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
TF 1.3.2: crash with: inconsistent map element types #31962
Comments
here are most of the log messages at the info level:
|
Hi @stuart12, Thanks for filing the issue. In order to confirm the behavior, it would help to have the exact variable declaration you are using which crashed, along with the complete value you are assigning to the variable. A complete example should be achievable by adding a similarly structured value as the variable's Thanks! |
hi! I am sorry but I no longer know how to reproduce this bug. My changes to other parts of the code mean that terraform no longer crashes. |
Thanks @stuart12. There may be a patch in an upcoming release which may address the issue. If not we can wait for a new issue to be filed. Thanks |
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 Version
Terraform Configuration Files
Debug Output
Expected Behavior
terraform -chdir=/home/s.pook/git/xxx-dsp-kubernetes/cluster plan -var 'dns={private_zone_name="private.uxbridge.xxx.org",public_zone_name="uxbridge.xxx.org"}' -var s3_kubeconfig_key=dsp-development-k8s-config-uxbridge -var s3_kubeconfig_bucket=k8s-state-store-xxx-development-clusters -var environment=uxbridge -var-file=/home/s.pook/git/xxx-dsp-kubernetes/cluster/development/development.tfvars -compact-warnings
should not crashActual Behavior
Terraform crashes when I add the
[]
argument tooptional
in the second last line of the extract from my terraform configuration given above. If I remove the, []
, TF 1.3.2 does not crash.Steps to Reproduce
terraform -chdir=/home/s.pook/git/xxx-dsp-kubernetes/cluster plan -var 'dns={private_zone_name="private.uxbridge.xxx.org",public_zone_name="uxbridge.xxx.org"}' -var s3_kubeconfig_key=dsp-development-k8s-config-uxbridge -var s3_kubeconfig_bucket=k8s-state-store-xxx-development-clusters -var environment=uxbridge -var-file=/home/s.pook/git/xxx-dsp-kubernetes/cluster/development/development.tfvars -compact-warnings
Additional Context
I'm porting pre-1.3 code that used module_variable_optional_attrs to 1.3. Perhaps the code that is causing terraform 1.3.2 to crash is illegal. I had the same crash with terraform 1.3.1. If I replace the
[]
with{}
, I get the error message:This default value is not compatible with the attribute's type constraint: list of object required.
I presume that{}
is what I should use as the default value but please correct me if I am wrong. I will provide more information if you ask.References
I saw #31844 but the fix #31855 targeted 1.3.1 so I should have this fix in TF 1.3.2.
The text was updated successfully, but these errors were encountered: