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

Update .gitlab-ci.yml

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