-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (43 loc) · 1.48 KB
/
terraform-network-loadbalancer.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
48
49
50
51
52
53
name: 03 - Deploy OCI Network Loadbalancer
on:
workflow_dispatch:
jobs:
build:
name: Build Infrastructure
runs-on: ubuntu-latest
env:
TF_VAR_compartment_ocid: ${{ secrets.OCI_COMPARTMENT_OCID }}
TF_VAR_fingerprint: ${{ secrets.OCI_CLI_FINGERPRINT }}
TF_VAR_private_key: ${{ secrets.OCI_CLI_KEY_CONTENT }}
TF_VAR_region: ${{ secrets.OCI_CLI_REGION }}
TF_VAR_tenancy_ocid: ${{ secrets.OCI_CLI_TENANCY }}
TF_VAR_user_ocid: ${{ secrets.OCI_CLI_USER }}
TF_VAR_ssh_public_key: ${{ secrets.JUNAID_SSH_PUBLIC_KEY }}
TF_VAR_project: junaid
TF_VAR_main_instance_ocid: ${{ secrets.OCI_MAIN_INSTANCE_OCID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
working_directory: ./terraform/03-network-loadbalancer/
defaults:
run:
working-directory: ${{env.working_directory}}
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Terraform Setup
uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.5.3
- name: Terraform fmt
id: fmt
run: terraform fmt -check
continue-on-error: true
- name: Terraform Init
id: init
run: terraform init
- name: Terraform Validate
id: validate
run: terraform validate -no-color
- name: Terraform Apply
id: apply
run: terraform apply -auto-approve -no-color