diff --git a/README.md b/README.md index a67fabd..e2670d9 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,7 @@ module "ec2" { | [root\_block\_device](#input\_root\_block\_device) | volume config | `any` | `[]` | no | | [security\_group\_ids](#input\_security\_group\_ids) | security\_group\_ids | `list(string)` | `null` | no | | [server\_name](#input\_server\_name) | server\_name | `string` | `null` | no | +| [source\_dest\_check](#input\_source\_dest\_check) | source\_dest\_check | `bool` | `null` | no | | [subnet\_id](#input\_subnet\_id) | subnet\_id | `string` | `null` | no | | [user\_data\_path](#input\_user\_data\_path) | user\_data\_path | `string` | `null` | no | | [user\_data\_replace\_on\_change](#input\_user\_data\_replace\_on\_change) | recreate on user data change | `bool` | `true` | no | diff --git a/main.tf b/main.tf index 8cd0f3b..c1d7bef 100644 --- a/main.tf +++ b/main.tf @@ -45,6 +45,8 @@ module "ec2_instance" { private_ip = var.private_ip + source_dest_check = var.source_dest_check + ami = var.ami != null ? var.ami : data.aws_ami.ami.id instance_type = var.instance_type monitoring = var.monitoring diff --git a/variables.tf b/variables.tf index 208a5a4..81fcb2c 100644 --- a/variables.tf +++ b/variables.tf @@ -106,4 +106,10 @@ variable "architecture" { default = "x86_64" } +variable "source_dest_check" { + description = "source_dest_check" + type = bool + default = null +} +