I have a project with multiple folders of terraform code. Each folder represents a unique application. I’d like to setup my pipeline to have one set of tasks that I can pull into the pipeline for each folder. The only unique part is changing the $TF_ROOT before running the steps.
I tried using the include:
with variables, but that seems to have failed. Is there some other means of doing this?
include:
- project: 'group/project'
ref: main
file: 'templates/terraform-pipeline.yml'
variables:
TF_ROOT: "${CI_PROJECT_DIR}/my-app-1"
- project: 'group/project'
ref: main
file: 'templates/terraform-pipeline.yml'
variables:
TF_ROOT: "${CI_PROJECT_DIR}/my-app-2"