-
Notifications
You must be signed in to change notification settings - Fork 1
/
cloudbuild.yaml
48 lines (40 loc) · 1011 Bytes
/
cloudbuild.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
options:
logging: CLOUD_LOGGING_ONLY
steps:
- name: 'gcr.io/cloud-builders/git'
args:
- clone
- https://github.com/lykaasegura/w-secteam-repo.git
- id: "tf init"
name: gcr.io/config-validator/terraform-validator
entrypoint: terraform
args:
- init
- id: "tf plan"
name: gcr.io/config-validator/terraform-validator
entrypoint: terraform
args:
- plan
- -out=terraform.plan
- id: "convert output to json"
name: gcr.io/config-validator/terraform-validator
entrypoint: "/bin/bash"
args: ["-c", "terraform show -json terraform.plan > terraform.json"]
- id: "validate policies"
name: gcr.io/config-validator/terraform-validator
args:
- validate
- terraform.json
- --policy-path=./w-secteam-repo
- id: "tf apply"
name: gcr.io/config-validator/terraform-validator
entrypoint: terraform
args:
- apply
- -auto-approve
# - id: "tf destroy"
# name: gcr.io/config-validator/terraform-validator
# entrypoint: terraform
# args:
# - destroy
# - -auto-approve