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 @@
include:
- project: shore/ci-templates
file: templates/pre-commit.yml
variables:
TF_ADDRESS: ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/terraform/state/default
- project: shore/ci-templates
file: templates/terraform.yml
stages:
- test
......@@ -30,27 +29,15 @@ Generate payload:
- .cache/
Terraform plan:
extends: .tf_plan
stage: plan
image: &tf_image registry.gitlab.com/gitlab-org/terraform-images/stable:latest
script:
- gitlab-terraform plan
- gitlab-terraform plan-json
dependencies:
- Generate payload
artifacts:
name: plan
paths:
- plan.cache
reports:
terraform: plan.json
Terraform apply:
extends: .tf_apply
stage: apply
image: *tf_image
script:
- gitlab-terraform apply
dependencies: &tf_apply_dependecies
- Generate payload
- Terraform plan
when: manual
needs: *tf_apply_dependecies
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment