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

fix for tgw peering multiple attachments issue #1237

Merged

Conversation

rjjaegeraws
Copy link
Contributor

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This changes fixes the CDK errors when trying to peer more than 1 TGW.

Original Error

rror: There is already a Construct with name 'Custom::TGWCreatePeeringAttachmentRole' in AccountStack [SharedNetworkPhase1CaWest_1]
    at Node.addChild (/app/node_modules/.pnpm/[email protected]/node_modules/constructs/src/construct.ts:428:13)
    at new Node (/app/node_modules/.pnpm/[email protected]/node_modules/constructs/src/construct.ts:71:17)
    at new Construct (/app/node_modules/.pnpm/[email protected]/node_modules/constructs/src/construct.ts:480:17)
    at new Resource (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/aws-cdk-lib/core/lib/resource.js:1:1309)
    at new ImportedRole (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/aws-cdk-lib/aws-iam/lib/private/imported-role.js:1:615)
    at Function.fromRoleArn (/app/node_modules/.pnpm/[email protected][email protected]/node_modules/aws-cdk-lib/aws-iam/lib/role.js:1:3167)
    at new TransitGatewayCreatePeeringAttachment (/app/src/lib/custom-resources/cdk-transit-gateway-create-peering/cdk/index.ts:48:26)
    at Object.createPeeringAttachment (/app/src/deployments/cdk/src/deployments/transit-gateway/peering.ts:86:47)
    at deploy (/app/src/deployments/cdk/src/apps/phase-1.ts:601:24)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

Copy link
Collaborator

@archikierstead archikierstead left a comment

Choose a reason for hiding this comment

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

LGTM

@archikierstead archikierstead merged commit be9b11a into aws-samples:main Sep 18, 2024
6 checks passed
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