Gitlab terraform base image with az cli installed for managing Azure infrastructure from gitlab ci
This image can be used instead of the default gitlab terraform image on terraform CIs
image: rafasiqueira/gitlab-terraform-az:latest
variables:
TF_ROOT: ${CI_PROJECT_DIR}
TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/${CI_PROJECT_NAME}
cache:
key: example-production
paths:
- ${TF_ROOT}/.terraform
before_script:
- cd ${TF_ROOT}
stages:
- prepare
- validate
- build
- deploy
(...)
Authentication can use certificates or passwords.
Azurerm provider accepts authentication using service principals with certificates or client secrets