Skip to content

Commit

Permalink
fix: tgw module multi run fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
d4kverma committed Sep 21, 2023
1 parent 8191005 commit 5dd3771
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
15 changes: 14 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,20 @@ updates:
open-pull-requests-limit: 3

- package-ecosystem: "terraform" # See documentation for possible values
directory: "/_example/multi_account" # Location of package manifests
directory: "/_example/multi_account/main_account" # Location of package manifests
schedule:
interval: "weekly"
# Add assignees
assignees:
- "clouddrove-ci"
# Add reviewer
reviewers:
- "approvers"
# Allow up to 3 open pull requests for pip dependencies
open-pull-requests-limit: 3

- package-ecosystem: "terraform" # See documentation for possible values
directory: "/_example/multi_account/slave_account" # Location of package manifests
schedule:
interval: "weekly"
# Add assignees
Expand Down
8 changes: 4 additions & 4 deletions _example/single_account/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,17 @@ module "transit_gateway" {
transit_gateway_default_route_table_association = true
transit_gateway_default_route_table_propagation = true
# Below should be uncommented only when vpc and subnet are already deployed.
#vpc_route_table_ids = module.subnets.public_route_tables_id
#destination_cidr = ["10.11.0.0/16"]
vpc_route_table_ids = module.subnets.public_route_tables_id
destination_cidr = []
},
vpc2 = {
vpc_id = module.vpc_other.vpc_id
subnet_ids = module.subnets_other.public_subnet_id
transit_gateway_default_route_table_association = false
transit_gateway_default_route_table_propagation = false
# Below should be uncommented only when vpc and subnet are already deployed.
#vpc_route_table_ids = module.subnets_other.public_route_tables_id
#destination_cidr = ["31.0.0.0/16", "53.0.0.0/16"]
vpc_route_table_ids = module.subnets_other.public_route_tables_id
destination_cidr = ["31.0.0.0/16", "53.0.0.0/16"]
}
}
}
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ resource "aws_ram_resource_association" "main" {
locals {
vpc_route_table = flatten([
for k, v in var.vpc_attachments : [
for rtb_id in try(v.vpc_route_table_ids, []) : [for cidr in try(v.destination_cidr) : {
for rtb_id in v.vpc_route_table_ids : [for cidr in v.destination_cidr : {
rtb_id = rtb_id
cidr = cidr
}
Expand Down

0 comments on commit 5dd3771

Please sign in to comment.