Skip to content
Snippets Groups Projects
Commit 8ad9776a authored by nimrod's avatar nimrod
Browse files

Use CI templates for Terraform jobs.

parent 8b42d2f9
No related branches found
No related tags found
No related merge requests found
Pipeline #1343 passed
...@@ -2,9 +2,8 @@ ...@@ -2,9 +2,8 @@
include: include:
- project: shore/ci-templates - project: shore/ci-templates
file: templates/pre-commit.yml file: templates/pre-commit.yml
- project: shore/ci-templates
variables: file: templates/terraform.yml
TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/default
stages: stages:
- test - test
...@@ -30,27 +29,15 @@ Generate payload: ...@@ -30,27 +29,15 @@ Generate payload:
- .cache/ - .cache/
Terraform plan: Terraform plan:
extends: .tf_plan
stage: plan stage: plan
image: &tf_image registry.gitlab.com/gitlab-org/terraform-images/stable:latest
script:
- gitlab-terraform plan
- gitlab-terraform plan-json
dependencies: dependencies:
- Generate payload - Generate payload
artifacts:
name: plan
paths:
- plan.cache
reports:
terraform: plan.json
Terraform apply: Terraform apply:
extends: .tf_apply
stage: apply stage: apply
image: *tf_image
script:
- gitlab-terraform apply
dependencies: &tf_apply_dependecies dependencies: &tf_apply_dependecies
- Generate payload - Generate payload
- Terraform plan - Terraform plan
when: manual
needs: *tf_apply_dependecies needs: *tf_apply_dependecies
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment