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 回答
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
专家
已回答 2 个月前
profile picture
专家
已审核 2 个月前
  • 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

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则