-
Notifications
You must be signed in to change notification settings - Fork 71
49 lines (43 loc) · 1.38 KB
/
cd-guest-config.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
name: cd-machine-config
on:
push:
branches: [main]
paths:
- "examples-machine-config"
workflow_dispatch:
jobs:
cd-machine-config:
env:
TF_IN_AUTOMATION: true
TF_INPUT: false
TF_CLI_ARGS_apply: "-auto-approve -parallelism=30"
TF_CLI_ARGS_destroy: "-auto-approve -parallelism=30"
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install Terraform
id: tfinstall
run: choco install terraform
- name: Terraform Init
id: init
run: terraform init -no-color
working-directory: examples-machine-config
- name: Terraform Build Machine Configs
id: build
if: ${{ success() }}
run: terraform apply -target null_resource.build_machine_config_packages -parallelism=1
working-directory: examples-machine-config
- name: Terraform Apply
id: apply
if: ${{ success() }}
run: terraform apply
working-directory: examples-machine-config
- name: Terraform Destroy
id: destroy
if: ${{ success() }}
run: terraform destroy
working-directory: examples-machine-config