AWS Native is in preview. AWS Classic is fully supported.
aws-native.ec2.SecurityGroup
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
Resource Type definition for AWS::EC2::SecurityGroup
Create SecurityGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecurityGroup(name: string, args: SecurityGroupArgs, opts?: CustomResourceOptions);
@overload
def SecurityGroup(resource_name: str,
args: SecurityGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecurityGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
group_description: Optional[str] = None,
group_name: Optional[str] = None,
security_group_egress: Optional[Sequence[SecurityGroupEgressArgs]] = None,
security_group_ingress: Optional[Sequence[SecurityGroupIngressArgs]] = None,
tags: Optional[Sequence[_root_inputs.TagArgs]] = None,
vpc_id: Optional[str] = None)
func NewSecurityGroup(ctx *Context, name string, args SecurityGroupArgs, opts ...ResourceOption) (*SecurityGroup, error)
public SecurityGroup(string name, SecurityGroupArgs args, CustomResourceOptions? opts = null)
public SecurityGroup(String name, SecurityGroupArgs args)
public SecurityGroup(String name, SecurityGroupArgs args, CustomResourceOptions options)
type: aws-native:ec2:SecurityGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args SecurityGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args SecurityGroupArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args SecurityGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecurityGroupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Example
The following reference example uses placeholder values for all input properties.
Coming soon!
Coming soon!
Coming soon!
Coming soon!
const securityGroupResource = new aws_native.ec2.SecurityGroup("securityGroupResource", {
groupDescription: "string",
groupName: "string",
securityGroupEgress: [{
ipProtocol: "string",
cidrIp: "string",
cidrIpv6: "string",
description: "string",
destinationPrefixListId: "string",
destinationSecurityGroupId: "string",
fromPort: 0,
toPort: 0,
}],
securityGroupIngress: [{
ipProtocol: "string",
cidrIp: "string",
cidrIpv6: "string",
description: "string",
fromPort: 0,
sourcePrefixListId: "string",
sourceSecurityGroupId: "string",
sourceSecurityGroupName: "string",
sourceSecurityGroupOwnerId: "string",
toPort: 0,
}],
tags: [{
key: "string",
value: "string",
}],
vpcId: "string",
});
Coming soon!
SecurityGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The SecurityGroup resource accepts the following input properties:
- Group
Description string - A description for the security group.
- Group
Name string - The name of the security group.
- Security
Group List<Pulumi.Egress Aws Native. Ec2. Inputs. Security Group Egress> - [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 List<Pulumi.Ingress Aws Native. Ec2. Inputs. Security Group Ingress> - The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
- List<Pulumi.
Aws Native. Inputs. Tag> - Any tags assigned to the security group.
- Vpc
Id string - The ID of the VPC for the security group.
- Group
Description string - A description for the security group.
- Group
Name string - The name of the security group.
- Security
Group []SecurityEgress Group Egress Type Args - [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 []SecurityIngress Group Ingress Type Args - The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
- Tag
Args - Any tags assigned to the security group.
- Vpc
Id string - The ID of the VPC for the security group.
- group
Description String - A description for the security group.
- group
Name String - The name of the security group.
- security
Group List<SecurityEgress Group Egress> - [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 List<SecurityIngress Group Ingress> - The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
- List<Tag>
- Any tags assigned to the security group.
- vpc
Id String - The ID of the VPC for the security group.
- group
Description string - A description for the security group.
- group
Name string - The name of the security group.
- security
Group SecurityEgress Group Egress[] - [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 SecurityIngress Group Ingress[] - The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
- Tag[]
- Any tags assigned to the security group.
- vpc
Id string - The ID of the VPC for the security group.
- group_
description str - A description for the security group.
- group_
name str - The name of the security group.
- security_
group_ Sequence[Securityegress Group Egress Args] - [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_ Sequence[Securityingress Group Ingress Args] - The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
- Sequence[Tag
Args] - Any tags assigned to the security group.
- vpc_
id str - The ID of the VPC for the security group.
- group
Description String - A description for the security group.
- group
Name String - The name of the security group.
- security
Group List<Property Map>Egress - [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 List<Property Map>Ingress - The inbound rules associated with the security group. There is a short interruption during which you cannot connect to the security group.
- List<Property Map>
- Any tags assigned to the security group.
- vpc
Id String - The ID of the VPC for the security group.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecurityGroup resource produces the following output properties:
Supporting Types
SecurityGroupEgress, SecurityGroupEgressArgs
- Ip
Protocol string - Cidr
Ip string - Cidr
Ipv6 string - Description string
- Destination
Prefix stringList Id - Destination
Security stringGroup Id - From
Port int - To
Port int
- Ip
Protocol string - Cidr
Ip string - Cidr
Ipv6 string - Description string
- Destination
Prefix stringList Id - Destination
Security stringGroup Id - From
Port int - To
Port int
- ip
Protocol String - cidr
Ip String - cidr
Ipv6 String - description String
- destination
Prefix StringList Id - destination
Security StringGroup Id - from
Port Integer - to
Port Integer
- ip
Protocol string - cidr
Ip string - cidr
Ipv6 string - description string
- destination
Prefix stringList Id - destination
Security stringGroup Id - from
Port number - to
Port number
- ip_
protocol str - cidr_
ip str - cidr_
ipv6 str - description str
- destination_
prefix_ strlist_ id - destination_
security_ strgroup_ id - from_
port int - to_
port int
- ip
Protocol String - cidr
Ip String - cidr
Ipv6 String - description String
- destination
Prefix StringList Id - destination
Security StringGroup Id - from
Port Number - to
Port Number
SecurityGroupIngress, SecurityGroupIngressArgs
- Ip
Protocol string - Cidr
Ip string - Cidr
Ipv6 string - Description string
- From
Port int - Source
Prefix stringList Id - Source
Security stringGroup Id - Source
Security stringGroup Name - Source
Security stringGroup Owner Id - To
Port int
- Ip
Protocol string - Cidr
Ip string - Cidr
Ipv6 string - Description string
- From
Port int - Source
Prefix stringList Id - Source
Security stringGroup Id - Source
Security stringGroup Name - Source
Security stringGroup Owner Id - To
Port int
- ip
Protocol String - cidr
Ip String - cidr
Ipv6 String - description String
- from
Port Integer - source
Prefix StringList Id - source
Security StringGroup Id - source
Security StringGroup Name - source
Security StringGroup Owner Id - to
Port Integer
- ip
Protocol string - cidr
Ip string - cidr
Ipv6 string - description string
- from
Port number - source
Prefix stringList Id - source
Security stringGroup Id - source
Security stringGroup Name - source
Security stringGroup Owner Id - to
Port number
- ip_
protocol str - cidr_
ip str - cidr_
ipv6 str - description str
- from_
port int - source_
prefix_ strlist_ id - source_
security_ strgroup_ id - source_
security_ strgroup_ name - source_
security_ strgroup_ owner_ id - to_
port int
- ip
Protocol String - cidr
Ip String - cidr
Ipv6 String - description String
- from
Port Number - source
Prefix StringList Id - source
Security StringGroup Id - source
Security StringGroup Name - source
Security StringGroup Owner Id - to
Port Number
Tag, TagArgs
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.