-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unchanged aws_vpc resource recreated due to assign_generated_ipv6_cidr_block #13035
Comments
Hi @dominics You are indeed correct - I am sorry for this issue - I am opening a PR right now that will migrate the state for you and take care of it Paul |
Fixes: #13035 It was pointed out in the issue that the addition of a new parameter with a default value AND a ForceNew: true is causing Terraform to try and recreate the VPC This PR migrates the state to add the default value of false for `assign_generated_ipv6_cidr_block` ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAWSVpcMigrateState' 130 ↵ ✚ ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/03/24 12:43:00 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAWSVpcMigrateState -timeout 120m === RUN TestAWSVpcMigrateState 2017/03/24 12:43:56 [INFO] Found AWS VPC State v0; migrating to v1 --- PASS: TestAWSVpcMigrateState (0.00s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 0.025s ```
Fixes: #13035 It was pointed out in the issue that the addition of a new parameter with a default value AND a ForceNew: true is causing Terraform to try and recreate the VPC This PR migrates the state to add the default value of false for `assign_generated_ipv6_cidr_block` ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAWSVpcMigrateState' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/03/24 12:51:41 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAWSVpcMigrateState -timeout 120m === RUN TestAWSVpcMigrateState 2017/03/24 12:52:26 [INFO] Found AWS VPC State v0; migrating to v1 2017/03/24 12:52:26 [DEBUG] Attributes before migration: map[string]string{"assign_generated_ipv6_cidr_block":"true"} 2017/03/24 12:52:26 [DEBUG] Attributes after migration: map[string]string{"assign_generated_ipv6_cidr_block":"false"} 2017/03/24 12:52:26 [INFO] Found AWS VPC State v0; migrating to v1 2017/03/24 12:52:26 [DEBUG] Attributes before migration: map[string]string{} 2017/03/24 12:52:26 [DEBUG] Attributes after migration: map[string]string{"assign_generated_ipv6_cidr_block":"false"} --- PASS: TestAWSVpcMigrateState (0.00s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 0.024s ```
Fixes: #13035 It was pointed out in the issue that the addition of a new parameter with a default value AND a ForceNew: true is causing Terraform to try and recreate the VPC This PR migrates the state to add the default value of false for `assign_generated_ipv6_cidr_block` ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAWSVpcMigrateState' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/03/24 12:51:41 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAWSVpcMigrateState -timeout 120m === RUN TestAWSVpcMigrateState 2017/03/24 12:52:26 [INFO] Found AWS VPC State v0; migrating to v1 2017/03/24 12:52:26 [DEBUG] Attributes before migration: map[string]string{"assign_generated_ipv6_cidr_block":"true"} 2017/03/24 12:52:26 [DEBUG] Attributes after migration: map[string]string{"assign_generated_ipv6_cidr_block":"false"} 2017/03/24 12:52:26 [INFO] Found AWS VPC State v0; migrating to v1 2017/03/24 12:52:26 [DEBUG] Attributes before migration: map[string]string{} 2017/03/24 12:52:26 [DEBUG] Attributes after migration: map[string]string{"assign_generated_ipv6_cidr_block":"false"} --- PASS: TestAWSVpcMigrateState (0.00s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 0.024s ```
Pretty sure I am still seeing this behavior in terraform v0.9.2: The following snippet is from a
I attempted to add UPDATE 4/5/2017: I think this is the same issue identified and fixed in Issue #13197. Looks like it will be in v0.9.3. |
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. |
I've noticed a regression on master (which I'm running to get the fix for an unrelated issue)
Terraform Version
v0.9.2-dev - rough bisect, strongly suspect any commit after bed23ff
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
No changes on
terraform plan
after 0.9.2-dev/master upgradeActual Behavior
Plan attempts to force-recreate the VPC, showing a
"" => "false"
difference on assign_generated_ipv6_cidr_block:I added
assign_generated_ipv6_cidr_block = false
explicitly, to attempt to work around the problem, and it worked at least some of the time. But I still (in some environments?!) saw plans that attempted to recreate the VPC.Steps to Reproduce
terraform plan
References
The text was updated successfully, but these errors were encountered: