Skip to content

Google cloud oidc integration#55

Closed
shirkevich wants to merge 2 commits intocloudposse:mainfrom
shirkevich:google-cloud
Closed

Google cloud oidc integration#55
shirkevich wants to merge 2 commits intocloudposse:mainfrom
shirkevich:google-cloud

Conversation

@shirkevich
Copy link

@shirkevich shirkevich commented Nov 26, 2024

what

Use google services when creating plan

why

For those who use google cloud it is hard to adopt atmos as all the GH tooling is built around AWS. This PR and several other fixes that.

references

See also related PRs in:

need help

To proper name the fields in metadata for google cloud.

- name: Configure Plan AWS Credentials
if: ${{ steps.config.outputs.aws-region != '' &&
steps.config.outputs.aws-region != 'null' &&
steps.config.outputs.backend == 'aws' &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
steps.config.outputs.backend == 'aws' &&

Comment on lines +179 to +185
- name: Configure Google Credentials
if: ${{ steps.config.outputs.backend == 'google' }}
uses: google-github-actions/auth@v2
with:
workload_identity_provider: ${{ steps.config.outputs.google-workload-identity-provider }}
service_account: ${{ steps.config.outputs.google-service-account }}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit confusing part. Let's discuss.
The current atmos gitops pattern assume there are 2 types of AWS creds

integrations:
  github:
    gitops:
....
      artifact-storage:
....
        role: arn:aws:iam::xxxxxxxxxxxx:role/cptest-core-ue2-auto-gitops-gha
      role:
        plan: arn:aws:iam::yyyyyyyyyyyy:role/cptest-core-gbl-identity-gitops
        apply: arn:aws:iam::yyyyyyyyyyyy:role/cptest-core-gbl-identity-gitops
....
  1. IAM role integration.github.gitops.artifact-storage.role that used to read/write plan file to storage
  2. IAM role integration.github.gitops.role.plan / integration.github.gitops.role.apply that used to run terraform plan / apply.

The second ones have wider permissions.
Really, eventually, we'd like to deprecate that part of the config.
Allow external AWS auth actions because we can not support all levels of AWS auth.

I had a feeling that in the case of Google Cloud, you mixed those two types of auth.
I think we do not need the step.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved auth step to GH worklfow in our own project. As you were saying it is not needed here.

@shirkevich shirkevich closed this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants