-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Cannot update aws_launch_configuration with at least one root_block_device attribute specified when the old AMI has been deregistered #10182
Comments
It actually appears that the initial apply of the code can be done with any version of the AWS provider, so I have reflected this in the steps to reproduce. |
I'm also seeing this issue. Resolved by doing AMI changes manually and then importing resources back into Terraform state. |
no error when version |
👍 |
A temporary workaround (other than @ernetas's)... if you're able, manually delete the resource then plan/apply. That worked for me. TF seems to deal with not finding the resource at all and then just puts it back but with the updated details. |
Hi folks 👋 We recently merged #9810 and with further testing from the original issue report here, it appears additional changes are needed to handle this condition. Hopefully will be able to submit a fix this week. |
…t block device lookup Reference: #10182 Previous output from new acceptance testing: ``` --- FAIL: TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears (329.50s) testing.go:640: Step 0 error: errors during follow-up refresh: Error: No images found for AMI ami-03f8153b368160e27 ``` Output from acceptance testing: ``` --- PASS: TestAccAWSAMI_basic (60.58s) --- PASS: TestAccAWSAMI_disappears (55.68s) --- PASS: TestAccAWSAMI_snapshotSize (61.57s) --- PASS: TestAccAWSAMI_tags (73.23s) --- PASS: TestAccAWSInstance_addSecondaryInterface (119.45s) --- PASS: TestAccAWSInstance_addSecurityGroupNetworkInterface (120.56s) --- PASS: TestAccAWSInstance_associatePublic_defaultPrivate (75.15s) --- PASS: TestAccAWSInstance_associatePublic_defaultPublic (74.26s) --- PASS: TestAccAWSInstance_associatePublic_explicitPrivate (74.07s) --- PASS: TestAccAWSInstance_associatePublic_explicitPublic (94.78s) --- PASS: TestAccAWSInstance_associatePublic_overridePrivate (103.83s) --- PASS: TestAccAWSInstance_associatePublic_overridePublic (74.45s) --- PASS: TestAccAWSInstance_associatePublicIPAndPrivateIP (77.27s) --- PASS: TestAccAWSInstance_basic (187.91s) --- PASS: TestAccAWSInstance_blockDevices (79.58s) --- PASS: TestAccAWSInstance_changeInstanceType (346.21s) --- PASS: TestAccAWSInstance_CreditSpecification_Empty_NonBurstable (309.18s) --- PASS: TestAccAWSInstance_creditSpecification_isNotAppliedToNonBurstable (95.71s) --- PASS: TestAccAWSInstance_creditSpecification_standardCpuCredits (94.60s) --- PASS: TestAccAWSInstance_creditSpecification_standardCpuCredits_t2Tot3Taint (416.77s) --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t2 (84.38s) --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t3 (277.51s) --- PASS: TestAccAWSInstance_creditSpecification_unlimitedCpuCredits (94.46s) --- PASS: TestAccAWSInstance_creditSpecification_unlimitedCpuCredits_t2Tot3Taint (205.09s) --- PASS: TestAccAWSInstance_creditSpecification_unspecifiedDefaultsToStandard (75.03s) --- PASS: TestAccAWSInstance_CreditSpecification_UnspecifiedToEmpty_NonBurstable (66.25s) --- PASS: TestAccAWSInstance_creditSpecification_updateCpuCredits (129.64s) --- PASS: TestAccAWSInstance_creditSpecificationT3_standardCpuCredits (96.86s) --- PASS: TestAccAWSInstance_creditSpecificationT3_unlimitedCpuCredits (93.24s) --- PASS: TestAccAWSInstance_creditSpecificationT3_unspecifiedDefaultsToUnlimited (302.23s) --- PASS: TestAccAWSInstance_creditSpecificationT3_updateCpuCredits (105.73s) --- PASS: TestAccAWSInstance_disableApiTermination (134.68s) --- PASS: TestAccAWSInstance_disappears (99.99s) --- PASS: TestAccAWSInstance_EbsBlockDevice_KmsKeyArn (86.99s) --- PASS: TestAccAWSInstance_forceNewAndTagsDrift (249.42s) --- PASS: TestAccAWSInstance_getPasswordData_falseToTrue (153.39s) --- PASS: TestAccAWSInstance_getPasswordData_trueToFalse (144.29s) --- PASS: TestAccAWSInstance_GP2IopsDevice (180.27s) --- PASS: TestAccAWSInstance_GP2WithIopsValue (63.42s) --- PASS: TestAccAWSInstance_hibernation (184.12s) --- PASS: TestAccAWSInstance_inDefaultVpcBySgId (82.35s) --- PASS: TestAccAWSInstance_inDefaultVpcBySgName (72.00s) --- PASS: TestAccAWSInstance_inEc2Classic (87.12s) --- PASS: TestAccAWSInstance_instanceProfileChange (165.02s) --- PASS: TestAccAWSInstance_ipv6_supportAddressCount (73.56s) --- PASS: TestAccAWSInstance_ipv6_supportAddressCountWithIpv4 (83.80s) --- PASS: TestAccAWSInstance_ipv6AddressCountAndSingleAddressCausesError (9.88s) --- PASS: TestAccAWSInstance_keyPairCheck (184.21s) --- PASS: TestAccAWSInstance_multipleRegions (249.46s) --- PASS: TestAccAWSInstance_NetworkInstanceRemovingAllSecurityGroups (80.15s) --- PASS: TestAccAWSInstance_NetworkInstanceSecurityGroups (76.11s) --- PASS: TestAccAWSInstance_NetworkInstanceVPCSecurityGroupIDs (75.10s) --- PASS: TestAccAWSInstance_noAMIEphemeralDevices (180.15s) --- PASS: TestAccAWSInstance_placementGroup (65.13s) --- PASS: TestAccAWSInstance_primaryNetworkInterface (75.72s) --- PASS: TestAccAWSInstance_primaryNetworkInterfaceSourceDestCheck (86.88s) --- PASS: TestAccAWSInstance_privateIP (74.08s) --- PASS: TestAccAWSInstance_RootBlockDevice_KmsKeyArn (316.78s) --- PASS: TestAccAWSInstance_rootBlockDeviceMismatch (186.67s) --- PASS: TestAccAWSInstance_rootInstanceStore (88.21s) --- PASS: TestAccAWSInstance_sourceDestCheck (111.85s) --- PASS: TestAccAWSInstance_tags (237.27s) --- PASS: TestAccAWSInstance_UserData_EmptyStringToUnspecified (92.43s) --- PASS: TestAccAWSInstance_UserData_UnspecifiedToEmptyString (108.86s) --- PASS: TestAccAWSInstance_userDataBase64 (221.53s) --- PASS: TestAccAWSInstance_volumeTags (100.55s) --- PASS: TestAccAWSInstance_volumeTagsComputed (104.70s) --- PASS: TestAccAWSInstance_vpc (73.95s) --- PASS: TestAccAWSInstance_withIamInstanceProfile (112.28s) --- PASS: TestAccAWSInstanceDataSource_AzUserData (221.28s) --- PASS: TestAccAWSInstanceDataSource_basic (301.34s) --- PASS: TestAccAWSInstanceDataSource_blockDevices (90.86s) --- PASS: TestAccAWSInstanceDataSource_creditSpecification (101.85s) --- PASS: TestAccAWSInstanceDataSource_EbsBlockDevice_KmsKeyId (205.68s) --- PASS: TestAccAWSInstanceDataSource_getPasswordData_falseToTrue (176.04s) --- PASS: TestAccAWSInstanceDataSource_getPasswordData_trueToFalse (172.89s) --- PASS: TestAccAWSInstanceDataSource_GetUserData (123.47s) --- PASS: TestAccAWSInstanceDataSource_GetUserData_NoUserData (115.57s) --- PASS: TestAccAWSInstanceDataSource_gp2IopsDevice (95.30s) --- PASS: TestAccAWSInstanceDataSource_keyPair (189.29s) --- PASS: TestAccAWSInstanceDataSource_PlacementGroup (186.27s) --- PASS: TestAccAWSInstanceDataSource_privateIP (108.66s) --- PASS: TestAccAWSInstanceDataSource_RootBlockDevice_KmsKeyId (110.15s) --- PASS: TestAccAWSInstanceDataSource_rootInstanceStore (89.90s) --- PASS: TestAccAWSInstanceDataSource_SecurityGroups (147.45s) --- PASS: TestAccAWSInstanceDataSource_tags (135.92s) --- PASS: TestAccAWSInstanceDataSource_VPC (83.45s) --- PASS: TestAccAWSInstanceDataSource_VPCSecurityGroups (191.31s) --- PASS: TestAccAWSInstancesDataSource_basic (207.14s) --- PASS: TestAccAWSInstancesDataSource_instance_state_names (191.23s) --- PASS: TestAccAWSInstancesDataSource_tags (201.39s) --- PASS: TestAccAWSLaunchConfiguration_basic (17.97s) --- PASS: TestAccAWSLaunchConfiguration_ebs_noDevice (10.28s) --- PASS: TestAccAWSLaunchConfiguration_encryptedRootBlockDevice (13.95s) --- PASS: TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears (334.21s) --- PASS: TestAccAWSLaunchConfiguration_RootBlockDevice_VolumeSize (25.12s) --- PASS: TestAccAWSLaunchConfiguration_updateEbsBlockDevices (16.63s) --- PASS: TestAccAWSLaunchConfiguration_userData (16.13s) --- PASS: TestAccAWSLaunchConfiguration_withBlockDevices (11.22s) --- PASS: TestAccAWSLaunchConfiguration_withEncryption (13.61s) --- PASS: TestAccAWSLaunchConfiguration_withIAMProfile (29.79s) --- PASS: TestAccAWSLaunchConfiguration_withInstanceStoreAMI (13.55s) --- PASS: TestAccAWSLaunchConfiguration_withSpotPrice (10.84s) --- PASS: TestAccAWSLaunchConfiguration_withVpcClassicLink (19.56s) --- PASS: TestAccAWSLaunchConfigurationDataSource_basic (8.90s) --- PASS: TestAccAWSLaunchConfigurationDataSource_securityGroups (11.48s) ```
Fix submitted: #12009 |
…t block device lookup (#12009) Reference: #10182 Previous output from new acceptance testing: ``` --- FAIL: TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears (329.50s) testing.go:640: Step 0 error: errors during follow-up refresh: Error: No images found for AMI ami-03f8153b368160e27 ``` Output from acceptance testing: ``` --- PASS: TestAccAWSAMI_basic (60.58s) --- PASS: TestAccAWSAMI_disappears (55.68s) --- PASS: TestAccAWSAMI_snapshotSize (61.57s) --- PASS: TestAccAWSAMI_tags (73.23s) --- PASS: TestAccAWSInstance_addSecondaryInterface (119.45s) --- PASS: TestAccAWSInstance_addSecurityGroupNetworkInterface (120.56s) --- PASS: TestAccAWSInstance_associatePublic_defaultPrivate (75.15s) --- PASS: TestAccAWSInstance_associatePublic_defaultPublic (74.26s) --- PASS: TestAccAWSInstance_associatePublic_explicitPrivate (74.07s) --- PASS: TestAccAWSInstance_associatePublic_explicitPublic (94.78s) --- PASS: TestAccAWSInstance_associatePublic_overridePrivate (103.83s) --- PASS: TestAccAWSInstance_associatePublic_overridePublic (74.45s) --- PASS: TestAccAWSInstance_associatePublicIPAndPrivateIP (77.27s) --- PASS: TestAccAWSInstance_basic (187.91s) --- PASS: TestAccAWSInstance_blockDevices (79.58s) --- PASS: TestAccAWSInstance_changeInstanceType (346.21s) --- PASS: TestAccAWSInstance_CreditSpecification_Empty_NonBurstable (309.18s) --- PASS: TestAccAWSInstance_creditSpecification_isNotAppliedToNonBurstable (95.71s) --- PASS: TestAccAWSInstance_creditSpecification_standardCpuCredits (94.60s) --- PASS: TestAccAWSInstance_creditSpecification_standardCpuCredits_t2Tot3Taint (416.77s) --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t2 (84.38s) --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t3 (277.51s) --- PASS: TestAccAWSInstance_creditSpecification_unlimitedCpuCredits (94.46s) --- PASS: TestAccAWSInstance_creditSpecification_unlimitedCpuCredits_t2Tot3Taint (205.09s) --- PASS: TestAccAWSInstance_creditSpecification_unspecifiedDefaultsToStandard (75.03s) --- PASS: TestAccAWSInstance_CreditSpecification_UnspecifiedToEmpty_NonBurstable (66.25s) --- PASS: TestAccAWSInstance_creditSpecification_updateCpuCredits (129.64s) --- PASS: TestAccAWSInstance_creditSpecificationT3_standardCpuCredits (96.86s) --- PASS: TestAccAWSInstance_creditSpecificationT3_unlimitedCpuCredits (93.24s) --- PASS: TestAccAWSInstance_creditSpecificationT3_unspecifiedDefaultsToUnlimited (302.23s) --- PASS: TestAccAWSInstance_creditSpecificationT3_updateCpuCredits (105.73s) --- PASS: TestAccAWSInstance_disableApiTermination (134.68s) --- PASS: TestAccAWSInstance_disappears (99.99s) --- PASS: TestAccAWSInstance_EbsBlockDevice_KmsKeyArn (86.99s) --- PASS: TestAccAWSInstance_forceNewAndTagsDrift (249.42s) --- PASS: TestAccAWSInstance_getPasswordData_falseToTrue (153.39s) --- PASS: TestAccAWSInstance_getPasswordData_trueToFalse (144.29s) --- PASS: TestAccAWSInstance_GP2IopsDevice (180.27s) --- PASS: TestAccAWSInstance_GP2WithIopsValue (63.42s) --- PASS: TestAccAWSInstance_hibernation (184.12s) --- PASS: TestAccAWSInstance_inDefaultVpcBySgId (82.35s) --- PASS: TestAccAWSInstance_inDefaultVpcBySgName (72.00s) --- PASS: TestAccAWSInstance_inEc2Classic (87.12s) --- PASS: TestAccAWSInstance_instanceProfileChange (165.02s) --- PASS: TestAccAWSInstance_ipv6_supportAddressCount (73.56s) --- PASS: TestAccAWSInstance_ipv6_supportAddressCountWithIpv4 (83.80s) --- PASS: TestAccAWSInstance_ipv6AddressCountAndSingleAddressCausesError (9.88s) --- PASS: TestAccAWSInstance_keyPairCheck (184.21s) --- PASS: TestAccAWSInstance_multipleRegions (249.46s) --- PASS: TestAccAWSInstance_NetworkInstanceRemovingAllSecurityGroups (80.15s) --- PASS: TestAccAWSInstance_NetworkInstanceSecurityGroups (76.11s) --- PASS: TestAccAWSInstance_NetworkInstanceVPCSecurityGroupIDs (75.10s) --- PASS: TestAccAWSInstance_noAMIEphemeralDevices (180.15s) --- PASS: TestAccAWSInstance_placementGroup (65.13s) --- PASS: TestAccAWSInstance_primaryNetworkInterface (75.72s) --- PASS: TestAccAWSInstance_primaryNetworkInterfaceSourceDestCheck (86.88s) --- PASS: TestAccAWSInstance_privateIP (74.08s) --- PASS: TestAccAWSInstance_RootBlockDevice_KmsKeyArn (316.78s) --- PASS: TestAccAWSInstance_rootBlockDeviceMismatch (186.67s) --- PASS: TestAccAWSInstance_rootInstanceStore (88.21s) --- PASS: TestAccAWSInstance_sourceDestCheck (111.85s) --- PASS: TestAccAWSInstance_tags (237.27s) --- PASS: TestAccAWSInstance_UserData_EmptyStringToUnspecified (92.43s) --- PASS: TestAccAWSInstance_UserData_UnspecifiedToEmptyString (108.86s) --- PASS: TestAccAWSInstance_userDataBase64 (221.53s) --- PASS: TestAccAWSInstance_volumeTags (100.55s) --- PASS: TestAccAWSInstance_volumeTagsComputed (104.70s) --- PASS: TestAccAWSInstance_vpc (73.95s) --- PASS: TestAccAWSInstance_withIamInstanceProfile (112.28s) --- PASS: TestAccAWSInstanceDataSource_AzUserData (221.28s) --- PASS: TestAccAWSInstanceDataSource_basic (301.34s) --- PASS: TestAccAWSInstanceDataSource_blockDevices (90.86s) --- PASS: TestAccAWSInstanceDataSource_creditSpecification (101.85s) --- PASS: TestAccAWSInstanceDataSource_EbsBlockDevice_KmsKeyId (205.68s) --- PASS: TestAccAWSInstanceDataSource_getPasswordData_falseToTrue (176.04s) --- PASS: TestAccAWSInstanceDataSource_getPasswordData_trueToFalse (172.89s) --- PASS: TestAccAWSInstanceDataSource_GetUserData (123.47s) --- PASS: TestAccAWSInstanceDataSource_GetUserData_NoUserData (115.57s) --- PASS: TestAccAWSInstanceDataSource_gp2IopsDevice (95.30s) --- PASS: TestAccAWSInstanceDataSource_keyPair (189.29s) --- PASS: TestAccAWSInstanceDataSource_PlacementGroup (186.27s) --- PASS: TestAccAWSInstanceDataSource_privateIP (108.66s) --- PASS: TestAccAWSInstanceDataSource_RootBlockDevice_KmsKeyId (110.15s) --- PASS: TestAccAWSInstanceDataSource_rootInstanceStore (89.90s) --- PASS: TestAccAWSInstanceDataSource_SecurityGroups (147.45s) --- PASS: TestAccAWSInstanceDataSource_tags (135.92s) --- PASS: TestAccAWSInstanceDataSource_VPC (83.45s) --- PASS: TestAccAWSInstanceDataSource_VPCSecurityGroups (191.31s) --- PASS: TestAccAWSInstancesDataSource_basic (207.14s) --- PASS: TestAccAWSInstancesDataSource_instance_state_names (191.23s) --- PASS: TestAccAWSInstancesDataSource_tags (201.39s) --- PASS: TestAccAWSLaunchConfiguration_basic (17.97s) --- PASS: TestAccAWSLaunchConfiguration_ebs_noDevice (10.28s) --- PASS: TestAccAWSLaunchConfiguration_encryptedRootBlockDevice (13.95s) --- PASS: TestAccAWSLaunchConfiguration_RootBlockDevice_AmiDisappears (334.21s) --- PASS: TestAccAWSLaunchConfiguration_RootBlockDevice_VolumeSize (25.12s) --- PASS: TestAccAWSLaunchConfiguration_updateEbsBlockDevices (16.63s) --- PASS: TestAccAWSLaunchConfiguration_userData (16.13s) --- PASS: TestAccAWSLaunchConfiguration_withBlockDevices (11.22s) --- PASS: TestAccAWSLaunchConfiguration_withEncryption (13.61s) --- PASS: TestAccAWSLaunchConfiguration_withIAMProfile (29.79s) --- PASS: TestAccAWSLaunchConfiguration_withInstanceStoreAMI (13.55s) --- PASS: TestAccAWSLaunchConfiguration_withSpotPrice (10.84s) --- PASS: TestAccAWSLaunchConfiguration_withVpcClassicLink (19.56s) --- PASS: TestAccAWSLaunchConfigurationDataSource_basic (8.90s) --- PASS: TestAccAWSLaunchConfigurationDataSource_securityGroups (11.48s) ```
The fix for this has been merged and will release with version 2.49.0 of the Terraform AWS Provider, tomorrow. 👍 |
This has been released in version 2.49.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 for triage. Thanks! |
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Terraform v0.11.14
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
The AMI should be changed regardless of the fact that the old AMI has been deregistered.
Actual Behavior
An error is thrown by Terraform that the old AMI is not found:
Steps to Reproduce
terraform apply
with any version of provider.awsterraform apply
with a version of provider.aws >= 2.23References
It seems that this bug has been introduced in version 2.23 as mentioned in the references.
The text was updated successfully, but these errors were encountered: