-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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]: 5.59.0 modifies capitalization of JSON keys unexpectedly #38543
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
I can confirm the same exists in version 5.60.0 of the terraform AWS provider. @ewbankkit what is the ETA for having this fixed? It is currently breaking our policy as code engine that enforces compliance on the terraform plan. |
This is caused by the AWS SDK for Go v2 migration of the ECS service (#38016). Previously JSON encoding routines in the AWS SDK for Go v1 were used for conversion of the Terraform configured JSON to the AWS API structures and vice-versa (#38380) and the migration replaced these with Go standard JSON functionality. |
@ewbankkit thanks for this! Will the provider be reverting to the previous behaviour, or should we plan to migrate to the new uppercased field names? |
@jonnangle We will restore the previous (v5.58.0) behavior. |
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v5.61.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
1.9.2
AWS Provider Version
5.59.0
Affected Resource(s)
Expected Behavior
If Terraform configuration contains an aws_ecs_task_definition with "cpu" in the container_definitions JSON, I expect "cpu" to be present in the JSON within the plan.
I use tools that inspect HCL and the Terraform plan to enforce compliance. For some checks, they need to analyze JSON data from the plan. The new provider changes the capitalization of JSON keys, which breaks JSON analysis.
Actual Behavior
The "cpu" field from the JSON for an ecs task container definition is showing in the plan as "Cpu". The compliance tools I use were configured to look for "cpu", following the AWS JSON schema, so they can't perform the compliance check.
But again, this issue isn't limited to the ECS task definition resource. The problem likely affects any resources where JSON data can be used.
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
terraform init followed by terraform plan.
If you modify the HCL to toggle between 5.58.0 and 5.59.0 you can see the change in capitalization.
Debug Output
No response
Panic Output
No response
Important Factoids
Reverting back to 5.58.0 fixes the problem.
References
No response
Would you like to implement a fix?
No
The text was updated successfully, but these errors were encountered: