mirror of
https://gitlab.sarex.io/infra/terraform-contour-mirror.git
synced 2026-08-08 21:21:34 +03:00
change pipeline generation + add tf dockerfile
This commit is contained in:
parent
39d61e2bac
commit
8d14406c4f
12
Dockerfile
12
Dockerfile
@ -35,4 +35,16 @@ RUN mkdir -p /root/.terraform.d/plugins/registry.terraform.io/hashicorp/random/3
|
|||||||
ENV TF_PLUGIN_CACHE_DIR=/root/.terraform.d/plugins
|
ENV TF_PLUGIN_CACHE_DIR=/root/.terraform.d/plugins
|
||||||
ENV TG_TF_PATH=/usr/local/bin/terraform
|
ENV TG_TF_PATH=/usr/local/bin/terraform
|
||||||
|
|
||||||
|
# Configure Terraform to use filesystem mirror for providers
|
||||||
|
RUN mkdir -p /root/.terraform.d && \
|
||||||
|
echo 'provider_installation {' > /root/.terraformrc && \
|
||||||
|
echo ' filesystem_mirror {' >> /root/.terraformrc && \
|
||||||
|
echo ' path = "/root/.terraform.d/plugins"' >> /root/.terraformrc && \
|
||||||
|
echo ' include = ["registry.terraform.io/*/*"]' >> /root/.terraformrc && \
|
||||||
|
echo ' }' >> /root/.terraformrc && \
|
||||||
|
echo ' direct {' >> /root/.terraformrc && \
|
||||||
|
echo ' exclude = ["registry.terraform.io/*/*"]' >> /root/.terraformrc && \
|
||||||
|
echo ' }' >> /root/.terraformrc && \
|
||||||
|
echo '}' >> /root/.terraformrc
|
||||||
|
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
|
|||||||
@ -91,10 +91,10 @@ validate-${job_prefix}:
|
|||||||
- cd \${TG_ROOT}
|
- cd \${TG_ROOT}
|
||||||
- ls -la
|
- ls -la
|
||||||
- rm -rf .terragrunt-cache
|
- rm -rf .terragrunt-cache
|
||||||
|
- export TF_PLUGIN_CACHE_DIR=/root/.terraform.d/plugins
|
||||||
script:
|
script:
|
||||||
- env | grep -E "(S3_|AWS_)" || echo "No S3/AWS vars found"
|
- env | grep -E "(S3_|AWS_)" || echo "No S3/AWS vars found"
|
||||||
- terragrunt init -reconfigure
|
- terragrunt init -reconfigure
|
||||||
- find .terragrunt-cache -name "backend.tf" -exec echo "=== {} ===" \; -exec head -15 {} \; 2>/dev/null || echo "No backend.tf found"
|
|
||||||
- terragrunt validate-inputs
|
- terragrunt validate-inputs
|
||||||
- terragrunt validate
|
- terragrunt validate
|
||||||
rules:
|
rules:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user