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

[FEATURE]: Include generateFiles field in Deploy Actions. #4964

Open
hassinerhouma opened this issue Aug 22, 2023 · 1 comment
Open

[FEATURE]: Include generateFiles field in Deploy Actions. #4964

hassinerhouma opened this issue Aug 22, 2023 · 1 comment

Comments

@hassinerhouma
Copy link

hassinerhouma commented Aug 22, 2023

Feature Request

Re-include the generateFiles field into the Terraform (or all) deploy actions.

Background / Motivation

Garden currently offers no way of managing Terraform remote state backends.

While getting around this is very obvious for actions with a local source (include a backend.tf file in the sources),
it is trickier with remote modules/actions. One easy workaround I found is using generateFiles to include a templated backend.tf file into the tf root of the terraform module. This way, I could generate the backend configuration and pass any needed variables or secrets to it.

Another use-case I stumbled upon was about extending remote Terraform modules. In my Garden config,I re-use the same modules that are used in production. Changing or extending them to accommodate my garden environments is not always straightforward, so I sometimes extend the modules by including more .tf files.

However, since the generateFiles field was removed in Actions, all of this is no longer possible and I am forced to stick with modules for now.

What should the user be able to do?

The user should be able to easily generate templated files (.tf files in this case) and include them in the Action sources.

Why do they want to do this? What problem does it solve?

  • To not have to modify/mess with existing critical Terraform modules to accommodate for Garden environments.
  • To have an easy way of configuring remote backends for Terraform Actions with a remote source.

Suggested Implementation(s)

The core logic is already there since this feature is still enabled for modules.

How important is this feature for you/your team?

🌵 Not having this feature makes using Garden painful

But as long as 0.14 is not there yet, and as long as we can keep using garden modules for Terraform, this is not a very pressing matter.

@stefreak
Copy link
Member

@hassinerhouma Thank you for reporting this! Can you provide a minimal reproducable example?

Does this still happen with the latest version? I can imagine that #4846 impacted the behaviour here (without looking to closely at this yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants