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): don't use templating for Terraform imports #3768

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

swiatekm
Copy link

Import using the json file as a reference instead of templating in the bash script. This is the final part of #3761.

Also fixed a bug in cleanup, which was using the wrong Secret name.

Finally, set an attribute on the generated Secret to align more with Kubernetes defaults.

@swiatekm swiatekm requested a review from a team as a code owner June 17, 2024 12:45
{{- end }}
{{- end }}
{{- end }}
jq -r '.resource[] | to_entries[] | "\(.key) \(.value.name)"' sources.tf.json | while read -r resource_name source_name; do
Copy link
Contributor

Choose a reason for hiding this comment

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

would it be better to have a common function for this since I see this is being repeated for all the files?

Copy link
Author

Choose a reason for hiding this comment

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

What is being repeated? We call jq exactly once, and then loop over the results.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we used to have more the same code in cleanup.sh

@swiatekm swiatekm merged commit c6ad975 into main Jun 18, 2024
58 of 59 checks passed
@swiatekm swiatekm deleted the chore/setup-cleanup-refactor-imports branch June 18, 2024 08:39
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.

3 participants