Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: persist terraform modules during template import #17665

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

Merged
merged 2 commits into from
May 8, 2025

Conversation

aslilac
Copy link
Member

@aslilac aslilac commented May 2, 2025

We need to save the source code of the terraform modules at import, so that they're available for evaluation with dynamic parameters.

The provisioner downloads the modules during the plan, which means we can have it create a tar file, send it to the backend, and then we can persist it in the database for later use.

@aslilac aslilac requested a review from Emyrk May 5, 2025 22:43
@aslilac aslilac marked this pull request as ready for review May 5, 2025 22:45
Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

removed

Copy link
Member

@Emyrk Emyrk left a comment

Choose a reason for hiding this comment

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

@spikecurtis is adding a new field to the proto struct backwards compatible like in json? Meaning, does the new field default to nil?

I will ✔️ once I know it's backwards compatible 👍

@spikecurtis
Copy link
Contributor

@spikecurtis is adding a new field to the proto struct backwards compatible like in json? Meaning, does the new field default to nil?

Yes, it's back compatible at the proto layer, so only a minor version bump, assuming the server side will tolerate it being unset. Can't recall whether bytes is a zero-length slice or literally nil, if the other side doesn't support it, but len(job.ModuleFiles) will be 0 in either case.

@aslilac aslilac force-pushed the lilac/persist-terraform-modules branch from 6b08bb0 to 51cebae Compare May 7, 2025 21:07
@aslilac aslilac merged commit ae3d90b into main May 8, 2025
37 checks passed
@aslilac aslilac deleted the lilac/persist-terraform-modules branch May 8, 2025 22:13
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants