File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy infrastructure
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main" ]
6
+
7
+ jobs :
8
+ terraform :
9
+ env :
10
+ ARM_CLIENT_ID : ${{secrets.CLIENT_ID}}
11
+ ARM_CLIENT_SECRET : ${{secrets.CLIENT_SECRET}}
12
+ ARM_SUBSCRIPTION_ID : ${{secrets.SUBSCRIPTION_ID}}
13
+ ARM_TENANT_ID : ${{secrets.TENANT_ID}}
14
+ name : ' Terraform'
15
+ runs-on : ubuntu-latest
16
+ defaults :
17
+ run :
18
+ working-directory : ${{ github.workspace }}/infra
19
+ steps :
20
+ - uses : actions/checkout@v2
21
+ - uses : hashicorp/setup-terraform@v1
22
+
23
+ - name : Terraform init
24
+ id : init
25
+ run : terraform init -backend-config="${{secrets.SAS_TOKEN}}
26
+
27
+ - name : Terraform validate
28
+ id : validate
29
+ run : terraform validate -no-color
30
+
31
+ - name : Terraform plan
32
+ id : plan
33
+ run : terraform plan -out plan.out
34
+
35
+ - name : Terraform apply
36
+ id : apply
37
+ run : terraform apply "plan.out"
You can’t perform that action at this time.
0 commit comments