Terragrunt support
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you can request access to GitLab Duo.
This adds a -terragrunt
variant for each supported OpenTofu version, mostly tested the apply job in the full pipeline.
Not sure how to do conditional artifact/cache paths, and if the module release exclude is correct.
Image release tags need more work, image_digest
is used to pass the suffix, note that in my testing project the generated backend overwrites the TF_ADDRESS
setup so state_name
is ignored:
include:
- component: gitlab.com/lei/opentofu/full-pipeline@cb8515a4ca06224187bbdfdcb4f3368f517e147f
inputs:
version: cb8515a4ca06224187bbdfdcb4f3368f517e147f
opentofu_version: 1.8.5
root_dir: tf/example
state_name: example
image_registry_base: registry.gitlab.com/lei/opentofu/internal
image_name: gitlab-opentofu
base_os: alpine
image_digest: -terragrunt
Removing -backend=false
from the init command in the validate job seems to fix this error always occurring at the second module:
Error: Backend initialization required, please run "tofu init"
Reason: Initial configuration of the requested backend "http"
If this is the right path I can try to add tests but my shared runner minutes are running low :)
I guess I should have created the MR from this repository.
The plan job fails for some reason but not always.
Fixes #50 (closed)