Commit 720f1436 authored by rajat.kulkarni's avatar rajat.kulkarni

Update .gitlab-ci.yml

parent 875097b1
Pipeline #23341 failed
......@@ -5,10 +5,6 @@
#https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Terraform.gitlab-ci.yml
stages:
- iac_validate
- iac_plan
- iac_apply
default:
#image:
......@@ -24,7 +20,19 @@ default:
paths:
- .terraform
terraform_validate:
variables:
TF_VAR_ACCESS_KEY: ${AWS_ACCESS_KEY_ID}
TF_VAR_SECRET_KEY: ${AWS_SECRET_ACCESS_KEY}
TF_VAR_AWS_REGION: ${AWS_DEFAULT_REGION}
stages:
- iac_validate
- iac_plan
- iac_apply
iac_validate:
stage: iac_validate
script:
- terraform validate
......@@ -32,7 +40,7 @@ terraform_validate:
refs:
- master
terraform_plan:
iac_plan:
stage: iac_plan
script:
- terraform plan --out plan
......@@ -43,7 +51,7 @@ terraform_plan:
paths:
- plan
terraform_apply:
iac_apply:
stage: iac_apply
script:
- terraform apply --auto-approve plan
......
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