-
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]: nil pointer dereference when removing cloudwatch deployment monitor from aws_ecs_service #29349
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Not finding a good workaround. I did a state rm to remove the entire resource and re-import it, and the terraform plan still shows it's trying to remove the alarm configuration. A CLI Using Terraform to taint then re-create the ECS service seems to have resolved this one. |
Running into the same issue
Here is the metric alarm that I'm attempting to create:
And attempting to add it to the following
|
Same here...
When using the following aws_ecs_service resource:
|
We get the same error, even when using v4.49.0 where this feature was introduced
|
I recently re-tested this with the 4.62.0 AWS provider version and I am no longer able to reproduce the issue. Adding/removing the circuit breaker logic no longer results in the nil pointer. |
Hi! My problem is with the alarms argument not with the circuit breaker. When applying for the first time everything is okay and the config gets added to the service but when removing the alarms argument and re applying (to disable the feature) I'm getting the error. I'm using 4.62. I also see the error when trying to add alarms to existing ECS services that were created without any alarm configuration, and the only way to sort it is by recreating the service which is not convenient. Any clues/recommendations? Thanks 🙏 |
Pay attention: If anyhow the tf provider pulls a configured deployment circuit breaker into the tf state it will not be possible to apply any changes to the service before it is not deleted from the state.. In our case we needed to manually use the aws cli to set the values to null. The ECS UI only hide the configs.
|
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
1.1.7
AWS Provider Version
4.54.0
Affected Resource(s)
aws_ecs_service
Expected Behavior
CloudWatch Deployment Alarm configuration should be removed upon apply
Actual Behavior
Received error and apply fails
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Terraform plan/apply - nothing special
Debug Output
No response
Panic Output
No response
Important Factoids
Nothing special. Interested in providing a fix, would be a first-timer.
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: