Skip to content
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

Unrecoverable state if you delete a Launch Template by hand #18931

Closed
kvz opened this issue Sep 24, 2018 · 2 comments
Closed

Unrecoverable state if you delete a Launch Template by hand #18931

kvz opened this issue Sep 24, 2018 · 2 comments

Comments

@kvz
Copy link
Contributor

kvz commented Sep 24, 2018

Terraform Version

Terraform v0.11.8'

Terraform Configuration Files

An aws_launch_template used in an aws_autoscaling_group.

Expected Behavior

I noticed some local changes weren't propagating to the Launch Template (this was odd in itself), so
I deleted the Launch Template by hand, and ran Terraform plan, expecting that Terraform would spot a difference between actual & expected state and that it would be recreate a Launch Template with my new settings.

Actual Behavior

At the refresh stage, Terraform errors out:

Error: Error refreshing state: 1 error(s) occurred:

* module.region_euwest2.module.crossover.aws_launch_template.crossover: 1 error(s) occurred:

* module.region_euwest2.module.crossover.aws_launch_template.crossover: aws_launch_template.crossover: Error getting launch template: InvalidLaunchTemplateId.NotFound: Atleast one of the launch templates specified in the request does not exist.
	status code: 400, request id: e321a45b-f359-40b5-9d18-dea9ed9100c2

So I got in an unrecoverable state because refresh is a prerequisite for changes, destroys, launches (I think). I manually removed the Launch Template and any reference to it from the tfstate json, and then I was on my way again.

@ghost
Copy link

ghost commented Sep 24, 2018

This issue has been automatically migrated to hashicorp/terraform-provider-aws#5965 because it looks like an issue with that provider. If you believe this is not an issue with the provider, please reply to hashicorp/terraform-provider-aws#5965.

@ghost
Copy link

ghost commented Apr 2, 2020

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.

@ghost ghost locked and limited conversation to collaborators Apr 2, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants