简体   繁体   English

Cloudformation“ AWS :: EC2 :: SecurityGroup”对象,原因“此用户无默认VPC”

[英]Cloudformation “AWS::EC2::SecurityGroup” object with the Reason “No default VPC for this user”

I am trying to create a stack in Cloudformation - I'm using the Windows Roles and Features sample template from here for this: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications-us-east-1.html 我正在尝试在Cloudformation中创建堆栈-我正在使用Windows角色和功能示例模板,用于此: http : //docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-applications- us-east-1.html

I've been testing cloudformation to see if it may be something I'd like to try. 我一直在测试cloudformation以查看是否可能是我想要尝试的东西。 While launching the Stack, I keep running into an error when creating the "AWS::EC2::SecurityGroup" object with the Reason "No default VPC for this user" 启动堆栈时,创建“ AWS :: EC2 :: SecurityGroup”对象时出现错误,原因是“此用户没有默认VPC”

I currently have 1 VPC with a bunch of different subnets. 我目前有1个VPC,并带有许多不同的子网。 I've added a section in my JSON to specify the VPC and subnet but am still getting this error when I create the stack. 我在JSON中添加了一个部分来指定VPC和子网,但是在创建堆栈时仍然出现此错误。 Here is what I have added: 这是我添加的内容:

"VpcId" : { "Type" : "String", "Description" : "VpcId of your existing Virtual Private Cloud (VPC)" }, “ VpcId”:{“类型”:“字符串”,“描述”:“现有虚拟私有云(VPC)的VpcId”},

"Subnets" : {
  "Type" : "CommaDelimitedList",
  "Description" : "The list of SubnetIds, for at least two Availability Zones in the region in your Virtual Private Cloud (VPC)"
},

Anyone know how to fix this? 有人知道怎么修这个东西吗? Or what I may be missing. 或者我可能会错过的东西。 Again as I said, I'm literally using the sample template. 再次如我所说,我实际上是在使用示例模板。 Thanks 谢谢

You need to provide a VPC id: 您需要提供一个VPC ID:

  • If you have an existing VPC then supply its VPC id, for example: "VpcId" : "vpc-12345678" . 如果您有现有的VPC,请提供其VPC ID,例如: "VpcId" : "vpc-12345678"

  • If you're creating the VPC in the same CloudFormation template then you'll need to reference it, for example "VpcId" : { "Ref" : "myvpc" } were myvpc is the resource name of the AWS::EC2::VPC resource you created in the template. 如果要在同一CloudFormation模板中创建VPC,则需要引用它,例如, "VpcId" : { "Ref" : "myvpc" }myvpcAWS :: EC2 ::的资源名称。您在模板中创建的VPC资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 没有默认 vpc 的 ec2 cloudformation 模板 - ec2 cloudformation template without default vpc 如何在 AWS CloudFormation 模板中为新的 SecurityGroup 使用现有 VPC - How to use existing VPC in AWS CloudFormation template for new SecurityGroup ec2 的 AWS Cloudformation 默认密钥对 - AWS Cloudformation Default keypair for ec2 aws cloudformation - 在我的 vpc 中启动 ec2 实例 - aws cloudformation - Launch ec2 instance in my vpc 将 EC2 与默认 VPC 连接与 AWS 中的自定义 VPC Terraform - Connecting EC2 with Default VPC vs Customized VPC in AWS Terraform 通过CLI工具的AWS EC2默认VPC访问 - AWS EC2 Default VPC access from CLI Tools 云形成AWS :: EC2 :: SecurityGroup VpcId是否接受字符串? - Cloud Formation AWS::EC2::SecurityGroup VpcId takes a string? Cloudformation:“此用户没有默认 VPC。GroupName 仅支持 EC2-Classic 和默认 VPC” - Cloudformation: "No default VPC for this user. GroupName is only supported for EC2-Classic and default VPC" 在VPC内的AWS EC2上创建RDS用户 - Create an RDS user on AWS EC2 within a VPC 我的 Cloudformation YAML 用于自动缩放组即使在我指定自定义 VPC 后仍会在默认 VPC 中创建 EC2 实例 - My Cloudformation YAML for autoscaling group keeps creating EC2 instances in default VPC even after I specify a custom VPC
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM