-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transit Gateway Attachment Module - Refactor to use for_each (#92)
* feat: Refactor tgw attachment module BREAKING CHANGE - Added `for_each` to the `../transit_gateway/attachment` module - Removed `../direct_connect_connection` module - Updated `../transit_gateway/attachment` module to use `for_each` instead of `count` - Updated the `vpc_id` variable to `vpc_ids` in the `../transit_gateway/attachment` module - `vpc_ids` is a map of objects that contain the `vpc_id` and `subnet_ids` for each VPC * chore: terraform fmt and terraform-docs * added name output to vpc * chore: terraform fmt and terraform-docs * updated outputs to match new module structure * chore: terraform fmt and terraform-docs * corrected vpc_id syntax * testing new jscpd setting
- Loading branch information
1 parent
7decc4d
commit eaa4246
Showing
11 changed files
with
78 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"ignore": [ | ||
"**/*.md" | ||
], | ||
"pattern": [ | ||
"**/*.tf" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,14 @@ | ||
output "id" { | ||
value = aws_ec2_transit_gateway_vpc_attachment.this.id | ||
output "ids" { | ||
description = "Map of VPC IDs and their transit gateway attachment IDs." | ||
value = { for attachment, value in aws_ec2_transit_gateway_vpc_attachment.this : value.vpc_id => value.id } | ||
} | ||
|
||
output "ids_list" { | ||
description = "List of transit gateway attachment IDs" | ||
value = values(aws_ec2_transit_gateway_vpc_attachment.this)[*].id | ||
} | ||
|
||
output "vpc_owner_id" { | ||
value = aws_ec2_transit_gateway_vpc_attachment.this.vpc_owner_id | ||
description = "Map of VPC IDs and their owner IDs" | ||
value = { for attachment, value in aws_ec2_transit_gateway_vpc_attachment.this : value.vpc_id => value.vpc_owner_id } | ||
} |
Oops, something went wrong.