Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use separate GHA roles per stage #302

Open
danieljamesscott opened this issue Aug 16, 2022 · 3 comments
Open

Use separate GHA roles per stage #302

danieljamesscott opened this issue Aug 16, 2022 · 3 comments

Comments

@danieljamesscott
Copy link

I would like to use a slightly different authentication pattern where each stage uses its own GHA role. The current configuration appears to only support a single role for the whole pipeline, which is then used to assume the CDK role for upload/deployment.

Would it be possible to modify the stage configuration pipeline.addStageWithGitHubOptions() to support a separate role per stage? Would you be open to accepting a PR which does this?

Background:

The reason for this request is that with a single role, it seems like we would need to either:

  1. Have one stage account designated as the 'pipeline' account, which contains the GHA role and then have the other accounts setup with cdk bootstrap to trust it. OR
  2. Have a completely separate pipeline account to contain the GHA role which is trusted by the stage accounts.

The above change, to support a role per stage, would make the configuration closer to the cdk pattern, where we 'bootstrap' the accounts first, to create the roles, with no need for an additional account, or mixing 'pipeline' and 'stage' accounts.

@nikovirtala
Copy link

I like that idea! The concept of 'pipeline' account doesn't make much sense in the world of GitHub Actions and OIDC. Actually... the GitHub Actions is the pipeline account 😄

@danieljamesscott
Copy link
Author

@kaizencc , would you consider a PR to implement the above?

@kaizencc
Copy link
Contributor

For reference: #307 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants