Skip to main content
Providers

SecurityGroup

A resource of the AWS provider, version 0.3.0, in its Networking group. Import it with:

import SecurityGroup from "aws/networking"

Example

resource SecurityGroup example {
    name        = "example-value"
    description = "example-value"
    vpcId       = "example-value"
    ingress     = "..."
    egress      = "..."
    tags        = "..."
}

Properties

Set by your code in the resource block. A required one must be set; any other you leave out takes the value under Default, if it has one.

NameTypeDefaultRequiredDescription
namestring—NoName of the security group
descriptionstring—NoDescription of the security group (required by AWS)
vpcIdstring—NoVPC ID where the security group will be created
ingressany[]—NoInbound rules allowing traffic into resources
egressany[]—NoOutbound rules allowing traffic from resources
tagsobject—NoTags to apply to the security group

Set by AWS after the resource is created: your code can read them but not set them. An importable one identifies an existing resource.

NameTypeImportableDescription
securityGroupIdstringNoThe security group ID assigned by AWS
ownerIdstringNoThe AWS account ID that owns the security group
arnstringYesThe Amazon Resource Name (ARN)

On this page