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

Converting from Map to Object #39

Closed
davecardwell opened this issue Feb 12, 2020 · 1 comment
Closed

Converting from Map to Object #39

davecardwell opened this issue Feb 12, 2020 · 1 comment

Comments

@davecardwell
Copy link

I am trying to diagnose hashicorp/terraform#24092 and the root of my issue seems to be that go-cty does not allow conversions from cty.Map to cty.Object.

I noticed that the convert docs suggest that map-to-object conversions are an “unsafe” operation, so should work for some subsets, but I could not find an example of this working.

Is it possible to allow map-to-object conversions like https://play.golang.org/p/mcXBOocphcu (disclaimer: I am not a go programmer)?

@apparentlymart
Copy link
Collaborator

Hi @davecardwell!

As I mentioned in #41, this should be fixed by #42 and so I'm going to close this out. The fix will be in the next release of cty, so once that is tagged I suppose the next step will be a PR to Terraform to upgrade to the new cty release.

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 a pull request may close this issue.

2 participants