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

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン