hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.83k stars 9.18k forks source link

[Enhancement]: Update Transit Gateway ASN without ForceNew #27301

Closed ddericco closed 2 years ago

ddericco commented 2 years ago

Description

AWS Transit Gateway supports updating the ASN value without needing to recreate the resource. The current Terraform resource forces a create/destroy of the Transit Gateway resource in order to update this value.

Note that the modify ASN operation is not allowed on a transit gateway with active BGP sessions. You must first delete all transit gateway attachments that have BGP configured prior to modifying the ASN on the transit gateway.

Affected Resource(s) and/or Data Source(s)

aws_ec2_transit_gateway

Potential Terraform Configuration

resource "aws_ec2_transit_gateway" "example" {
  description = "example"
  amazon_side_asn = "64512"

}
...

resource "aws_ec2_transit_gateway" "example" {
  description = "example"
  amazon_side_asn = "65000"
}

References

API Reference: https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/ec2@v1.63.1/types#ModifyTransitGatewayOptions

Would you like to implement a fix?

Yes

github-actions[bot] commented 2 years ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

ddericco commented 2 years ago

This is being worked on.

github-actions[bot] commented 2 years ago

This functionality has been released in v4.37.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.