diff --git a/CHANGELOG.md b/CHANGELOG.md index cc78777..0cedac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -337,3 +337,7 @@ * 2.9.5 -- 2023-07-06 - routing - change vpc to domain="vpc" due to aws provider changes + +* 2.9.6 -- 2023-07-06 + - vpc-transit-gateway-association/self + - allow passing of transit_gateway_environments diff --git a/common/version.tf b/common/version.tf index cc52bdd..394d846 100644 --- a/common/version.tf +++ b/common/version.tf @@ -1,5 +1,5 @@ locals { - _module_version = "2.9.5" + _module_version = "2.9.6" _module_names = { "_main_" = "aws-vpc-setup" diff --git a/vpc-transit-gateway-association/self/README.md b/vpc-transit-gateway-association/self/README.md index 9b97bba..e5b4084 100644 --- a/vpc-transit-gateway-association/self/README.md +++ b/vpc-transit-gateway-association/self/README.md @@ -112,7 +112,7 @@ module "vpc_tgw_self" { | [create\_prefix\_list\_routing](#input\_create\_prefix\_list\_routing) | Flag to create (or not) prefix list routing. This is to be applied only on the TGW main account and VPCs | `bool` | `false` | no | | [create\_static\_peer\_routing](#input\_create\_static\_peer\_routing) | Flag to create (or not) static peer. This can be applied on every account including the TGW main account. This conflicts with craete\_prefix\_list\_routing | `bool` | `false` | no | | [data\_input](#input\_data\_input) | Map of data generated by vpc-transit-gateway-association-data |
object({
availablity_zone = map(any)
gateway_self = string
gateway_peer = string
route_tables_self = map(any)
route_tables_peer = map(any)
map_route_tables_self = map(any)
map_route_tables_peer = map(any)
map_vpn_route_tables_self = map(any)
map_vpn_route_tables_peer = map(any)
prefix_list_id_ipv4 = string
vpn_prefix_list_id_ipv4 = string
vpc_id = string
vpc_cidr_block = string
vpc_cidr_blocks = list(string)
}) | n/a | yes |
-| [enable\_vpn\_routing](#input\_enable\_vpn\_routing) | Flag to enable VPN routing, handled through a prefix list. This is used in the transition from per-VPC VPNs to TGW | `bool` | `false` | no |
+| [enable\_vpn\_routing](#input\_enable\_vpn\_routing) | Flag to enable VPN routing, handled through a prefix list. This is used in the transition from per-VPC VPNs to TGW | `bool` | `true` | no |
| [network\_account\_profile](#input\_network\_account\_profile) | AWS profile of the source account sharing the VPC resources | `string` | n/a | yes |
| [override\_prefixes](#input\_override\_prefixes) | Override built-in prefixes by component. This should be used primarily for common infrastructure things | `map(string)` | `{}` | no |
| [private\_route\_table\_ids](#input\_private\_route\_table\_ids) | Map of private route table IDs (which exclude the attachment subnets) | `map(string)` | `{}` | no |
@@ -121,6 +121,7 @@ module "vpc_tgw_self" {
| [route\_table\_label](#input\_route\_table\_label) | Route table lable for the attachment subnets | `string` | `"attachment"` | no |
| [tags](#input\_tags) | AWS Tags to apply to appropriate resources (S3, KMS). Do not include safeguard tags here, use the data\_safeguard field for such things. | `map(string)` | `{}` | no |
| [transit\_gateway\_environment](#input\_transit\_gateway\_environment) | Transit Gateway Environment (aka, VRF) to which to connnect this VPC | `string` | n/a | yes |
+| [transit\_gateway\_environments](#input\_transit\_gateway\_environments) | Transit Gateway Environments possible. Pass a different list to use in the Lab or DMZ environment | `list(string)` | `[]` | no |
| [transit\_gateway\_label](#input\_transit\_gateway\_label) | Transit Gateway label for specific instance (sa, prod) | `string` | `"prod"` | no |
| [vpc\_cidr\_block](#input\_vpc\_cidr\_block) | VPC CIDR Block | `string` | `null` | no |
| [vpc\_cidr\_blocks](#input\_vpc\_cidr\_blocks) | VPC CIDR Block List | `list(string)` | `[]` | no |
diff --git a/vpc-transit-gateway-association/self/data.prefix_lists.tf b/vpc-transit-gateway-association/self/data.prefix_lists.tf
index b4a3c6d..10a4f1c 100644
--- a/vpc-transit-gateway-association/self/data.prefix_lists.tf
+++ b/vpc-transit-gateway-association/self/data.prefix_lists.tf
@@ -1,5 +1,5 @@
data "aws_ec2_managed_prefix_lists" "tgw_crossregion_env" {
- for_each = toset(local._defaults["transit-gateway-environments"])
+ for_each = length(var.transit_gateway_environments) > 0 ? toset(var.transit_gateway_environments) : toset(local._defaults["transit-gateway-environments"])
filter {
name = "prefix-list-name"
values = [format("%v.crossregion.transit-gateway.%v", each.key, var.transit_gateway_label)]
diff --git a/vpc-transit-gateway-association/self/variables.tf b/vpc-transit-gateway-association/self/variables.tf
index e107346..bb62bad 100644
--- a/vpc-transit-gateway-association/self/variables.tf
+++ b/vpc-transit-gateway-association/self/variables.tf
@@ -57,3 +57,10 @@ variable "private_route_table_ids" {
type = map(string)
default = {}
}
+
+variable "transit_gateway_environments" {
+ description = "Transit Gateway Environments possible. Pass a different list to use in the Lab or DMZ environment"
+ type = list(string)
+ default = []
+}
+