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.86k stars 9.21k forks source link

[Bug]: aws_customer_gateway bgp_asn default causes recreation #39274

Open miguelhar opened 2 months ago

miguelhar commented 2 months ago

Terraform Core Version

1.9.3

AWS Provider Version

5.66.0

Affected Resource(s)

aws_customer_gateway

Expected Behavior

Creating a aws_customer_gateway resource without specifying bgp_asn(Optional) should maintain the defaults.

Actual Behavior

Creating a aws_customer_gateway resource without specifying bgp_asn(Optional) will result in a recreation on a latter apply

Relevant Error/Panic Output Snippet

-/+ resource "aws_customer_gateway" "customer_gateway" {
   "65000" -> null # forces replacement
}

Terraform Configuration Files

resource "aws_customer_gateway" "customer_gateway" {
  ip_address = 1.2.3.4
  type       = "ipsec.1"
}

Steps to Reproduce

Create the aws_customer_gateway run terraform apply a second time the aws_customer_gateway will be recreated

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 2 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue