File tree Expand file tree Collapse file tree 3 files changed +7
-25
lines changed Expand file tree Collapse file tree 3 files changed +7
-25
lines changed Original file line number Diff line number Diff line change 1111jobs :
1212 terraform_gh_runner :
1313 runs-on : ubuntu-latest
14- env :
15- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
14+ # env:
15+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1616
1717 steps :
1818 - name : Checkout repository
2929 # Install any dependencies required by your Terraform code
3030
3131 - name : Run Bash Script
32- env :
33- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32+ # env:
33+ # GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434 run : |
3535 # GitHub repository and access token for github api calls, since GITHUB_TOKEN can't
3636 # be used for this purpose.
5858 - name : Run Terraform
5959 working-directory : ./github-runners/terraform/base
6060 run : |
61- terraform init-backend-config="organization=subspace" -backend-config="workspaces=${{ secrets.WORKSPACE_NAME }}"
61+ terraform init
6262 terraform plan -var-file=/tmp/terraform.tfvars
6363 terraform apply -auto-approve -var "gh_token=${{ secrets.RUNNER_TOKEN }}" -var-file=/tmp/terraform.tfvars
Original file line number Diff line number Diff line change 5757 terraform_wrapper : false
5858 cli_config_credentials_token : ${{ secrets.TF_API_TOKEN }}
5959
60- - name : Setup Remote Config Backend
61- run : |
62- cat > /tmp/config.remote.tfbackend <<EOF
63- workspaces { name = "${{ inputs.tf_workspace_name }}"}
64- hostname = "app.terraform.io"
65- organization = "${{ inputs.tf_organization }}"
66- EOF
67-
6860 - name : Terraform fmt
6961 working-directory : ${{ inputs.project }}/${{ inputs.resource }}
7062 run : terraform fmt -check
7365 - name : Terraform Init for ${{ inputs.project }}/${{ inputs.resource }}
7466 working-directory : ${{ inputs.project }}/${{ inputs.resource }}
7567 run : |
76- cat /tmp/config.remote.tfbackend
77- terraform init -backend-config=/tmp/config.remote.tfbackend
68+ terraform init
7869
7970 - name : Terraform Validate
8071 working-directory : ${{ inputs.project }}/${{ inputs.resource }}
Original file line number Diff line number Diff line change 6161 terraform_wrapper : false
6262 cli_config_credentials_token : ${{ secrets.TF_API_TOKEN }}
6363
64- - name : Setup Remote Config Backend
65- run : |
66- cat > /tmp/config.remote.tfbackend <<EOF
67- workspaces { name = "${{ inputs.tf_workspace_name }}"}
68- hostname = "app.terraform.io"
69- organization = "${{ inputs.tf_organization }}"
70- EOF
71-
7264 - name : Terraform fmt
7365 working-directory : ${{ inputs.project }}/${{ inputs.instance }}/${{ inputs.resource }}
7466 run : terraform fmt -check
7769 - name : Terraform Init for ${{ inputs.project }}/${{ inputs.instance }}/${{ inputs.resource }}
7870 working-directory : ${{ inputs.project }}/${{ inputs.instance }}/${{ inputs.resource }}
7971 run : |
80- cat /tmp/config.remote.tfbackend
81- terraform init -backend-config=/tmp/config.remote.tfbackend
72+ terraform init
8273
8374 - name : Terraform Validate
8475 working-directory : ${{ inputs.project }}/${{ inputs.instance }}/${{ inputs.resource }}
You can’t perform that action at this time.
0 commit comments