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

Terraform errors on aws_iam_server_certificate deletion #3746

Closed
bensojona opened this issue Nov 4, 2015 · 3 comments
Closed

Terraform errors on aws_iam_server_certificate deletion #3746

bensojona opened this issue Nov 4, 2015 · 3 comments

Comments

@bensojona
Copy link
Contributor

When I try and delete an aws_iam_server_certificate resource that's being used by the aws_elb resource, I get the below error. This happens both when I do terraform destroy's and when I modify theaws_elb oraws_iam_server_certificate and it needs to replace the resource.

See .tf gist here.

Deleting the HTTPS listener that's using the SSL certificate seems to get be past the error, but obviously not a great solution.

image

Terraform v0.6.6

Setting up remote state...
Downloading remote modules...
Refreshing Terraform state prior to plan...
aws_iam_server_certificate.nodejs: Destroying...
Error applying plan:

1 error(s) occurred:

* aws_iam_server_certificate.nodejs: [WARN] Error deleting server certificate: DeleteConflict: Certificate: ASCAINAR4OAMIOW77O5MO is currently in use by arn:aws:elasticloadbalancing:us-east-1:241656615859:loadbalancer/prod-demo-nodejs. Please remove it first before deleting it from IAM.

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

and

Terraform v0.6.6

Setting up remote state...
Downloading remote modules...
Refreshing Terraform state prior to plan...
aws_iam_server_certificate.nodejs: Destroying...
Error applying plan:

1 error(s) occurred:

* aws_iam_server_certificate.nodejs: [WARN] Error deleting server certificate: DeleteConflict: Certificate: ASCAIHXITBLGNUC4T4H4C is currently in use by arn:aws:elasticloadbalancing:us-east-1:241656615859:loadbalancer/staging-demo-nodejs. Please remove it first before deleting it from IAM.

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
@farridav
Copy link

farridav commented Nov 4, 2015

I think this bug may be a duplicate of #3412, also worth a read is a similar issue but with apply #3275

@phinze
Copy link
Contributor

phinze commented Nov 4, 2015

Yep - dup of #3412, but these examples and descriptions are also helpful. 👍

@phinze phinze closed this as completed Nov 4, 2015
@ghost
Copy link

ghost commented Apr 30, 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 30, 2020
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

3 participants