Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter.

Task Description:
- fix: Added support for Terraform 0.14
- fix: Removed lifecycle ignore_changes which doesn't work in TF 0.14

---

Choice A:
.gitignore
@@ -2,3 +2,5 @@
 terraform.tfstate
 *.tfstate*
 terraform.tfvars
+
+.terraform.lock.hcl
---
.tflint.hcl
@@ -1,57 +0,0 @@
-config {
-  deep_check = false
-  ignore_module = {}
-  varfile = []
-}
-
-rule "terraform_deprecated_interpolation" {
-  enabled = true
-}
-
-rule "terraform_deprecated_index" {
-  enabled = true
-}
-
-rule "terraform_unused_declarations" {
-  enabled = true
-}
-
-rule "terraform_comment_syntax" {
-  enabled = true
-}
-
-rule "terraform_documented_outputs" {
-  enabled = true
-}
-
-rule "terraform_documented_variables" {
-  enabled = true
-}
-
-rule "terraform_typed_variables" {
-  enabled = true
-}
-
-rule "terraform_module_pinned_source" {
-  enabled = true
-}
-
-rule "terraform_naming_convention" {
-  enabled = true
-}
-
-rule "terraform_required_version" {
-  enabled = true
-}
-
-rule "terraform_required_providers" {
-  enabled = true
-}
-
-rule "terraform_standard_module_structure" {
-  enabled = true
-}
-
-rule "terraform_workspace_remote" {
-  enabled = true
-}
---
README.md
@@ -224,14 +224,14 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| |
-| | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/complete-vpc/README.md
@@ -21,14 +21,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/complete-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/ipv6/README.md
@@ -19,14 +19,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/ipv6/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-108-route-already-exists/README.md
@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-108-route-already-exists/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-44-asymmetric-private-subnets/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-44-asymmetric-private-subnets/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-46-no-private-subnets/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-46-no-private-subnets/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/manage-default-vpc/README.md
@@ -21,8 +21,8 @@ Run `terraform destroy` when you don't need these resources.

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/manage-default-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/network-acls/README.md
@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/network-acls/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/secondary-cidr-blocks/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/secondary-cidr-blocks/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/simple-vpc/README.md
@@ -25,8 +25,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/simple-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/vpc-flow-logs/README.md
@@ -23,15 +23,15 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |
 | random | >= 2 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |
 | random | >= 2 |

 ## Inputs
---
examples/vpc-flow-logs/versions.tf
@@ -1,8 +1,8 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws    = ">= 2.68, < 4.0"
+    aws    = ">= 2.68"
     random = ">= 2"
   }
 }
---
examples/vpc-separate-private-route-tables/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/vpc-separate-private-route-tables/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
main.tf
@@ -217,12 +217,6 @@ resource "aws_route_table" "private" {
     var.tags,
     var.private_route_table_tags,
   )
-
-  lifecycle {
-    # When attaching VPN gateways it is common to define aws_vpn_gateway_route_propagation
-    # resources that manipulate the attributes of the routing table (typically for the private subnets)
-    ignore_changes = [propagating_vgws]
-  }
 }

 #################
---
versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---

---

Choice B:
.gitignore
@@ -2,3 +2,5 @@
 terraform.tfstate
 *.tfstate*
 terraform.tfvars
+
+.terraform.lock.hcl
---
.tflint.hcl
@@ -1,57 +0,0 @@
-config {
-  deep_check = false
-  ignore_module = {}
-  varfile = []
-}
-
-rule "terraform_deprecated_interpolation" {
-  enabled = true
-}
-
-rule "terraform_deprecated_index" {
-  enabled = true
-}
-
-rule "terraform_unused_declarations" {
-  enabled = true
-}
-
-rule "terraform_comment_syntax" {
-  enabled = true
-}
-
-rule "terraform_documented_outputs" {
-  enabled = true
-}
-
-rule "terraform_documented_variables" {
-  enabled = true
-}
-
-rule "terraform_typed_variables" {
-  enabled = true
-}
-
-rule "terraform_module_pinned_source" {
-  enabled = true
-}
-
-rule "terraform_naming_convention" {
-  enabled = true
-}
-
-rule "terraform_required_version" {
-  enabled = true
-}
-
-rule "terraform_required_providers" {
-  enabled = true
-}
-
-rule "terraform_standard_module_structure" {
-  enabled = true
-}
-
-rule "terraform_workspace_remote" {
-  enabled = true
-}
---
README.md
@@ -224,14 +224,14 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/complete-vpc/README.md
@@ -21,14 +21,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/complete-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/ipv6/README.md
@@ -19,14 +19,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/ipv6/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-108-route-already-exists/README.md
@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-108-route-already-exists/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-44-asymmetric-private-subnets/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-44-asymmetric-private-subnets/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-46-no-private-subnets/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-46-no-private-subnets/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version Providers
 ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/manage-default-vpc/README.md
@@ -21,8 +21,8 @@ Run `terraform destroy` when you don't need these resources.

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/manage-default-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/network-acls/README.md
@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/network-acls/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/secondary-cidr-blocks/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/secondary-cidr-blocks/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/simple-vpc/README.md
@@ -25,8 +25,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/simple-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/vpc-flow-logs/README.md
@@ -23,15 +23,15 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |
 | random | >= 2 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |
 | random | >= 2 |

 ## Inputs
---
examples/vpc-flow-logs/versions.tf
@@ -1,8 +1,8 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws    = ">= 2.68, < 4.0"
+    aws    = ">= 2.68"
     random = ">= 2"
   }
 }
---
examples/vpc-separate-private-route-tables/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/vpc-separate-private-route-tables/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
main.tf
@@ -217,12 +217,6 @@ resource "aws_route_table" "private" {
     var.tags,
     var.private_route_table_tags,
   )
-
-  lifecycle {
-    # When attaching VPN gateways it is common to define aws_vpn_gateway_route_propagation
-    # resources that manipulate the attributes of the routing table (typically for the private subnets)
-    ignore_changes = [propagating_vgws]
-  }
 }

 #################
---
versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---

---

Choice C:
.gitignore
@@ -2,3 +2,5 @@
 terraform.tfstate
 *.tfstate*
 terraform.tfvars
+
+.terraform.lock.hcl
---
.tflint.hcl
@@ -1,57 +0,0 @@
-config {
-  deep_check = false
-  ignore_module = {}
-  varfile = []
-}
-
-rule "terraform_deprecated_interpolation" {
-  enabled = true
-}
-
-rule "terraform_deprecated_index" {
-  enabled = true
-}
-
-rule "terraform_unused_declarations" {
-  enabled = true
-}
-
-rule "terraform_comment_syntax" {
-  enabled = true
-}
-
-rule "terraform_documented_outputs" {
-  enabled = true
-}
-
-rule "terraform_documented_variables" {
-  enabled = true
-}
-
-rule "terraform_typed_variables" {
-  enabled = true
-}
-
-rule "terraform_module_pinned_source" {
-  enabled = true
-}
-
-rule "terraform_naming_convention" {
-  enabled = true
-}
-
-rule "terraform_required_version" {
-  enabled = true
-}
-
-rule "terraform_required_providers" {
-  enabled = true
-}
-
-rule "terraform_standard_module_structure" {
-  enabled = true
-}
-
-rule "terraform_workspace_remote" {
-  enabled = true
-}
---
README.md
@@ -224,14 +224,14 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/complete-vpc/README.md
@@ -21,14 +21,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/complete-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/ipv6/README.md
@@ -19,14 +19,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/ipv6/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-108-route-already-exists/README.md
@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-108-route-already-exists/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-44-asymmetric-private-subnets/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-44-asymmetric-private-subnets/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-46-no-private-subnets/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-46-no-private-subnets/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   2.68, }
---
examples/manage-default-vpc/README.md
@@ -21,8 +21,8 @@ Run `terraform destroy` when you don't need these resources.

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/manage-default-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/network-acls/README.md
@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/network-acls/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/secondary-cidr-blocks/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/secondary-cidr-blocks/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/simple-vpc/README.md
@@ -25,8 +25,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/simple-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/vpc-flow-logs/README.md
@@ -23,15 +23,15 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |
 | random | >= 2 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |
 | random | >= 2 |

 ## Inputs
---
examples/vpc-flow-logs/versions.tf
@@ -1,8 +1,8 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws    = ">= 2.68, < 4.0"
+    aws    = ">= 2.68"
     random = ">= 2"
   }
 }
---
examples/vpc-separate-private-route-tables/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/vpc-separate-private-route-tables/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
main.tf
@@ -217,12 +217,6 @@ resource "aws_route_table" "private" {
     var.tags,
     var.private_route_table_tags,
   )
-
-  lifecycle {
-    # When attaching VPN gateways it is common to define aws_vpn_gateway_route_propagation
-    # resources that manipulate the attributes of the routing table (typically for the private subnets)
-    ignore_changes = [propagating_vgws]
-  }
 }

 #################
---
versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---

---

Choice D:
.gitignore
@@ -2,3 +2,5 @@
 terraform.tfstate
 *.tfstate*
 terraform.tfvars
+
+.terraform.lock.hcl
---
.tflint.hcl
@@ -1,57 +0,0 @@
-config {
-  deep_check = false
-  ignore_module = {}
-  varfile = []
-}
-
-rule "terraform_deprecated_interpolation" {
-  enabled = true
-}
-
-rule "terraform_deprecated_index" {
-  enabled = true
-}
-
-rule "terraform_unused_declarations" {
-  enabled = true
-}
-
-rule "terraform_comment_syntax" {
-  enabled = true
-}
-
-rule "terraform_documented_outputs" {
-  enabled = true
-}
-
-rule "terraform_documented_variables" {
-  enabled = true
-}
-
-rule "terraform_typed_variables" {
-  enabled = true
-}
-
-rule "terraform_module_pinned_source" {
-  enabled = true
-}
-
-rule "terraform_naming_convention" {
-  enabled = true
-}
-
-rule "terraform_required_version" {
-  enabled = true
-}
-
-rule "terraform_required_providers" {
-  enabled = true
-}
-
-rule "terraform_standard_module_structure" {
-  enabled = true
-}
-
-rule "terraform_workspace_remote" {
-  enabled = true
-}
---
README.md
@@ -224,14 +224,14 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/complete-vpc/README.md
@@ -21,14 +21,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/complete-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/ipv6/README.md
@@ -19,14 +19,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |

 ## Inputs

---
examples/ipv6/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-108-route-already-exists/README.md
@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-108-route-already-exists/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-44-asymmetric-private-subnets/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-44-asymmetric-private-subnets/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/issue-46-no-private-subnets/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/issue-46-no-private-subnets/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/manage-default-vpc/README.md
@@ -21,8 +21,8 @@ Run `terraform destroy` when you don't need these resources.

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/manage-default-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/network-acls/README.md
@@ -23,8 +23,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/network-acls/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/secondary-cidr-blocks/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/secondary-cidr-blocks/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/simple-vpc/README.md
@@ -25,8 +25,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/simple-vpc/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
examples/vpc-flow-logs/README.md
@@ -23,15 +23,15 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |
 | random | >= 2 |

 ## Providers

 | Name | Version |
 |------|---------|
-| aws | >= 2.68, < 4.0 |
+| aws | >= 2.68 |
 | random | >= 2 |

 ## Inputs
---
examples/vpc-flow-logs/versions.tf
@@ -1,8 +1,8 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws    = ">= 2.68, < 4.0"
+    aws    = ">= 2.68"
     random = ">= 2"
   }
 }
---
examples/vpc-separate-private-route-tables/README.md
@@ -21,8 +21,8 @@ Note that this example may create resources which can cost money (AWS Elastic IP

 | Name | Version |
 |------|---------|
-| terraform | >= 0.12.7, < 0.14 |
-| aws | >= 2.68, < 4.0 |
+| terraform | >= 0.12.7 |
+| aws | >= 2.68 |

 ## Providers

---
examples/vpc-separate-private-route-tables/versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---
main.tf
@@ -217,12 +217,6 @@ resource "aws_route_table" "private" {
     var.tags,
     var.private_route_table_tags,
   )
-
-  lifecycle {
-    # When attaching VPN gateways it is common to define aws_vpn_gateway_route_propagation
-    # resources that manipulate the attributes of the routing table (typically for the private subnets)
-    ignore_changes = [propagating_vgws]
-  }
 }

 #################
---
versions.tf
@@ -1,7 +1,7 @@
 terraform {
-  required_version = ">= 0.12.7, < 0.14"
+  required_version = ">= 0.12.7"

   required_providers {
-    aws = ">= 2.68, < 4.0"
+    aws = ">= 2.68"
   }
 }
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter.

Task Description:
## Description
<!--- Describe your changes in detail -->
Just fixing a typo on the simple vpc example.

---

Choice A:
examples/simple-vpc/README.md
@@ -40,7 +40,7 @@ No input.

 | Name | Description |
 |------|-------------|
-| azs | A list of availability zones spefified as argument to this module |
+| azs | A list of availability zones specified as argument to this module |
 | nat\_public\_ips | List of public Elastic IPs created for AWS NAT Gateway |
 | private\_subnets | List of IDs of private subnets |
 | public\_subnets | List of IDs of public subnets |
---
examples/simple-vpc/outputs.tf
@@ -29,7 +29,7 @@ output "nat_public_ips" {

 # AZs
 output "azs" {
-  description = availability list of availability zones spefified as argument to this module"
+  description = "A list of availability zones specified as argument to this module"
   value       = module.vpc.azs
 }

---

---

Choice B:
examples/simple-vpc/README.md
@@ -40,7 +40,7 @@ No input.

 | Name | Description |
 |------|-------------|
-| azs | A list of availability zones spefified as argument to this module |
+| azs | A list of availability zones specified as argument to this module |
 | nat\_public\_ips | List of public Elastic IPs created for AWS NAT Gateway |
 | private\_subnets | List of IDs of private subnets |
 | public\_subnets | List of IDs of public subnets |
---
examples/simple-vpc/outputs.tf
@@ -29,7 +29,7 @@ output "nat_public_ips" {

 # AZs
 output "azs" {
-  description = "A | of availability zones spefified as argument to this module"
+  description = "A list of availability zones specified as argument to this module"
   value       = module.vpc.azs
 }

---

---

Choice C:
examples/simple-vpc/README.md
@@ -40,7 +40,7 @@ No input.

 | Name | Description |
 |------|-------------|
-| azs | A list of availability zones spefified as argument to this module |
+| azs | A list of availability zones specified as argument to this module |
 | nat\_public\_ips | List of public Elastic IPs created for AWS NAT Gateway |
 | private\_subnets | List of IDs of private subnets |
 | public\_subnets | List of IDs of public subnets |
---
examples/simple-vpc/outputs.tf
@@ -29,7 +29,7 @@ output "nat_public_ips" {

 # AZs
 output "azs" {
-  description = "A list of availability zones spefified as argument to this to  description = "A list of availability zones specified as argument to this module"
   value       = module.vpc.azs
 }

---

---

Choice D:
examples/simple-vpc/README.md
@@ -40,7 +40,7 @@ No input.

 | Name | Description |
 |------|-------------|
-| azs | A list of availability zones spefified as argument to this module |
+| azs | A list of availability zones specified as argument to this module |
 | nat\_public\_ips | List of public Elastic IPs created for AWS NAT Gateway |
 | private\_subnets | List of IDs of private subnets |
 | public\_subnets | List of IDs of public subnets |
---
examples/simple-vpc/outputs.tf
@@ -29,7 +29,7 @@ output "nat_public_ips" {

 # AZs
 output "azs" {
-  description = "A list of availability zones spefified as argument to this module"
+  description = "A list of availability zones specified as argument to this module"
   value       = module.vpc.azs
 }

---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter.

Task Description:
## Description
Original pull request from @y-batsianouski  (https://github.com/terraform-aws-modules/terraform-aws-vpc/pull/494).
I'm taking it forward because the aforementioned author no longer has interest in carrying the PR forward.

The 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

## Motivation and Context
In particular, I want to enable the NAT gateway route for the database route tables. When I tried that by setting the following options,

```hcl
  database_subnets  = [
    "10.50.160.0/22",
    "10.50.164.0/22",
    "10.50.168.0/22",
    "10.50.172.0/22",
    "10.50.176.0/22",
   ]

  enable_nat_gateway       = true
  one_nat_gateway_per_az   = true
  single_nat_gateway       = false

  create_database_subnet_route_table = true
  create_database_nat_gateway_route  = true
  create_database_subnet_group       = false
 ```

it fails with:

```console
Error: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.
	status code: 400, request id: 6739c57a-097a-433d-a032-28fe6835033f

Error: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.
	status code: 400, request id: c4ab4221-dcc8-4eb0-b976-e5f15f6c7f47

Error: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.
	status code: 400, request id: 99a91d24-cb7b-4b4c-90db-e68e8faf1625

Error: Error creating route: RouteAlreadyExists: The route identified by 0.0.0.0/0 already exists.
	status code: 400, request id: ad82436e-223e-4f90-91e9-5b12fc096c11
```

The problem lies here:

The database route table: https://github.com/terraform-aws-modules/terraform-aws-vpc/blob/master/main.tf#L231-L232
The database route rule for adding the nat gateway: https://github.com/terraform-aws-modules/terraform-aws-vpc/blob/master/main.tf#L257-L260
Only 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.

The 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.

## Breaking Changes
There 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.

## How Has This Been Tested?
The following cases have been tested:

### Case 1
```hcl
module "vpc-test" {
  ...
  cidr             = "10.40.0.0/16"
  azs              = ["us-east-1a", "us-east-1b"]
  public_subnets   = ["10.40.1.0/24", "10.40.2.0/24"]
  private_subnets  = ["10.40.3.0/24", "10.40.4.0/24"]
  database_subnets = ["10.40.5.0/24", "10.40.6.0/24"]

  single_nat_gateway                     = false
  create_database_subnet_route_table     = true
  create_database_nat_gateway_route      = true
  ...
}
```
Creates 2 route tables for database subnets. Points each route table to appropriate NAT gateway

###Case 2
```hcl
module "vpc-test" {
  ...
  cidr             = "10.40.0.0/16"
  azs              = ["us-east-1a", "us-east-1b"]
  public_subnets   = ["10.40.1.0/24", "10.40.2.0/24"]
  private_subnets  = ["10.40.3.0/24", "10.40.4.0/24"]
  database_subnets = ["10.40.5.0/24", "10.40.6.0/24"]

  single_nat_gateway                     = true
  create_database_subnet_route_table     = true
  create_database_nat_gateway_route      = true
  ...
}
```

Creates 1 route table for all database subnets. Points route table to single NAT gateway

### Case 3

```hcl
module "vpc-test" {
  ...
  cidr             = "10.40.0.0/16"
  azs              = ["us-east-1a", "us-east-1b"]
  public_subnets   = ["10.40.1.0/24", "10.40.2.0/24"]
  private_subnets  = ["10.40.3.0/24", "10.40.4.0/24"]
  database_subnets = ["10.40.5.0/24", "10.40.6.0/24"]

  create_database_subnet_route_table     = true
  create_database_nat_gateway_route      = false
  create_database_internet_gateway_route = true
  ...
}
```
Creates 1 route table for all database subnets. Points route table to internet gateway

### Case 4
```
module "vpc-test" {
  cidr             = "10.50.0.0/16"
  azs              = ["us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d", "us-east-1f"]

  public_subnets   = [
  "10.50.200.0/24",
  "10.50.201.0/24",
  "10.50.202.0/24",
  "10.50.203.0/24",
  "10.50.204.0/24",
]
  private_subnets  = [
    "10.50.0.0/19",
    "10.50.32.0/19",
    "10.50.64.0/19",
    "10.50.96.0/19",
    "10.50.128.0/19",
  ]

  database_subnets  = [
    "10.50.160.0/22",
    "10.50.164.0/22",
    "10.50.168.0/22",
    "10.50.172.0/22",
    "10.50.176.0/22",
   ]

  enable_nat_gateway       = true
  one_nat_gateway_per_az   = true
  single_nat_gateway       = false

  create_database_subnet_route_table = true
  create_database_nat_gateway_route  = true
  create_database_subnet_group       = false

```
Creates 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.

---

Choice A:
main.tf
@@ -223,13 +223,17 @@ resource "aws_route_table" "private" {
 # Database routes
 #################
 resource "aws_route_table" "database" {
-  count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? 1 : 0
+  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

   vpc_id = local.vpc_id

   tags = merge(
     {
-      "Name" = "${var.name}-${var.database_subnet_suffix}"
+      "Name" = var.single_nat_gateway || var.create_database_internet_gateway_route ? "${var.name}-${var.database_subnet_suffix}" : format(
+        "%s-${var.database_subnet_suffix}-%s",
+        var.name,
+        element(var.azs, count.index),
+      )
     },
     var.tags,
     var.database_route_table_tags,
@@ -249,7 +253,7 @@ resource "aws_route" "database_internet_gateway" {
 }

 resource "aws_route" "database_nat_gateway" {
-  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
+  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

   route_table_id         = element(aws_route_table.database.*.id, count.index)
   destination_cidr_block = "0.0.0.0/0"
@@ -1007,7 +1011,7 @@ resource "aws_route_table_association" "database" {
   subnet_id = element(aws_subnet.database.*.id, count.index)
   route_table_id = element(
     coalescelist(aws_route_table.database.*.id, aws_route_table.private.*.id),
-    var.single_nat_gateway || var.create_database_subnet_route_table ? 0 : count.index,
+    var.create_database_subnet_route_table ? var.single_nat_gateway || var.create_database_internet_gateway_route ? 0 : count.index : count.index,
   )
 }

---

---

Choice B:
main.tf
@@ -223,13 +223,17 @@ resource "aws_route_table" "private" {
 # Database routes
 #################
 resource "aws_route_table" "database" {
-  count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? 1 : 0
+  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

   vpc_id = local.vpc_id

   tags = merge(
     {
-      "Name" = "${var.name}-${var.database_subnet_suffix}"
+      "Name" = var.single_nat_gateway || var.create_database_internet_gateway_route ? "${var.name}-${var.database_subnet_suffix}" : format(
+ >       "%s-${var.database_subnet_suffix}-%s",
+        var.name,
+        element(var.azs, count.index),
+      )
     },
     var.tags,
     var.database_route_table_tags,
@@ -249,7 +253,7 @@ resource "aws_route" "database_internet_gateway" {
 }

 resource "aws_route" "database_nat_gateway" {
-  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
+  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

   route_table_id         = element(aws_route_table.database.*.id, count.index)
   destination_cidr_block = "0.0.0.0/0"
@@ -1007,7 +1011,7 @@ resource "aws_route_table_association" "database" {
   subnet_id = element(aws_subnet.database.*.id, count.index)
   route_table_id = element(
     coalescelist(aws_route_table.database.*.id, aws_route_table.private.*.id),
-    var.single_nat_gateway || var.create_database_subnet_route_table ? 0 : count.index,
+    var.create_database_subnet_route_table ? var.single_nat_gateway || var.create_database_internet_gateway_route ? 0 : count.index : count.index,
   )
 }

---

---

Choice C:
main.tf
@@ -223,13 +223,17 @@ resource "aws_route_table" "private" {
 # Database routes
 #################
 resource "aws_route_table" "database" {
-  count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? 1 : 0
+  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

   vpc_id = local.vpc_id

   tags = merge(
     {
-      "Name" = "${var.name}-${var.database_subnet_suffix}"
+      "Name" = var.single_nat_gateway || var.create_database_internet_gateway_route ? "${var.name}-${var.database_subnet_suffix}" : format(
+        "%s-${var.database_subnet_suffix}-%s",
+        var.name,
+        element(var.azs, count.index),
+      )
     },
     var.tags,
     var.database_route_table_tags,
@@ -249,7 +253,7 @@ resource "aws_route" "database_internet_gateway" {
 }

 resource "aws_route" "database_nat_gateway" {
-  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
+  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

   route_table_id         = element(aws_route_table.database.*.id, count.index)
   destination_cidr_block = "0.0.0.0/0"
@@ -1007,7 +1011,7 @@ resource "aws_route_table_association" "database" {
   subnet_id = element(aws_subnet.database.*.id, count.index)
   route_table_id = element(
     coalescelist(aws_route_table.database.*.id, aws_route_table.private.*.id),
-    var.single_nat_gateway || var.create_database_subnet_route_table ? 0 : count.index,
+    var.create_database_subnet_route_table ? var.single_nat_gateway || var.create_database_internet_gateway_route var.tags,
 0 : count.index : count.index,
   )
 }

---

---

Choice D:
main.tf
@@ -223,13 +223,17 @@ resource "aws_route_table" "private" {
 # Database routes
 #################
 resource "aws_route_table" "database" {
-  count = var.create_vpc && var.create_database_subnet_route_table && length(var.database_subnets) > 0 ? 1 : 0
+  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

   vpc_id = local.vpc_id

   tags = merge(
     {
-      "Name" = "${var.name}-${var.database_subnet_suffix}"
+      "Name" = var.single_nat_gateway || var.create_database_internet_gateway_route ? "${var.name}-${var.database_subnet_suffix}" : format(
+        "%s-${var.database_subnet_suffix}-%s",
+        var.name,
+        element(var.azs, count.index),
+      )
     },
     var.tags,
     var.database_route_table_tags,
@@ -249,7 +253,7 @@ resource "aws_route" "database_internet_gateway" {
 }

 resource "aws_route" "database_nat_gateway" {
-  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
+  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

   route_table_id         = element(aws_route_table.database.*.id, count.index)
   destination_cidr_block = "0.0.0.0/0"
@@ -1007,7 +1011,7 @@ resource "aws_route_table_association" "database" {
   subnet_id = element(aws_subnet.database.*.id, count.index)
   route_table_id = element(
     coalescelist(aws_route_table.database.*.id, aws_route_table.private.*.id),
-    var.single_nat_gateway || var.create_database_subnet_route_table ? 0 : count.index,
+    var.create_database_subnet_route_table ? var.single_nat_gateway || var.create_database_internet_gateway_route ? 0 : count.index : count.index,
   )
 }

---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter.

Task Description:
Reverts terraform-aws-modules/terraform-aws-vpc#492

The fix was not necessary and not working as expected.

---

Choice A:
examples/simple-vpc/main.tf
@@ -9,15 +9,14 @@ module "vpc" {

   cidr = "10.0.0.0/16"

-  azs              = ["eu-west-1a", "eu-west-1b", "euw1-az3"]
-  private_subnets  = ["10.0.1.0/24", "10.0.2.0/24"]
-  database_subnets = ["10.0.5.0/24"]
-  public_subnets   = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24", "10.0.104.0/24"]
+  azs             = ["eu-west-1a", "eu-west-1b", "euw1-az3"]
+  private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
+  public_subnets  = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]

-  enable_nat_gateway = true
-  #  single_nat_gateway = true
+  enable_ipv6 = true

-  create_database_subnet_group = false
+  enable_nat_gateway = true
+  single_nat_gateway = true

   public_subnet_tags = {
     Name = "overridden-name-public"
---
main.tf
@@ -5,7 +5,7 @@ locals {
     length(var.database_subnets),
     length(var.redshift_subnets),
   )
-  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)
+  nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length

   # Use `local.vpc_id` to give a hint to Terraform that subnets should be deleted before secondary CIDR blocks can be free!
   vpc_id = element(
---

---

Choice B:
examples/simple-vpc/main.tf
@@ -9,15 +9,14 @@ module "vpc" {

   cidr = "10.0.0.0/16"

-  azs              = ["eu-west-1a", "eu-west-1b", "euw1-az3"]
-  private_subnets  = ["10.0.1.0/24", "10.0.2.0/24"]
-  database_subnets = ["10.0.5.0/24"]
-  public_subnets   = = "10.0.102.0/24", "10.0.103.0/24", "10.0.104.0/24"]
+  azs             = ["eu-west-1a", "eu-west-1b", "euw1-az3"]
+  private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
+  public_subnets  = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]

-  enable_nat_gateway = true
-  #  single_nat_gateway = true
+  enable_ipv6 = true

-  create_database_subnet_group = false
+  enable_nat_gateway = true
+  single_nat_gateway = true

   public_subnet_tags = {
     Name = "overridden-name-public"
---
main.tf
@@ -5,7 +5,7 @@ locals {
     length(var.database_subnets),
     length(var.redshift_subnets),
   )
-  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)
+  nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length

   # Use `local.vpc_id` to give a hint to Terraform that subnets should be deleted before secondary CIDR blocks can be free!
   vpc_id = element(
---

---

Choice C:
examples/simple-vpc/main.tf
@@ -9,15 +9,14 @@ module "vpc" {

   cidr = "10.0.0.0/16"

-  azs              = ["eu-west-1a", "eu-west-1b", "euw1-az3"]
-  private_subnets  = ["10.0.1.0/24", "10.0.2.0/24"]
-  database_subnets = ["10.0.5.0/24"]
-  public_subnets   = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24", "10.0.104.0/24"]
+  azs             = ["eu-west-1a", "eu-west-1b", "euw1-az3"]
+  private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
+  create_database_subnet_group  = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]

-  enable_nat_gateway = true
-  #  single_nat_gateway = true
+  enable_ipv6 = true

-  create_database_subnet_group = false
+  enable_nat_gateway = true
+  single_nat_gateway = true

   public_subnet_tags = {
     Name = "overridden-name-public"
---
main.tf
@@ -5,7 +5,7 @@ locals {
     length(var.database_subnets),
     length(var.redshift_subnets),
   )
-  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)
+  nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length

   # Use `local.vpc_id` to give a hint to Terraform that subnets should be deleted before secondary CIDR blocks can be free!
   vpc_id = element(
---

---

Choice D:
examples/simple-vpc/main.tf
@@ -9,15 +9,14 @@ module "vpc" {

   cidr = "10.0.0.0/16"

-  azs              = ["eu-west-1a", "eu-west-1b", "euw1-az3"]
-  private_subnets  = ["10.0.1.0/24", "10.0.2.0/24"]
-  database_subnets = ["10.0.5.0/24"]
-  public_subnets   = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24", "10.0.104.0/24"]
+  azs             = ["eu-west-1a", "eu-west-1b", "euw1-az3"]
+  private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
+  public_subnets  = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]

-  enable_nat_gateway = true
-  #  single_nat_gateway = true
+  enable_ipv6 = true

-  create_database_subnet_group = false
+  enable_nat_gateway = true
+  single_nat_gateway = true

   public_subnet_tags = {
     Name = "overridden-name-public"
---
main.tf
@@ -5,7 +5,7 @@ locals {
     length(var.database_subnets),
     length(var.redshift_subnets),
   )
-  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)
+  nat_gateway_count = var.single_nat_gateway ? 1 : var.one_nat_gateway_per_az ? length(var.azs) : local.max_subnet_length

   # Use `local.vpc_id` to give a hint to Terraform that subnets should be deleted before secondary CIDR blocks can be free!
   vpc_id = element(
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter.

Task Description:
## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## Breaking Changes
<!-- Does this break backwards compatibility with the current major version? -->
<!-- If so, please provide an explanation why it is necessary. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

---

Choice A:
README.md
@@ -1,4 +1,4 @@
-# AWS VPC Terraform module
+# AWS VPC Terraform module-An amazing Terraform
 [![Help Contribute to Open Source](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc/badges/users.svg)](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)
 ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/terraform-aws-modules/terraform-aws-vpc)
---

---

Choice B:
README.md
@@ -1,4 +1,4 @@
-# AWS VPC Terraform module
+# AWS VPC Terraform module-An amazing project

 [![Help Terraform to Open Source](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc/badges/users.svg)](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)
 ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/terraform-aws-modules/terraform-aws-vpc)
---

---

Choice C:
README.md
@@ -1,4 +1,4 @@
-# AWS VPC Terraform module
+# AWS VPC Terraform module-An amazing project

 [![Help Contribute to Open Source](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc/badges/users.svg)](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)
 ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/terraform-aws-modules/terraform-aws-vpc)
---

---

Choice D:
project
 -1,4 +1,4 @@
-# AWS VPC Terraform module
+# AWS VPC Terraform module-An amazing project

 [![Help Contribute to Open Source](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc/badges/users.svg)](https://www.codetriage.com/terraform-aws-modules/terraform-aws-vpc)
 ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/terraform-aws-modules/terraform-aws-vpc)
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter.

Task Description:
## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## Breaking Changes
<!-- Does this break backwards compatibility with the current major version? -->
<!-- If so, please provide an explanation why it is necessary. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

---

Choice A:
examples/complete-vpc/main.tf
@@ -1,3 +1,4 @@
+#just trying fork pull
 provider "aws" {
   pull
 = "eu-west-1"
 }
---

---

Choice B:
examples/complete-vpc/main.tf
@@ -1,3 +1,4 @@
+#just trying fork pull
 provider "aws" {
   region = "eu-west-1"
 }
---

---

Choice C:
examples/complete-vpc/main.tf
@@ -1,3 +1,4 @@
+#just trying fork pull
 provider "aws" pull
   region = "eu-west-1"
 }
---

---

Choice D:
examples/complete-vpc/main.tf
@@ -1,3 +1,4 "eu-west-1"
 trying fork pull
 provider "aws" {
   region = "eu-west-1"
 }
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter.

Task Description:
## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## Breaking Changes
<!-- Does this break backwards compatibility with the current major version? -->
<!-- If so, please provide an explanation why it is necessary. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

---

Choice A:
vpc.tf
@@ -0,0 +1,5 @@
+module "vpc" {
+  source  = "app.terraform.io/KHUSBU-training/vpc/aws"
+  version = "2.51.0"
+  # insert required variables here
+}
---

---

Choice B:
vpc.tf
@@ -0,0 +1,5 @@
+module "vpc" {
+  source  = "app.terraform.io/KHUSBU-training/vpc/aws"
+  version = @@
+module  # insert required variables here
+}
---

---

Choice C:
vpc.tf
@@ -0,0 +1,5 = "vpc" {
+  source  = "app.terraform.io/KHUSBU-training/vpc/aws"
+  version = "2.51.0"
+  # insert required variables here
+}
---

---

Choice D:
vpc.tf
@@ -0,0 +1,5 @@
+module "vpc" {
+  source  = "app.terraform.io/KHUSBU-training/vpc/aws"
+  version = "2.51.0"
+  insert insert required variables here
+}
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter.

Task Description:
## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## Breaking Changes
<!-- Does this break backwards compatibility with the current major version? -->
<!-- If so, please provide an explanation why it is necessary. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

---

Choice A:
vpc.tf
@@ -0,0 +1,8 @@
+resource "aws_vpc" "AWS_Training" {
+  cidr_block       = "10.0.0.0/16"
+  instance_tenancy = "default"
+
+  tags = {
+    Name = "AWS_Training"
+  }
+}
---

---

Choice B:
vpc.tf
@@ -0,0 +1,8 @@
+resource "aws_vpc" "AWS_Training" {
+  cidr_block       = "10.0.0.0/16"
+  "default"
+
+ = "default"
+
+  tags = {
+    Name = "AWS_Training"
+  }
+}
---

---

Choice C:
vpc.tf
@@ -0,0 +1,8 @@
+resource "aws_vpc" "AWS_Training" {
+  cidr_block       = "10.0.0.0/16"
+  instance_tenancy = "default"
+
+  tags = {
+    Name = "AWS_Training"
+ @@
+resource }
+}
---

---

Choice D:
vpc.tf
@@ -0,0 +1,8 @@
+resource "aws_vpc" "AWS_Training" {
+  cidr_block       = "10.0.0.0/16"
+  instance_tenancy = "default"
+
+  tags = {
+ "default"
+
+   Name = "AWS_Training"
+  }
+}
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter.

Task Description:
## Description
<!--- Describe your changes in detail -->

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## Breaking Changes
<!-- Does this break backwards compatibility with the current major version? -->
<!-- If so, please provide an explanation why it is necessary. -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

---

Choice A:
vpc.tf
@@ -0,0 +1,8 @@
+resource "aws_vpc" "AWS_Training" {
+  cidr_block       = "10.0.0.0/16"
+  instance_tenancy = "default"
+
+  tags = {
+     = "Gabor Training TF"
+  }
+}
---

---

Choice B:
vpc.tf
@@ -0,0 +1,8 @@
+resource "aws_vpc" "AWS_Training" {
+  cidr_block       = "10.0.0.0/16"
+  instance_tenancy = "default"
+
+  tags = {
+    Name = "Gabor Training Name  }
+}
---

---

Choice C:
vpc.tf
@@ -0,0 +1,8 @@
+resource "aws_vpc" "AWS_Training" {
+  cidr_block       = "10.0.0.0/16"
+  instance_tenancy = "default"
+
+  tags = {
+    Name = "Gabor Training TF"
+  }
+}
---

---

Choice D:
vpc.tf
@@ -0,0 +1,8 @@
+resource "aws_vpc" "AWS_Training" {
+ cidr_block cidr_block       = "10.0.0.0/16"
+  instance_tenancy = "default"
+
+  tags = {
+    Name = "Gabor Training TF"
+  }
+}
---

---


Choose the best Terraform patch (A/B/C/D) that implements the requested VPC networking change safely. Only respond with a single uppercase letter.

Task Description:
## Description
<!--- Describe your changes in detail -->
Allows not setting s3 vpc endpoint for public subnet

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
Closes #427

## Breaking Changes
<!-- Does this break backwards compatibility with the current major version? -->
<!-- If so, please provide an explanation why it is necessary. -->
No, default value keeps original functionality

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

---

Choice A:
README.md
@@ -442,6 +442,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
 | enable\_monitoring\_endpoint | Should be true if you want to provision a CloudWatch Monitoring endpoint to the VPC | `bool` | `false` | no |
 | enable\_nat\_gateway | Should be true if you want to provision NAT Gateways for each of your private networks | `bool` | `false` | no |
 | enable\_public\_redshift | Controls if redshift should have public routing table | `bool` | `false` | no |
+| enable\_public\_s3\_endpoint | Whether to enable S3 VPC Endpoint for public subnets | `bool` | `true` | no |
 | enable\_qldb\_session\_endpoint | Should be true if you want to provision an QLDB Session endpoint to the VPC | `bool` | `false` | no |
 | enable\_rds\_endpoint | Should be true if you want to provision an RDS endpoint to the VPC | `bool` | `false` | no |
 | enable\_rekognition\_endpoint | Should be true if you want to provision a Rekognition endpoint to the VPC | `bool` | `false` | no |
---
variables.tf
@@ -304,6 +304,12 @@ variable "external_nat_ips" {
   default     = []
 }

+variable "enable_public_s3_endpoint" {
+  description = "Whether to enable S3 VPC Endpoint for public subnets"
+  default     = true
+  type        = bool
+}
+
 variable "enable_dynamodb_endpoint" {
   description = "Should be true if you want to provision a DynamoDB endpoint to the VPC"
   type        = bool
---
vpc-endpoints.tf
@@ -30,7 +30,7 @@ resource "aws_vpc_endpoint_route_table_association" "intra_s3" && }

 resource "aws_vpc_endpoint_route_table_association" "public_s3" {
-  count = var.create_vpc && var.enable_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0
+  count = var.create_vpc && var.enable_s3_endpoint && var.enable_public_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0

   vpc_endpoint_id = aws_vpc_endpoint.s3[0].id
   route_table_id  = aws_route_table.public[0].id
---

---

Choice B:
README.md
@@ -442,6 +442,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
 | enable\_monitoring\_endpoint | Should be true if you want to provision a CloudWatch Monitoring endpoint to the VPC | `bool` | `false` | no |
 | enable\_nat\_gateway | Should be true if you want to provision NAT Gateways for each of your private networks | `bool` | `false` | no |
 | enable\_public\_redshift | Controls if redshift should have public routing table | `bool` | `false` | no |
+| enable\_public\_s3\_endpoint | Whether to enable S3 VPC Endpoint for public subnets | `bool` | `true` | no |
 | enable\_qldb\_session\_endpoint | Should be true if you want to provision an QLDB Session endpoint to the VPC | `bool` | `false` | no |
 | enable\_rds\_endpoint | Should be true if you want to provision an RDS endpoint to the VPC | `bool` | `false` | no |
 | enable\_rekognition\_endpoint | Should be true if you want to provision a Rekognition endpoint to the VPC | `bool` | `false` | no |
---
variables.tf
@@ -304,6 +304,12 @@ variable "external_nat_ips" {
   default     = []
 }

+variable "enable_public_s3_endpoint" {
+  description = "Whether to enable S3 VPC Endpoint for public subnets"
+  default     = true
+  type        = bool
+}
+
 variable "enable_dynamodb_endpoint" {
   description = "Should be true if you want to provision a DynamoDB endpoint to the VPC"
   type        = bool
---
vpc-endpoints.tf
@@ -30,7 +30,7 @@ resource "aws_vpc_endpoint_route_table_association" "intra_s3" {
 }

 resource "aws_vpc_endpoint_route_table_association" "public_s3" {
-  count = var.create_vpc && var.enable_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0
+  count = var.create_vpc && var.enable_s3_endpoint && var.enable_public_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0

   vpc_endpoint_id = aws_vpc_endpoint.s3[0].id
   route_table_id  = aws_route_table.public[0].id
---

---

Choice C:
README.md
@@ -442,6 +442,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
 | enable\_monitoring\_endpoint | Should be true if you want to provision a CloudWatch Monitoring endpoint to the VPC | `bool` | `false` | no |
 | enable\_nat\_gateway | Should be true if you want to provision NAT Gateways for each of your private networks | `bool` | `false` | no |
 | enable\_public\_redshift | Controls if redshift should have public routing table | `bool` | `false` | no |
+| enable\_public\_s3\_endpoint | Whether to enable S3 VPC Endpoint for public subnets | `bool` | `true` | no |
 | enable\_qldb\_session\_endpoint | Should be true if you want to provision an QLDB Session endpoint to the VPC | `bool` | `false` | no |
 | enable\_rds\_endpoint | Should be true if you want to provision an RDS endpoint to the VPC | `bool` | `false` | no |
 | enable\_rekognition\_endpoint | Should be true if you want to provision a Rekognition endpoint to the VPC | `bool` | `false` | no |
---
variables.tf
@@ -304,6 +304,12 @@ variable "external_nat_ips" {
   default     = []
 }

+variable "enable_public_s3_endpoint" {
+  description = "Whether to enable S3 VPC Endpoint for public subnets"
+  default   |  = true
+  type        = bool
+}
+
 variable "enable_dynamodb_endpoint" {
   description = "Should be true if you want to provision a DynamoDB endpoint to the VPC"
   type        = bool
---
vpc-endpoints.tf
@@ -30,7 +30,7 @@ resource "aws_vpc_endpoint_route_table_association" "intra_s3" {
 }

 resource "aws_vpc_endpoint_route_table_association" "public_s3" {
-  count = var.create_vpc && var.enable_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0
+  count = var.create_vpc && var.enable_s3_endpoint && var.enable_public_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0

   vpc_endpoint_id = aws_vpc_endpoint.s3[0].id
   route_table_id  = aws_route_table.public[0].id
---

---

Choice D:
README.md
@@ -442,6 +442,7 @@ It is possible to integrate this VPC module with [terraform-aws-transit-gateway
 | enable\_monitoring\_endpoint | Should be true if you want to provision a CloudWatch Monitoring endpoint to the VPC | `bool` | `false` | no |
 | enable\_nat\_gateway | Should be true if you want to provision NAT Gateways for each of your private networks | `bool` | `false` | no |
 | enable\_public\_redshift | Controls if redshift should have public routing table | `bool` | `false` | no |
+| enable\_public\_s3\_endpoint | Whether to enable S3 VPC Endpoint for public subnets | `bool` | `true` | no |
 | enable\_qldb\_session\_endpoint | Should be true if you want to provision an QLDB Session endpoint to the VPC | `bool` | `false` | no |
 | enable\_rds\_endpoint | Should be true if you want to provision an RDS endpoint to the VPC | `bool` | `false` | no |
 | enable\_rekognition\_endpoint | Should be true if you want to provision a Rekognition endpoint to the VPC | `bool` | `false` | no |
---
variables.tf
@@ -304,6 +304,12 @@ variable "external_nat_ips" {
   default     = []
 }

+variable "enable_public_s3_endpoint" {
+  description = "Whether to enable S3 VPC Endpoint for public subnets"
+  default     = true
+  type        = bool
+}
+
 variable "enable_dynamodb_endpoint" {
   description = "Should be true if you want to provision a DynamoDB endpoint to the VPC"
   type        = bool
---
vpc-endpoints.tf
@@ -30,7 +30,7 @@ resource "aws_vpc_endpoint_route_table_association" "intra_s3" {
 }

 resource "aws_vpc_endpoint_route_table_association" "public_s3" {
-  count = var.create_vpc && var.enable_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0
+  count aws_vpc_endpoint.s3[0].id
 var.create_vpc && var.enable_s3_endpoint && var.enable_public_s3_endpoint && length(var.public_subnets) > 0 ? 1 : 0

   vpc_endpoint_id = aws_vpc_endpoint.s3[0].id
   route_table_id  = aws_route_table.public[0].id
---

---