Commit f052493d authored by rajat.kulkarni's avatar rajat.kulkarni

Upload New File

parent 60ca0bf9
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml
include:
- template: Terraform/Base.gitlab-ci.yml # https://gitlab.com/gitlab-org/gitlab/blob/master/lib/gitlab/ci/templates/Terraform/Base.latest.gitlab-ci.yml
variables:
TF_VAR_ACCESS_KEY: ${AWS_ACCESS_KEY_ID}
TF_VAR_SECRET_KEY: ${AWS_SECRET_ACCESS_KEY}
TF_VAR_AWS_REGION: ${AWS_DEFAULT_REGION}
cache:
paths:
- .terraform
stages:
- build
- plan
- apply
- destroy
build:
tags:
- rs
stage: build
script:
- terraform --version
- terraform init
only:
- merge_requests
plan:
tags:
- rs
stage: plan
script:
- terraform plan
only:
- master
apply:
tags:
- rs
stage: apply
script:
- terraform apply
dependencies:
- build
when: manual
only:
- master
destroy:
tags:
- rs
stage: destroy
script:
- echo "Destroying resources"
- terraform destroy
dependencies:
- apply
when: manual
only:
refs:
- 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