Skip to content

Conversation

sgettys
Copy link

@sgettys sgettys commented Mar 21, 2024

Closes #81
This adds the ability to specify multiple terraform plans based on different working directories. The mixin config can now specify a list of directories for the different working dirs. Then each step can specify the working dir for the run of that step.

Example mixin config

mixins:
  - terraform:
      workingDirs:
        - infra1
        - infra2

Example install step with working directory specified for the step:

install:
  - terraform:
      description: 'infra 1'
      workingDir: 'infra1'
      vars:
        infra1_var: ${bundle.parameters.infra1_var}
      outputs:
        - name: infra1_output
  - terraform:
      description: 'infra 2'
      workingDir: 'infra2'
      vars:
        infra2_var: ${bundle.parameters.infra2_var}
      outputs:
        - name: infra2_output

Updated integration test with a multiple working dirs bundle.
Added usage docs.

@sgettys sgettys changed the title WIP:Feat/add multiple working dirs WIP: Feat/add multiple working dirs Mar 21, 2024
sgettys added 5 commits March 25, 2024 22:38
Signed-off-by: Steven Gettys <steven.gettys@gmail.com>
Signed-off-by: Steven Gettys <steven.gettys@gmail.com>
Signed-off-by: Steven Gettys <steven.gettys@gmail.com>
Signed-off-by: Steven Gettys <steven.gettys@gmail.com>
Signed-off-by: Steven Gettys <steven.gettys@gmail.com>
@sgettys sgettys force-pushed the feat/add-multiple-working-dirs branch from db4872a to 66fade1 Compare March 26, 2024 05:38
Signed-off-by: Steven Gettys <steven.gettys@gmail.com>
@sgettys sgettys changed the title WIP: Feat/add multiple working dirs feat: add multiple working dirs Mar 26, 2024
@sgettys
Copy link
Author

sgettys commented Mar 29, 2024

Refactor to have the build step inspect all actions for "workingDir" specified and collect them at build time. Fallback to the "workingDir" set in the mixin config or default

@schristoff
Copy link
Member

oop, @sgettys can you fix that test?

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 this pull request may close these issues.

Make the working directory configurable per command

3 participants