Skip to content

Commit 5617c64

Browse files
committed
Google cloud oidc integration
1 parent c5162ec commit 5617c64

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

action.yml

+11
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ runs:
123123
echo "sort-by=$(atmos describe config -f json | jq -r '.integrations.github.gitops.matrix["sort-by"]')" >> $GITHUB_OUTPUT
124124
echo "aws-region=$(atmos describe config -f json | jq -r '.integrations.github.gitops["artifact-storage"].region')" >> $GITHUB_OUTPUT
125125
echo "terraform-plan-role=$(atmos describe config -f json | jq -r '.integrations.github.gitops.role.plan')" >> $GITHUB_OUTPUT
126+
echo "google-workload-identity-provider=$(atmos describe config -f json | jq -r '.integrations.github.gitops["artifact-storage"]."google-workload-identity-provider"')" >> $GITHUB_OUTPUT
127+
echo "google-service-account=$(atmos describe config -f json | jq -r '.integrations.github.gitops["artifact-storage"]."google-service-account"')" >> $GITHUB_OUTPUT
128+
echo "backend=$(atmos describe config -f json | jq -r '.integrations.github.gitops["artifact-storage"].backend')" >> $GITHUB_OUTPUT
126129
127130
- name: Install Terraform
128131
if: ${{ steps.config.outputs.terraform-version != '' && steps.config.outputs.terraform-version != 'null' }}
@@ -157,6 +160,7 @@ runs:
157160
- name: Configure Plan AWS Credentials
158161
if: ${{ steps.config.outputs.aws-region != '' &&
159162
steps.config.outputs.aws-region != 'null' &&
163+
steps.config.outputs.backend == 'aws' &&
160164
steps.config.outputs.terraform-plan-role != '' &&
161165
steps.config.outputs.terraform-plan-role != 'null' }}
162166
uses: aws-actions/[email protected]
@@ -166,6 +170,13 @@ runs:
166170
role-session-name: "atmos-terraform-plan-gitops"
167171
mask-aws-account-id: "no"
168172

173+
- name: Configure Google Credentials
174+
if: ${{ steps.config.outputs.backend == 'google' }}
175+
uses: google-github-actions/auth@v2
176+
with:
177+
workload_identity_provider: ${{ steps.config.outputs.google-workload-identity-provider }}
178+
service_account: ${{ steps.config.outputs.google-service-account }}
179+
169180
- name: atmos affected stacks for atmos pro
170181
id: affected-pro
171182
if: ${{ inputs.atmos-pro-upload == 'true' }}

0 commit comments

Comments
 (0)