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

adding jsonencode() block into a generated terraform file using golang cty #164

Closed
gohayon-cls opened this issue Jun 19, 2023 · 2 comments
Closed

Comments

@gohayon-cls
Copy link

Hi
Kind of new at this, so apology in advance if I'm asking a question that was answered already.
I'm trying to generate a tf file using the golang cty library.
It's pretty straightforward. However, I have this section:

  custom_fields = {
    alternate_contact = jsonencode({somecode})
}

How can I add the jsonencode() section into my generated tf file

@apparentlymart
Copy link
Collaborator

Hi @gohayon-cls,

It looks like your goal here is to generate Terraform language code using HCL syntax. This repository only deals with values in memory and knows nothing about the Terraform language in particular.

I think a good place for this question would be Terraform's community forum, where I've seen questions similar to this one before. If you start a new topic there and share the code you already wrote as a starting point I expect someone can suggest how to change it to generate a function call.

Since this repository doesn't deal with Terraform language syntax, I'm going to close this issue. Thanks!

@apparentlymart apparentlymart closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2023
@gohayon-cls
Copy link
Author

Perfect, thanks for taking the time to reply back to me.

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

No branches or pull requests

2 participants