You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
../test/terraform validate
Error: Incorrect attribute value type
on main.tf line 5, in resource "dummy_dummy" "dummy":
5: test = {
6: testlist = ["test", "tester"]
7: }
Inappropriate value for attribute "test": element "testlist": string required.
The behavior you've seen here is a limitation of the current Terraform Plugin SDK rather than a bug: maps can only be of primitive types, not of nested collection or resource types. I believe this is usually detected and reported by the SDK's InternalValidate function, which providers usually call as part of their test suite but which your test provider here does not use.
That's a constraint of the SDK rather than of Terraform itself, and the SDK is developed separately in its own repository so there's no change we could make in this repository that would improve that situation, and so I'm going to close this. The Terraform SDK repository has an issue hashicorp/terraform-plugin-sdk#62 which seems to be discussing the situation you've raised here, so you could enable notifications for that issue if you're interest in knowing when the situation changes.
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.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked as resolved and limited conversation to collaborators
Nov 28, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
terraform 13.4 & 13.5
Terraform Configuration Files
https://github.com/ovadbar/terraform13-TypeList-bug
Debug Output
https://github.com/ovadbar/terraform13-TypeList-bug/blob/main/trace
Crash Output
Expected Behavior
Validate successfully
Actual Behavior
Steps to Reproduce
mkdir -p ~/.terraform.d/plugins/terraform.getdyl.com/dyl/dummy/1.0.0/darwin_amd64/
go build -o terraform-provider-dummy_v1.0.0
terraform init
terraform validate
Additional Context
This is a custom built package
References
The text was updated successfully, but these errors were encountered: