forked from dineshba/tf-summarize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codefresh.yaml
56 lines (49 loc) · 1.18 KB
/
codefresh.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Created by Bradley of breadNET (bradley@breadnet.co.uk)
version: "1.0"
stages:
- "clone"
- "init"
- "plan"
- "show"
- "deploy"
steps:
clone:
title: "Cloning repository"
type: "git-clone"
repo: "petsathome/terraform"
revision: "${{CF_BRANCH}}"
stage: "clone"
TerraformInit:
image: hashicorp/terraform:light
title: Terraform Init
stage: init
working_directory: "${{clone}}"
cmd: init
TerraformValidate:
image: hashicorp/terraform:light
title: Terraform Validate
stage: init
working_directory: "${{clone}}"
cmd: validate
TerraformPlan:
image: hashicorp/terraform:light
title: Terraform Plan
stage: plan
working_directory: "${{clone}}"
commands:
- terraform plan -out=tfplan
- terraform show -json tfplan > output.json
tfSummarize:
title: Show Changes
image: ghcr.io/dineshba/tf-summarize
stage: show
working_directory: "${{clone}}"
commands:
- tf-summarize output.json
TerraformApply:
image: hashicorp/terraform:light
title: Terraform Apply from Plan
stage: deploy
working_directory: "${{clone}}"
commands:
- terraform apply tfplan