AWS Fundamentals Logo
AWS Fundamentals
AWS::EC2::SecurityGroupVpcAssociation

EC2 SecurityGroupVpcAssociation

Resource type definition for the AWS::EC2::SecurityGroupVpcAssociation resource

Properties

2 configurable properties. 2 required. Click a row to see details.

Filter:
PropertyTypeFlags
GroupId
string
RequiredCreate-only
VpcId
string
RequiredCreate-only

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
StatestringThe state of the security group vpc association.
StateReasonstringThe reason for the state of the security group vpc association.
VpcOwnerIdstringThe owner of the VPC in the security group vpc association.

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::EC2::SecurityGroupVpcAssociation

Resources:
  MyResource:
    Type: AWS::EC2::SecurityGroupVpcAssociation
    Properties:
      GroupId: "my-groupid"
      VpcId: "my-vpcid"

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

ec2:AssociateSecurityGroupVpcec2:DescribeSecurityGroupVpcAssociations

read

ec2:DescribeSecurityGroupVpcAssociations

delete

ec2:DisassociateSecurityGroupVpcec2:DescribeSecurityGroupVpcAssociations

list

ec2:DescribeSecurityGroupVpcAssociations

Get the EC2 Cheat Sheet

Everything you need to know about EC2 on one page. HD quality, print-friendly.

Download Free Infographic

Quick Facts

ServiceEC2
Properties5
Required2
TaggingNot supported
Primary IDGroupId

Supported Operations

CreateReadDeleteList

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

GroupIdVpcId

External Links