Skip to content

Commit

Permalink
Merge pull request #10 from clouddrove/feature/differentac
Browse files Browse the repository at this point in the history
subnet and route_table issue fixed
  • Loading branch information
d4kverma committed Jul 27, 2022
2 parents 2a666bf + 354895b commit 24e592f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion _example/different-account/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ module "transit-gateway" {
#Transit gateway invitation accepter
aws_ram_resource_share_accepter = true
resource_share_arn = "arn:aws:ram:eu-west-1:XXXXXXXXXXX:resource-share/XXXXXXXXXXXXXXXXXXXXXXXXXX"

subnet_ids = module.subnets.private_subnet_id

# VPC Attachements
vpc_attachement_create = false # Enable After once create the subnets
vpc_id = module.vpc.vpc_id
Expand Down
3 changes: 2 additions & 1 deletion _example/single-account/example.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ module "transit-gateway" {
resource_share_enable = false
resource_share_allow_external_principals = true
resource_share_account_ids = ["XXXXXXXXXXXXX"]

subnet_ids = module.subnets.private_subnet_id

# VPC Attachements
vpc_attachement_create = false # Enable After once create the subnets
vpc_id = module.vpc.vpc_id
Expand Down
8 changes: 2 additions & 6 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ resource "aws_ec2_transit_gateway_vpc_attachment" "main" {
count = var.enable && var.vpc_attachement_create ? 1 : 0

transit_gateway_id = var.use_existing_transit_gateway_id == false ? join("", aws_ec2_transit_gateway.main.*.id) : var.transit_gateway_id
subnet_ids = element(data.aws_subnet_ids.main.*.ids, count.index)
subnet_ids = var.subnet_ids
vpc_id = var.vpc_id
transit_gateway_default_route_table_association = var.transit_gateway_default_route_table_association
transit_gateway_default_route_table_propagation = var.transit_gateway_default_route_table_propagation
Expand Down Expand Up @@ -96,11 +96,7 @@ data "aws_route_tables" "main" {
count = var.enable && var.vpc_attachement_create ? 1 : 0
vpc_id = var.vpc_id

filter {
name = "tag:Application"
values = [var.environment]

}

}

#Module : AWS ROUTE
Expand Down

0 comments on commit 24e592f

Please sign in to comment.