0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[CloudFormation]リージョン間のピアリング接続

Posted at

はじめに

同アカウントでのリージョン間ピアリング接続をCloudFormationで構築した際に、少しハマったため紹介します。

リージョンの明示

リクエスタ:ap-northeast-1
→スタックをap-northeast-1で作成

アクセプタ:ap-northeast-3
→テンプレート側でPeerRegionの指定をしないと、自動では判断してくれない

同一アカウント内ピアリング接続の承諾

コンソール:アクセプタ(大阪リージョン)側で、ピアリング接続の承諾が必須
CloudFormation:自動でactiveになり、承諾は不要

テンプレート例

AWSTemplateFormatVersion: 2010-09-09
Description: VPC Peering Connection

Resources: 
  VpcPeeringConnection: 
    Type: AWS::EC2::VPCPeeringConnection
    Properties: 
      VpcId: hogehoge # リクエスタ
      PeerVpcId: hogehoge # アクセプタ
      PeerRegion: ap-northeast-3 # アクセプタリージョン

Outputs:
  VpcPeeringConnectionId:
    Description: Peering Connection ID
    Value: !Ref VpcPeeringConnection
    Export:
      Name: hogehoge
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?