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

feat(app-staging-synthesizer): cross-account support #26638

Closed
wants to merge 2 commits into from

Conversation

tenjaa
Copy link
Contributor

@tenjaa tenjaa commented Aug 4, 2023

Closes #26634


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team August 4, 2023 13:08
@github-actions github-actions bot added beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK feature-request A feature should be added or improved. p2 labels Aug 4, 2023
@tenjaa tenjaa changed the title Add property for cross account trust feat(app-staging-synthesizer): cross-account support Aug 4, 2023
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@tenjaa
Copy link
Contributor Author

tenjaa commented Aug 4, 2023

Exemption Request

Looking at other commits adding new props I could not find new integration tests, e.g. 1b36124
I think this change is kinda similar.

@aws-cdk-automation aws-cdk-automation added the pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. label Aug 4, 2023
@tenjaa tenjaa force-pushed the app-staging-synthesizer-cross-account branch from 0393f4f to 4002f4c Compare August 4, 2023 13:45
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 4002f4c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Aug 4, 2023
Copy link
Contributor

@daschaa daschaa left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution!
For me the PR looks good and can be reviewed by a maintainer.

@aws-cdk-automation aws-cdk-automation added pr/needs-maintainer-review This PR needs a review from a Core Team Member and removed pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. labels Aug 24, 2023
* Specify trusted principals for e.g. cross-account usage.
* They will be added to the default principal.
* Both file-role and image-role will be modified.
* Will be ignored when custom roles are provided.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add a validation for this please.

@mrgrain mrgrain added pr-linter/exempt-integ-test The PR linter will not require integ test changes and removed pr-linter/exemption-requested The contributor has requested an exemption to the PR Linter feedback. labels Aug 24, 2023
@aws-cdk-automation aws-cdk-automation dismissed their stale review August 24, 2023 13:24

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation removed the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Aug 24, 2023
Comment on lines +278 to +280
defaultStackSynthesizer: AppStagingSynthesizer.defaultResources({
appId: 'my-app-id',
additionalTrustedPrincipals: [new iam.AccountPrincipal('999999999999')],
Copy link
Contributor

@rix0rrr rix0rrr Aug 24, 2023

Choose a reason for hiding this comment

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

Am I correct in assuming that this example is not complete?

Because by default this would assume a bootstrapped Deploy Role, and only the Deploy Role needs to be able to assume the Asset Roles.

So are you using

    deploymentIdentities: DeploymentIdentities.cliCredentials(),

In practice when you need this feature (and the credentials happen to be for account 999999999999 ?)

@kaizencc kaizencc marked this pull request as draft August 24, 2023 14:00
@kaizencc
Copy link
Contributor

Marking this as draft because @tenjaa and I are still having a conversation about the use cases of this PR

@aws-cdk-automation
Copy link
Collaborator

This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. To keep this PR from being closed, please continue work on it. If not, it will automatically be closed in a week.

@mrgrain mrgrain closed this Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK feature-request A feature should be added or improved. p2 pr-linter/exempt-integ-test The PR linter will not require integ test changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

app-staging-synthesizer: cross-account support
6 participants