我已在我的组织的帐户中创建了一个 TransitGateway,并使用资源管理器与其他帐户共享它,我现在尝试使用此中转网关的 ID 在另一个帐户中使用 Cloudformation 创建附件使用中转网关的“id”的帐户,但这不起作用。
我尝试在创建 TGW 的帐户中获取 TGW 的 id,并将其传递到我要创建附件的帐户的 Cloudformation 中:
TransitGatewayAttachment":
{
"Type" : "AWS::EC2::TransitGatewayAttachment",
"Properties" : {
"SubnetIds": [
{
"Ref": "PrivateSubnet1A"
}
],
"TransitGatewayId" :"tgw-xxxexxxxxxxx",
"Ref": "VPC"
}
}
最佳答案
您缺少VpcId 。应该是:
TransitGatewayAttachment":
{
"Type" : "AWS::EC2::TransitGatewayAttachment",
"Properties" : {
"SubnetIds": [
{
"Ref": "PrivateSubnet1A"
}
],
"TransitGatewayId" :"tgw-xxxexxxxxxxx",
"VpcId": {"Ref": "VPC"}
}
}
关于aws-cloudformation - 如何在 VPC 中创建到在另一个账户中创建的中转网关的中转网关连接(使用 Cloudformation),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61834062/