image: What environment your pipeline runs inimage:
name:registry.gitlab.com/gitlab-org/gitlab-build-images:terraform
entrypoint:
-'/usr/bin/env'
-'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
entrypoint part:PATH so Terraform and other CLI tools are found correctlyvariables: Environment variables for Terraform & AWSvariables:
TF_VERSION:"1.5.0"
AWS_ACCESS_KEY_ID:${MY_AWS_KEY}
AWS_SECRET_ACCESS_KEY:${MY_AWS_ACCESS_KEY}
AWS_DEFAULT_REGION:"ap-south-1"
MY_AWS_KEY and MY_AWS_ACCESS_KEY are GitLab CI secrets
Terraform uses these automatically to authenticate with AWS.