Skip to content

Commit 6a09286

Browse files
yyarmoshykYaroslavyyarmoshyk
authored
fix: Defined dependencies for aws_ram_resource_share_accepter and aws_route (#144)
Co-authored-by: Yaroslav <yaroslav@Yaroslavs-MBP.lan> Co-authored-by: yyarmoshyk <yyarmoshyk@ip-10-0-0-23.eu-west-1.compute.internal>
1 parent 01789bd commit 6a09286

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

main.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ resource "aws_ec2_transit_gateway_vpc_attachment" "this" {
8484
var.tgw_vpc_attachment_tags,
8585
try(each.value.tags, {}),
8686
)
87+
88+
depends_on = [aws_ram_resource_share_accepter.this]
8789
}
8890

8991
################################################################################
@@ -122,6 +124,8 @@ resource "aws_route" "this" {
122124
destination_cidr_block = try(each.value.ipv6_support, false) ? null : each.value["cidr"]
123125
destination_ipv6_cidr_block = try(each.value.ipv6_support, false) ? each.value["cidr"] : null
124126
transit_gateway_id = each.value["tgw_id"]
127+
128+
depends_on = [aws_ec2_transit_gateway_vpc_attachment.this]
125129
}
126130

127131
resource "aws_ec2_transit_gateway_route_table_association" "this" {

0 commit comments

Comments
 (0)