Loading...
Loading...
### Terraform Version ```shell v1.10.4 ``` ### Terraform Configuration Files Does not work : ```terraform locals { test = jsondecode("{ \"hello\": { \"test\": true }, \"hello\": { \"test2\": false } }") } ``` Works : ```terraform locals { test = jsondecode("{ \"hello\": { \"test\": true }, \"something_else_than_hello\": { \"test2\": false } }") } ``` ### Debug Output During plan or apply : ``` ╷ │ Error: Error in function call │ │ on terraform.tf line 2, in locals: │ 2: test = jsondecode("{ \"hello\": { \"test\": true }, \"hello\": { \"test2\": false } }") │ ├──────────────── │ │ while calling jsondecode(str) │ │ Call to function "jsondecode" failed: unsupported attribute │ "test". ``` ### Expected Behavior The dupplicate key should overwrite the previous ones in the map, or at least the error message should state why is "test" unsupported. ### Actual Behavior It fails saying that "test" (the dupplicate key) is an unsupported attribute ### Steps to Reproduce 1. terraform init 2. terraform plan ### Additional Context _No response_ ### References _No response_ ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.