-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
[Bug]: fails on reading ELB Listener Certificate of removed Listener during terraform plan #30489
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Hey @a0s 👋 Thank you for taking the time to raise this! Am I understanding correctly that the issue here arises when you've deleted resources from the AWS console that are then left in the Terraform state? Rather than downloading the state, editing it, and pushing it back to your state storage, you should be able to use |
Correct. I suspect that terraform is not properly handling a 404 or similar response from aws api (for nested resource) during plan stage.
I keep forgetting this feature exists. Besides, if the terraform plan crashes, I won't know the id of the object I need, and in any case, I'll have to download the tf state. I also trust my hands more :) |
Hey would like to add since I've run into this issue recently. I ran into the same issue with running a plan after manually deleting the listener. |
Also getting this issue. Was on aws provider 4.36.0 and when an alb is deleted via console, doing a terraform apply recreated the alb. After updating to 4.64.0, get the same behaviour exhibited above. Attempted to updated to provider 5.4.0 and get the same issue Able to update to provider 4.50.0 with no issues. The issue started in aws provider 4.51.0 |
This functionality has been released in v5.13.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. 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. |
Terraform Core Version
v1.4.2
AWS Provider Version
4.61.0
Affected Resource(s)
Expected Behavior
Should build terraform plan
Actual Behavior
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
I am using cdktf with typescript, its hard to write simpler version of this code.
I am creating
LbListenerCertificate
,LbTargetGroup
,LbListenerRule
inside big loop for every sub-domain in list. Multiple LbListenerCertificate linked to the same LbListener.I am creating common LbListener's for 80 and 443 ports outside the loop. 443 listener is linked to ACM certificate of sub-zone.
Steps to Reproduce
Create Listener with linked Certificate
Manually remove all listeners and target groups from LB
Run terraform plan
Debug Output
No response
Panic Output
No response
Important Factoids
How to override:
aws_lb_listener
andaws_lb_listener_certificate
that were already removed from awsserial
numberReferences
https://www.reddit.com/r/Terraform/comments/125tsmb/error_when_applying_terraform_configuration_for
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: