-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathtestPayloadV1.yml
103 lines (92 loc) · 2.52 KB
/
testPayloadV1.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
configuration:
runtime: "concord-v1"
arguments:
tf_docker_image: "${null}"
flows:
default:
# regular run
- task: terraform
in:
dockerImage: "${tf_docker_image}"
debug: true
action: plan
# custom $PWD
- task: terraform
in:
dockerImage: "${tf_docker_image}"
action: plan
pwd: mydir
# custom $PWD + [DIR]
- task: terraform
in:
dockerImage: "${tf_docker_image}"
action: plan
pwd: mydir
dir: nested
fullTestCustomConfig:
- set:
tfVersion: "${execution.hasVariable('tf_version') ? tf_version : '1.2.6'}"
tfCfg:
env: terraform-task-payload-test
debug: true
toolUrl: "https://releases.hashicorp.com/terraform/${tfVersion}/terraform_${tfVersion}_linux_amd64.zip"
varFiles: "${execution.hasVariable('tf_extra_vars_file') ? [ tf_extra_vars_file ] : [ ]}"
- log: "Var files: ${tfCfg.varFiles}"
- task: terraform
in:
dockerImage: "${tf_docker_image}"
action: plan
debug: "${tfCfg.debug}"
pwd: mydir
backend: concord
toolUrl: "${tfCfg.toolUrl}"
stateId: "${tfCfg.env}-tf-state"
varFiles: "${tfCfg.varFiles}"
extraEnv:
TF_VAR_time: now
extraVars:
name: bob
# make sure things still work after a suspend (e.g. form)
- task: sleep
in:
suspend: true
duration: 5 #seconds
- task: terraform
in:
dockerImage: "${tf_docker_image}"
action: apply
debug: "${tfCfg.debug}"
pwd: mydir
plan: "${result.planPath}"
backend: concord
toolUrl: "${tfCfg.toolUrl}"
stateId: "${tfCfg.env}-tf-state"
- task: terraform
in:
dockerImage: "${tf_docker_image}"
action: output
debug: "${tfCfg.debug}"
pwd: mydir
backend: concord
toolUrl: "${tfCfg.toolUrl}"
stateId: "${tfCfg.env}-tf-state"
varFiles: "${tfCfg.varFiles}"
extraEnv:
TF_VAR_time: now
extraVars:
name: bob
- log: ${resource.prettyPrintJson(result.data)}
- task: terraform
in:
dockerImage: "${tf_docker_image}"
action: destroy
debug: "${tfCfg.debug}"
pwd: mydir
backend: concord
toolUrl: "${tfCfg.toolUrl}"
stateId: "${tfCfg.env}-tf-state"
varFiles: "${tfCfg.varFiles}"
extraEnv:
TF_VAR_time: now
extraVars:
name: bob