Skip to content
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

Handle write-only properties #86

Merged
merged 8 commits into from
Aug 5, 2021
Merged

Handle write-only properties #86

merged 8 commits into from
Aug 5, 2021

Conversation

ewbankkit
Copy link
Contributor

Closes #42.
This also includes generation of the aws_kms_key resource to test a write-only property which led to a number of other fixes:

  • Handle JSON strings like Key Policy correctly (marshal map[string]interface{} to string)
  • Empty/Null Set handling - May required Terraform Core fix

panic: must not call SetVal with empty slice

goroutine 68 [running]:
github.com/zclconf/go-cty/cty.SetVal(0x47ed998, 0x0, 0x0, 0x47ed998, 0x0, 0x0, 0x0)
        /Users/distiller/go/pkg/mod/github.com/zclconf/go-cty@v1.9.0/cty/value_init.go:267 +0x865
github.com/hashicorp/terraform/internal/command/format.(*blockBodyDiffPrinter).writeNestedAttrDiff(0xc00085d2a8, 0xc0005a5610, 0x4, 0xc0006d12c0, 0x3748ad0, 0xc0004977d0, 0x0, 0x0, 0x3748ad0, 0xc000497c60, ...)
        /Users/distiller/project/project/internal/command/format/diff.go:615 +0x246a
github.com/hashicorp/terraform/internal/command/format.(*blockBodyDiffPrinter).writeAttrDiff(0xc0006492a8, 0xc0005a5610, 0x4, 0xc000932ec0, 0x3748ad0, 0xc0004977d0, 0x0, 0x0, 0x3748ad0, 0xc000497c60, ...)
        /Users/distiller/project/project/internal/command/format/diff.go:473 +0x7a7
github.com/hashicorp/terraform/internal/command/format.(*blockBodyDiffPrinter).writeAttrsDiff(0xc00085d2a8, 0xc000956060, 0x3748a98, 0xc000497f70, 0x2f41440, 0xc00076e1b0, 0x3748a98, 0xc0007e3210, 0x2f41440, 0xc00076e450, ...)
        /Users/distiller/project/project/internal/command/format/diff.go:434 +0x685
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write-only properties
1 participant