Terraform OCI image that allows to manage Terraform git modules on private repositories with HTTP-based authentications:
GIT_AUTH_URL: the URL of the Git server that will be the context for which configure the credentials.GIT_USER: the username value.GIT_PASS: the password value.Note: these environment variables are additional to the already Terraform-supported ones.
GIT_AUTH_URL: the URL of the Git server that will be the context for which configure the credentials.GIT_TOKEN: the bearer token value.Note: these environment variables are additional to the already Terraform-supported ones.
docker run --rm \
-e GIT_AUTH_URL="https://github.com" \
-e GIT_TOKEN="${GIT_TOKEN}" \
-v $(pwd):/workspace -w /workspace \
maxgio92/terraform-git-http:0.13.6 \
terraform init
azure-pipelines.yml:variables:
- name: gitAuthUrl
value: https://github.com
steps:
- script: |
docker run \
-e GIT_AUTH_URL="${GIT_AUTH_URL}" \
-e GIT_TOKEN="${SYSTEM_ACCESSTOKEN}" \
--rm -v $(pwd):/workspace -w /workspace \
maxgio92/terraform-git-http:0.13.6 \
terraform init ./src
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
GIT_AUTH_URL: ${{ variables.gitAuthUrl }}
TERRAFORM_VERSION: the version tag of hashicorp/terraform OCI image this image will start from.docker build . --build-arg TERRAFORM_VERSION=<Terraform version>
Content type
Image
Digest
Size
45.3 MB
Last updated
over 5 years ago
docker pull maxgio92/terraform-git-http