Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

awscc.ec2_security_group

CloudFormation Type: AWS::EC2::SecurityGroup

Resource Type definition for AWS::EC2::SecurityGroup

Attributes

NameTypeRequiredDescription
group_descriptionStringYesA description for the security group.
group_idString(read-only)
group_nameStringNoThe name of the security group.
idString(read-only)
security_group_egressListNo[VPC only] The outbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
security_group_ingressListNoThe inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
tagsMapNoAny tags assigned to the security group.
vpc_idStringNoThe ID of the VPC for the security group.

Example

let vpc = awscc.ec2_vpc {
  name       = "example-vpc"
  cidr_block = "10.0.0.0/16"
}

awscc.ec2_security_group {
  name              = "example-sg"
  vpc_id            = vpc.vpc_id
  group_description = "Example security group"

  tags = {
    Environment = "example"
  }
}