forked from Machine-Learning-01/finance-complaint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathterraform.yml
63 lines (58 loc) · 1.42 KB
/
terraform.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
version: 2.1
jobs:
init:
docker:
- image: docker.mirror.hashicorp.services/hashicorp/terraform:light
steps:
- checkout
- run:
name: Initialise Terraform
command: |
terraform -chdir==infrastructure/ init
format:
docker:
- image: docker.mirror.hashicorp.services/hashicorp/terraform:light
steps:
- attach_workspace:
at: .
- run:
name: Format Terraform Files
command: |
terraform -chdir=infrastructure/ fmt -recursive
plan:
docker:
- image: docker.mirror.hashicorp.services/hashicorp/terraform:light
steps:
- run:
name: Plan the infrastructure
command: |
terraform -chdir=infrastructure/ plan
# apply:
# docker:
# - image: docker.mirror.hashicorp.services/hashicorp/terraform:light
# steps:
# - run:
# name: terraform apply
# command: |
# terraform -chdir=infrastructure/ apply -auto-approve
workflows:
version: 2.1
plan_approve_apply:
jobs:
- checkout
- init:
requires:
- checkout
- fmt:
requires:
- init
- plan:
requires:
- fmt
- wait-for-approval:
type: approval
requires:
- plan
# - apply:
# requires:
# - wait-for-approval