whitespace at end of vpc_id causes object to be destroyed and recreated endlessly #359
Labels
bug
Addresses a defect in current functionality.
service/ec2
Issues and PRs that pertain to the ec2 service.
stale
Old or inactive issues managed by automation, if no further action taken these will get closed.
This issue was originally opened by @wjimenez5271 as hashicorp/terraform#9982. It was migrated here as part of the provider split. The original body of the issue is below.
consider if you have the following
aws_subnet
resource:and you accidentally add some whitespace to the
vpc_id
parameter like soIt seems terraform will create the resource on one iteration, next iteration delete and recreate it, and this will continue endlessly.
I can imagine that perhaps the AWS API strips the whitespace and so it is able to create the resource, however terraform state knows it as a string with that whitespace, which causes it to be a mismatch next time around. Ideally it would be nice if terraform would present the user with an error when this whitespace is present, otherwise it is difficult to identify the problem based on the behavior.
The text was updated successfully, but these errors were encountered: