Cannot remove aws_instance source for created AMI #11103
Labels
service/ec2
Issues and PRs that pertain to the ec2 service.
waiting-response
Maintainers are waiting on response from community or contributor.
Community Note
Terraform Version
Any.
Affected Resource(s)
Terraform Configuration Files
Steps to Reproduce
terraform apply
terraform destroy -target=aws_instance.ami-source
Expected Behavior
Source EC2 instance should be destroyed, but AMI should be kept as after creation it becomes independent resource.
Actual Behavior
Removing
lifecycle.prevent_destroy
produces:The text was updated successfully, but these errors were encountered: