1eeb3c41e3
Fixes: #13588 It was pointed out in #13588 that we don't need to ForceNew on a change of IPv6 CIDR block. The logic I decided to implement here was to disassociate then associate. We should only be able to be associated to 1 IPv6 CIDR block at once. This feels like a risky move. We can disassociate and then error on the associate. This would leave us in a situation where we have no IPv6 CIDR block associated The alternative here would be that the failure of association, triggers a reassociation with the old IPv6 CIDR block I added a test to make sure that the subnet Ids don't change as the ipv6 block changes. Before removing the ForceNew from the ipv6_cidr_block, the test results in the following: ``` === RUN TestAccAWSSubnet_ipv6 --- FAIL: TestAccAWSSubnet_ipv6 (92.09s) resource_aws_subnet_test.go:105: Expected SubnetIDs not to change, but both got before: subnet-0d2b6a6a and after: subnet-742c6d13 ``` After the removal of ForceNew, the test result looks as follows: ``` === RUN TestAccAWSSubnet_ipv6 --- PASS: TestAccAWSSubnet_ipv6 (188.34s) ``` ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSubnet_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/04/24 21:26:36 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSubnet_ -timeout 120m === RUN TestAccAWSSubnet_importBasic --- PASS: TestAccAWSSubnet_importBasic (85.63s) === RUN TestAccAWSSubnet_basic --- PASS: TestAccAWSSubnet_basic (80.28s) === RUN TestAccAWSSubnet_ipv6 --- PASS: TestAccAWSSubnet_ipv6 (188.34s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 354.283s ``` |
||
---|---|---|
.. | ||
bins | ||
providers | ||
provisioners |