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

Make the working directory configurable per command #81

Open
carolynvs opened this issue Sep 7, 2021 · 4 comments · May be fixed by #115
Open

Make the working directory configurable per command #81

carolynvs opened this issue Sep 7, 2021 · 4 comments · May be fixed by #115

Comments

@carolynvs
Copy link
Member

I recently added working directory as a mixin level config, which lets the user override the default directory with all their terraform files. #61 Sometimes people have multiple terraform modules though, and its not possible to use more than one in the same bundle. We should add working directory to the terraform mixin command so that you can do something like this:

install:
  - terraform:
       workingDir: mymodule1
  - terraform:
       workingDir: mymodule2
@bdegeeter
Copy link
Contributor

We should consider using terraform's -chdir to solve this instead of cd <workingDir> && terraform

@sgettys
Copy link

sgettys commented Mar 21, 2024

Need to have the mixin config accept multiple workingDirs as well:

mixins:
  - terraform:
       workingDirs:
         - mymodule1
         - mymodule2

@sgettys
Copy link

sgettys commented Mar 21, 2024

Also need to figure out the case at the action level:

mixins:
  - terraform:
       workingDirs:
         - mymodule1
         - mymodule2
install
  - terraform:
       workingDir: "mymodule1"
  - terraform:
       workingDir: "mymodule2"

@sgettys
Copy link

sgettys commented Mar 21, 2024

Logic to support this would need to be able to mutually exclusively set "workingDir" or "workingDirs" at the mixin level so that the terraform can be built into the bundle. And then require at the action level if "workingDirs" is set that each terraform action requires one of the values set in the mixin config.

@sgettys sgettys linked a pull request Mar 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants