Created
January 14, 2020 16:42
-
-
Save greyhoundforty/8d8227fd8b7e8450bc596b12f719a4be to your computer and use it in GitHub Desktop.
GitLab CI/CD example for IBM Cloud Terraform
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: | |
name: ibmterraform/terraform-provider-ibm-docker | |
entrypoint: | |
- '/usr/bin/env' | |
- 'PATH=/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' | |
before_script: | |
- terraform init | |
stages: | |
- validate | |
- plan | |
- apply | |
validate: | |
stage: validate | |
script: | |
- terraform validate | |
plan: | |
stage: plan | |
script: | |
- terraform plan -out "planfile" | |
dependencies: | |
- validate | |
artifacts: | |
paths: | |
- planfile | |
apply: | |
stage: apply | |
script: | |
- terraform apply -input=false "planfile" | |
dependencies: | |
- plan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment