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

.tf.json format support #165

Closed
yuriy-yarosh opened this issue May 29, 2023 · 4 comments · Fixed by #283
Closed

.tf.json format support #165

yuriy-yarosh opened this issue May 29, 2023 · 4 comments · Fixed by #283
Labels
enhancement New feature or request needs:triage

Comments

@yuriy-yarosh
Copy link

yuriy-yarosh commented May 29, 2023

What problem are you facing?

I want to use upbound/provider-terraform with the .tf.json format out of cdktf.

How could Official Terraform Provider help solve your problem?

Basically, I want to be able to rename the default main.tf module filename over here, to main.tf.json.

So, I could pass the infline tf.json files as is, without relying on go-getter and module repo's.

@yuriy-yarosh yuriy-yarosh added enhancement New feature or request needs:triage labels May 29, 2023
@bobh66
Copy link
Collaborator

bobh66 commented May 29, 2023

This seems like it would be as simple as adding the ".json" suffix to the tfMain constant if the Workspace format attribute is set to JSON.

That would mean the inline manifest would be expected to be in JSON format instead of YAML.

@bobh66
Copy link
Collaborator

bobh66 commented May 29, 2023

Correction - we need to add format at the Workspace level instead of/in addition to the varFiles level

@yuriy-yarosh
Copy link
Author

yuriy-yarosh commented May 31, 2023

to be in JSON format instead of YAML

@bobh66 Maybe, instead of HCL ?

instead of/in addition to the varFiles level

Nah, it has nothing to do with varFiles .
Only if you want to keep the existing CRD's schema the same.
It's possible to impl a wacky rule "if we're passing a .tf.json - treat it as a main.tf replacement" etc.

@bobh66
Copy link
Collaborator

bobh66 commented May 31, 2023

Maybe, instead of HCL ?

Yes, HCL - sorry.

I'd prefer to add the format attribute to the Workspace, rather than try to detect JSON vs HCL.

I'm hoping to push a PR for this in a day or two.

denniskniep added a commit to denniskniep/provider-terraform that referenced this issue Jul 31, 2024
Signed-off-by: Dennis Kniep <kniepdennis@gmail.com>
denniskniep added a commit to denniskniep/provider-terraform that referenced this issue Jul 31, 2024
Signed-off-by: Dennis Kniep <kniepdennis@gmail.com>
denniskniep added a commit to denniskniep/provider-terraform that referenced this issue Aug 9, 2024
Signed-off-by: Dennis Kniep <kniepdennis@gmail.com>
bobh66 pushed a commit that referenced this issue Aug 26, 2024
Signed-off-by: Dennis Kniep <kniepdennis@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs:triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants