input
listlengths 2
2
| ideal
stringclasses 4
values |
|---|---|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n<!--- Describe your changes in detail -->\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\n\r\n## Breaking Changes\r\n<!-- Does this break backwards compatibility with the current major version? -->\r\n<!-- If so, please provide an explanation why it is necessary. -->\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\n\n---\n\nChoice A:\nmain.tf\n@@ -324,13 +324,13 @@ resource \"aws_route_table\" \"intra\" {\n }\n \n ################\n-# Public subnet\n+# Public-App subnet\n ################\n-resource \"aws_subnet\" \"public\" {\n- count = var.create_vpc && length(var.public_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public_subnets) >= length(var.azs)) ? length(var.public_subnets) : 0\n+resource \"aws_subnet\" \"public-app\" {\n+ count = var.create_vpc && length(var.public-app_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public-app_subnets) >= length(var.azs)) ? length(var.public-app_subnets) : 0\n \n vpc_id = local.vpc_id\n- cidr_block = element(concat(var.public_subnets, [\"\"]), count.index)\n+ cidr_block = element(concat(var.public-app_subnets, [\"\"]), count.index)\n availability_zone = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) > 0 ? element(var.azs, count.index) : null\n availability_zone_id = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) == 0 ? element(var.azs, count.index) : null\n map_public_ip_on_launch = var.map_public_ip_on_launch\n@@ -341,13 +341,41 @@ resource \"aws_subnet\" \"public\" {\n tags = merge(\n {\n \"Name\" = format(\n- \"%s-${var.public_subnet_suffix}-%s\",\n+ \"%s-${var.public-app_subnet_suffix}-%s\",\n var.name,\n element(var.azs, count.index),\n )\n },\n var.tags,\n- var.public_subnet_tags,\n+ var.public-app_subnet_tags,\n+ )\n+}\n+\n+################\n+# Public-Network subnet\n+################\n+resource \"aws_subnet\" \"public-network\" {\n+ count = var.create_vpc && length(var.public-network_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public-network_subnets) >= length(var.azs)) ? length(var.public-network_subnets) : 0\n+\n+ vpc_id = local.vpc_id\n+ cidr_block = element(concat(var.public-network_subnets, [\"\"]), count.index)\n+ availability_zone = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) > 0 ? element(var.azs, count.index) : null\n+ availability_zone_id = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) == 0 ? element(var.azs, count.index) : null\n+ map_public_ip_on_launch = var.map_public_ip_on_launch\n+ assign_ipv6_address_on_creation = var.public_subnet_assign_ipv6_address_on_creation == null ? var.assign_ipv6_address_on_creation : var.public_subnet_assign_ipv6_address_on_creation\n+\n+ ipv6_cidr_block = var.enable_ipv6 && length(var.public_subnet_ipv6_prefixes) > 0 ? cidrsubnet(aws_vpc.this[0].ipv6_cidr_block, 8, var.public_subnet_ipv6_prefixes[count.index]) : null\n+\n+ tags = merge(\n+ {\n+ \"Name\" = format(\n+ \"%s-${var.public-network_subnet_suffix}-%s\",\n+ var.name,\n+ element(var.azs, count.index),\n+ )\n+ },\n+ var.tags,\n+ var.public-network_subnet_tags,\n )\n }\n \n---\noutputs.tf\n@@ -88,24 +88,44 @@ output \"private_subnets_ipv6_cidr_blocks\" {\n value = aws_subnet.private.*.ipv6_cidr_block\n }\n \n-output \"public_subnets\" {\n+output \"public-app_subnets\" {\n description = \"List of IDs of public subnets\"\n- value = aws_subnet.public.*.id\n+ value = aws_subnet.public-app.*.id\n }\n \n-output \"public_subnet_arns\" {\n+output \"public-network_subnets\" {\n+ description = \"List of IDs of public subnets\"\n+ value = aws_subnet.public-network.*.id\n+}\n+\n+output \"public-app_subnet_arns\" {\n+ description = \"List of ARNs of public subnets\"\n+ value = aws_subnet.public-app.*.arn\n+}\n+\n+output \"public-network_subnet_arns\" {\n description = \"List of ARNs of public subnets\"\n- value = aws_subnet.public.*.arn\n+ value = aws_subnet.public-network.*.arn\n }\n \n-output \"public_subnets_cidr_blocks\" {\n+output \"public-app_subnets_cidr_blocks\" {\n description = \"List of cidr_blocks of public subnets\"\n- value = aws_subnet.public.*.cidr_block\n+ value = aws_subnet.public-app.*.cidr_block\n+}\n+\n+output \"public-network_subnets_cidr_blocks\" {\n+ description = \"List of cidr_blocks of public subnets\"\n+ value = aws_subnet.public-network.*.cidr_block\n+}\n+\n+output \"public-app_subnets_ipv6_cidr_blocks\" {\n+ description = \"List of IPv6 cidr_blocks of public subnets in an IPv6 enabled VPC\"\n+ value = aws_subnet.public-app.*.ipv6_cidr_block\n }\n \n-output \"public_subnets_ipv6_cidr_blocks\" {\n+output \"public-network_subnets_ipv6_cidr_blocks\" {\n description = \"List of IPv6 cidr_blocks of public subnets in an IPv6 enabled VPC\"\n- value = aws_subnet.public.*.ipv6_cidr_block\n+ value = aws_subnet.public-network.*.ipv6_cidr_block\n }\n \n output \"database_subnets\" {\n---\nvariables.tf\n@@ -148,8 +148,14 @@ variable \"elasticache_subnet_suffix\" {\n default = \"elasticache\"\n }\n \n-variable \"public_subnets\" {\n- description = \"A list of public subnets inside the VPC\"\n+variable \"public-app_subnets\" {\n+ description = \"A list of public-app subnets inside the VPC\"\n+ type = list(string)\n+ default = []\n+}\n+\n+variable \"public-network_subnets\" {\n+ description = \"A list of public-network subnets inside the VPC\"\n type = list(string)\n default = []\n }\n@@ -1955,7 +1961,13 @@ variable \"igw_tags\" {\n default = {}\n }\n \n-variable \"public_subnet_tags\" {\n+variable \"public-app_subnet_tags\" {\n+ description = \"Additional tags for the public subnets\"\n+ type = map(string)\n+ default = {}\n+}\n+\n+variable \"public-network_subnet_tags\" {\n description = \"Additional tags for the public subnets\"\n type = map(string)\n default = {}\n---\n\n\n---\n\nChoice B:\nmain.tf\n@@ -324,13 +324,13 @@ resource \"aws_route_table\" \"intra\" {\n }\n \n ################\n-# Public subnet\n+# Public-App subnet\n ################\n-resource \"aws_subnet\" \"public\" {\n- count = var.create_vpc && length(var.public_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public_subnets) >= length(var.azs)) ? length(var.public_subnets) : 0\n+resource \"aws_subnet\" \"public-app\" {\n+ count = var.create_vpc && length(var.public-app_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public-app_subnets) >= length(var.azs)) ? length(var.public-app_subnets) : 0\n \n vpc_id = local.vpc_id\n- cidr_block = element(concat(var.public_subnets, [\"\"]), count.index)\n+ cidr_block = element(concat(var.public-app_subnets, [\"\"]), count.index)\n availability_zone = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) > 0 ? element(var.azs, count.index) : null\n availability_zone_id = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) == 0 ? element(var.azs, count.index) : null\n map_public_ip_on_launch = var.map_public_ip_on_launch\n@@ -341,13 +341,41 @@ resource \"aws_subnet\" \"public\" {\n tags = merge(\n {\n \"Name\" = format(\n- \"%s-${var.public_subnet_suffix}-%s\",\n+ \"%s-${var.public-app_subnet_suffix}-%s\",\n var.name,\n element(var.azs, count.index),\n )\n },\n var.tags,\n- var.public_subnet_tags,\n+ var.public-app_subnet_tags,\n+ )\n+}\n+\n+################\n+# Public-Network subnet\n+################\n+resource \"aws_subnet\" \"public-network\" {\n+ count = var.create_vpc && length(var.public-network_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public-network_subnets) >= length(var.azs)) ? length(var.public-network_subnets) : 0\n+\n+ vpc_id = local.vpc_id\n+ cidr_block = element(concat(var.public-network_subnets, [\"\"]), count.index)\n+ availability_zone = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) > 0 ? element(var.azs, count.index) : null\n+ availability_zone_id = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) == 0 ? element(var.azs, count.index) : null\n+ map_public_ip_on_launch = var.map_public_ip_on_launch\n+ assign_ipv6_address_on_creation = var.public_subnet_assign_ipv6_address_on_creation == null ? var.assign_ipv6_address_on_creation : var.public_subnet_assign_ipv6_address_on_creation\n+\n+ ipv6_cidr_block = && length(var.public_subnet_ipv6_prefixes) > 0 ? cidrsubnet(aws_vpc.this[0].ipv6_cidr_block, 8, var.public_subnet_ipv6_prefixes[count.index]) : null\n+\n+ tags = merge(\n+ {\n+ \"Name\" = format(\n+ \"%s-${var.public-network_subnet_suffix}-%s\",\n+ var.name,\n+ element(var.azs, count.index),\n+ )\n+ },\n+ var.tags,\n+ var.public-network_subnet_tags,\n )\n }\n \n---\noutputs.tf\n@@ -88,24 +88,44 @@ output \"private_subnets_ipv6_cidr_blocks\" {\n value = aws_subnet.private.*.ipv6_cidr_block\n }\n \n-output \"public_subnets\" {\n+output \"public-app_subnets\" {\n description = \"List of IDs of public subnets\"\n- value = aws_subnet.public.*.id\n+ value = aws_subnet.public-app.*.id\n }\n \n-output \"public_subnet_arns\" {\n+output \"public-network_subnets\" {\n+ description = \"List of IDs of public subnets\"\n+ value = aws_subnet.public-network.*.id\n+}\n+\n+output \"public-app_subnet_arns\" {\n+ description = \"List of ARNs of public subnets\"\n+ value = aws_subnet.public-app.*.arn\n+}\n+\n+output \"public-network_subnet_arns\" {\n description = \"List of ARNs of public subnets\"\n- value = aws_subnet.public.*.arn\n+ value = aws_subnet.public-network.*.arn\n }\n \n-output \"public_subnets_cidr_blocks\" {\n+output \"public-app_subnets_cidr_blocks\" {\n description = \"List of cidr_blocks of public subnets\"\n- value = aws_subnet.public.*.cidr_block\n+ value = aws_subnet.public-app.*.cidr_block\n+}\n+\n+output \"public-network_subnets_cidr_blocks\" {\n+ description = \"List of cidr_blocks of public subnets\"\n+ value = aws_subnet.public-network.*.cidr_block\n+}\n+\n+output \"public-app_subnets_ipv6_cidr_blocks\" {\n+ description = \"List of IPv6 cidr_blocks of public subnets in an IPv6 enabled VPC\"\n+ value = aws_subnet.public-app.*.ipv6_cidr_block\n }\n \n-output \"public_subnets_ipv6_cidr_blocks\" {\n+output \"public-network_subnets_ipv6_cidr_blocks\" {\n description = \"List of IPv6 cidr_blocks of public subnets in an IPv6 enabled VPC\"\n- value = aws_subnet.public.*.ipv6_cidr_block\n+ value = aws_subnet.public-network.*.ipv6_cidr_block\n }\n \n output \"database_subnets\" {\n---\nvariables.tf\n@@ -148,8 +148,14 @@ variable \"elasticache_subnet_suffix\" {\n default = \"elasticache\"\n }\n \n-variable \"public_subnets\" {\n- description = \"A list of public subnets inside the VPC\"\n+variable \"public-app_subnets\" {\n+ description = \"A list of public-app subnets inside the VPC\"\n+ type = list(string)\n+ default = []\n+}\n+\n+variable \"public-network_subnets\" {\n+ description = \"A list of public-network subnets inside the VPC\"\n type = list(string)\n default = []\n }\n@@ -1955,7 +1961,13 @@ variable \"igw_tags\" {\n default = {}\n }\n \n-variable \"public_subnet_tags\" {\n+variable \"public-app_subnet_tags\" {\n+ description = \"Additional tags for the public subnets\"\n+ type = map(string)\n+ default = {}\n+}\n+\n+variable \"public-network_subnet_tags\" {\n description = \"Additional tags for the public subnets\"\n type = map(string)\n default = {}\n---\n\n\n---\n\nChoice C:\nmain.tf\n@@ -324,13 +324,13 @@ resource \"aws_route_table\" \"intra\" {\n }\n \n ################\n-# Public subnet\n+# Public-App subnet\n ################\n-resource \"aws_subnet\" \"public\" {\n- count = var.create_vpc && length(var.public_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public_subnets) >= length(var.azs)) ? length(var.public_subnets) : 0\n+resource \"aws_subnet\" \"public-app\" {\n+ count = var.create_vpc && length(var.public-app_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public-app_subnets) >= length(var.azs)) ? length(var.public-app_subnets) : 0\n \n vpc_id = local.vpc_id\n- cidr_block = element(concat(var.public_subnets, [\"\"]), count.index)\n+ cidr_block = element(concat(var.public-app_subnets, [\"\"]), count.index)\n availability_zone = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) > 0 ? element(var.azs, count.index) : null\n availability_zone_id = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) == 0 ? element(var.azs, count.index) : null\n map_public_ip_on_launch = var.map_public_ip_on_launch\n@@ -341,13 +341,41 @@ resource \"aws_subnet\" \"public\" {\n tags = merge(\n {\n \"Name\" = format(\n- \"%s-${var.public_subnet_suffix}-%s\",\n+ \"%s-${var.public-app_subnet_suffix}-%s\",\n var.name,\n element(var.azs, count.index),\n )\n },\n var.tags,\n- var.public_subnet_tags,\n+ var.public-app_subnet_tags,\n+ )\n+}\n+\n+################\n+# Public-Network subnet\n+################\n+resource \"aws_subnet\" \"public-network\" {\n+ count = var.create_vpc && length(var.public-network_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public-network_subnets) >= length(var.azs)) ? length(var.public-network_subnets) : 0\n+\n+ vpc_id = local.vpc_id\n+ cidr_block = element(concat(var.public-network_subnets, [\"\"]), count.index)\n+ availability_zone = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) > 0 ? element(var.azs, count.index) : null\n+ availability_zone_id = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) == 0 ? element(var.azs, count.index) : null\n+ map_public_ip_on_launch = var.map_public_ip_on_launch\n+ assign_ipv6_address_on_creation = var.public_subnet_assign_ipv6_address_on_creation == null ? var.assign_ipv6_address_on_creation : var.public_subnet_assign_ipv6_address_on_creation\n+\n+ ipv6_cidr_block = var.enable_ipv6 && length(var.public_subnet_ipv6_prefixes) > 0 ? cidrsubnet(aws_vpc.this[0].ipv6_cidr_block, 8, var.public_subnet_ipv6_prefixes[count.index]) : null\n+\n+ tags = merge(\n+ {\n+ \"Name\" = format(\n+ \"%s-${var.public-network_subnet_suffix}-%s\",\n+ var.name,\n+ element(var.azs, count.index),\n+ )\n+ },\n+ var.tags,\n+ var.public-network_subnet_tags,\n )\n }\n \n---\noutputs.tf\n@@ -88,24 +88,44 @@ output \"private_subnets_ipv6_cidr_blocks\" {\n value = aws_subnet.private.*.ipv6_cidr_block\n }\n \n-output \"public_subnets\" {\n+output \"public-app_subnets\" {\n description = \"List of IDs of public subnets\"\n- value = aws_subnet.public.*.id\n+ value = aws_subnet.public-app.*.id\n }\n \n-output \"public_subnet_arns\" {\n+output \"public-network_subnets\" {\n+ description = \"List of IDs of public subnets\"\n+ value = aws_subnet.public-network.*.id\n+}\n+\n+output \"public-app_subnet_arns\" {\n+ description = \"List of ARNs of public subnets\"\n+ value = aws_subnet.public-app.*.arn\n+}\n+\n+output \"public-network_subnet_arns\" {\n description = \"List of ARNs of public subnets\"\n- value = aws_subnet.public.*.arn\n+ value = aws_subnet.public-network.*.arn\n }\n \n-output \"public_subnets_cidr_blocks\" {\n+output \"public-app_subnets_cidr_blocks\" {\n description = \"List of cidr_blocks of public subnets\"\n- value = aws_subnet.public.*.cidr_block\n+ value = aws_subnet.public-app.*.cidr_block\n+}\n+\n+output \"public-network_subnets_cidr_blocks\" {\n+ description = \"List of cidr_blocks of public subnets\"\n+ value = aws_subnet.public-network.*.cidr_block\n+}\n+\n+output \"public-app_subnets_ipv6_cidr_blocks\" {\n+ description = \"List of IPv6 cidr_blocks of public subnets in an IPv6 enabled VPC\"\n+ value = aws_subnet.public-app.*.ipv6_cidr_block\n }\n \n-output \"public_subnets_ipv6_cidr_blocks\" {\n+output \"public-network_subnets_ipv6_cidr_blocks\" {\n description = \"List of IPv6 cidr_blocks of public subnets in an IPv6 enabled VPC\"\n- value = aws_subnet.public.*.ipv6_cidr_block\n+ value = aws_subnet.public-network.*.ipv6_cidr_block\n }\n \n output \"database_subnets\" {\n---\nvariables.tf\n@@ -148,8 +148,14 @@ variable \"elasticache_subnet_suffix\" {\n default = \"elasticache\"\n }\n \n-variable \"public_subnets\" {\n- description = \"A list of public subnets inside the VPC\"\n+variable \"public-app_subnets\" {\n+ description = \"A list of public-app subnets inside the VPC\"\n+ type = list(string)\n+ default = []\n+}\n+\n+variable \"public-network_subnets\" {\n+ description = \"A list of public-network subnets inside the VPC\"\n type = list(string)\n default = []\n }\n@@ -1955,7 +1961,13 @@ variable \"igw_tags\" {\n default = {}\n }\n \n-variable \"public_subnet_tags\" {\n+variable \"public-app_subnet_tags\" {\n+ description = \"Additional tags for the public subnets\"\n+ type = map(string)\n+ default = {}\n+}\n+\n+variable \"public-network_subnet_tags\" {\n description = \"Additional tags for the public subnets\"\n type = map(string)\n default = {}\n---\n\n\n---\n\nChoice D:\nmain.tf\n@@ -324,13 +324,13 @@ resource \"aws_route_table\" \"intra\" {\n }\n \n ################\n-# Public subnet\n+# Public-App subnet\n ################\n-resource \"aws_subnet\" \"public\" {\n- count = var.create_vpc && length(var.public_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public_subnets) >= length(var.azs)) ? length(var.public_subnets) : 0\n+resource \"aws_subnet\" \"public-app\" {\n+ count = var.create_vpc && length(var.public-app_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public-app_subnets) >= length(var.azs)) ? length(var.public-app_subnets) : 0\n \n vpc_id = local.vpc_id\n- cidr_block = element(concat(var.public_subnets, [\"\"]), count.index)\n+ cidr_block = element(concat(var.public-app_subnets, [\"\"]), count.index)\n availability_zone = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) > 0 ? element(var.azs, count.index) : null\n availability_zone_id = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) == 0 ? element(var.azs, count.index) : null\n map_public_ip_on_launch = var.map_public_ip_on_launch\n@@ -341,13 +341,41 @@ resource \"aws_subnet\" \"public\" {\n tags = merge(\n {\n \"Name\" = format(\n- \"%s-${var.public_subnet_suffix}-%s\",\n+ \"%s-${var.public-app_subnet_suffix}-%s\",\n var.name,\n element(var.azs, count.index),\n )\n },\n var.tags,\n- var.public_subnet_tags,\n+ var.public-app_subnet_tags,\n+ )\n+}\n+\n+################\n+# Public-Network subnet\n+################\n+resource \"aws_subnet\" \"public-network\" {\n+ count = var.create_vpc && length(var.public-network_subnets) > 0 && (false == var.one_nat_gateway_per_az || length(var.public-network_subnets) >= length(var.azs)) ? length(var.public-network_subnets) : 0\n+\n+ -341,13 vpc_id = local.vpc_id\n+ cidr_block = element(concat(var.public-network_subnets, [\"\"]), count.index)\n+ availability_zone = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) > 0 ? element(var.azs, count.index) : null\n+ availability_zone_id = length(regexall(\"^[a-z]{2}-\", element(var.azs, count.index))) == 0 ? element(var.azs, count.index) : null\n+ map_public_ip_on_launch = var.map_public_ip_on_launch\n+ assign_ipv6_address_on_creation = var.public_subnet_assign_ipv6_address_on_creation == null ? var.assign_ipv6_address_on_creation : var.public_subnet_assign_ipv6_address_on_creation\n+\n+ ipv6_cidr_block = var.enable_ipv6 && length(var.public_subnet_ipv6_prefixes) > 0 ? cidrsubnet(aws_vpc.this[0].ipv6_cidr_block, 8, var.public_subnet_ipv6_prefixes[count.index]) : null\n+\n+ tags = merge(\n+ {\n+ \"Name\" = format(\n+ \"%s-${var.public-network_subnet_suffix}-%s\",\n+ var.name,\n+ element(var.azs, count.index),\n+ )\n+ },\n+ var.tags,\n+ var.public-network_subnet_tags,\n )\n }\n \n---\noutputs.tf\n@@ -88,24 +88,44 @@ output \"private_subnets_ipv6_cidr_blocks\" {\n value = aws_subnet.private.*.ipv6_cidr_block\n }\n \n-output \"public_subnets\" {\n+output \"public-app_subnets\" {\n description = \"List of IDs of public subnets\"\n- value = aws_subnet.public.*.id\n+ value = aws_subnet.public-app.*.id\n }\n \n-output \"public_subnet_arns\" {\n+output \"public-network_subnets\" {\n+ description = \"List of IDs of public subnets\"\n+ value = aws_subnet.public-network.*.id\n+}\n+\n+output \"public-app_subnet_arns\" {\n+ description = \"List of ARNs of public subnets\"\n+ value = aws_subnet.public-app.*.arn\n+}\n+\n+output \"public-network_subnet_arns\" {\n description = \"List of ARNs of public subnets\"\n- value = aws_subnet.public.*.arn\n+ value = aws_subnet.public-network.*.arn\n }\n \n-output \"public_subnets_cidr_blocks\" {\n+output \"public-app_subnets_cidr_blocks\" {\n description = \"List of cidr_blocks of public subnets\"\n- value = aws_subnet.public.*.cidr_block\n+ value = aws_subnet.public-app.*.cidr_block\n+}\n+\n+output \"public-network_subnets_cidr_blocks\" {\n+ description = \"List of cidr_blocks of public subnets\"\n+ value = aws_subnet.public-network.*.cidr_block\n+}\n+\n+output \"public-app_subnets_ipv6_cidr_blocks\" {\n+ description = \"List of IPv6 cidr_blocks of public subnets in an IPv6 enabled VPC\"\n+ value = aws_subnet.public-app.*.ipv6_cidr_block\n }\n \n-output \"public_subnets_ipv6_cidr_blocks\" {\n+output \"public-network_subnets_ipv6_cidr_blocks\" {\n description = \"List of IPv6 cidr_blocks of public subnets in an IPv6 enabled VPC\"\n- value = aws_subnet.public.*.ipv6_cidr_block\n+ value = aws_subnet.public-network.*.ipv6_cidr_block\n }\n \n output \"database_subnets\" {\n---\nvariables.tf\n@@ -148,8 +148,14 @@ variable \"elasticache_subnet_suffix\" {\n default = \"elasticache\"\n }\n \n-variable \"public_subnets\" {\n- description = \"A list of public subnets inside the VPC\"\n+variable \"public-app_subnets\" {\n+ description = \"A list of public-app subnets inside the VPC\"\n+ type = list(string)\n+ default = []\n+}\n+\n+variable \"public-network_subnets\" {\n+ description = \"A list of public-network subnets inside the VPC\"\n type = list(string)\n default = []\n }\n@@ -1955,7 +1961,13 @@ variable \"igw_tags\" {\n default = {}\n }\n \n-variable \"public_subnet_tags\" {\n+variable \"public-app_subnet_tags\" {\n+ description = \"Additional tags for the public subnets\"\n+ type = map(string)\n+ default = {}\n+}\n+\n+variable \"public-network_subnet_tags\" {\n description = \"Additional tags for the public subnets\"\n type = map(string)\n default = {}\n---\n\n\n---\n"
}
] |
A
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\nFixes #551 \r\nChanges the descriptions of \r\ndefault_vpc_id\r\ndefault_vpc_arn\r\ndefault_vpc_cidr_block\r\ndefault_vpc_default_network_acl_id\r\ndefault_vpc_route_tabnle_id\r\ndefault_vpc_security_group_id\r\ndefault_vpc_enable_dns_hostnames\r\ndefault_vpc_enable_dns_support\r\ndefault_vpc_instance_tenancy\r\ndefault_vpc_main_route_table_id\r\nin both README.md and outputs.tf to avoid confusion.\n\n---\n\nChoice A:\nREADME.md\n@@ -673,16 +673,16 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | default\\_network\\_acl\\_id | The ID of the default network ACL |\n | default\\_route\\_table\\_id | The ID of the default route table |\n | default\\_security\\_group\\_id | The ID of the security group created by default on VPC creation |\n-| default\\_vpc\\_arn | The ARN of the VPC |\n-| default\\_vpc\\_cidr\\_block | The CIDR block of the VPC |\n-| default\\_vpc\\_default\\_network\\_acl\\_id | The ID of the default network ACL |\n-| default\\_vpc\\_default\\_route\\_table\\_id | The ID of the default route table |\n-| default\\_vpc\\_default\\_security\\_group\\_id | The ID of the security group created by default on VPC creation |\n-| default\\_vpc\\_enable\\_dns\\_hostnames | Whether or not the VPC has DNS hostname support |\n-| default\\_vpc\\_enable\\_dns\\_support | Whether or not the VPC has DNS support |\n-| default\\_vpc\\_id | The ID of the VPC |\n-| default\\_vpc\\_instance\\_tenancy | Tenancy of instances spin up within VPC |\n-| default\\_vpc\\_main\\_route\\_table\\_id | The ID of the main route table associated with this VPC |\n+| default\\_vpc\\_arn | The ARN of the Default VPC |\n+| default\\_vpc\\_cidr\\_block | The CIDR block of the Default VPC |\n+| default\\_vpc\\_default\\_network\\_acl\\_id | The ID of the default network ACL of the Default VPC |\n+| default\\_vpc\\_default\\_route\\_table\\_id | The ID of the default route table of the Default VPC |\n+| default\\_vpc\\_default\\_security\\_group\\_id | The ID of the security group created by default on Default VPC creation |\n+| default\\_vpc\\_enable\\_dns\\_hostnames | Whether or not the Default VPC has DNS hostname support |\n+| default\\_vpc\\_enable\\_dns\\_support | Whether or not the Default VPC has DNS support |\n+| default\\_vpc\\_id | The ID of the Default VPC |\n+| default\\_vpc\\_instance\\_tenancy | Tenancy of instances spin up within Default VPC |\n+| default\\_vpc\\_main\\_route\\_table\\_id | The ID of the main route table associated with the Default VPC |\n | egress\\_only\\_internet\\_gateway\\_id | The ID of the egress only Internet Gateway |\n | elasticache\\_network\\_acl\\_arn | ARN of the elasticache network ACL |\n | elasticache\\_network\\_acl\\_id | ID of the elasticache network ACL |\n---\noutputs.tf\n@@ -368,52 +368,52 @@ output \"vgw_arn\" {\n }\n \n output \"default_vpc_id\" {\n- description = \"The ID of the VPC\"\n+ description = \"The ID of the Default VPC\"\n value = concat(aws_default_vpc.this.*.id, [\"\"])[0]\n }\n \n output \"default_vpc_arn\" {\n- description = \"The ARN of the VPC\"\n+ description = \"The ARN of the Default VPC\"\n value = concat(aws_default_vpc.this.*.arn, [\"\"])[0]\n }\n \n output \"default_vpc_cidr_block\" {\n- description = \"The CIDR block of the VPC\"\n+ description = \"The CIDR block of the Default VPC\"\n value = concat(aws_default_vpc.this.*.cidr_block, [\"\"])[0]\n }\n \n output \"default_vpc_default_security_group_id\" {\n- description = \"The ID of the security group created by default on VPC creation\"\n+ description = \"The ID of the security group created by default on Default VPC creation\"\n value = concat(aws_default_vpc.this.*.default_security_group_id, [\"\"])[0]\n }\n \n output \"default_vpc_default_network_acl_id\" {\n- description = \"The ID of the default network ACL\"\n+ description = \"The ID of the default network ACL of the Default VPC\"\n value = concat(aws_default_vpc.this.*.default_network_acl_id, [\"\"])[0]\n }\n \n output \"default_vpc_default_route_table_id\" {\n- description = \"The ID of the default route table\"\n+ description = \"The ID of the default route table of the Default VPC\"\n value = concat(aws_default_vpc.this.*.default_route_table_id, [\"\"])[0]\n }\n \n output \"default_vpc_instance_tenancy\" {\n- description = \"Tenancy of instances spin up within VPC\"\n+ description = \"Tenancy of instances spin up within Default VPC\"\n value = concat(aws_default_vpc.this.*.instance_tenancy, [\"\"])[0]\n }\n \n output \"default_vpc_enable_dns_support\" {\n- description = \"Whether or not the VPC has DNS support\"\n+ description = \"Whether or not the Default VPC has DNS support\"\n value = concat(aws_default_vpc.this.*.enable_dns_support, [\"\"])[0]\n }\n \n output \"default_vpc_enable_dns_hostnames\" {\n- description = \"Whether or not the VPC has DNS hostname support\"\n+ description = \"Whether or not the Default VPC has DNS hostname support\"\n value = concat(aws_default_vpc.this.*.enable_dns_hostnames, [\"\"])[0]\n }\n \n output \"default_vpc_main_route_table_id\" {\n- description = \"The ID of the main route table associated with this VPC\"\n+ description = \"The ID of the main route table associated with the Default VPC\"\n value = concat(aws_default_vpc.this.*.main_route_table_id, [\"\"])[0]\n }\n \n---\n\n\n---\n\nChoice B:\nREADME.md\n@@ -673,16 +673,16 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | default\\_network\\_acl\\_id | The ID of the default network ACL |\n | default\\_route\\_table\\_id | The ID of the default route table |\n | default\\_security\\_group\\_id | The ID of the security group created by default on VPC creation |\n-| default\\_vpc\\_arn | The ARN of the VPC |\n-| default\\_vpc\\_cidr\\_block | The CIDR block of the VPC |\n-| default\\_vpc\\_default\\_network\\_acl\\_id | The ID of the default network ACL |\n-| default\\_vpc\\_default\\_route\\_table\\_id | The ID of the default route table |\n-| default\\_vpc\\_default\\_security\\_group\\_id | The ID of the security group created by default on VPC creation |\n-| default\\_vpc\\_enable\\_dns\\_hostnames | Whether or not the VPC has DNS hostname support |\n-| default\\_vpc\\_enable\\_dns\\_support | Whether or not the VPC has DNS support |\n-| default\\_vpc\\_id | The ID of the VPC |\n-| default\\_vpc\\_instance\\_tenancy | Tenancy of instances spin up within VPC |\n-| default\\_vpc\\_main\\_route\\_table\\_id | The ID of the main route table associated with this VPC |\n+| default\\_vpc\\_arn | The ARN of the Default VPC |\n+| default\\_vpc\\_cidr\\_block | The CIDR block of the Default VPC |\n+| default\\_vpc\\_default\\_network\\_acl\\_id | The ID of the default network ACL of the Default VPC |\n+| default\\_vpc\\_default\\_route\\_table\\_id | The ID of the default route table of the Default VPC |\n+| default\\_vpc\\_default\\_security\\_group\\_id | The ID of the security group created by default on Default VPC creation |\n+| default\\_vpc\\_enable\\_dns\\_hostnames | Whether or not the Default VPC has DNS hostname support |\n+| default\\_vpc\\_enable\\_dns\\_support | Whether or not the Default VPC has DNS support |\n+| default\\_vpc\\_id | The ID of the Default VPC |\n+| default\\_vpc\\_instance\\_tenancy | Tenancy of instances spin up within Default VPC |\n+| default\\_vpc\\_main\\_route\\_table\\_id | The ID \n the main route table associated with the Default VPC |\n | egress\\_only\\_internet\\_gateway\\_id | The ID of the egress only Internet Gateway |\n | elasticache\\_network\\_acl\\_arn | ARN of the elasticache network ACL |\n | elasticache\\_network\\_acl\\_id | ID of the elasticache network ACL |\n---\noutputs.tf\n@@ -368,52 +368,52 @@ output \"vgw_arn\" {\n }\n \n output \"default_vpc_id\" {\n- description = \"The ID of the VPC\"\n+ description = \"The ID of the Default VPC\"\n value = concat(aws_default_vpc.this.*.id, [\"\"])[0]\n }\n \n output \"default_vpc_arn\" {\n- description = \"The ARN of the VPC\"\n+ description = \"The ARN of the Default VPC\"\n value = concat(aws_default_vpc.this.*.arn, [\"\"])[0]\n }\n \n output \"default_vpc_cidr_block\" {\n- description = \"The CIDR block of the VPC\"\n+ description = \"The CIDR block of the Default VPC\"\n value = concat(aws_default_vpc.this.*.cidr_block, [\"\"])[0]\n }\n \n output \"default_vpc_default_security_group_id\" {\n- description = \"The ID of the security group created by default on VPC creation\"\n+ description = \"The ID of the security group created by default on Default VPC creation\"\n value = concat(aws_default_vpc.this.*.default_security_group_id, [\"\"])[0]\n }\n \n output \"default_vpc_default_network_acl_id\" {\n- description = \"The ID of the default network ACL\"\n+ description = \"The ID of the default network ACL of the Default VPC\"\n value = concat(aws_default_vpc.this.*.default_network_acl_id, [\"\"])[0]\n }\n \n output \"default_vpc_default_route_table_id\" {\n- description = \"The ID of the default route table\"\n+ description = \"The ID of the default route table of the Default VPC\"\n value = concat(aws_default_vpc.this.*.default_route_table_id, [\"\"])[0]\n }\n \n output \"default_vpc_instance_tenancy\" {\n- description = \"Tenancy of instances spin up within VPC\"\n+ description = \"Tenancy of instances spin up within Default VPC\"\n value = concat(aws_default_vpc.this.*.instance_tenancy, [\"\"])[0]\n }\n \n output \"default_vpc_enable_dns_support\" {\n- description = \"Whether or not the VPC has DNS support\"\n+ description = \"Whether or not the Default VPC has DNS support\"\n value = concat(aws_default_vpc.this.*.enable_dns_support, [\"\"])[0]\n }\n \n output \"default_vpc_enable_dns_hostnames\" {\n- description = \"Whether or not the VPC has DNS hostname support\"\n+ description = \"Whether or not the Default VPC has DNS hostname support\"\n value = concat(aws_default_vpc.this.*.enable_dns_hostnames, [\"\"])[0]\n }\n \n output \"default_vpc_main_route_table_id\" {\n- description = \"The ID of the main route table associated with this VPC\"\n+ description = \"The ID of the main route table associated with the Default VPC\"\n value = concat(aws_default_vpc.this.*.main_route_table_id, [\"\"])[0]\n }\n \n---\n\n\n---\n\nChoice C:\nREADME.md\n@@ -673,16 +673,16 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | default\\_network\\_acl\\_id | The ID of the default network ACL |\n | default\\_route\\_table\\_id | The ID of the default route table |\n | default\\_security\\_group\\_id | The ID of the security group created by default on VPC creation |\n-| default\\_vpc\\_arn | The ARN of the VPC |\n-| default\\_vpc\\_cidr\\_block | The CIDR block of the VPC |\n-| default\\_vpc\\_default\\_network\\_acl\\_id | The ID of the default network ACL |\n-| default\\_vpc\\_default\\_route\\_table\\_id | The ID of the default route table |\n-| default\\_vpc\\_default\\_security\\_group\\_id | The ID of the security group created by default on VPC creation |\n-| default\\_vpc\\_enable\\_dns\\_hostnames | Whether or not the VPC has DNS hostname support |\n-| default\\_vpc\\_enable\\_dns\\_support | Whether or not the VPC has DNS support |\n-| default\\_vpc\\_id | The ID of the VPC |\n-| default\\_vpc\\_instance\\_tenancy | Tenancy of instances spin up within VPC |\n-| default\\_vpc\\_main\\_route\\_table\\_id | The ID of the main route table associated with this VPC |\n+| default\\_vpc\\_arn | The ARN of the Default VPC |\n+| default\\_vpc\\_cidr\\_block | The CIDR block of the Default VPC |\n+| default\\_vpc\\_default\\_network\\_acl\\_id | The ID of the default network ACL of the Default VPC |\n+| default\\_vpc\\_default\\_route\\_table\\_id | The ID of the default route table of the Default VPC |\n+| default\\_vpc\\_default\\_security\\_group\\_id | The ID of the security group created by default on Default VPC creation |\n+| default\\_vpc\\_enable\\_dns\\_hostnames | Whether or not the Default VPC has DNS hostname support |\n+| default\\_vpc\\_enable\\_dns\\_support | Whether or not the Default VPC has DNS support |\n+| default\\_vpc\\_id | The ID of the Default VPC |\n+| default\\_vpc\\_instance\\_tenancy | Tenancy of instances spin up within Default VPC |\n+| default\\_vpc\\_main\\_route\\_table\\_id | The ID of the main route table associated with the Default VPC |\n | egress\\_only\\_internet\\_gateway\\_id | The ID of the egress only Internet Gateway |\n | elasticache\\_network\\_acl\\_arn | ARN of the elasticache network ACL |\n | elasticache\\_network\\_acl\\_id | ID of the elasticache network ACL |\n---\noutputs.tf\n@@ -368,52 +368,52 @@ output \"vgw_arn\" {\n }\n \n output \"default_vpc_id\" {\n- description = \"The ID of the VPC\"\n+ description = \"The ID of the Default VPC\"\n value = concat(aws_default_vpc.this.*.id, [\"\"])[0]\n }\n \n output \"default_vpc_arn\" {\n- description = \"The ARN of the VPC\"\n+ description = \"The ARN of the Default VPC\"\n value = concat(aws_default_vpc.this.*.arn, [\"\"])[0]\n }\n \n output \"default_vpc_cidr_block\" {\n- description = \"The CIDR block of the VPC\"\n+ description = \"The CIDR block of the Default VPC\"\n value = concat(aws_default_vpc.this.*.cidr_block, [\"\"])[0]\n }\n \n output \"default_vpc_default_security_group_id\" {\n- description = \"The ID of the security group created by default on VPC creation\"\n+ description = \"The ID of the security group created by default on Default VPC creation\"\n value = concat(aws_default_vpc.this.*.default_security_group_id, [\"\"])[0]\n }\n \n output \"default_vpc_default_network_acl_id\" {\n- description = \"The ID of the default network ACL\"\n+ description = \"The ID of the default network ACL of the Default VPC\"\n value = concat(aws_default_vpc.this.*.default_network_acl_id, [\"\"])[0]\n }\n \n output \"default_vpc_default_route_table_id\" {\n- description = \"The ID of the default route table\"\n+ description = \"The ID of the default route table of the Default VPC\"\n value The = concat(aws_default_vpc.this.*.default_route_table_id, [\"\"])[0]\n }\n \n output \"default_vpc_instance_tenancy\" {\n- description = \"Tenancy of instances spin up within VPC\"\n+ description = \"Tenancy of instances spin up within Default VPC\"\n value = concat(aws_default_vpc.this.*.instance_tenancy, [\"\"])[0]\n }\n \n output \"default_vpc_enable_dns_support\" {\n- description = \"Whether or not the VPC has DNS support\"\n+ description = \"Whether or not the Default VPC has DNS support\"\n value = concat(aws_default_vpc.this.*.enable_dns_support, [\"\"])[0]\n }\n \n output \"default_vpc_enable_dns_hostnames\" {\n- description = \"Whether or not the VPC has DNS hostname support\"\n+ description = \"Whether or not the Default VPC has DNS hostname support\"\n value = concat(aws_default_vpc.this.*.enable_dns_hostnames, [\"\"])[0]\n }\n \n output \"default_vpc_main_route_table_id\" {\n- description = \"The ID of the main route table associated with this VPC\"\n+ description = \"The ID of the main route table associated with the Default VPC\"\n value = concat(aws_default_vpc.this.*.main_route_table_id, [\"\"])[0]\n }\n \n---\n\n\n---\n\nChoice D:\nREADME.md\n@@ -673,16 +673,16 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | default\\_network\\_acl\\_id | The ID of the default network ACL |\n | default\\_route\\_table\\_id | The ID of the default route table |\n | default\\_security\\_group\\_id | The ID of the security group created by default on VPC creation |\n-| default\\_vpc\\_arn | The ARN of the VPC |\n-| default\\_vpc\\_cidr\\_block | The CIDR block of the VPC |\n-| default\\_vpc\\_default\\_network\\_acl\\_id | The ID of the default network ACL |\n-| default\\_vpc\\_default\\_route\\_table\\_id | The ID of the default route table |\n-| default\\_vpc\\_default\\_security\\_group\\_id | The ID of the security group created by default on VPC creation |\n-| default\\_vpc\\_enable\\_dns\\_hostnames | Whether or not the VPC has DNS hostname support |\n-| default\\_vpc\\_enable\\_dns\\_support | Whether or not the VPC has DNS support |\n-| default\\_vpc\\_id | The ID of the VPC |\n-| default\\_vpc\\_instance\\_tenancy | Tenancy of instances spin up within VPC |\n-| default\\_vpc\\_main\\_route\\_table\\_id | The ID of the main route table associated with this VPC |\n+| default\\_vpc\\_arn | The ARN of the Default VPC |\n+| default\\_vpc\\_cidr\\_block | The CIDR block of the Default VPC |\n+| default\\_vpc\\_default\\_network\\_acl\\_id | The ID of the default network ACL of the Default VPC |\n+| default\\_vpc\\_default\\_route\\_table\\_id | The ID of the default route table of the Default VPC |\n+| default\\_vpc\\_default\\_security\\_group\\_id | The ID of the security group created by default on Default VPC creation |\n+| default\\_vpc\\_enable\\_dns\\_hostnames | Whether or not the Default VPC has DNS hostname support |\n+| default\\_vpc\\_enable\\_dns\\_support | Whether or not the Default VPC has DNS support |\n+| default\\_vpc\\_id | The ID of the Default VPC |\n+| default\\_vpc\\_instance\\_tenancy | Tenancy of instances spin up within Default VPC |\n+| default\\_vpc\\_main\\_route\\_table\\_id | The ID of the main route table associated with the Default VPC |\n | egress\\_only\\_internet\\_gateway\\_id | The ID of the egress only Internet Gateway |\n | elasticache\\_network\\_acl\\_arn | ARN of the elasticache network ACL |\n | elasticache\\_network\\_acl\\_id | ID of the elasticache network ACL |\n---\noutputs.tf\n@@ -368,52 +368,52 @@ output \"vgw_arn\" {\n }\n \n output \"default_vpc_id\" {\n- description = \"The ID of the VPC\"\n+ description = \"The ID of the Default VPC\"\n value = concat(aws_default_vpc.this.*.id, [\"\"])[0]\n }\n \n output \"default_vpc_arn\" {\n- description = \"The ARN of the VPC\"\n+ description = \"The ARN of the Default VPC\"\n value = concat(aws_default_vpc.this.*.arn, [\"\"])[0]\n }\n \n output \"default_vpc_cidr_block\" {\n- description = \"The CIDR block of the VPC\"\n+ description = \"The CIDR block of the Default VPC\"\n value = concat(aws_default_vpc.this.*.cidr_block, [\"\"])[0]\n }\n \n output \"default_vpc_default_security_group_id\" {\n- description = \"The ID of the security group created by default on VPC creation\"\n+ description = \"The ID of the security group created by default on Default VPC creation\"\n value = concat(aws_default_vpc.this.*.default_security_group_id, [\"\"])[0]\n }\n \n output \"default_vpc_default_network_acl_id\" {\n- description = \"The ID of the default network ACL\"\n+ description = \"The ID of the default network ACL of the Default VPC\"\n value = concat(aws_default_vpc.this.*.default_network_acl_id, [\"\"])[0]\n }\n \n output \"default_vpc_default_route_table_id\" {\n- description = \"The ID of the default route table\"\n+ description = \"The ID of the default route table of the Default VPC\"\n value = concat(aws_default_vpc.this.*.default_route_table_id, [\"\"])[0]\n }\n \n output \"default_vpc_instance_tenancy\" {\n- description = \"Tenancy of instances spin up within VPC\"\n+ description = \"Tenancy of instances spin up within Default VPC\"\n value = concat(aws_default_vpc.this.*.instance_tenancy, [\"\"])[0]\n }\n \n output \"default_vpc_enable_dns_support\" {\n- description = \"Whether or not the VPC has DNS support\"\n+ description = \"Whether or not the Default VPC has DNS support\"\n value = concat(aws_default_vpc.this.*.enable_dns_support, [\"\"])[0]\n }\n \n output \"default_vpc_enable_dns_hostnames\" {\n- description = \"Whether or not the VPC has DNS hostname support\"\n+ description = \"Whether or not the Default VPC has DNS hostname support\"\n value = concat(aws_default_vpc.this.*.enable_dns_hostnames, [\"\"])[0]\n }\n \n output \"default_vpc_main_route_table_id\" {\n- description = \"The ID of the main route table associated with this VPC\"\n+ description = \"The ID of the main route \n associated with the Default VPC\"\n value = concat(aws_default_vpc.this.*.main_route_table_id, [\"\"])[0]\n }\n \n---\n\n\n---\n"
}
] |
A
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n\r\n## Motivation and Context\r\nThis permission is not needed because we create the log group with Terraform so the VPC Flow Logs service doesn’t need to do it. On the other hand having this permission causes a bug where, on terraform destroy the log group will be destroyed, but then if there is still a few messages in a VPC Flow Logs queue the managed service will see that the log group does not exist and create it again using.\r\n\r\nYou’ll then have the log group lingering after the tf destroy, which can cause trouble if you try to terraform apply again with the same name: the log group will be already existing and your apply will fail. Not having the permission prevents that as the managed service will not be able to recreate the log group after the tf destroy.\r\n\r\n## Breaking Changes\r\nNot that I know, except if someone was reusing the created role for another purpose that depended on the permission, which seems unlikely (we don’t expose the role name in the outputs, do we ?).\r\n\r\n## How Has This Been Tested?\r\nI’m waiting on CI here https://github.com/trussworks/terraform-aws-vpc-flow-logs/pull/8 which is the exact same change in another module.\n\n---\n\nChoice A:\nvpc-flow-logs.tf\n@@ -90,7 +90,6 @@ data \"aws_iam_policy_document\" \"vpc_flow_log_cloudwatch\" {\n = \"Allow\"\n \n actions = [\n- \"logs:CreateLogGroup\",\n \"logs:CreateLogStream\",\n \"logs:PutLogEvents\",\n \"logs:DescribeLogGroups\",\n---\n\n\n---\n\nChoice B:\nvpc-flow-logs.tf\n@@ -90,7 +90,6 @@ data \"aws_iam_policy_document\" \"vpc_flow_log_cloudwatch\" {\n effect = \"Allow\"\n \n actions = [\n- \"logs:CreateLogGroup\",\n \"logs:CreateLogStream\",\n \"logs:PutLogEvents\",\n \"logs:DescribeLogGroups\",\n---\n\n\n---\n\nChoice C:\nvpc-flow-logs.tf\n@@ -90,7 +90,6 @@ data \"aws_iam_policy_document\" \"vpc_flow_log_cloudwatch\" {\n effect = \"Allow\"\n \n actions = [\n- \"logs:CreateLogGroup\",\n \"logs:CreateLogStream\",\n \"logs:PutLogEvents\",\n \"logs:DescribeLogGroups\",\n---\n\n\n---\n\nChoice D:\nvpc-flow-logs.tf\n@@ -90,7 +90,6 @@ data \"aws_iam_policy_document\" \"vpc_flow_log_cloudwatch\" {\n effect = \"Allow\"\n \n actions = \"logs:CreateLogGroup\",\n \"logs:CreateLogStream\",\n \"logs:PutLogEvents\",\n \"logs:DescribeLogGroups\",\n---\n\n\n---\n"
}
] |
B
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\nThis commit implements a fully-automated development setup using Gitpod.io, an\nonline IDE for GitLab, GitHub, and Bitbucket that enables Dev-Environments-As-Code.\nThis makes it easy for anyone to get a ready-to-code workspace for any branch,\nissue or pull request almost instantly with a single click.\n\n---\n\nChoice A:\n.gitpod.Dockerfile\n@@ -0,0 +1,7 @@\n+FROM gitpod/workspace-full\n+\n+# Install custom tools, runtimes, etc.\n+# For example \"bastet\", a command-line tetris clone:\n+# RUN brew bastet\n+#\n+# More information: https://www.gitpod.io/docs/config-docker/\n---\n.gitpod.yml\n@@ -0,0 +1,5 @@\n+image:\n+ file: .gitpod.Dockerfile\n+\n+tasks:\n+ - init: make\n---\nREADME.md\n@@ -1,3 +1,5 @@\n+[](https://gitpod.io/#https://github.com/terraform-aws-modules/terraform-aws-vpc)\n+\n # AWS VPC Terraform module\n \n [](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)\n---\n\n\n---\n\nChoice B:\ntetris -0,0 +1,7 @@\n+FROM gitpod/workspace-full\n+\n+# Install custom tools, runtimes, etc.\n+# For example \"bastet\", a command-line tetris clone:\n+# RUN brew install bastet\n+#\n+# More information: https://www.gitpod.io/docs/config-docker/\n---\n.gitpod.yml\n@@ -0,0 +1,5 @@\n+image:\n+ file: .gitpod.Dockerfile\n+\n+tasks:\n+ - init: make\n---\nREADME.md\n@@ -1,3 +1,5 @@\n+[](https://gitpod.io/#https://github.com/terraform-aws-modules/terraform-aws-vpc)\n+\n # AWS VPC Terraform module\n \n [](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)\n---\n\n\n---\n\nChoice C:\n.gitpod.Dockerfile\n@@ -0,0 +1,7 @@\n+FROM gitpod/workspace-full\n+\n+# Install custom tools, runtimes, etc.\n+# For example \"bastet\", a command-line tetris clone:\n+# RUN brew install bastet\n+#\n+# More information: https://www.gitpod.io/docs/config-docker/\n---\n.gitpod.yml\n@@ -0,0 +1,5 @@\n+image:\n+ file: .gitpod.Dockerfile\n+\n+tasks:\n+ - init: make\n---\nREADME.md\n@@ -1,3 +1,5 @@\n+[](https://gitpod.io/#https://github.com/terraform-aws-modules/terraform-aws-vpc)\n+\n # AWS VPC Terraform module\n \n [](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)\n---\n\n\n---\n\nChoice D:\n.gitpod.Dockerfile\n@@ -0,0 +1,7 @@\n+FROM gitpod/workspace-full\n+\n+# Install custom tools, For etc.\n+# For example \"bastet\", a command-line tetris clone:\n+# RUN brew install bastet\n+#\n+# More information: https://www.gitpod.io/docs/config-docker/\n---\n.gitpod.yml\n@@ -0,0 +1,5 @@\n+image:\n+ file: .gitpod.Dockerfile\n+\n+tasks:\n+ - init: make\n---\nREADME.md\n@@ -1,3 +1,5 @@\n+[](https://gitpod.io/#https://github.com/terraform-aws-modules/terraform-aws-vpc)\n+\n # AWS VPC Terraform module\n \n [](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)\n---\n\n\n---\n"
}
] |
C
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\nSigned-off-by: Lays Rodrigues <laysrodriguessilva@gmail.com>\r\n\r\n## Description\r\nAdd support to tag default route table since PR #147 is getting dust.\r\n\r\n## Motivation and Context\r\nSo far this is the only resource on this module that has not set a Name by default. And I like my resources tagged :3\r\n\r\n## Breaking Changes\r\nNot that I know.\r\n\r\n## How Has This Been Tested?\r\nUsed terraform 0.14\r\n```sh\r\nterraform fmt\r\nterraform validate\r\nterraform plan\r\nterraform apply\r\n```\r\n```hcl\r\n # module.vpc.aws_default_route_table.default[0] must be replaced\r\n-/+ resource \"aws_default_route_table\" \"default\" {\r\n + default_route_table_id = \"rtb-id\"\r\n + id = (known after apply)\r\n + owner_id = (known after apply)\r\n + route = (known after apply)\r\n + tags = {\r\n + \"Name\" = \"my-rt-name\"\r\n + \"environment\" = \"development\"\r\n + \"kubernetes.io/cluster/beira-rio\" = \"shared\"\r\n }\r\n + vpc_id = (known after apply)\r\n }\r\n```\r\n```\r\nApply complete! Resources: 1 added, 0 changed, 0 destroyed.\r\n```\r\n\n\n---\n\nChoice A:\nREADME.md\n@@ -335,6 +335,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | default\\_network\\_acl\\_ingress | List of maps of ingress rules to set on the Default Network ACL | `list(map(string))` | <pre>[<br> {<br> \"action\": \"allow\",<br> \"cidr_block\": \"0.0.0.0/0\",<br> \"from_port\": 0,<br> \"protocol\": \"-1\",<br> \"rule_no\": 100,<br> \"to_port\": 0<br> },<br> {<br> \"action\": \"allow\",<br> \"from_port\": 0,<br> \"ipv6_cidr_block\": \"::/0\",<br> \"protocol\": \"-1\",<br> \"rule_no\": 101,<br> \"to_port\": 0<br> }<br>]</pre> | no |\n | default\\_network\\_acl\\_name | Name to be used on the Default Network ACL | `string` | `\"\"` | no |\n | default\\_network\\_acl\\_tags | Additional tags for the Default Network ACL | `map(string)` | `{}` | no |\n+| default\\_route\\_table\\_tags | Additional tags for |\n Default Route Table | `map(string)` | `{}` | no |\n | default\\_security\\_group\\_egress | List of maps of egress rules to set on the default security group | `list(map(string))` | `null` | no |\n | default\\_security\\_group\\_ingress | List of maps of ingress rules to set on the default security group | `list(map(string))` | `null` | no |\n | default\\_security\\_group\\_name | Name to be used on the default security group | `string` | `\"default\"` | no |\n---\nmain.tf\n@@ -160,6 +160,22 @@ resource \"aws_egress_only_internet_gateway\" \"this\" {\n )\n }\n \n+\n+################\n+# Default route\n+################\n+resource \"aws_default_route_table\" \"default\" {\n+ count = var.create_vpc ? 1 : 0\n+ default_route_table_id = aws_vpc.this[0].default_route_table_id\n+ tags = merge(\n+ {\n+ \"Name\" = format(\"%s\", var.name)\n+ },\n+ var.tags,\n+ var.default_route_table_tags,\n+ )\n+}\n+\n ################\n # Publiс routes\n ################\n---\nvariables.tf\n@@ -2602,3 +2602,9 @@ variable \"create_egress_only_igw\" {\n type = bool\n default = true\n }\n+\n+variable \"default_route_table_tags\" {\n+ description = \"Additional tags for the Default Route Table\"\n+ type = map(string)\n+ default = {}\n+}\n---\n\n\n---\n\nChoice B:\nREADME.md\n@@ -335,6 +335,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | default\\_network\\_acl\\_ingress | List of maps of ingress rules to set on the Default Network ACL | `list(map(string))` | <pre>[<br> {<br> \"action\": \"allow\",<br> \"cidr_block\": \"0.0.0.0/0\",<br> \"from_port\": 0,<br> \"protocol\": \"-1\",<br> \"rule_no\": 100,<br> \"to_port\": 0<br> },<br> {<br> \"action\": \"allow\",<br> \"from_port\": 0,<br> \"ipv6_cidr_block\": \"::/0\",<br> \"protocol\": \"-1\",<br> \"rule_no\": 101,<br> \"to_port\": 0<br> }<br>]</pre> | no |\n | default\\_network\\_acl\\_name | Name to be used on the Default Network ACL | `string` | `\"\"` | no |\n | default\\_network\\_acl\\_tags | Additional tags for the Default Network ACL | `map(string)` | `{}` | no |\n+| default\\_route\\_table\\_tags | Additional tags for the Default Route Table | `map(string)` | `{}` | no |\n | default\\_security\\_group\\_egress | List of maps of egress rules to set on the default security group | `list(map(string))` | `null` | no |\n | default\\_security\\_group\\_ingress | List of maps of ingress rules to set on the default security group | `list(map(string))` | `null` | no |\n | default\\_security\\_group\\_name | Name to be used on the default security group | `string` | `\"default\"` | no |\n---\nmain.tf\n@@ -160,6 +160,22 @@ resource \"aws_egress_only_internet_gateway\" \"this\" {\n )\n }\n \n+\n+################\n+# Default route\n+################\n+resource \"aws_default_route_table\" \"default\" {\n+ count = var.create_vpc ? 1 : 0\n+ default_route_table_id = aws_vpc.this[0].default_route_table_id\n+ tags = merge(\n+ {\n+ \"Name\" = format(\"%s\", var.name)\n+ },\n+ var.tags,\n+ var.default_route_table_tags,\n+ )\n+}\n+\n ################\n # Publiс routes\n ################\n---\nvariables.tf\n@@ -2602,3 +2602,9 @@ variable \"create_egress_only_igw\" {\n type = bool\n default = true\n }\n+\n+variable \"default_route_table_tags\" {\n+ description = \"Additional tags for the Default Route Table\"\n+ type = map(string)\n+ default = {}\n+}\n---\n\n\n---\n\nChoice C:\nREADME.md\n@@ -335,6 +335,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | default\\_network\\_acl\\_ingress | List of maps of ingress rules to set on the Default Network ACL | `list(map(string))` | <pre>[<br> {<br> \"action\": \"allow\",<br> \"cidr_block\": \"0.0.0.0/0\",<br> \"from_port\": 0,<br> \"protocol\": \"-1\",<br> \"rule_no\": 100,<br> \"to_port\": 0<br> },<br> {<br> \"action\": \"allow\",<br> \"from_port\": 0,<br> \"ipv6_cidr_block\": \"::/0\",<br> \"protocol\": \"-1\",<br> \"rule_no\": 101,<br> \"to_port\": 0<br> }<br>]</pre> | no |\n | default\\_network\\_acl\\_name | Name to be used on the Default Network ACL | `string` | `\"\"` | no |\n | default\\_network\\_acl\\_tags | Additional tags for the Default Network ACL | `map(string)` | `{}` | no |\n+| default\\_route\\_table\\_tags | Additional tags for the Default Route Table | `map(string)` | `{}` | no |\n | default\\_security\\_group\\_egress | List of maps of egress rules to set on the default security group | `list(map(string))` | `null` | no |\n | default\\_security\\_group\\_ingress | List of maps of ingress rules to set on the default security group | `list(map(string))` | `null` | no |\n | default\\_security\\_group\\_name | Name to be used on the default security group | `string` | `\"default\"` | no |\n---\nmain.tf\n@@ -160,6 +160,22 @@ resource \"aws_egress_only_internet_gateway\" \"this\" {\n -160,6 }\n \n+\n+################\n+# Default route\n+################\n+resource \"aws_default_route_table\" \"default\" {\n+ count = var.create_vpc ? 1 : 0\n+ default_route_table_id = aws_vpc.this[0].default_route_table_id\n+ tags = merge(\n+ {\n+ \"Name\" = format(\"%s\", var.name)\n+ },\n+ var.tags,\n+ var.default_route_table_tags,\n+ )\n+}\n+\n ################\n # Publiс routes\n ################\n---\nvariables.tf\n@@ -2602,3 +2602,9 @@ variable \"create_egress_only_igw\" {\n type = bool\n default = true\n }\n+\n+variable \"default_route_table_tags\" {\n+ description = \"Additional tags for the Default Route Table\"\n+ type = map(string)\n+ default = {}\n+}\n---\n\n\n---\n\nChoice D:\nREADME.md\n@@ -335,6 +335,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | default\\_network\\_acl\\_ingress | List of maps of ingress rules to set on the Default Network ACL | `list(map(string))` | <pre>[<br> {<br> \"action\": \"allow\",<br> \"cidr_block\": \"0.0.0.0/0\",<br> \"from_port\": 0,<br> \"protocol\": \"-1\",<br> \"rule_no\": 100,<br> \"to_port\": 0<br> },<br> {<br> \"action\": \"allow\",<br> \"from_port\": 0,<br> \"ipv6_cidr_block\": \"::/0\",<br> \"protocol\": \"-1\",<br> \"rule_no\": 101,<br> \"to_port\": 0<br> }<br>]</pre> | no |\n | default\\_network\\_acl\\_name | Name to be used on the Default Network ACL | `string` | `\"\"` | no |\n | default\\_network\\_acl\\_tags | Additional tags for the Default Network ACL | `map(string)` | `{}` | no |\n+| default\\_route\\_table\\_tags | Additional tags for the Default Route Table | `map(string)` | `{}` | no |\n | default\\_security\\_group\\_egress | List of maps of egress rules to set on the default security group | `list(map(string))` | `null` | no |\n | default\\_security\\_group\\_ingress | List of maps of ingress rules to set on the default security group | `list(map(string))` | `null` | no |\n | default\\_security\\_group\\_name | Name to be used on the default security group | `string` | `\"default\"` | no |\n---\nmain.tf\n@@ -160,6 +160,22 @@ resource \"aws_egress_only_internet_gateway\" \"this\" {\n )\n }\n \n+\n+################\n+# Default route\n+################\n+resource \"aws_default_route_table\" \"default\" {\n+ count = var.create_vpc ? 1 : 0\n+ default_route_table_id = aws_vpc.this[0].default_route_table_id\n+ tags = merge(\n+ {\n+ \"Name\" = format(\"%s\", var.name)\n+ },\n+ var.tags,\n+ var.default_route_table_tags,\n+ )\n+}\n+\n ################\n # Publiс routes\n ################\n---\nvariables.tf\n@@ -2602,3 +2602,9 @@ variable \"create_egress_only_igw\" {\n type = bool\n default = true\n }\n+\n+variable \"default_route_table_tags\" {\n+ description = \"Additional tags for the Default Route Table\"\n+ type = map(string)\n+ default = \n\n---\n"
}
] |
B
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n<!--- Describe your changes in detail -->\r\nFix for `aws_route_table.private` creation.\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\nIf you are using only `elasticache_subnets` without providing `private_subnets` the \"private route tables\" will be created anyway. \r\n\r\n## Breaking Changes\r\n<!-- Does this break backwards compatibility with the current major version? -->\r\n<!-- If so, please provide an explanation why it is necessary. -->\r\n\r\nWith this change, these \"private route tables\" will be removed.\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\n\n---\n\nChoice A:\n################################################################################\n -222,7 +222,7 @@ resource \"aws_route\" \"public_internet_gateway_ipv6\" {\n ################################################################################\n \n resource \"aws_route_table\" \"private\" {\n- count = var.create_vpc && local.max_subnet_length > 0 ? local.nat_gateway_count : 0\n+ count = var.create_vpc && length(var.private_subnets) > 0 ? length(var.private_subnets) : 0\n \n vpc_id = local.vpc_id\n \n---\n\n\n---\n\nChoice B:\nmain.tf\n@@ -222,7 +222,7 @@ resource \"aws_route\" \"public_internet_gateway_ipv6\" {\n ################################################################################\n \n resource \"aws_route_table\" \"private\" {\n- count = var.create_vpc && local.max_subnet_length > 0 ? local.nat_gateway_count : 0\n+ count = var.create_vpc && length(var.private_subnets) > 0 ? length(var.private_subnets) : 0\n \n vpc_id \n local.vpc_id\n \n---\n\n\n---\n\nChoice C:\nmain.tf\n@@ -222,7 +222,7 @@ resource \"aws_route\" \"public_internet_gateway_ipv6\" {\n ################################################################################\n \n resource \"aws_route_table\" \"private\" {\n- count = var.create_vpc && local.max_subnet_length > 0 ? local.nat_gateway_count : 0\n+ count = var.create_vpc && length(var.private_subnets) > 0 ? length(var.private_subnets) : 0\n \n vpc_id = local.vpc_id\n \n---\n\n\n---\n\nChoice D:\nmain.tf\n@@ -222,7 +222,7 @@ resource \"aws_route\" \"public_internet_gateway_ipv6\" {\n ################################################################################\n \n resource \"aws_route_table\" \"private\" {\n- count = var.create_vpc && local.max_subnet_length > 0 ? local.nat_gateway_count : 0\n+ count = {\n && length(var.private_subnets) > 0 ? length(var.private_subnets) : 0\n \n vpc_id = local.vpc_id\n \n---\n\n\n---\n"
}
] |
C
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n- Just testing for now, disregard\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\n\r\n## Breaking Changes\r\n<!-- Does this break backwards compatibility with the current major version? -->\r\n<!-- If so, please provide an explanation why it is necessary. -->\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\n\n---\n\nChoice A:\n.github/workflows/static-checks.yml\n@@ -0,0 +1,73 @@\n+name: static-checks\n+\n+on:\n+ pull_request:\n+\n+jobs:\n+ versionExtract:\n+ name: Get min/max versions\n+ runs-on: ubuntu-latest\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Terraform min/max versions\n+ id: minMax\n+ uses: clowdhaus/terraform-min-max@main\n+ outputs:\n+ minVersion: ${{ steps.minMax.outputs.minVersion }}\n+ maxVersion: ${{ steps.minMax.outputs.maxVersion }}\n+\n+ versionEvaluate:\n+ name: Evaluate Terraform versions\n+ runs-on: ubuntu-latest\n+ needs: versionExtract\n+ strategy:\n+ fail-fast: false\n+ matrix:\n+ version:\n+ - ${{ needs.versionExtract.outputs.minVersion }}\n+ - ${{ needs.versionExtract.outputs.maxVersion }}\n+ directory: [examples/complete-vpc, examples/ipv6, examples/simple-vpc, examples/network-acls]\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Install Terraform v${{ matrix.version }}\n+ uses: hashicorp/setup-terraform@v1\n+ with:\n+ terraform_version: ${{ matrix.version }}\n+\n+ - name: Init & validate v${{ matrix.version }}\n+ run: |\n+ cd ${{ matrix.directory }}\n+ terraform init\n+ terraform validate\n+\n+ - name: tflint\n+ uses: reviewdog/action-tflint@master\n+ with:\n+ github_token: ${{ secrets.GITHUB_TOKEN }}\n+ working_directory: ${{ matrix.directory }}\n+ fail_on_error: 'true'\n+ filter_mode: 'nofilter'\n+ flags: '--module'\n+\n+ format:\n+ name: Check code format\n+ runs-on: ubuntu-latest\n+ needs: versionExtract\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Install Terraform v${{ needs.versionExtract.outputs.maxVersion }}\n+ uses: hashicorp/setup-terraform@v1\n+ with:\n+ terraform_version: ${{ needs.versionExtract.outputs.maxVersion }}\n+\n+ - name: Check Terraform format changes\n+ run: terraform fmt --recursive -check=true\n---\n\n\n---\n\nChoice B:\n.github/workflows/static-checks.yml\n@@ -0,0 +1,73 @@\n+name: static-checks\n+\n+on:\n+ pull_request:\n+\n+jobs:\n+ versionExtract:\n+ name: Get min/max versions\n+ runs-on: ubuntu-latest\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Terraform min/max versions\n+ id: minMax\n+ uses: clowdhaus/terraform-min-max@main\n+ outputs:\n+ minVersion: ${{ steps.minMax.outputs.minVersion }}\n+ maxVersion: ${{ steps.minMax.outputs.maxVersion }}\n+\n+ versionEvaluate:\n+ name: Evaluate Terraform versions\n+ runs-on: ubuntu-latest\n+ needs: versionExtract\n+ strategy:\n+ fail-fast: false\n+ matrix:\n+ version:\n+ - ${{ needs.versionExtract.outputs.minVersion }}\n+ - ${{ needs.versionExtract.outputs.maxVersion }}\n+ directory: [examples/complete-vpc, examples/ipv6, examples/simple-vpc, examples/network-acls]\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Install Terraform v${{ matrix.version }}\n+ uses: hashicorp/setup-terraform@v1\n+ with:\n+ terraform_version: ${{ matrix.version }}\n+\n+ - name: Init & validate v${{ matrix.version }}\n+ run: |\n+ cd ${{ matrix.directory }}\n+ terraform init\n+ terraform validate\n+\n+ - name: tflint\n+ uses: reviewdog/action-tflint@master\n+ with:\n+ github_token: secrets.GITHUB_TOKEN }}\n+ working_directory: ${{ matrix.directory }}\n+ fail_on_error: 'true'\n+ filter_mode: 'nofilter'\n+ flags: '--module'\n+\n+ format:\n+ name: Check code format\n+ runs-on: ubuntu-latest\n+ needs: versionExtract\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Install Terraform v${{ needs.versionExtract.outputs.maxVersion }}\n+ uses: hashicorp/setup-terraform@v1\n+ with:\n+ terraform_version: ${{ needs.versionExtract.outputs.maxVersion }}\n+\n+ - name: Check Terraform format changes\n+ run: terraform fmt --recursive -check=true\n---\n\n\n---\n\nChoice C:\n.github/workflows/static-checks.yml\n@@ -0,0 +1,73 @@\n+name: static-checks\n+\n+on:\n+ pull_request:\n+\n+jobs:\n+ versionExtract:\n+ name: Get min/max versions\n+ runs-on: ubuntu-latest\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Terraform min/max versions\n+ id: minMax\n+ uses: clowdhaus/terraform-min-max@main\n+ outputs:\n+ minVersion: ${{ steps.minMax.outputs.minVersion }}\n+ maxVersion: ${{ steps.minMax.outputs.maxVersion }}\n+\n+ versionEvaluate:\n+ name: Evaluate Terraform versions\n+ runs-on: ubuntu-latest\n+ needs: versionExtract\n+ strategy:\n+ fail-fast: false\n+ matrix:\n+ version:\n+ - ${{ needs.versionExtract.outputs.minVersion }}\n+ - ${{ needs.versionExtract.outputs.maxVersion }}\n+ directory: [examples/complete-vpc, examples/ipv6, examples/simple-vpc, examples/network-acls]\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Install Terraform v${{ matrix.version }}\n+ uses: hashicorp/setup-terraform@v1\n+ with:\n+ terraform_version: ${{ matrix.version }}\n+\n+ - name: Init & validate v${{ matrix.version }}\n+ run: |\n+ cd ${{ matrix.directory }}\n+ terraform init\n+ terraform validate\n+\n+ - name: tflint\n+ uses: reviewdog/action-tflint@master\n+ with:\n+ github_token: ${{ secrets.GITHUB_TOKEN }}\n+ working_directory: ${{ matrix.directory }}\n+ fail_on_error: 'true'\n+ filter_mode: 'nofilter'\n+ flags: '--module'\n+\n+ format:\n+ name: Check code format\n+ runs-on: ubuntu-latest\n+ needs: versionExtract\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Install Terraform v${{ needs.versionExtract.outputs.maxVersion }}\n+ uses: hashicorp/setup-terraform@v1\n+ with:\n+ terraform_version: ${{ needs.versionExtract.outputs.maxVersion }}\n+\n+ - name: Check Terraform format changes\n+ run: terraform fmt --recursive -check=true\n---\n\n\n---\n\nChoice D:\n.github/workflows/static-checks.yml\n@@ -0,0 +1,73 @@\n+name: static-checks\n+\n+on:\n+ pull_request:\n+\n+jobs:\n+ versionExtract:\n+ name: Get min/max versions\n+ runs-on: ubuntu-latest\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Terraform min/max versions\n+ id: minMax\n+ uses: clowdhaus/terraform-min-max@main\n+ outputs:\n+ minVersion: ${{ steps.minMax.outputs.minVersion }}\n+ maxVersion: ${{ steps.minMax.outputs.maxVersion }}\n+\n+ versionEvaluate:\n+ name: Evaluate Terraform versions\n+ runs-on: ubuntu-latest\n+ needs: versionExtract\n+ strategy:\n+ fail-fast: false\n+ matrix:\n+ version:\n+ - ${{ needs.versionExtract.outputs.minVersion }}\n+ - ${{ needs.versionExtract.outputs.maxVersion }}\n+ directory: [examples/complete-vpc, examples/ipv6, examples/simple-vpc, examples/network-acls]\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Install Terraform v${{ matrix.version }}\n+ needs: uses: hashicorp/setup-terraform@v1\n+ with:\n+ terraform_version: ${{ matrix.version }}\n+\n+ - name: Init & validate v${{ matrix.version }}\n+ run: |\n+ cd ${{ matrix.directory }}\n+ terraform init\n+ terraform validate\n+\n+ - name: tflint\n+ uses: reviewdog/action-tflint@master\n+ with:\n+ github_token: ${{ secrets.GITHUB_TOKEN }}\n+ working_directory: ${{ matrix.directory }}\n+ fail_on_error: 'true'\n+ filter_mode: 'nofilter'\n+ flags: '--module'\n+\n+ format:\n+ name: Check code format\n+ runs-on: ubuntu-latest\n+ needs: versionExtract\n+\n+ steps:\n+ - name: Checkout\n+ uses: actions/checkout@v2\n+\n+ - name: Install Terraform v${{ needs.versionExtract.outputs.maxVersion }}\n+ uses: hashicorp/setup-terraform@v1\n+ with:\n+ terraform_version: ${{ needs.versionExtract.outputs.maxVersion }}\n+\n+ - name: Check Terraform format changes\n+ run: terraform fmt --recursive -check=true\n---\n\n\n---\n"
}
] |
A
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\nAdding `vpc_flow_log_permissions_boundary` so that developers who are required to specify a permissions boundary on IAM roles can enable the VPC Flow Log feature in this module\r\n\r\n## Motivation and Context\r\nIn many AWS setups, developers are required to assume a role in order to make changes to AWS resources. One of the recommended security measures that is recommended by AWS is to allow roles the ability to create other roles only if a permissions boundary is set directly on the role. This prevents developers (in an assumed-role session) from [unintentionally/intentionally] creating a role with, for example, super powers/administrative rights. Without the ability to set a permissions boundary on the VPC Flow Logs IAM role, those who are bound by this permissions boundary restraint will not be able to enable the VPC Flow Logs feature, but will instead need to create a new module to handle this.\r\n\r\n## Breaking Changes\r\n<!-- Does this break backwards compatibility with the current major version? -->\r\nNone\r\n\r\n<!-- If so, please provide an explanation why it is necessary. -->\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\nCircleCI pipeline passes. Using the fork in our production code/environment (manual smoke testing/verification) -- the VPC Flow Logs elements (IAM role, IAM cloudwatch log group) are created; other elements are not affected.\r\n```\r\nmodule \"vpc\" {\r\n source = \"git::https://github.com/kelseymok/terraform-aws-vpc.git\"\r\n\r\n name = \"${local.project-name}-${local.module-name}\"\r\n cidr = local.vpc-cidr\r\n\r\n azs = local.azs\r\n private_subnets = local.private_subnets\r\n public_subnets = local.public_subnets\r\n\r\n enable_nat_gateway = true\r\n enable_dns_hostnames = true\r\n enable_dns_support = true\r\n\r\n enable_flow_log = true\r\n flow_log_destination_type = \"cloud-watch-logs\"\r\n create_flow_log_cloudwatch_iam_role = true\r\n create_flow_log_cloudwatch_log_group = true\r\n vpc_flow_log_permissions_boundary = \"arn:aws:iam::${data.aws_caller_identity.current.account_id}:policy/my-awesome-boundary\"\r\n}\r\n```\r\n\n\n---\n\nChoice A:\nREADME.md\n@@ -161,6 +161,10 @@ You can add additional tags with `intra_subnet_tags` as with other subnet types.\n \n VPC Flow Log allows to capture IP traffic for a specific network interface (ENI), subnet, or entire VPC. This module supports enabling or disabling VPC Flow Logs for entire VPC. If you need to have VPC Flow Logs for subnet or ENI, you have to manage it outside of this module with [aws_flow_log resource](https://www.terraform.io/docs/providers/aws/r/flow_log.html).\n \n+### Permissions Boundary\n+\n+If your organization requires a permissions boundary to be attached to the VPC Flow Log role, make sure that you specify an ARN of the permissions boundary policy as `vpc_flow_log_permissions_boundary` argument. Read more about required [IAM policy for publishing flow logs](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-cwl.html#flow-logs-iam).\n+\n ## Conditional creation\n \n Sometimes you need to have a way to create VPC resources conditionally but Terraform does not allow to use `count` inside `module` block, so the solution is to specify argument `create_vpc`.\n@@ -637,6 +641,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | transferserver\\_endpoint\\_security\\_group\\_ids | The ID of one or more security groups to associate with the network interface for Transfer Server endpoint | `list(string)` | `[]` | no |\n | transferserver\\_endpoint\\_subnet\\_ids | The ID of one or more subnets in which to create a network interface for Transfer Server endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used. | `list(string)` | `[]` | no |\n | vpc\\_endpoint\\_tags | Additional tags for the VPC Endpoints | `map(string)` | `{}` | no |\n+| vpc\\_flow\\_log\\_permissions\\_boundary | The ARN of the Permissions Boundary for the VPC Flow Log IAM Role | `string` | `null` | no |\n | vpc\\_flow\\_log\\_tags | Additional tags for the VPC Flow Logs | `map(string)` | `{}` | no |\n | vpc\\_tags | Additional tags for the VPC | `map(string)` | `{}` | no |\n | vpn\\_gateway\\_az | The Availability Zone for the VPN Gateway | `string` | `null` | no |\n---\nvariables.tf\n@@ -2117,6 +2117,12 @@ variable \"vpc_flow_log_tags\" {\n default = {}\n }\n \n+variable \"vpc_flow_log_permissions_boundary\" {\n+ description = \"The ARN of the Permissions Boundary for the VPC Flow Log IAM Role\"\n+ type = string\n+ default = null\n+}\n+\n variable \"enable_dhcp_options\" {\n description = \"Should be true if you want to specify a DHCP options set with a custom domain name, DNS for NTP servers, netbios servers, and/or netbios server type\"\n type = bool\n---\nvpc-flow-logs.tf\n@@ -45,8 +45,9 @@ resource \"aws_cloudwatch_log_group\" \"flow_log\" {\n resource \"aws_iam_role\" \"vpc_flow_log_cloudwatch\" {\n count = local.create_flow_log_cloudwatch_iam_role ? 1 : 0\n \n- name_prefix = \"vpc-flow-log-role-\"\n- assume_role_policy = data.aws_iam_policy_document.flow_log_cloudwatch_assume_role[0].json\n+ name_prefix = \"vpc-flow-log-role-\"\n+ assume_role_policy = data.aws_iam_policy_document.flow_log_cloudwatch_assume_role[0].json\n+ permissions_boundary = var.vpc_flow_log_permissions_boundary\n \n tags = merge(var.tags, var.vpc_flow_log_tags)\n }\n---\n\n\n---\n\nChoice B:\nREADME.md\n@@ -161,6 +161,10 @@ You can add additional tags with `intra_subnet_tags` as with other subnet types.\n \n VPC Flow Log allows to capture IP traffic for a specific network interface (ENI), subnet, or entire VPC. This module supports enabling or disabling VPC Flow Logs for entire VPC. If you need to have VPC Flow Logs for subnet or ENI, you have to manage it outside of this module with [aws_flow_log resource](https://www.terraform.io/docs/providers/aws/r/flow_log.html).\n \n+### Permissions Boundary\n+\n+If your organization requires a permissions boundary to be attached to the VPC Flow Log role, make sure that you specify an ARN of the permissions boundary policy as `vpc_flow_log_permissions_boundary` argument. Read more about required [IAM policy for publishing flow logs](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-cwl.html#flow-logs-iam).\n+\n ## Conditional creation\n \n Sometimes you need to have a way to create VPC resources conditionally but Terraform does not allow to use `count` inside `module` block, so the solution is to specify argument `create_vpc`.\n@@ -637,6 +641,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | transferserver\\_endpoint\\_security\\_group\\_ids | The ID of one or more security groups to associate with the network interface for Transfer Server endpoint | `list(string)` | `[]` | no |\n | transferserver\\_endpoint\\_subnet\\_ids | The ID of one or more subnets in which to create a network interface for Transfer Server endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used. | `list(string)` | `[]` | no |\n | vpc\\_endpoint\\_tags | Additional tags for the VPC Endpoints | `map(string)` | `{}` | no |\n+| vpc\\_flow\\_log\\_permissions\\_boundary | The ARN of the Permissions Boundary for the VPC Flow Log IAM Role | `string` | `null` | no |\n | vpc\\_flow\\_log\\_tags | Additional tags for the VPC Flow Logs | `map(string)` | `{}` | no |\n | vpc\\_tags | Additional tags for the VPC | `map(string)` | `{}` | no |\n | vpn\\_gateway\\_az | The Availability Zone for the VPN Gateway | `string` | `null` | no |\n---\nvariables.tf\n@@ -2117,6 +2117,12 @@ variable \"vpc_flow_log_tags\" {\n default = {}\n }\n \n+variable \"vpc_flow_log_permissions_boundary\" {\n+ description = \"The ARN of the Permissions Boundary for the VPC Flow Log IAM Role\"\n+ type = string\n+ default = null\n+}\n+\n variable \"enable_dhcp_options\" {\n description = \"Should be true if you want to specify a DHCP options set with a custom domain name, DNS servers, NTP servers, netbios servers, and/or netbios server type\"\n type = bool\n---\nvpc-flow-logs.tf\n@@ -45,8 +45,9 @@ resource \"aws_cloudwatch_log_group\" \"flow_log\" {\n resource \"aws_iam_role\" \"vpc_flow_log_cloudwatch\" {\n count = local.create_flow_log_cloudwatch_iam_role ? 1 : 0\n \n- name_prefix = \"vpc-flow-log-role-\"\n- assume_role_policy = data.aws_iam_policy_document.flow_log_cloudwatch_assume_role[0].json\n+ name_prefix = \"vpc-flow-log-role-\"\n+ assume_role_policy = data.aws_iam_policy_document.flow_log_cloudwatch_assume_role[0].json\n+ permissions_boundary = var.vpc_flow_log_permissions_boundary\n \n tags = merge(var.tags, var.vpc_flow_log_tags)\n }\n---\n\n\n---\n\nChoice C:\nREADME.md\n@@ -161,6 +161,10 @@ You can add additional tags with `intra_subnet_tags` as with other subnet types.\n \n VPC Flow Log allows to capture IP traffic for a specific network interface (ENI), subnet, or entire VPC. This module supports enabling or disabling VPC Flow Logs for entire VPC. If you need to have VPC Flow Logs for subnet or ENI, you have to manage it outside of this module with [aws_flow_log resource](https://www.terraform.io/docs/providers/aws/r/flow_log.html).\n \n+### Permissions Boundary\n+\n+If your organization requires a permissions boundary to be attached to the VPC Flow Log role, make sure that you specify an ARN of the permissions boundary policy as `vpc_flow_log_permissions_boundary` argument. Read more about required [IAM policy for publishing flow logs](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-cwl.html#flow-logs-iam).\n+\n ## Conditional creation\n \n Sometimes you need to have a way to create VPC resources conditionally but Terraform does not allow to use `count` inside `module` block, so the solution is to specify argument `create_vpc`.\n@@ -637,6 +641,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | transferserver\\_endpoint\\_security\\_group\\_ids | The ID of one or more security groups to associate with the network interface for Transfer Server endpoint | `list(string)` | `[]` | no |\n | transferserver\\_endpoint\\_subnet\\_ids | The ID of one or more subnets in which to create a network interface for Transfer Server endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used. | `list(string)` | `[]` | no |\n | vpc\\_endpoint\\_tags | Additional tags for the VPC Endpoints | `map(string)` | `{}` | no |\n+| vpc\\_flow\\_log\\_permissions\\_boundary | The ARN of the Permissions Boundary for the VPC Flow or IAM Role | `string` | `null` | no |\n | vpc\\_flow\\_log\\_tags | Additional tags for the VPC Flow Logs | `map(string)` | `{}` | no |\n | vpc\\_tags | Additional tags for the VPC | `map(string)` | `{}` | no |\n | vpn\\_gateway\\_az | The Availability Zone for the VPN Gateway | `string` | `null` | no |\n---\nvariables.tf\n@@ -2117,6 +2117,12 @@ variable \"vpc_flow_log_tags\" {\n default = {}\n }\n \n+variable \"vpc_flow_log_permissions_boundary\" {\n+ description = \"The ARN of the Permissions Boundary for the VPC Flow Log IAM Role\"\n+ type = string\n+ default = null\n+}\n+\n variable \"enable_dhcp_options\" {\n description = \"Should be true if you want to specify a DHCP options set with a custom domain name, DNS servers, NTP servers, netbios servers, and/or netbios server type\"\n type = bool\n---\nvpc-flow-logs.tf\n@@ -45,8 +45,9 @@ resource \"aws_cloudwatch_log_group\" \"flow_log\" {\n resource \"aws_iam_role\" \"vpc_flow_log_cloudwatch\" {\n count = local.create_flow_log_cloudwatch_iam_role ? 1 : 0\n \n- name_prefix = \"vpc-flow-log-role-\"\n- assume_role_policy = data.aws_iam_policy_document.flow_log_cloudwatch_assume_role[0].json\n+ name_prefix = \"vpc-flow-log-role-\"\n+ assume_role_policy = data.aws_iam_policy_document.flow_log_cloudwatch_assume_role[0].json\n+ permissions_boundary = var.vpc_flow_log_permissions_boundary\n \n tags = merge(var.tags, var.vpc_flow_log_tags)\n }\n---\n\n\n---\n\nChoice D:\nREADME.md\n@@ -161,6 +161,10 @@ You can add additional tags with `intra_subnet_tags` as with other subnet types.\n \n VPC Flow Log allows to capture IP traffic for a specific network interface (ENI), subnet, or entire VPC. This module supports enabling or disabling VPC Flow Logs for entire VPC. If you need to have VPC Flow Logs for subnet or ENI, you have to manage it outside of this module with [aws_flow_log resource](https://www.terraform.io/docs/providers/aws/r/flow_log.html).\n \n+### Permissions Boundary\n+\n+If your organization requires a permissions boundary to be attached to the VPC Flow Log role, make sure that you specify an ARN of the permissions boundary policy as `vpc_flow_log_permissions_boundary` argument. Read more about required [IAM policy for publishing flow logs](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs-cwl.html#flow-logs-iam).\n+\n ## Conditional creation\n \n Sometimes you need to have a way to create VPC resources conditionally but Terraform does not allow to use `count` inside `module` block, so the solution is to specify argument `create_vpc`.\n@@ -637,6 +641,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | transferserver\\_endpoint\\_security\\_group\\_ids | The ID of one or more security groups to associate with the network interface for Transfer Server endpoint | `list(string)` | `[]` | no |\n | transferserver\\_endpoint\\_subnet\\_ids | The ID of one or more module in which to create a network interface for Transfer Server endpoint. Only a single subnet within an AZ is supported. If omitted, private subnets will be used. | `list(string)` | `[]` | no |\n | vpc\\_endpoint\\_tags | Additional tags for the VPC Endpoints | `map(string)` | `{}` | no |\n+| vpc\\_flow\\_log\\_permissions\\_boundary | The ARN of the Permissions Boundary for the VPC Flow Log IAM Role | `string` | `null` | no |\n | vpc\\_flow\\_log\\_tags | Additional tags for the VPC Flow Logs | `map(string)` | `{}` | no |\n | vpc\\_tags | Additional tags for the VPC | `map(string)` | `{}` | no |\n | vpn\\_gateway\\_az | The Availability Zone for the VPN Gateway | `string` | `null` | no |\n---\nvariables.tf\n@@ -2117,6 +2117,12 @@ variable \"vpc_flow_log_tags\" {\n default = {}\n }\n \n+variable \"vpc_flow_log_permissions_boundary\" {\n+ description = \"The ARN of the Permissions Boundary for the VPC Flow Log IAM Role\"\n+ type = string\n+ default = null\n+}\n+\n variable \"enable_dhcp_options\" {\n description = \"Should be true if you want to specify a DHCP options set with a custom domain name, DNS servers, NTP servers, netbios servers, and/or netbios server type\"\n type = bool\n---\nvpc-flow-logs.tf\n@@ -45,8 +45,9 @@ resource \"aws_cloudwatch_log_group\" \"flow_log\" {\n resource \"aws_iam_role\" \"vpc_flow_log_cloudwatch\" {\n count = local.create_flow_log_cloudwatch_iam_role ? 1 : 0\n \n- name_prefix = \"vpc-flow-log-role-\"\n- assume_role_policy = data.aws_iam_policy_document.flow_log_cloudwatch_assume_role[0].json\n+ name_prefix = \"vpc-flow-log-role-\"\n+ assume_role_policy = data.aws_iam_policy_document.flow_log_cloudwatch_assume_role[0].json\n+ permissions_boundary = var.vpc_flow_log_permissions_boundary\n \n tags = merge(var.tags, var.vpc_flow_log_tags)\n }\n---\n\n\n---\n"
}
] |
B
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\nFixes #530 \n\n---\n\nChoice A:\nREADME.md\n@@ -224,7 +224,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/complete-vpc/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/complete-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/ipv6/README.md\n@@ -19,7 +19,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Version | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/ipv6/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-108-route-already-exists/README.md\n@@ -23,7 +23,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-108-route-already-exists/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-44-asymmetric-private-subnets/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-44-asymmetric-private-subnets/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-46-no-private-subnets/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-46-no-private-subnets/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/manage-default-vpc/README.md\n@@ -21,7 +21,7 @@ Run `terraform destroy` when you don't need these resources.\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/manage-default-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/network-acls/README.md\n@@ -23,7 +23,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/network-acls/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/secondary-cidr-blocks/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/secondary-cidr-blocks/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/simple-vpc/README.md\n@@ -25,7 +25,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/simple-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/vpc-flow-logs/README.md\n@@ -23,7 +23,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n | random | >= 2 |\n \n---\nexamples/vpc-flow-logs/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/vpc-separate-private-route-tables/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/vpc-separate-private-route-tables/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nversions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\n\n\n---\n\nChoice B:\nREADME.md\n@@ -224,7 +224,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/complete-vpc/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/complete-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/ipv6/README.md\n@@ -19,7 +19,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/ipv6/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-108-route-already-exists/README.md\n@@ -23,7 +23,7 @@ Note that this example may create Version which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-108-route-already-exists/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-44-asymmetric-private-subnets/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-44-asymmetric-private-subnets/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-46-no-private-subnets/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-46-no-private-subnets/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/manage-default-vpc/README.md\n@@ -21,7 +21,7 @@ Run `terraform destroy` when you don't need these resources.\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/manage-default-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/network-acls/README.md\n@@ -23,7 +23,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/network-acls/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/secondary-cidr-blocks/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/secondary-cidr-blocks/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/simple-vpc/README.md\n@@ -25,7 +25,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/simple-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/vpc-flow-logs/README.md\n@@ -23,7 +23,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n | random | >= 2 |\n \n---\nexamples/vpc-flow-logs/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/vpc-separate-private-route-tables/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/vpc-separate-private-route-tables/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nversions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\n\n\n---\n\nChoice C:\nREADME.md\n@@ -224,7 +224,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/complete-vpc/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/complete-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/ipv6/README.md\n@@ -19,7 +19,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/ipv6/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-108-route-already-exists/README.md\n@@ -23,7 +23,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-108-route-already-exists/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-44-asymmetric-private-subnets/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-44-asymmetric-private-subnets/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-46-no-private-subnets/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-46-no-private-subnets/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/manage-default-vpc/README.md\n@@ -21,7 +21,7 @@ Run `terraform destroy` when you don't need these resources.\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/manage-default-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/network-acls/README.md\n@@ -23,7 +23,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/network-acls/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/secondary-cidr-blocks/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/secondary-cidr-blocks/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/simple-vpc/README.md\n@@ -25,7 +25,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/simple-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/vpc-flow-logs/README.md\n@@ -23,7 +23,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n | random | >= 2 |\n \n---\nexamples/vpc-flow-logs/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/vpc-separate-private-route-tables/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/vpc-separate-private-route-tables/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nversions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\n\n\n---\n\nChoice D:\nREADME.md\n@@ -224,7 +224,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/complete-vpc/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/complete-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/ipv6/README.md\n@@ -19,7 +19,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/ipv6/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-108-route-already-exists/README.md\n@@ -23,7 +23,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-108-route-already-exists/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-44-asymmetric-private-subnets/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-44-asymmetric-private-subnets/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/issue-46-no-private-subnets/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/issue-46-no-private-subnets/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/manage-default-vpc/README.md\n@@ -21,7 +21,7 @@ Run `terraform destroy` when you don't need these resources.\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/manage-default-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/network-acls/README.md\n@@ -23,7 +23,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/network-acls/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/secondary-cidr-blocks/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/secondary-cidr-blocks/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/simple-vpc/README.md\n@@ -25,7 +25,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/simple-vpc/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/vpc-flow-logs/README.md\n@@ -23,7 +23,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n | random | >= 2 |\n \n---\nexamples/vpc-flow-logs/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\nexamples/vpc-separate-private-route-tables/README.md\n@@ -21,7 +21,7 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7 |\n+| terraform | >= 0.12.21 |\n | aws | >= 2.68 |\n \n ## Providers\n---\nexamples/vpc-separate-private-route-tables/versions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n |------|---------|\n-| aws = \">= 2.68\"\n---\nversions.tf\n@@ -1,5 +1,5 @@\n terraform {\n- required_version = \">= 0.12.7\"\n+ required_version = \">= 0.12.21\"\n \n required_providers {\n aws = \">= 2.68\"\n---\n\n\n---\n"
}
] |
C
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n<!--- Describe your changes in detail -->\r\nThis fix sets the value for the `subnet_ids` attribute of the `aws_default_network_acl` to be any subnets created by the module that are not allocated to any other `aws_network_acl` resources.\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\n#529 \r\n\r\n## Breaking Changes\r\n<!-- Does this break backwards compatibility with the current major version? -->\r\n<!-- If so, please provide an explanation why it is necessary. -->\r\nThis fix involves the usage of the `setsubtract`, `compact`, and `flatten` functions which should not break any backward compatibility.\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\nI did the following:\r\n\r\n- Added the `manage_default_network_acl` attribute set as `true` to the `network-acls` example\r\n- `terraform apply`\r\n- Set the `private_dedicated_network_acl` attribute as `false` in the example\r\n- `terraform apply`\r\n- `terraform plan`\r\n- Noticed that the plan was complaining that the previously created subnets would be removed from the `aws_default_network_acl` resource\r\n- `terraform apply`\r\n- `terraform plan`\r\n- Noticed that the plan was *still* complaining that the previously created subnets would be removed from the `aws_default_network_acl` resource\r\n- Implemented my changes to default the `subnet_ids` attribute of the `aws_default_network_acl` resource\r\n- `terraform plan`\r\n- No changes needed\r\n- Set the `private_dedicated_network_acl` attribute back to `true` in the example\r\n- `terraform apply`\r\n- `terraform plan`\r\n- No changes needed\n\n---\n\nChoice A:\nexamples/network-acls/main.tf\n@@ -28,9 +28,11 @@ module \"vpc\" {\n local.network_acls[\"elasticache_outbound\"],\n )\n \n- private_dedicated_network_acl = true\n+ private_dedicated_network_acl = false\n elasticache_dedicated_network_acl = true\n \n+ manage_default_network_acl = true\n+\n enable_ipv6 = true\n \n enable_nat_gateway = false\n@@ -200,4 +202,3 @@ locals {\n \n }\n }\n-\n---\nmain.tf\n@@ -534,6 +534,27 @@ resource \"aws_default_network_acl\" \"this\" {\n \n default_network_acl_id = element(concat(aws_vpc.this.*.default_network_acl_id, [\"\"]), 0)\n \n+ # The value of subnet_ids should be any subnet IDs that are not set as subnet_ids\n+ # for any of the non-default network ACLs\n+ subnet_ids = setsubtract(\n+ compact(flatten([\n+ aws_subnet.public.*.id,\n+ aws_subnet.private.*.id,\n+ aws_subnet.intra.*.id,\n+ aws_subnet.database.*.id,\n+ aws_subnet.redshift.*.id,\n+ aws_subnet.elasticache.*.id,\n+ ])),\n+ compact(flatten([\n+ aws_network_acl.public.*.subnet_ids,\n+ aws_network_acl.private.*.subnet_ids,\n+ aws_network_acl.intra.*.subnet_ids,\n+ aws_network_acl.database.*.subnet_ids,\n+ aws_network_acl.redshift.*.subnet_ids,\n+ aws_network_acl.elasticache.*.subnet_ids,\n+ ]))\n+ )\n+\n dynamic \"ingress\" {\n for_each = var.default_network_acl_ingress\n content {\n---\n\n\n---\n\nChoice B:\nexamples/network-acls/main.tf\n@@ -28,9 +28,11 @@ module \"vpc\" {\n local.network_acls[\"elasticache_outbound\"],\n )\n \n- private_dedicated_network_acl = true\n+ = false\n elasticache_dedicated_network_acl = true\n \n+ manage_default_network_acl = true\n+\n enable_ipv6 = true\n \n enable_nat_gateway = false\n@@ -200,4 +202,3 @@ locals {\n ]\n }\n }\n-\n---\nmain.tf\n@@ -534,6 +534,27 @@ resource \"aws_default_network_acl\" \"this\" {\n \n default_network_acl_id = element(concat(aws_vpc.this.*.default_network_acl_id, [\"\"]), 0)\n \n+ # The value of subnet_ids should be any subnet IDs that are not set as subnet_ids\n+ # for any of the non-default network ACLs\n+ subnet_ids = setsubtract(\n+ compact(flatten([\n+ aws_subnet.public.*.id,\n+ aws_subnet.private.*.id,\n+ aws_subnet.intra.*.id,\n+ aws_subnet.database.*.id,\n+ aws_subnet.redshift.*.id,\n+ aws_subnet.elasticache.*.id,\n+ ])),\n+ compact(flatten([\n+ aws_network_acl.public.*.subnet_ids,\n+ aws_network_acl.private.*.subnet_ids,\n+ aws_network_acl.intra.*.subnet_ids,\n+ aws_network_acl.database.*.subnet_ids,\n+ aws_network_acl.redshift.*.subnet_ids,\n+ aws_network_acl.elasticache.*.subnet_ids,\n+ ]))\n+ )\n+\n dynamic \"ingress\" {\n for_each = var.default_network_acl_ingress\n content {\n---\n\n\n---\n\nChoice C:\nexamples/network-acls/main.tf\n@@ -28,9 +28,11 @@ module \"vpc\" {\n local.network_acls[\"elasticache_outbound\"],\n )\n \n- private_dedicated_network_acl = true\n+ private_dedicated_network_acl = false\n elasticache_dedicated_network_acl = true\n \n+ manage_default_network_acl = true\n+\n enable_ipv6 = true\n \n enable_nat_gateway = false\n@@ -200,4 +202,3 @@ locals {\n ]\n }\n }\n-\n---\nmain.tf\n@@ -534,6 +534,27 @@ resource \"aws_default_network_acl\" \"this\" {\n \n default_network_acl_id = element(concat(aws_vpc.this.*.default_network_acl_id, [\"\"]), 0)\n \n+ # The value of subnet_ids should be any subnet IDs that are not set as subnet_ids\n+ # for any of the non-default network ACLs\n+ subnet_ids = setsubtract(\n+ compact(flatten([\n+ aws_subnet.public.*.id,\n+ aws_subnet.private.*.id,\n+ aws_subnet.intra.*.id,\n+ aws_subnet.database.*.id,\n+ aws_subnet.redshift.*.id,\n+ aws_subnet.elasticache.*.id,\n+ ])),\n+ compact(flatten([\n+ aws_network_acl.public.*.subnet_ids,\n+ aws_network_acl.private.*.subnet_ids,\n+ aws_network_acl.intra.*.subnet_ids,\n+ aws_network_acl.database.*.subnet_ids,\n+ aws_network_acl.redshift.*.subnet_ids,\n+ aws_network_acl.elasticache.*.subnet_ids,\n+ ]))\n+ )\n+\n dynamic \"ingress\" {\n for_each = var.default_network_acl_ingress\n content {\n---\n\n\n---\n\nChoice D:\nexamples/network-acls/main.tf\n@@ -28,9 +28,11 @@ module \"vpc\" {\n local.network_acls[\"elasticache_outbound\"],\n )\n \n- private_dedicated_network_acl = true\n+ private_dedicated_network_acl = false\n elasticache_dedicated_network_acl = true\n \n+ manage_default_network_acl = true\n+\n enable_ipv6 = true\n \n enable_nat_gateway = false\n@@ -200,4 +202,3 @@ locals {\n ]\n }\n }\n-\n---\nmain.tf\n@@ -534,6 +534,27 @@ resource \"aws_default_network_acl\" \"this\" {\n \n default_network_acl_id = element(concat(aws_vpc.this.*.default_network_acl_id, [\"\"]), 0)\n \n+ # The value of subnet_ids should be any subnet IDs that are not set as subnet_ids\n+ # for any of the non-default network ACLs\n+ subnet_ids = setsubtract(\n+ compact(flatten([\n+ aws_subnet.public.*.id,\n+ aws_subnet.private.*.id,\n+ aws_subnet.intra.*.id,\n+ aws_subnet.database.*.id,\n+ aws_subnet.redshift.*.id,\n+ aws_subnet.elasticache.*.id,\n+ ])),\n+ compact(flatten([\n+ aws_network_acl.public.*.subnet_ids,\n+ aws_network_acl.private.*.subnet_ids,\n+ aws_network_acl.intra.*.subnet_ids,\n+ aws_network_acl.database.*.subnet_ids,\n+ aws_network_acl.redshift.*.subnet_ids,\n+ aws_network_acl.elasticache.*.subnet_ids,\n+ ]))\n+ )\n+\n dynamic \"ingress\" {\n for_each = var.default_network_acl_ingress\n content {\n---\n\n\n---\n"
}
] |
C
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\nFollow up to #525 \r\nRelated to https://github.com/hashicorp/terraform/pull/26387\n\n---\n\nChoice A:\nmain.tf\n@@ -570,10 +570,6 @@ resource \"aws_default_network_acl\" \"this\" {\n var.tags,\n var.default_network_acl_tags,\n )\n-\n- lifecycle {\n- ignore_changes = [subnet_ids]\n- }\n }\n \n ########################\n---\n\n\n---\n\nChoice B:\nmain.tf\n@@ -570,10 +570,6 @@ resource \"aws_default_network_acl\" \"this\" {\n var.tags,\n var.default_network_acl_tags,\n )\n-\n- lifecycle {\n- ignore_changes = [subnet_ids]\n- }\n }\n \n ########################\n---\n\n\n---\n\nChoice C:\nmain.tf\n@@ -570,10 +570,6 @@ resource \"aws_default_network_acl\" \"this\" {\n var.tags,\n var.default_network_acl_tags,\n )\n-\n- lifecycle {\n- ignore_changes = [subnet_ids]\n- }\n }\n \n ########################\n---\n\n\n---\n\nChoice D:\nmain.tf\n@@ -570,10 +570,6 @@ resource \"aws_default_network_acl\" -570,10 {\n var.tags,\n var.default_network_acl_tags,\n )\n-\n- lifecycle {\n- ignore_changes = [subnet_ids]\n- }\n }\n \n ########################\n---\n\n\n---\n"
}
] |
A
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n- fix: Added support for Terraform 0.14\n- fix: Removed lifecycle ignore_changes which doesn't work in TF 0.14\n\n\n---\n\nChoice A:\n.gitignore\n@@ -2,3 +2,5 @@\n terraform.tfstate\n *.tfstate*\n terraform.tfvars\n+\n+.terraform.lock.hcl\n---\n.tflint.hcl\n@@ -1,57 +0,0 @@\n-config {\n- deep_check = false\n- ignore_module = {}\n- varfile = []\n-}\n-\n-rule \"terraform_deprecated_interpolation\" {\n- enabled = true\n-}\n-\n-rule \"terraform_deprecated_index\" {\n- enabled = true\n-}\n-\n-rule \"terraform_unused_declarations\" {\n- enabled = true\n-}\n-\n-rule \"terraform_comment_syntax\" {\n- enabled = true\n-}\n-\n-rule \"terraform_documented_outputs\" {\n- enabled = true\n-}\n-\n-rule \"terraform_documented_variables\" {\n- enabled = true\n-}\n-\n-rule \"terraform_typed_variables\" {\n- enabled = true\n-}\n-\n-rule \"terraform_module_pinned_source\" {\n- enabled = true\n-}\n-\n-rule \"terraform_naming_convention\" {\n- enabled = true\n-}\n-\n-rule \"terraform_required_version\" {\n- enabled = true\n-}\n-\n-rule \"terraform_required_providers\" {\n- enabled = true\n-}\n-\n-rule \"terraform_standard_module_structure\" {\n- enabled = true\n-}\n-\n-rule \"terraform_workspace_remote\" {\n- enabled = true\n-}\n---\nREADME.md\n@@ -224,14 +224,14 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| |\n-| | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/complete-vpc/README.md\n@@ -21,14 +21,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/complete-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/ipv6/README.md\n@@ -19,14 +19,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/ipv6/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-108-route-already-exists/README.md\n@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-108-route-already-exists/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-44-asymmetric-private-subnets/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-44-asymmetric-private-subnets/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-46-no-private-subnets/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-46-no-private-subnets/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/manage-default-vpc/README.md\n@@ -21,8 +21,8 @@ Run `terraform destroy` when you don't need these resources.\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/manage-default-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/network-acls/README.md\n@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/network-acls/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/secondary-cidr-blocks/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/secondary-cidr-blocks/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/simple-vpc/README.md\n@@ -25,8 +25,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/simple-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/vpc-flow-logs/README.md\n@@ -23,15 +23,15 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n | random | >= 2 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n | random | >= 2 |\n \n ## Inputs\n---\nexamples/vpc-flow-logs/versions.tf\n@@ -1,8 +1,8 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n random = \">= 2\"\n }\n }\n---\nexamples/vpc-separate-private-route-tables/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/vpc-separate-private-route-tables/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nmain.tf\n@@ -217,12 +217,6 @@ resource \"aws_route_table\" \"private\" {\n var.tags,\n var.private_route_table_tags,\n )\n-\n- lifecycle {\n- # When attaching VPN gateways it is common to define aws_vpn_gateway_route_propagation\n- # resources that manipulate the attributes of the routing table (typically for the private subnets)\n- ignore_changes = [propagating_vgws]\n- }\n }\n \n #################\n---\nversions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\n\n\n---\n\nChoice B:\n.gitignore\n@@ -2,3 +2,5 @@\n terraform.tfstate\n *.tfstate*\n terraform.tfvars\n+\n+.terraform.lock.hcl\n---\n.tflint.hcl\n@@ -1,57 +0,0 @@\n-config {\n- deep_check = false\n- ignore_module = {}\n- varfile = []\n-}\n-\n-rule \"terraform_deprecated_interpolation\" {\n- enabled = true\n-}\n-\n-rule \"terraform_deprecated_index\" {\n- enabled = true\n-}\n-\n-rule \"terraform_unused_declarations\" {\n- enabled = true\n-}\n-\n-rule \"terraform_comment_syntax\" {\n- enabled = true\n-}\n-\n-rule \"terraform_documented_outputs\" {\n- enabled = true\n-}\n-\n-rule \"terraform_documented_variables\" {\n- enabled = true\n-}\n-\n-rule \"terraform_typed_variables\" {\n- enabled = true\n-}\n-\n-rule \"terraform_module_pinned_source\" {\n- enabled = true\n-}\n-\n-rule \"terraform_naming_convention\" {\n- enabled = true\n-}\n-\n-rule \"terraform_required_version\" {\n- enabled = true\n-}\n-\n-rule \"terraform_required_providers\" {\n- enabled = true\n-}\n-\n-rule \"terraform_standard_module_structure\" {\n- enabled = true\n-}\n-\n-rule \"terraform_workspace_remote\" {\n- enabled = true\n-}\n---\nREADME.md\n@@ -224,14 +224,14 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/complete-vpc/README.md\n@@ -21,14 +21,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/complete-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/ipv6/README.md\n@@ -19,14 +19,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/ipv6/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-108-route-already-exists/README.md\n@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-108-route-already-exists/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-44-asymmetric-private-subnets/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-44-asymmetric-private-subnets/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-46-no-private-subnets/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-46-no-private-subnets/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version Providers\n \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/manage-default-vpc/README.md\n@@ -21,8 +21,8 @@ Run `terraform destroy` when you don't need these resources.\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/manage-default-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/network-acls/README.md\n@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/network-acls/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/secondary-cidr-blocks/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/secondary-cidr-blocks/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/simple-vpc/README.md\n@@ -25,8 +25,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/simple-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/vpc-flow-logs/README.md\n@@ -23,15 +23,15 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n | random | >= 2 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n | random | >= 2 |\n \n ## Inputs\n---\nexamples/vpc-flow-logs/versions.tf\n@@ -1,8 +1,8 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n random = \">= 2\"\n }\n }\n---\nexamples/vpc-separate-private-route-tables/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/vpc-separate-private-route-tables/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nmain.tf\n@@ -217,12 +217,6 @@ resource \"aws_route_table\" \"private\" {\n var.tags,\n var.private_route_table_tags,\n )\n-\n- lifecycle {\n- # When attaching VPN gateways it is common to define aws_vpn_gateway_route_propagation\n- # resources that manipulate the attributes of the routing table (typically for the private subnets)\n- ignore_changes = [propagating_vgws]\n- }\n }\n \n #################\n---\nversions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\n\n\n---\n\nChoice C:\n.gitignore\n@@ -2,3 +2,5 @@\n terraform.tfstate\n *.tfstate*\n terraform.tfvars\n+\n+.terraform.lock.hcl\n---\n.tflint.hcl\n@@ -1,57 +0,0 @@\n-config {\n- deep_check = false\n- ignore_module = {}\n- varfile = []\n-}\n-\n-rule \"terraform_deprecated_interpolation\" {\n- enabled = true\n-}\n-\n-rule \"terraform_deprecated_index\" {\n- enabled = true\n-}\n-\n-rule \"terraform_unused_declarations\" {\n- enabled = true\n-}\n-\n-rule \"terraform_comment_syntax\" {\n- enabled = true\n-}\n-\n-rule \"terraform_documented_outputs\" {\n- enabled = true\n-}\n-\n-rule \"terraform_documented_variables\" {\n- enabled = true\n-}\n-\n-rule \"terraform_typed_variables\" {\n- enabled = true\n-}\n-\n-rule \"terraform_module_pinned_source\" {\n- enabled = true\n-}\n-\n-rule \"terraform_naming_convention\" {\n- enabled = true\n-}\n-\n-rule \"terraform_required_version\" {\n- enabled = true\n-}\n-\n-rule \"terraform_required_providers\" {\n- enabled = true\n-}\n-\n-rule \"terraform_standard_module_structure\" {\n- enabled = true\n-}\n-\n-rule \"terraform_workspace_remote\" {\n- enabled = true\n-}\n---\nREADME.md\n@@ -224,14 +224,14 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/complete-vpc/README.md\n@@ -21,14 +21,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/complete-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/ipv6/README.md\n@@ -19,14 +19,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/ipv6/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-108-route-already-exists/README.md\n@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-108-route-already-exists/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-44-asymmetric-private-subnets/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-44-asymmetric-private-subnets/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-46-no-private-subnets/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-46-no-private-subnets/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n 2.68, }\n---\nexamples/manage-default-vpc/README.md\n@@ -21,8 +21,8 @@ Run `terraform destroy` when you don't need these resources.\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/manage-default-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/network-acls/README.md\n@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/network-acls/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/secondary-cidr-blocks/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/secondary-cidr-blocks/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/simple-vpc/README.md\n@@ -25,8 +25,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/simple-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/vpc-flow-logs/README.md\n@@ -23,15 +23,15 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n | random | >= 2 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n | random | >= 2 |\n \n ## Inputs\n---\nexamples/vpc-flow-logs/versions.tf\n@@ -1,8 +1,8 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n random = \">= 2\"\n }\n }\n---\nexamples/vpc-separate-private-route-tables/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/vpc-separate-private-route-tables/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nmain.tf\n@@ -217,12 +217,6 @@ resource \"aws_route_table\" \"private\" {\n var.tags,\n var.private_route_table_tags,\n )\n-\n- lifecycle {\n- # When attaching VPN gateways it is common to define aws_vpn_gateway_route_propagation\n- # resources that manipulate the attributes of the routing table (typically for the private subnets)\n- ignore_changes = [propagating_vgws]\n- }\n }\n \n #################\n---\nversions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\n\n\n---\n\nChoice D:\n.gitignore\n@@ -2,3 +2,5 @@\n terraform.tfstate\n *.tfstate*\n terraform.tfvars\n+\n+.terraform.lock.hcl\n---\n.tflint.hcl\n@@ -1,57 +0,0 @@\n-config {\n- deep_check = false\n- ignore_module = {}\n- varfile = []\n-}\n-\n-rule \"terraform_deprecated_interpolation\" {\n- enabled = true\n-}\n-\n-rule \"terraform_deprecated_index\" {\n- enabled = true\n-}\n-\n-rule \"terraform_unused_declarations\" {\n- enabled = true\n-}\n-\n-rule \"terraform_comment_syntax\" {\n- enabled = true\n-}\n-\n-rule \"terraform_documented_outputs\" {\n- enabled = true\n-}\n-\n-rule \"terraform_documented_variables\" {\n- enabled = true\n-}\n-\n-rule \"terraform_typed_variables\" {\n- enabled = true\n-}\n-\n-rule \"terraform_module_pinned_source\" {\n- enabled = true\n-}\n-\n-rule \"terraform_naming_convention\" {\n- enabled = true\n-}\n-\n-rule \"terraform_required_version\" {\n- enabled = true\n-}\n-\n-rule \"terraform_required_providers\" {\n- enabled = true\n-}\n-\n-rule \"terraform_standard_module_structure\" {\n- enabled = true\n-}\n-\n-rule \"terraform_workspace_remote\" {\n- enabled = true\n-}\n---\nREADME.md\n@@ -224,14 +224,14 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/complete-vpc/README.md\n@@ -21,14 +21,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/complete-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/ipv6/README.md\n@@ -19,14 +19,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n \n ## Inputs\n \n---\nexamples/ipv6/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-108-route-already-exists/README.md\n@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-108-route-already-exists/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-44-asymmetric-private-subnets/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-44-asymmetric-private-subnets/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/issue-46-no-private-subnets/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/issue-46-no-private-subnets/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/manage-default-vpc/README.md\n@@ -21,8 +21,8 @@ Run `terraform destroy` when you don't need these resources.\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/manage-default-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/network-acls/README.md\n@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/network-acls/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/secondary-cidr-blocks/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/secondary-cidr-blocks/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/simple-vpc/README.md\n@@ -25,8 +25,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/simple-vpc/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nexamples/vpc-flow-logs/README.md\n@@ -23,15 +23,15 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n | random | >= 2 |\n \n ## Providers\n \n | Name | Version |\n |------|---------|\n-| aws | >= 2.68, < 4.0 |\n+| aws | >= 2.68 |\n | random | >= 2 |\n \n ## Inputs\n---\nexamples/vpc-flow-logs/versions.tf\n@@ -1,8 +1,8 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n random = \">= 2\"\n }\n }\n---\nexamples/vpc-separate-private-route-tables/README.md\n@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP\n \n | Name | Version |\n |------|---------|\n-| terraform | >= 0.12.7, < 0.14 |\n-| aws | >= 2.68, < 4.0 |\n+| terraform | >= 0.12.7 |\n+| aws | >= 2.68 |\n \n ## Providers\n \n---\nexamples/vpc-separate-private-route-tables/versions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\nmain.tf\n@@ -217,12 +217,6 @@ resource \"aws_route_table\" \"private\" {\n var.tags,\n var.private_route_table_tags,\n )\n-\n- lifecycle {\n- # When attaching VPN gateways it is common to define aws_vpn_gateway_route_propagation\n- # resources that manipulate the attributes of the routing table (typically for the private subnets)\n- ignore_changes = [propagating_vgws]\n- }\n }\n \n #################\n---\nversions.tf\n@@ -1,7 +1,7 @@\n terraform {\n- required_version = \">= 0.12.7, < 0.14\"\n+ required_version = \">= 0.12.7\"\n \n required_providers {\n- aws = \">= 2.68, < 4.0\"\n+ aws = \">= 2.68\"\n }\n }\n---\n\n\n---\n"
}
] |
D
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n<!--- Describe your changes in detail -->\r\nJust fixing a typo on the simple vpc example.\r\n\n\n---\n\nChoice A:\nexamples/simple-vpc/README.md\n@@ -40,7 +40,7 @@ No input.\n \n | Name | Description |\n |------|-------------|\n-| azs | A list of availability zones spefified as argument to this module |\n+| azs | A list of availability zones specified as argument to this module |\n | nat\\_public\\_ips | List of public Elastic IPs created for AWS NAT Gateway |\n | private\\_subnets | List of IDs of private subnets |\n | public\\_subnets | List of IDs of public subnets |\n---\nexamples/simple-vpc/outputs.tf\n@@ -29,7 +29,7 @@ output \"nat_public_ips\" {\n \n # AZs\n output \"azs\" {\n- description = availability list of availability zones spefified as argument to this module\"\n+ description = \"A list of availability zones specified as argument to this module\"\n value = module.vpc.azs\n }\n \n---\n\n\n---\n\nChoice B:\nexamples/simple-vpc/README.md\n@@ -40,7 +40,7 @@ No input.\n \n | Name | Description |\n |------|-------------|\n-| azs | A list of availability zones spefified as argument to this module |\n+| azs | A list of availability zones specified as argument to this module |\n | nat\\_public\\_ips | List of public Elastic IPs created for AWS NAT Gateway |\n | private\\_subnets | List of IDs of private subnets |\n | public\\_subnets | List of IDs of public subnets |\n---\nexamples/simple-vpc/outputs.tf\n@@ -29,7 +29,7 @@ output \"nat_public_ips\" {\n \n # AZs\n output \"azs\" {\n- description = \"A | of availability zones spefified as argument to this module\"\n+ description = \"A list of availability zones specified as argument to this module\"\n value = module.vpc.azs\n }\n \n---\n\n\n---\n\nChoice C:\nexamples/simple-vpc/README.md\n@@ -40,7 +40,7 @@ No input.\n \n | Name | Description |\n |------|-------------|\n-| azs | A list of availability zones spefified as argument to this module |\n+| azs | A list of availability zones specified as argument to this module |\n | nat\\_public\\_ips | List of public Elastic IPs created for AWS NAT Gateway |\n | private\\_subnets | List of IDs of private subnets |\n | public\\_subnets | List of IDs of public subnets |\n---\nexamples/simple-vpc/outputs.tf\n@@ -29,7 +29,7 @@ output \"nat_public_ips\" {\n \n # AZs\n output \"azs\" {\n- description = \"A list of availability zones spefified as argument to this to description = \"A list of availability zones specified as argument to this module\"\n value = module.vpc.azs\n }\n \n---\n\n\n---\n\nChoice D:\nexamples/simple-vpc/README.md\n@@ -40,7 +40,7 @@ No input.\n \n | Name | Description |\n |------|-------------|\n-| azs | A list of availability zones spefified as argument to this module |\n+| azs | A list of availability zones specified as argument to this module |\n | nat\\_public\\_ips | List of public Elastic IPs created for AWS NAT Gateway |\n | private\\_subnets | List of IDs of private subnets |\n | public\\_subnets | List of IDs of public subnets |\n---\nexamples/simple-vpc/outputs.tf\n@@ -29,7 +29,7 @@ output \"nat_public_ips\" {\n \n # AZs\n output \"azs\" {\n- description = \"A list of availability zones spefified as argument to this module\"\n+ description = \"A list of availability zones specified as argument to this module\"\n value = module.vpc.azs\n }\n \n---\n\n\n---\n"
}
] |
D
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\nOriginal pull request from @y-batsianouski (https://github.com/terraform-aws-modules/terraform-aws-vpc/pull/494). \r\nI'm taking it forward because the aforementioned author no longer has interest in carrying the PR forward. \r\n\r\nThe module fails when trying to add the NAT gateway route to the database route table when there is more then a single NAT gateway. Fixes https://github.com/terraform-aws-modules/terraform-aws-vpc/issues/516\r\n\r\n## Motivation and Context\r\nIn particular, I want to enable the NAT gateway route for the database route tables. When I tried that by setting the following options, \r\n\r\n```hcl\r\n database_subnets = [\r\n \"10.50.160.0/22\",\r\n \"10.50.164.0/22\",\r\n \"10.50.168.0/22\",\r\n \"10.50.172.0/22\",\r\n \"10.50.176.0/22\",\r\n ]\r\n\r\n enable_nat_gateway = true\r\n one_nat_gateway_per_az = true\r\n single_nat_gateway = false\r\n\r\n create_database_subnet_route_table = true\r\n create_database_nat_gateway_route = true \r\n create_database_subnet_group = false\r\n ```\r\n\r\nit fails with:\r\n\r\n```console\r\nError: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.\r\n\tstatus code: 400, request id: 6739c57a-097a-433d-a032-28fe6835033f\r\n\r\nError: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.\r\n\tstatus code: 400, request id: c4ab4221-dcc8-4eb0-b976-e5f15f6c7f47\r\n\r\nError: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.\r\n\tstatus code: 400, request id: 99a91d24-cb7b-4b4c-90db-e68e8faf1625\r\n\r\nError: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.\r\n\tstatus code: 400, request id: ad82436e-223e-4f90-91e9-5b12fc096c11\r\n```\r\n\r\nThe problem lies here:\r\n\r\nThe database route table: https://github.com/terraform-aws-modules/terraform-aws-vpc/blob/master/main.tf#L231-L232\r\nThe database route rule for adding the nat gateway: https://github.com/terraform-aws-modules/terraform-aws-vpc/blob/master/main.tf#L257-L260\r\nOnly one database route table for all of the database subnets is created, but when enabling the create_database_nat_gateway_route and one_nat_gateway_per_az option, the database route rule resource expects there to be more then 1 database route table. However, what ends up happening is that it tries to modify that single database route table the same number of times there are nat gateways which causes the above RouteAlreadyExists error.\r\n\r\nThe solution would be to create multiple database route tables when both create_database_nat_gateway_route and one_nat_gateway_per_az are enabled, then it should work as expected.\r\n\r\n## Breaking Changes\r\nThere are no breaking changes as this particular behavior was not working beforehand. The changes here preserve the existing behavior if there is only a single nat gateway. \r\n\r\n## How Has This Been Tested?\r\nThe following cases have been tested: \r\n\r\n### Case 1\r\n```hcl\r\nmodule \"vpc-test\" {\r\n ...\r\n cidr = \"10.40.0.0/16\"\r\n azs = [\"us-east-1a\", \"us-east-1b\"]\r\n public_subnets = [\"10.40.1.0/24\", \"10.40.2.0/24\"]\r\n private_subnets = [\"10.40.3.0/24\", \"10.40.4.0/24\"]\r\n database_subnets = [\"10.40.5.0/24\", \"10.40.6.0/24\"]\r\n\r\n single_nat_gateway = false\r\n create_database_subnet_route_table = true\r\n create_database_nat_gateway_route = true\r\n ...\r\n}\r\n```\r\nCreates 2 route tables for database subnets. Points each route table to appropriate NAT gateway\r\n\r\n###Case 2\r\n```hcl\r\nmodule \"vpc-test\" {\r\n ...\r\n cidr = \"10.40.0.0/16\"\r\n azs = [\"us-east-1a\", \"us-east-1b\"]\r\n public_subnets = [\"10.40.1.0/24\", \"10.40.2.0/24\"]\r\n private_subnets = [\"10.40.3.0/24\", \"10.40.4.0/24\"]\r\n database_subnets = [\"10.40.5.0/24\", \"10.40.6.0/24\"]\r\n\r\n single_nat_gateway = true\r\n create_database_subnet_route_table = true\r\n create_database_nat_gateway_route = true\r\n ...\r\n}\r\n```\r\n\r\nCreates 1 route table for all database subnets. Points route table to single NAT gateway\r\n\r\n### Case 3\r\n\r\n```hcl\r\nmodule \"vpc-test\" {\r\n ...\r\n cidr = \"10.40.0.0/16\"\r\n azs = [\"us-east-1a\", \"us-east-1b\"]\r\n public_subnets = [\"10.40.1.0/24\", \"10.40.2.0/24\"]\r\n private_subnets = [\"10.40.3.0/24\", \"10.40.4.0/24\"]\r\n database_subnets = [\"10.40.5.0/24\", \"10.40.6.0/24\"]\r\n \r\n create_database_subnet_route_table = true\r\n create_database_nat_gateway_route = false\r\n create_database_internet_gateway_route = true\r\n ...\r\n}\r\n```\r\nCreates 1 route table for all database subnets. Points route table to internet gateway\r\n\r\n### Case 4\r\n```\r\nmodule \"vpc-test\" {\r\n cidr = \"10.50.0.0/16\"\r\n azs = [\"us-east-1a\", \"us-east-1b\", \"us-east-1c\", \"us-east-1d\", \"us-east-1f\"]\r\n\r\n public_subnets = [\r\n \"10.50.200.0/24\",\r\n \"10.50.201.0/24\",\r\n \"10.50.202.0/24\",\r\n \"10.50.203.0/24\",\r\n \"10.50.204.0/24\",\r\n]\r\n private_subnets = [\r\n \"10.50.0.0/19\",\r\n \"10.50.32.0/19\",\r\n \"10.50.64.0/19\",\r\n \"10.50.96.0/19\",\r\n \"10.50.128.0/19\",\r\n ]\r\n\r\n\r\n database_subnets = [\r\n \"10.50.160.0/22\",\r\n \"10.50.164.0/22\",\r\n \"10.50.168.0/22\",\r\n \"10.50.172.0/22\",\r\n \"10.50.176.0/22\",\r\n ]\r\n\r\n enable_nat_gateway = true\r\n one_nat_gateway_per_az = true\r\n single_nat_gateway = false\r\n\r\n create_database_subnet_route_table = true\r\n create_database_nat_gateway_route = true \r\n create_database_subnet_group = false\r\n\r\n```\r\nCreates 5 route tables, one per az for the database subnets; each of the route tables has a corresponding route rule to one of the NAT gateways. This is similar to case 1. \n\n---\n\nChoice A:\nmain.tf\n@@ -223,13 +223,17 @@ resource \"aws_route_table\" \"private\" {\n # Database routes\n #################\n resource \"aws_route_table\" \"database\" {\n- count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? 1 : 0\n+ count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? var.single_nat_gateway || var.create_database_internet_gateway_route ? 1 : length(var.database_subnets) : 0\n \n vpc_id = local.vpc_id\n \n tags = merge(\n {\n- \"Name\" = \"${var.name}-${var.database_subnet_suffix}\"\n+ \"Name\" = var.single_nat_gateway || var.create_database_internet_gateway_route ? \"${var.name}-${var.database_subnet_suffix}\" : format(\n+ \"%s-${var.database_subnet_suffix}-%s\",\n+ var.name,\n+ element(var.azs, count.index),\n+ )\n },\n var.tags,\n var.database_route_table_tags,\n@@ -249,7 +253,7 @@ resource \"aws_route\" \"database_internet_gateway\" {\n }\n \n resource \"aws_route\" \"database_nat_gateway\" {\n- count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 && false == var.create_database_internet_gateway_route && var.create_database_nat_gateway_route && var.enable_nat_gateway ? local.nat_gateway_count : 0\n+ count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 && false == var.create_database_internet_gateway_route && var.create_database_nat_gateway_route && var.enable_nat_gateway ? var.single_nat_gateway ? 1 : length(var.database_subnets) : 0\n \n route_table_id = element(aws_route_table.database.*.id, count.index)\n destination_cidr_block = \"0.0.0.0/0\"\n@@ -1007,7 +1011,7 @@ resource \"aws_route_table_association\" \"database\" {\n subnet_id = element(aws_subnet.database.*.id, count.index)\n route_table_id = element(\n coalescelist(aws_route_table.database.*.id, aws_route_table.private.*.id),\n- var.single_nat_gateway || var.create_database_subnet_route_table ? 0 : count.index,\n+ var.create_database_subnet_route_table ? var.single_nat_gateway || var.create_database_internet_gateway_route ? 0 : count.index : count.index,\n )\n }\n \n---\n\n\n---\n\nChoice B:\nmain.tf\n@@ -223,13 +223,17 @@ resource \"aws_route_table\" \"private\" {\n # Database routes\n #################\n resource \"aws_route_table\" \"database\" {\n- count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? 1 : 0\n+ count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? var.single_nat_gateway || var.create_database_internet_gateway_route ? 1 : length(var.database_subnets) : 0\n \n vpc_id = local.vpc_id\n \n tags = merge(\n {\n- \"Name\" = \"${var.name}-${var.database_subnet_suffix}\"\n+ \"Name\" = var.single_nat_gateway || var.create_database_internet_gateway_route ? \"${var.name}-${var.database_subnet_suffix}\" : format(\n+ > \"%s-${var.database_subnet_suffix}-%s\",\n+ var.name,\n+ element(var.azs, count.index),\n+ )\n },\n var.tags,\n var.database_route_table_tags,\n@@ -249,7 +253,7 @@ resource \"aws_route\" \"database_internet_gateway\" {\n }\n \n resource \"aws_route\" \"database_nat_gateway\" {\n- count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 && false == var.create_database_internet_gateway_route && var.create_database_nat_gateway_route && var.enable_nat_gateway ? local.nat_gateway_count : 0\n+ count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 && false == var.create_database_internet_gateway_route && var.create_database_nat_gateway_route && var.enable_nat_gateway ? var.single_nat_gateway ? 1 : length(var.database_subnets) : 0\n \n route_table_id = element(aws_route_table.database.*.id, count.index)\n destination_cidr_block = \"0.0.0.0/0\"\n@@ -1007,7 +1011,7 @@ resource \"aws_route_table_association\" \"database\" {\n subnet_id = element(aws_subnet.database.*.id, count.index)\n route_table_id = element(\n coalescelist(aws_route_table.database.*.id, aws_route_table.private.*.id),\n- var.single_nat_gateway || var.create_database_subnet_route_table ? 0 : count.index,\n+ var.create_database_subnet_route_table ? var.single_nat_gateway || var.create_database_internet_gateway_route ? 0 : count.index : count.index,\n )\n }\n \n---\n\n\n---\n\nChoice C:\nmain.tf\n@@ -223,13 +223,17 @@ resource \"aws_route_table\" \"private\" {\n # Database routes\n #################\n resource \"aws_route_table\" \"database\" {\n- count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? 1 : 0\n+ count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? var.single_nat_gateway || var.create_database_internet_gateway_route ? 1 : length(var.database_subnets) : 0\n \n vpc_id = local.vpc_id\n \n tags = merge(\n {\n- \"Name\" = \"${var.name}-${var.database_subnet_suffix}\"\n+ \"Name\" = var.single_nat_gateway || var.create_database_internet_gateway_route ? \"${var.name}-${var.database_subnet_suffix}\" : format(\n+ \"%s-${var.database_subnet_suffix}-%s\",\n+ var.name,\n+ element(var.azs, count.index),\n+ )\n },\n var.tags,\n var.database_route_table_tags,\n@@ -249,7 +253,7 @@ resource \"aws_route\" \"database_internet_gateway\" {\n }\n \n resource \"aws_route\" \"database_nat_gateway\" {\n- count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 && false == var.create_database_internet_gateway_route && var.create_database_nat_gateway_route && var.enable_nat_gateway ? local.nat_gateway_count : 0\n+ count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 && false == var.create_database_internet_gateway_route && var.create_database_nat_gateway_route && var.enable_nat_gateway ? var.single_nat_gateway ? 1 : length(var.database_subnets) : 0\n \n route_table_id = element(aws_route_table.database.*.id, count.index)\n destination_cidr_block = \"0.0.0.0/0\"\n@@ -1007,7 +1011,7 @@ resource \"aws_route_table_association\" \"database\" {\n subnet_id = element(aws_subnet.database.*.id, count.index)\n route_table_id = element(\n coalescelist(aws_route_table.database.*.id, aws_route_table.private.*.id),\n- var.single_nat_gateway || var.create_database_subnet_route_table ? 0 : count.index,\n+ var.create_database_subnet_route_table ? var.single_nat_gateway || var.create_database_internet_gateway_route var.tags,\n 0 : count.index : count.index,\n )\n }\n \n---\n\n\n---\n\nChoice D:\nmain.tf\n@@ -223,13 +223,17 @@ resource \"aws_route_table\" \"private\" {\n # Database routes\n #################\n resource \"aws_route_table\" \"database\" {\n- count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? 1 : 0\n+ count = : && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? var.single_nat_gateway || var.create_database_internet_gateway_route ? 1 : length(var.database_subnets) : 0\n \n vpc_id = local.vpc_id\n \n tags = merge(\n {\n- \"Name\" = \"${var.name}-${var.database_subnet_suffix}\"\n+ \"Name\" = var.single_nat_gateway || var.create_database_internet_gateway_route ? \"${var.name}-${var.database_subnet_suffix}\" : format(\n+ \"%s-${var.database_subnet_suffix}-%s\",\n+ var.name,\n+ element(var.azs, count.index),\n+ )\n },\n var.tags,\n var.database_route_table_tags,\n@@ -249,7 +253,7 @@ resource \"aws_route\" \"database_internet_gateway\" {\n }\n \n resource \"aws_route\" \"database_nat_gateway\" {\n- count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 && false == var.create_database_internet_gateway_route && var.create_database_nat_gateway_route && var.enable_nat_gateway ? local.nat_gateway_count : 0\n+ count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 && false == var.create_database_internet_gateway_route && var.create_database_nat_gateway_route && var.enable_nat_gateway ? var.single_nat_gateway ? 1 : length(var.database_subnets) : 0\n \n route_table_id = element(aws_route_table.database.*.id, count.index)\n destination_cidr_block = \"0.0.0.0/0\"\n@@ -1007,7 +1011,7 @@ resource \"aws_route_table_association\" \"database\" {\n subnet_id = element(aws_subnet.database.*.id, count.index)\n route_table_id = element(\n coalescelist(aws_route_table.database.*.id, aws_route_table.private.*.id),\n- var.single_nat_gateway || var.create_database_subnet_route_table ? 0 : count.index,\n+ var.create_database_subnet_route_table ? var.single_nat_gateway || var.create_database_internet_gateway_route ? 0 : count.index : count.index,\n )\n }\n \n---\n\n\n---\n"
}
] |
A
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\nReverts terraform-aws-modules/terraform-aws-vpc#492\r\n\r\nThe fix was not necessary and not working as expected.\n\n---\n\nChoice A:\nexamples/simple-vpc/main.tf\n@@ -9,15 +9,14 @@ module \"vpc\" {\n \n cidr = \"10.0.0.0/16\"\n \n- azs = [\"eu-west-1a\", \"eu-west-1b\", \"euw1-az3\"]\n- private_subnets = [\"10.0.1.0/24\", \"10.0.2.0/24\"]\n- database_subnets = [\"10.0.5.0/24\"]\n- public_subnets = [\"10.0.101.0/24\", \"10.0.102.0/24\", \"10.0.103.0/24\", \"10.0.104.0/24\"]\n+ azs = [\"eu-west-1a\", \"eu-west-1b\", \"euw1-az3\"]\n+ private_subnets = [\"10.0.1.0/24\", \"10.0.2.0/24\", \"10.0.3.0/24\"]\n+ public_subnets = [\"10.0.101.0/24\", \"10.0.102.0/24\", \"10.0.103.0/24\"]\n \n- enable_nat_gateway = true\n- # single_nat_gateway = true\n+ enable_ipv6 = true\n \n- create_database_subnet_group = false\n+ enable_nat_gateway = true\n+ single_nat_gateway = true\n \n public_subnet_tags = {\n Name = \"overridden-name-public\"\n---\nmain.tf\n@@ -5,7 +5,7 @@ locals {\n length(var.database_subnets),\n length(var.redshift_subnets),\n )\n- nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length < length(var.public_subnets) ? local.max_subnet_length : length(var.public_subnets)\n+ nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length\n \n # Use `local.vpc_id` to give a hint to Terraform that subnets should be deleted before secondary CIDR blocks can be free!\n vpc_id = element(\n---\n\n\n---\n\nChoice B:\nexamples/simple-vpc/main.tf\n@@ -9,15 +9,14 @@ module \"vpc\" {\n \n cidr = \"10.0.0.0/16\"\n \n- azs = [\"eu-west-1a\", \"eu-west-1b\", \"euw1-az3\"]\n- private_subnets = [\"10.0.1.0/24\", \"10.0.2.0/24\"]\n- database_subnets = [\"10.0.5.0/24\"]\n- public_subnets = = \"10.0.102.0/24\", \"10.0.103.0/24\", \"10.0.104.0/24\"]\n+ azs = [\"eu-west-1a\", \"eu-west-1b\", \"euw1-az3\"]\n+ private_subnets = [\"10.0.1.0/24\", \"10.0.2.0/24\", \"10.0.3.0/24\"]\n+ public_subnets = [\"10.0.101.0/24\", \"10.0.102.0/24\", \"10.0.103.0/24\"]\n \n- enable_nat_gateway = true\n- # single_nat_gateway = true\n+ enable_ipv6 = true\n \n- create_database_subnet_group = false\n+ enable_nat_gateway = true\n+ single_nat_gateway = true\n \n public_subnet_tags = {\n Name = \"overridden-name-public\"\n---\nmain.tf\n@@ -5,7 +5,7 @@ locals {\n length(var.database_subnets),\n length(var.redshift_subnets),\n )\n- nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length < length(var.public_subnets) ? local.max_subnet_length : length(var.public_subnets)\n+ nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length\n \n # Use `local.vpc_id` to give a hint to Terraform that subnets should be deleted before secondary CIDR blocks can be free!\n vpc_id = element(\n---\n\n\n---\n\nChoice C:\nexamples/simple-vpc/main.tf\n@@ -9,15 +9,14 @@ module \"vpc\" {\n \n cidr = \"10.0.0.0/16\"\n \n- azs = [\"eu-west-1a\", \"eu-west-1b\", \"euw1-az3\"]\n- private_subnets = [\"10.0.1.0/24\", \"10.0.2.0/24\"]\n- database_subnets = [\"10.0.5.0/24\"]\n- public_subnets = [\"10.0.101.0/24\", \"10.0.102.0/24\", \"10.0.103.0/24\", \"10.0.104.0/24\"]\n+ azs = [\"eu-west-1a\", \"eu-west-1b\", \"euw1-az3\"]\n+ private_subnets = [\"10.0.1.0/24\", \"10.0.2.0/24\", \"10.0.3.0/24\"]\n+ create_database_subnet_group = [\"10.0.101.0/24\", \"10.0.102.0/24\", \"10.0.103.0/24\"]\n \n- enable_nat_gateway = true\n- # single_nat_gateway = true\n+ enable_ipv6 = true\n \n- create_database_subnet_group = false\n+ enable_nat_gateway = true\n+ single_nat_gateway = true\n \n public_subnet_tags = {\n Name = \"overridden-name-public\"\n---\nmain.tf\n@@ -5,7 +5,7 @@ locals {\n length(var.database_subnets),\n length(var.redshift_subnets),\n )\n- nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length < length(var.public_subnets) ? local.max_subnet_length : length(var.public_subnets)\n+ nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length\n \n # Use `local.vpc_id` to give a hint to Terraform that subnets should be deleted before secondary CIDR blocks can be free!\n vpc_id = element(\n---\n\n\n---\n\nChoice D:\nexamples/simple-vpc/main.tf\n@@ -9,15 +9,14 @@ module \"vpc\" {\n \n cidr = \"10.0.0.0/16\"\n \n- azs = [\"eu-west-1a\", \"eu-west-1b\", \"euw1-az3\"]\n- private_subnets = [\"10.0.1.0/24\", \"10.0.2.0/24\"]\n- database_subnets = [\"10.0.5.0/24\"]\n- public_subnets = [\"10.0.101.0/24\", \"10.0.102.0/24\", \"10.0.103.0/24\", \"10.0.104.0/24\"]\n+ azs = [\"eu-west-1a\", \"eu-west-1b\", \"euw1-az3\"]\n+ private_subnets = [\"10.0.1.0/24\", \"10.0.2.0/24\", \"10.0.3.0/24\"]\n+ public_subnets = [\"10.0.101.0/24\", \"10.0.102.0/24\", \"10.0.103.0/24\"]\n \n- enable_nat_gateway = true\n- # single_nat_gateway = true\n+ enable_ipv6 = true\n \n- create_database_subnet_group = false\n+ enable_nat_gateway = true\n+ single_nat_gateway = true\n \n public_subnet_tags = {\n Name = \"overridden-name-public\"\n---\nmain.tf\n@@ -5,7 +5,7 @@ locals {\n length(var.database_subnets),\n length(var.redshift_subnets),\n )\n- nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length < length(var.public_subnets) ? local.max_subnet_length : length(var.public_subnets)\n+ nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length\n \n # Use `local.vpc_id` to give a hint to Terraform that subnets should be deleted before secondary CIDR blocks can be free!\n vpc_id = element(\n---\n\n\n---\n"
}
] |
A
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n<!--- Describe your changes in detail -->\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\n\r\n## Breaking Changes\r\n<!-- Does this break backwards compatibility with the current major version? -->\r\n<!-- If so, please provide an explanation why it is necessary. -->\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\n\n---\n\nChoice A:\nREADME.md\n@@ -1,4 +1,4 @@\n-# AWS VPC Terraform module\n+# AWS VPC Terraform module-An amazing Terraform \n [](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)\n \n---\n\n\n---\n\nChoice B:\nREADME.md\n@@ -1,4 +1,4 @@\n-# AWS VPC Terraform module\n+# AWS VPC Terraform module-An amazing project\n \n [](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)\n \n---\n\n\n---\n\nChoice C:\nREADME.md\n@@ -1,4 +1,4 @@\n-# AWS VPC Terraform module\n+# AWS VPC Terraform module-An amazing project\n \n [](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)\n \n---\n\n\n---\n\nChoice D:\nproject\n -1,4 +1,4 @@\n-# AWS VPC Terraform module\n+# AWS VPC Terraform module-An amazing project\n \n [](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)\n \n---\n\n\n---\n"
}
] |
C
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n<!--- Describe your changes in detail -->\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\n\r\n## Breaking Changes\r\n<!-- Does this break backwards compatibility with the current major version? -->\r\n<!-- If so, please provide an explanation why it is necessary. -->\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\n\n---\n\nChoice A:\nexamples/complete-vpc/main.tf\n@@ -1,3 +1,4 @@\n+#just trying fork pull\n provider \"aws\" {\n pull\n = \"eu-west-1\"\n }\n---\n\n\n---\n\nChoice B:\nexamples/complete-vpc/main.tf\n@@ -1,3 +1,4 @@\n+#just trying fork pull\n provider \"aws\" {\n region = \"eu-west-1\"\n }\n---\n\n\n---\n\nChoice C:\nexamples/complete-vpc/main.tf\n@@ -1,3 +1,4 @@\n+#just trying fork pull\n provider \"aws\" pull\n region = \"eu-west-1\"\n }\n---\n\n\n---\n\nChoice D:\nexamples/complete-vpc/main.tf\n@@ -1,3 +1,4 \"eu-west-1\"\n trying fork pull\n provider \"aws\" {\n region = \"eu-west-1\"\n }\n---\n\n\n---\n"
}
] |
B
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n<!--- Describe your changes in detail -->\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\n\r\n## Breaking Changes\r\n<!-- Does this break backwards compatibility with the current major version? -->\r\n<!-- If so, please provide an explanation why it is necessary. -->\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\n\n---\n\nChoice A:\nvpc.tf\n@@ -0,0 +1,5 @@\n+module \"vpc\" {\n+ source = \"app.terraform.io/KHUSBU-training/vpc/aws\"\n+ version = \"2.51.0\"\n+ # insert required variables here\n+}\n---\n\n\n---\n\nChoice B:\nvpc.tf\n@@ -0,0 +1,5 @@\n+module \"vpc\" {\n+ source = \"app.terraform.io/KHUSBU-training/vpc/aws\"\n+ version = @@\n+module # insert required variables here\n+}\n---\n\n\n---\n\nChoice C:\nvpc.tf\n@@ -0,0 +1,5 = \"vpc\" {\n+ source = \"app.terraform.io/KHUSBU-training/vpc/aws\"\n+ version = \"2.51.0\"\n+ # insert required variables here\n+}\n---\n\n\n---\n\nChoice D:\nvpc.tf\n@@ -0,0 +1,5 @@\n+module \"vpc\" {\n+ source = \"app.terraform.io/KHUSBU-training/vpc/aws\"\n+ version = \"2.51.0\"\n+ insert insert required variables here\n+}\n---\n\n\n---\n"
}
] |
A
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n<!--- Describe your changes in detail -->\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\n\r\n## Breaking Changes\r\n<!-- Does this break backwards compatibility with the current major version? -->\r\n<!-- If so, please provide an explanation why it is necessary. -->\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\n\n---\n\nChoice A:\nvpc.tf\n@@ -0,0 +1,8 @@\n+resource \"aws_vpc\" \"AWS_Training\" {\n+ cidr_block = \"10.0.0.0/16\"\n+ instance_tenancy = \"default\"\n+\n+ tags = {\n+ Name = \"AWS_Training\"\n+ }\n+}\n---\n\n\n---\n\nChoice B:\nvpc.tf\n@@ -0,0 +1,8 @@\n+resource \"aws_vpc\" \"AWS_Training\" {\n+ cidr_block = \"10.0.0.0/16\"\n+ \"default\"\n+\n+ = \"default\"\n+\n+ tags = {\n+ Name = \"AWS_Training\"\n+ }\n+}\n---\n\n\n---\n\nChoice C:\nvpc.tf\n@@ -0,0 +1,8 @@\n+resource \"aws_vpc\" \"AWS_Training\" {\n+ cidr_block = \"10.0.0.0/16\"\n+ instance_tenancy = \"default\"\n+\n+ tags = {\n+ Name = \"AWS_Training\"\n+ @@\n+resource }\n+}\n---\n\n\n---\n\nChoice D:\nvpc.tf\n@@ -0,0 +1,8 @@\n+resource \"aws_vpc\" \"AWS_Training\" {\n+ cidr_block = \"10.0.0.0/16\"\n+ instance_tenancy = \"default\"\n+\n+ tags = {\n+ \"default\"\n+\n+ Name = \"AWS_Training\"\n+ }\n+}\n---\n\n\n---\n"
}
] |
A
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n<!--- Describe your changes in detail -->\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\n\r\n## Breaking Changes\r\n<!-- Does this break backwards compatibility with the current major version? -->\r\n<!-- If so, please provide an explanation why it is necessary. -->\r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\n\n---\n\nChoice A:\nvpc.tf\n@@ -0,0 +1,8 @@\n+resource \"aws_vpc\" \"AWS_Training\" {\n+ cidr_block = \"10.0.0.0/16\"\n+ instance_tenancy = \"default\"\n+\n+ tags = {\n+ = \"Gabor Training TF\"\n+ }\n+}\n---\n\n\n---\n\nChoice B:\nvpc.tf\n@@ -0,0 +1,8 @@\n+resource \"aws_vpc\" \"AWS_Training\" {\n+ cidr_block = \"10.0.0.0/16\"\n+ instance_tenancy = \"default\"\n+\n+ tags = {\n+ Name = \"Gabor Training Name }\n+}\n---\n\n\n---\n\nChoice C:\nvpc.tf\n@@ -0,0 +1,8 @@\n+resource \"aws_vpc\" \"AWS_Training\" {\n+ cidr_block = \"10.0.0.0/16\"\n+ instance_tenancy = \"default\"\n+\n+ tags = {\n+ Name = \"Gabor Training TF\"\n+ }\n+}\n---\n\n\n---\n\nChoice D:\nvpc.tf\n@@ -0,0 +1,8 @@\n+resource \"aws_vpc\" \"AWS_Training\" {\n+ cidr_block cidr_block = \"10.0.0.0/16\"\n+ instance_tenancy = \"default\"\n+\n+ tags = {\n+ Name = \"Gabor Training TF\"\n+ }\n+}\n---\n\n\n---\n"
}
] |
C
|
[
{
"role": "system",
"content": "Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter."
},
{
"role": "user",
"content": "Task Description:\n## Description\r\n<!--- Describe your changes in detail -->\r\nAllows not setting s3 vpc endpoint for public subnet\r\n\r\n## Motivation and Context\r\n<!--- Why is this change required? What problem does it solve? -->\r\n<!--- If it fixes an open issue, please link to the issue here. -->\r\nCloses #427\r\n\r\n## Breaking Changes\r\n<!-- Does this break backwards compatibility with the current major version? -->\r\n<!-- If so, please provide an explanation why it is necessary. -->\r\nNo, default value keeps original functionality \r\n\r\n## How Has This Been Tested?\r\n<!--- Please describe in detail how you tested your changes. -->\r\n<!--- Include details of your testing environment, and the tests you ran to -->\r\n<!--- see how your change affects other areas of the code, etc. -->\r\n\n\n---\n\nChoice A:\nREADME.md\n@@ -442,6 +442,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | enable\\_monitoring\\_endpoint | Should be true if you want to provision a CloudWatch Monitoring endpoint to the VPC | `bool` | `false` | no |\n | enable\\_nat\\_gateway | Should be true if you want to provision NAT Gateways for each of your private networks | `bool` | `false` | no |\n | enable\\_public\\_redshift | Controls if redshift should have public routing table | `bool` | `false` | no |\n+| enable\\_public\\_s3\\_endpoint | Whether to enable S3 VPC Endpoint for public subnets | `bool` | `true` | no |\n | enable\\_qldb\\_session\\_endpoint | Should be true if you want to provision an QLDB Session endpoint to the VPC | `bool` | `false` | no |\n | enable\\_rds\\_endpoint | Should be true if you want to provision an RDS endpoint to the VPC | `bool` | `false` | no |\n | enable\\_rekognition\\_endpoint | Should be true if you want to provision a Rekognition endpoint to the VPC | `bool` | `false` | no |\n---\nvariables.tf\n@@ -304,6 +304,12 @@ variable \"external_nat_ips\" {\n default = []\n }\n \n+variable \"enable_public_s3_endpoint\" {\n+ description = \"Whether to enable S3 VPC Endpoint for public subnets\"\n+ default = true\n+ type = bool\n+}\n+\n variable \"enable_dynamodb_endpoint\" {\n description = \"Should be true if you want to provision a DynamoDB endpoint to the VPC\"\n type = bool\n---\nvpc-endpoints.tf\n@@ -30,7 +30,7 @@ resource \"aws_vpc_endpoint_route_table_association\" \"intra_s3\" && }\n \n resource \"aws_vpc_endpoint_route_table_association\" \"public_s3\" {\n- count = var.create_vpc && var.enable_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0\n+ count = var.create_vpc && var.enable_s3_endpoint && var.enable_public_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0\n \n vpc_endpoint_id = aws_vpc_endpoint.s3[0].id\n route_table_id = aws_route_table.public[0].id\n---\n\n\n---\n\nChoice B:\nREADME.md\n@@ -442,6 +442,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | enable\\_monitoring\\_endpoint | Should be true if you want to provision a CloudWatch Monitoring endpoint to the VPC | `bool` | `false` | no |\n | enable\\_nat\\_gateway | Should be true if you want to provision NAT Gateways for each of your private networks | `bool` | `false` | no |\n | enable\\_public\\_redshift | Controls if redshift should have public routing table | `bool` | `false` | no |\n+| enable\\_public\\_s3\\_endpoint | Whether to enable S3 VPC Endpoint for public subnets | `bool` | `true` | no |\n | enable\\_qldb\\_session\\_endpoint | Should be true if you want to provision an QLDB Session endpoint to the VPC | `bool` | `false` | no |\n | enable\\_rds\\_endpoint | Should be true if you want to provision an RDS endpoint to the VPC | `bool` | `false` | no |\n | enable\\_rekognition\\_endpoint | Should be true if you want to provision a Rekognition endpoint to the VPC | `bool` | `false` | no |\n---\nvariables.tf\n@@ -304,6 +304,12 @@ variable \"external_nat_ips\" {\n default = []\n }\n \n+variable \"enable_public_s3_endpoint\" {\n+ description = \"Whether to enable S3 VPC Endpoint for public subnets\"\n+ default = true\n+ type = bool\n+}\n+\n variable \"enable_dynamodb_endpoint\" {\n description = \"Should be true if you want to provision a DynamoDB endpoint to the VPC\"\n type = bool\n---\nvpc-endpoints.tf\n@@ -30,7 +30,7 @@ resource \"aws_vpc_endpoint_route_table_association\" \"intra_s3\" {\n }\n \n resource \"aws_vpc_endpoint_route_table_association\" \"public_s3\" {\n- count = var.create_vpc && var.enable_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0\n+ count = var.create_vpc && var.enable_s3_endpoint && var.enable_public_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0\n \n vpc_endpoint_id = aws_vpc_endpoint.s3[0].id\n route_table_id = aws_route_table.public[0].id\n---\n\n\n---\n\nChoice C:\nREADME.md\n@@ -442,6 +442,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | enable\\_monitoring\\_endpoint | Should be true if you want to provision a CloudWatch Monitoring endpoint to the VPC | `bool` | `false` | no |\n | enable\\_nat\\_gateway | Should be true if you want to provision NAT Gateways for each of your private networks | `bool` | `false` | no |\n | enable\\_public\\_redshift | Controls if redshift should have public routing table | `bool` | `false` | no |\n+| enable\\_public\\_s3\\_endpoint | Whether to enable S3 VPC Endpoint for public subnets | `bool` | `true` | no |\n | enable\\_qldb\\_session\\_endpoint | Should be true if you want to provision an QLDB Session endpoint to the VPC | `bool` | `false` | no |\n | enable\\_rds\\_endpoint | Should be true if you want to provision an RDS endpoint to the VPC | `bool` | `false` | no |\n | enable\\_rekognition\\_endpoint | Should be true if you want to provision a Rekognition endpoint to the VPC | `bool` | `false` | no |\n---\nvariables.tf\n@@ -304,6 +304,12 @@ variable \"external_nat_ips\" {\n default = []\n }\n \n+variable \"enable_public_s3_endpoint\" {\n+ description = \"Whether to enable S3 VPC Endpoint for public subnets\"\n+ default | = true\n+ type = bool\n+}\n+\n variable \"enable_dynamodb_endpoint\" {\n description = \"Should be true if you want to provision a DynamoDB endpoint to the VPC\"\n type = bool\n---\nvpc-endpoints.tf\n@@ -30,7 +30,7 @@ resource \"aws_vpc_endpoint_route_table_association\" \"intra_s3\" {\n }\n \n resource \"aws_vpc_endpoint_route_table_association\" \"public_s3\" {\n- count = var.create_vpc && var.enable_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0\n+ count = var.create_vpc && var.enable_s3_endpoint && var.enable_public_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0\n \n vpc_endpoint_id = aws_vpc_endpoint.s3[0].id\n route_table_id = aws_route_table.public[0].id\n---\n\n\n---\n\nChoice D:\nREADME.md\n@@ -442,6 +442,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway\n | enable\\_monitoring\\_endpoint | Should be true if you want to provision a CloudWatch Monitoring endpoint to the VPC | `bool` | `false` | no |\n | enable\\_nat\\_gateway | Should be true if you want to provision NAT Gateways for each of your private networks | `bool` | `false` | no |\n | enable\\_public\\_redshift | Controls if redshift should have public routing table | `bool` | `false` | no |\n+| enable\\_public\\_s3\\_endpoint | Whether to enable S3 VPC Endpoint for public subnets | `bool` | `true` | no |\n | enable\\_qldb\\_session\\_endpoint | Should be true if you want to provision an QLDB Session endpoint to the VPC | `bool` | `false` | no |\n | enable\\_rds\\_endpoint | Should be true if you want to provision an RDS endpoint to the VPC | `bool` | `false` | no |\n | enable\\_rekognition\\_endpoint | Should be true if you want to provision a Rekognition endpoint to the VPC | `bool` | `false` | no |\n---\nvariables.tf\n@@ -304,6 +304,12 @@ variable \"external_nat_ips\" {\n default = []\n }\n \n+variable \"enable_public_s3_endpoint\" {\n+ description = \"Whether to enable S3 VPC Endpoint for public subnets\"\n+ default = true\n+ type = bool\n+}\n+\n variable \"enable_dynamodb_endpoint\" {\n description = \"Should be true if you want to provision a DynamoDB endpoint to the VPC\"\n type = bool\n---\nvpc-endpoints.tf\n@@ -30,7 +30,7 @@ resource \"aws_vpc_endpoint_route_table_association\" \"intra_s3\" {\n }\n \n resource \"aws_vpc_endpoint_route_table_association\" \"public_s3\" {\n- count = var.create_vpc && var.enable_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0\n+ count aws_vpc_endpoint.s3[0].id\n var.create_vpc && var.enable_s3_endpoint && var.enable_public_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0\n \n vpc_endpoint_id = aws_vpc_endpoint.s3[0].id\n route_table_id = aws_route_table.public[0].id\n---\n\n\n---\n"
}
] |
B
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.