AWS CloudFormation
User Guide (API Version 2010-05-15)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.Did this page help you?  Yes | No |  Tell us about it...

AWS::EC2::VPC

Creates a Virtual Private Cloud (VPC) with the CIDR block that you specify.

Syntax

{
   "Type" : "AWS::EC2::VPC",
   "Properties" : {
      "CidrBlock" : String,
      "InstanceTenancy" : String,
      "Tags" : [ EC2 Tag, ... ]
   }
}     

Properties

CidrBlock

The CIDR block you want the VPC to cover. For example: "10.0.0.0/16".

Type: String

Required: Yes

InstanceTenancy

The allowed tenancy of instances launched into the VPC. A value of "default" means instances can be launched with any tenancy; a value of "dedicated" means instances must be launched with tenancy as dedicated.

Type: String

Required: No

Valid values: "default" or "dedicated"

Tags

The tags you want to attach to the instance.

Type: List of EC2 Tags.

Required: No

Update requires: no interruption

Return Values

Ref

When the logical ID of this resource is provided to the Ref intrinsic function, it returns the resource name.

For more information about using the Ref function, see Ref.

Example

{
   "AWSTemplateFormatVersion" : "2010-09-09",
   "Resources" : {
      "myVPC" : {
         "Type" : "AWS::EC2::VPC",
         "Properties" : {
            "CidrBlock" : "10.0.0.0/16",
            "InstanceTenancy" :"dedicated",
            "Tags" : [ {"Key" : "foo", "Value" : "bar"} ]
         }
      }
   }
}     

See Also

  • CreateVpc in the Amazon Elastic Compute Cloud API Reference.