Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Am I live
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
shore
Am I live
Commits
8ad9776a
Commit
8ad9776a
authored
3 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
Use CI templates for Terraform jobs.
parent
8b42d2f9
No related branches found
No related tags found
No related merge requests found
Pipeline
#1343
passed
3 years ago
Stage: test
Stage: build
Stage: plan
Stage: apply
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+4
-17
4 additions, 17 deletions
.gitlab-ci.yml
with
4 additions
and
17 deletions
.gitlab-ci.yml
+
4
−
17
View file @
8ad9776a
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment