Skip to content

Commit dbd7879

Browse files
authored
feat(ci): Update action workflow to elevate permissions required for Cloud NGFW (#64)
1 parent f412375 commit dbd7879

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/actions/terratest/action.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,23 @@ runs:
3737
workload_identity_provider: ${{ env.WORKLOAD_IDENTITY_PROVIDER }}
3838
service_account: ${{ env.GCP_SERVICE_ACCOUNT}}
3939

40+
- name: Set up Cloud SDK
41+
uses: "google-github-actions/setup-gcloud@v2"
42+
with:
43+
version: "469.0.0"
44+
45+
- name: Elevate permissions
46+
shell: bash
47+
env:
48+
ORG_ID: ${{ env.ORG_ID }}
49+
run: |
50+
gcloud beta pam grants create \
51+
--entitlement=custom-network-security-endpoint-admin-auto \
52+
--location=global \
53+
--organization="$ORG_ID" \
54+
--requested-duration=3600s \
55+
--justification="On demand Idempotence on ${{ github.repository }} test for PR - (#${{ github.event.inputs.pr-id }}) ${{ github.event.inputs.pr-title }}"
56+
4057
- name: ${{ inputs.terratest_action }} infrastructure
4158
env:
4259
TPATH: ${{ inputs.path }}

0 commit comments

Comments
 (0)