-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
terraform plan -generate-config-out fails for map nested objects with keys with spaces #35752
Comments
It looks like this may be a problem with periods in map keys as well - in the case of periods the HCL can be generated, but there ends up being an error about an undeclared resource:
With generated HCL that looks like this:
It looks like the "policy.action" value ought to be in quotes. |
@DanielMSchmidt It doesn't look to me like that merge request fixes the problem I added in a comment yesterday for when map keys have periods. |
Yeah, I agree, let me re-open this again 👍 |
Terraform Version
Terraform Configuration Files
Debug Output
https://gist.github.com/henryrecker-pingidentity/ae09eb59b71a2d0c02526018760dd254
Expected Behavior
HCL should be generated with the expected values
Actual Behavior
Error, no HCL is generated:
Steps to Reproduce
terraform plan -generate-config-out=generated_resources.tf
with a provider schema that has a MapNestedAttribute with a key that includes spaces.A simple provider that reproduces this issue can be found here: https:/henryrecker-pingidentity/terraform-provider-example/tree/GenerateConfigBug
Relevant provider code, note the "Use Case" name with the space.
Additional Context
No response
References
No response
The text was updated successfully, but these errors were encountered: