Resource
aws.ec2.SecurityGroupEgress
Describes a security group rule.
Example
let vpc = aws.ec2.Vpc {
cidr_block = '10.0.0.0/16'
tags = {
Environment = 'example'
}
}
let sg = aws.ec2.SecurityGroup {
group_name = 'carina-example-sg-egress'
description = 'SG for egress rule example'
vpc_id = vpc.vpc_id
tags = {
Environment = 'example'
}
}
aws.ec2.SecurityGroupEgress {
group_id = sg.group_id
description = 'Allow HTTPS outbound'
ip_protocol = tcp
from_port = 443
to_port = 443
cidr_ip = '0.0.0.0/0'
}
Argument Reference
cidr_ip
- Type:
Ipv4Cidr (custom validator) - Required: No
Not supported. Use IP permissions instead.
cidr_ipv6
- Type:
Ipv6Cidr (custom validator) - Required: No
The IPv6 CIDR range.
description
- Type:
String - Required: No
The security group rule description.
destination_prefix_list_id
- Type:
PrefixListId (pattern: /^pl-[0-9a-f]{8,}$/ (Full)) - Required: No
The ID of the destination prefix list.
from_port
- Type:
Int (range: -1..=65535) - Required: No
Not supported. Use IP permissions instead.
group_id
- Type:
SecurityGroupId (pattern: /^sg-[0-9a-f]{8,}$/ (Full)) - Required: Yes
The ID of the security group.
ip_protocol
- Type: IpProtocol
- Required: Yes
Not supported. Use IP permissions instead.
source_security_group_owner_id
- Type:
AwsAccountId (pattern: /^[0-9]{12}$/ (Full), len: 12..=12) - Required: No
Not supported. Use IP permissions instead.
to_port
- Type:
Int (range: -1..=65535) - Required: No
Not supported. Use IP permissions instead.
destination_security_group_id
- Type:
SecurityGroupId (pattern: /^sg-[0-9a-f]{8,}$/ (Full)) - Required: No
The ID of the destination security group.
Enum Values
ip_protocol (IpProtocol)
| Value | DSL Identifier |
|---|---|
tcp |
aws.ec2.SecurityGroupEgress.IpProtocol.tcp |
udp |
aws.ec2.SecurityGroupEgress.IpProtocol.udp |
icmp |
aws.ec2.SecurityGroupEgress.IpProtocol.icmp |
icmpv6 |
aws.ec2.SecurityGroupEgress.IpProtocol.icmpv6 |
-1 |
aws.ec2.SecurityGroupEgress.IpProtocol.all |
Shorthand formats: tcp or IpProtocol.tcp
Attribute Reference
security_group_rule_id
- Type:
SecurityGroupRuleId (pattern: /^sgr-[0-9a-f]{8,}$/ (Full)) - Read-only
The ID of the security group rule.