"Incorrect attribute value type"
See original GitHub issueCommunity Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave “+1” or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
cdktf & Language Versions
cdktf: 0.0.12 typescript: Version 3.9.7
Affected Resource(s)
cdk deploy
Debug Output
https://gist.github.com/pmartindev/a5a741043975855a2a1a6fcacf4f549a
Expected Behavior
I would expect the file to create default/null values for the cdk.json and the cdk deploy to succeed
Actual Behavior
Executing cdk deploy
produces the above error.
Steps to Reproduce
- Create an AWS security group construct (see: https://gist.github.com/pmartindev/b1ab0aa678678b11aadc30a3b23859d0)
- run the
cdk deploy
command - Check output to see that the error is shown, and the cdk.tf.json does not contain the values that the error message specifies (see: https://gist.github.com/pmartindev/c9e93ffa5c7fa8c939b07252c9e90bcf)
Important Factoids
This appears to be an issue with the Terraform .json files. A workaround is to set the values to null, however, this is not possible with Typescript.
UPDATE: Adding the missing attributes with null values in the cdk.tf.json allows the terraform file to run correctly.
https://gist.github.com/pmartindev/314d083116776634ee4b4a5f07f40c95
References
https://github.com/terraform-providers/terraform-provider-aws/issues/8786
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Why am I getting an 'Incorrect attribute value type' error when I ...
I'm getting an Incorrect attribute value type when I try to create a variable in TF. I'm on this version of TF: Terraform...
Read more >terraform - Error: Incorrect attribute value type. Inappropriate ...
I'm unable to create 4 subnets within a vnet using type = list(map(string)) Error: Incorrect attribute value type │ │ on ...
Read more >Error: Incorrect attribute value type · Issue #1170 - GitHub
vsphere_user is object with no attributes Inappropriate value for attribute "user": string required. Error: Incorrect attribute value type on ..
Read more >Error messages on modules - DevOps Learning Community
Error: Incorrect attribute value type │ │ on .terraform/modules/virtual-network/main.tf line 8, in resource “azurerm_subnet” “subnet”:
Read more >'Incorrect attribute value type System.String' while...
i get 'Incorrect attribute value type System.String' exception on the Guid id = _orgService.Create(crmInvoice); line of code.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Interesting. I will try it out and see if that works, thanks!
I stand corrected -
undefined
is filtered,null
is not. I can synth thisto this