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

chore(setup,cleanup): don't use Helm templates in Terraform manifests #3761

Closed
wants to merge 11 commits into from

Conversation

swiatekm
Copy link

@swiatekm swiatekm commented Jun 13, 2024

This PR shows the entirety of the changes I want to make to our Terraform manifests used by the setup job. It is not meant to be merged - I plan to submit the changes in a series of smaller PRs. It's here so the changes can be viewed in a broader context.

There are three approaches to moving Helm templating outside Terraform manifests in this PR:

  • Simple values are turned into Terraform variables. The variable values are set via environment variables, which are defined in the setup/cleanup Pod definition.
  • More complex values are turned into Terraform variables, and the values are set in a templated terraform.tfvars.json file. In this file, we generate what we need by manipulating Helm dictionaries, and then convert them to JSON in one go.
  • A special case of the above are source definitions. For sources, we have some maps in the configuration and want to turn them into Terraform resources. There isn't a dynamic way to do this in Terraform, so I instead decided to generate the necessary resources and local variable definitions in a sources.tf.json file. This file is then used as a reference for the actual manifests and scripts.

@swiatekm swiatekm changed the title chore(setup/cleanup): don't use Helm templates in Terraform manifests chore(setup,cleanup): don't use Helm templates in Terraform manifests Jun 13, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request contains invalid labels. Please remove all of the following labels: ['do-not-merge/hold']

@swiatekm
Copy link
Author

Merged in #3762 #3765 #3766. #3767 remains, but it should be merged shortly. Closing.

@swiatekm swiatekm closed this Jun 17, 2024
@swiatekm swiatekm deleted the chore/setup/refactor branch June 17, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant