-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Open
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.service/transitgatewayIssues and PRs that pertain to the transitgateway service.Issues and PRs that pertain to the transitgateway service.
Description
Terraform Core Version
1.1.5
AWS Provider Version
5.24.0
Affected Resource(s)
aws_ec2_transit_gateway
Expected Behavior
Modifying default_route_table_association
or default_route_table_propagation
arguments to enable
should not cause the replacement of Transit Gateway.
Actual Behavior
Modifying default_route_table_association
or default_route_table_propagation
arguments to enable
it is causing the replacement of Transit Gateway.
Relevant Error/Panic Output Snippet
# aws_ec2_transit_gateway.this[0] must be replaced
-/+ resource "aws_ec2_transit_gateway" "this" {
~ arn = "arn:aws:ec2:us-east-1:<NONE>:transit-gateway/tgw-<NONE>" -> (known after apply)
+ association_default_route_table_id = (known after apply)
~ default_route_table_association = "disable" -> "enable" # forces replacement
~ default_route_table_propagation = "disable" -> "enable" # forces replacement
~ id = "tgw-<NONE>" -> (known after apply)
~ owner_id = "<NONE>" -> (known after apply)
+ propagation_default_route_table_id = (known after apply)
tags = {
"Name" = "tgw-poc"
}
- transit_gateway_cidr_blocks = [] -> null
# (7 unchanged attributes hidden)
# (1 unchanged block hidden)
}
Plan: 2 to add, 0 to change, 2 to destroy.
Terraform Configuration Files
resource "aws_ec2_transit_gateway" "this" {
amazon_side_asn = 65512
auto_accept_shared_attachments = "disable"
default_route_table_association = "disable"
default_route_table_propagation = "disable"
description = "tgw-poc"
dns_support = "enable"
multicast_support = "disable"
vpn_ecmp_support = "enable"
}
resource "aws_ec2_transit_gateway_route_table" "this" {
transit_gateway_id = aws_ec2_transit_gateway.this.id
}
Steps to Reproduce
-
Create a
aws_ec2_transit_gateway
withdefault_route_table_association
anddefault_route_table_propagation
arguments set toenable
-
Modify
default_route_table_association
anddefault_route_table_propagation
arguments to "enable"
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
In CloudFormation, this behavior does not exists:
TGW CloudFormation
Would you like to implement a fix?
No
Theiago, mmaya, saadmarcelo, rafaelfranciscosp, andersonfariiass and 5 more
Metadata
Metadata
Assignees
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.service/transitgatewayIssues and PRs that pertain to the transitgateway service.Issues and PRs that pertain to the transitgateway service.