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

terraform-cdk-go: able to override and remove a key completely from generated cdk.tf.json #3751

Open
1 task
arjunkarnwal opened this issue Oct 22, 2024 · 0 comments
Labels
enhancement New feature or request new Un-triaged issue

Comments

@arjunkarnwal
Copy link

Description

In its current form, there is no way for the developers to remove a particular field from the generated cdk.tf.json.
e.g.

"terraform": {
    "backend" : "XX"
    "required_providers": {
      "datadog": {
        "source": "DataDog/datadog",
        "version": "3.37.0"
      }
    }
  }

There is no way where I can completely remove backend from the generated json file.

The functionality provided right now to override

cdkStack.AddOverride("terraform.backend", "")

will set the backend with a "" value but not completely remove. Moreover nil can not be passed as argument.

Passing nil is supported in the terraform-cdk-typescript which completely removes the given key but is not supported in terraform-cdk-go.

References

No response

Help Wanted

  • I'm interested in contributing a fix myself

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@arjunkarnwal arjunkarnwal added enhancement New feature or request new Un-triaged issue labels Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new Un-triaged issue
Projects
None yet
Development

No branches or pull requests

1 participant