Altering Security group rules in the Peered VPC from CDK Code

0

I have two VPCs in two different accounts ( VPC A in Account A and VPC B in Account B) and I have created a VPC Peering between Both. Is It possible in the CDK Code used to build the Infrastructure stack for VPC A in Account A to alter some security group rules in one of the Security Groups which are part of the Peered VPC in Account B from the CDK Code ?

Note :

1-The VPC Peering Setup was created through the AWS Console not from CDK.

1 Answer
0

Have a look a this: https://aws.amazon.com/blogs/devops/how-to-import-existing-resources-into-aws-cdk-stacks/, in particular you can leverage the new CDK import command to avoid the manual step in that post, so that then you can modify the imported resource

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • Thanks So much , I have gone through this article , but i can't find information regarding is it possible to import a resource in a different account to my cdk stack in other account, and also if this is applicable will i get cost for this resource twice ? one for the source account and the other for the account the resource is imported too

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions