Commit f8984e30 authored by Syed Bilal Raees's avatar Syed Bilal Raees

Update .gitlab-ci.yml

parent 6f1db596
Pipeline #1953 canceled with stages
image: image:
name: hashicorp/terraform:light name: hashicorp/terraform:light
entrypoint: entrypoint:
- '/usr/bin/env' - '/usr/bin/env'
- 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' - 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
# Default output file for Terraform plan
variables: variables:
TF_STATE_NAME: default PLAN: plan.tfplan
TF_CACHE_KEY: default
cache:
paths:
- .terraform
before_script:
- terraform --version
- terraform init
stages:
- validate
- build
- deploy
validate:
stage: validate
script:
- terraform validate
plan:
stage: build
script:
- terraform plan -out=$PLAN
artifacts:
name: plan
paths:
- $PLAN
# Separate apply job for manual launching Terraform as it can be destructive
# action.
apply:
stage: deploy
environment:
name: production
script:
- terraform apply -input=false $PLAN
dependencies:
- plan
when: manual
only:
- master
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment