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

Consolidated cross-account resource stack #7080

Closed
1 of 2 tasks
CaerusKaru opened this issue Mar 30, 2020 · 5 comments
Closed
1 of 2 tasks

Consolidated cross-account resource stack #7080

CaerusKaru opened this issue Mar 30, 2020 · 5 comments
Labels
closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@CaerusKaru
Copy link
Contributor

Currently aws-codepipeline-actions has a utility that enables generating resources for cross-account deployments. It does this by creating a stack in the necessary account that the CDK can deploy to setup the resources for later use.

However, if people writing other constructs wish to take on likewise actions, for say cross-account DNS delegation, they are stuck needing to duplicate the logic for that package, leading to two separate stacks for the same account (with the same goal in mind – cross-account resources).

I'm proposing creating a utility, possibly a static method on the Stack class that can return the resource stack for cross-account/cross-region purposes.

Use Case

I'm writing a cross-account DNS domain delegation construct that would benefit from not duplicating this logic.

Proposed Solution

Something like this:

public static external(app: App, accountNumber: string, region: string): Stack;

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@CaerusKaru CaerusKaru added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Mar 30, 2020
@CaerusKaru
Copy link
Contributor Author

cc @skinny85 @eladb

@skinny85 skinny85 self-assigned this Mar 31, 2020
@eladb
Copy link
Contributor

eladb commented Mar 31, 2020

I am trying to wrap my head around the proposed API. Can you provide a more complete example?

@CaerusKaru
Copy link
Contributor Author

Something like this:

const otherAccountStack = Stack.external(this.node.root, '12345678', 'us-west-2');

const roleId = 'DelegateHostRole';
const hostRole: Role = otherAccountStack.node.tryFindChild(roleId) as Role | undefined || new Role(otherAccountStack, roleId, {...});

@skinny85 skinny85 added effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Apr 2, 2020
@workeitel
Copy link
Contributor

workeitel commented Jun 27, 2020

EDIT: Sorry, that comment only made partially sense here. Moved it into a new issue #8776

@github-actions
Copy link

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

4 participants