-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
aws_lb_listener_certificate not destroyed upon "force new resource" #7761
Comments
@bflad |
This bug makes it impossible to use terraform 0.12.0, since it provokes the following error:
|
Finally had time to look into this. Turns out, the error is not per se with persisting to state, but the read function deletes it from state if the profile running terraform doesn't have the elasticloadbalancing:DescribeListenerCertificates permission. There is no error message exept in debug mode, and it just silently removes the resource. |
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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. |
Community Note
Terraform Version
0.11.14
Affected Resource(s)
aws_lb_listener_certificate
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
aws_lb_listener_certificate
should have been destroyed (i.e, the certificate should have been removed from the alb) before the actual certificate would be destroyed,Actual Behavior
Terraform seems to have no concept of the
aws_lb_listener_certificate
"resource" and it doesn't even try to remove the certificate from the lb.Looking through the state file, I can't even see that the
aws_lb_listener_certificate
resource is even saved.Running terraform plan without making any changes lists the
aws_lb_listener_certificate
as a new resource every time (probably overwriting the cert in the lb with itself?).Documentation says "forces new resource" (https://www.terraform.io/docs/providers/aws/r/lb_listener_certificate.html#listener_arn), but since terraform don't know the old value, it just doesn't.
Steps to Reproduce
terraform apply
twice to see that theaws_lb_listener_certificate
is created as a new resource every time.aws_acm_certificate
that forces a new resource.terraform apply
to see it fail on certificate deletion (and not even try to remove it from the alb)Important Factoids
References
The text was updated successfully, but these errors were encountered: