Try AWS Native preview for resources not in the classic version.
aws.vpc.SecurityGroupEgressRule
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
Manages an outbound (egress) rule for a security group.
When specifying an outbound rule for your security group in a VPC, the configuration must include a destination for the traffic.
NOTE on Security Groups and Security Group Rules: this provider currently provides a Security Group resource with
ingress
andegress
rules defined in-line and a Security Group Rule resource which manages one or moreingress
oregress
rules. Both of these resource were added before AWS assigned a security group rule unique ID, and they do not work well in all scenarios using thedescription
andtags
attributes, which rely on the unique ID. Theaws.vpc.SecurityGroupEgressRule
resource has been added to address these limitations and should be used for all new security group rules. You should not use theaws.vpc.SecurityGroupEgressRule
resource in conjunction with anaws.ec2.SecurityGroup
resource with in-line rules or withaws.ec2.SecurityGroupRule
resources defined for the same Security Group, as rule conflicts may occur and rules will be overwritten.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.vpc.SecurityGroupEgressRule("example", {
securityGroupId: exampleAwsSecurityGroup.id,
cidrIpv4: "10.0.0.0/8",
fromPort: 80,
ipProtocol: "tcp",
toPort: 80,
});
import pulumi
import pulumi_aws as aws
example = aws.vpc.SecurityGroupEgressRule("example",
security_group_id=example_aws_security_group["id"],
cidr_ipv4="10.0.0.0/8",
from_port=80,
ip_protocol="tcp",
to_port=80)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpc"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vpc.NewSecurityGroupEgressRule(ctx, "example", &vpc.SecurityGroupEgressRuleArgs{
SecurityGroupId: pulumi.Any(exampleAwsSecurityGroup.Id),
CidrIpv4: pulumi.String("10.0.0.0/8"),
FromPort: pulumi.Int(80),
IpProtocol: pulumi.String("tcp"),
ToPort: pulumi.Int(80),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Vpc.SecurityGroupEgressRule("example", new()
{
SecurityGroupId = exampleAwsSecurityGroup.Id,
CidrIpv4 = "10.0.0.0/8",
FromPort = 80,
IpProtocol = "tcp",
ToPort = 80,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.vpc.SecurityGroupEgressRule;
import com.pulumi.aws.vpc.SecurityGroupEgressRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new SecurityGroupEgressRule("example", SecurityGroupEgressRuleArgs.builder()
.securityGroupId(exampleAwsSecurityGroup.id())
.cidrIpv4("10.0.0.0/8")
.fromPort(80)
.ipProtocol("tcp")
.toPort(80)
.build());
}
}
resources:
example:
type: aws:vpc:SecurityGroupEgressRule
properties:
securityGroupId: ${exampleAwsSecurityGroup.id}
cidrIpv4: 10.0.0.0/8
fromPort: 80
ipProtocol: tcp
toPort: 80
Create SecurityGroupEgressRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecurityGroupEgressRule(name: string, args: SecurityGroupEgressRuleArgs, opts?: CustomResourceOptions);
@overload
def SecurityGroupEgressRule(resource_name: str,
args: SecurityGroupEgressRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecurityGroupEgressRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
ip_protocol: Optional[str] = None,
security_group_id: Optional[str] = None,
cidr_ipv4: Optional[str] = None,
cidr_ipv6: Optional[str] = None,
description: Optional[str] = None,
from_port: Optional[int] = None,
prefix_list_id: Optional[str] = None,
referenced_security_group_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
to_port: Optional[int] = None)
func NewSecurityGroupEgressRule(ctx *Context, name string, args SecurityGroupEgressRuleArgs, opts ...ResourceOption) (*SecurityGroupEgressRule, error)
public SecurityGroupEgressRule(string name, SecurityGroupEgressRuleArgs args, CustomResourceOptions? opts = null)
public SecurityGroupEgressRule(String name, SecurityGroupEgressRuleArgs args)
public SecurityGroupEgressRule(String name, SecurityGroupEgressRuleArgs args, CustomResourceOptions options)
type: aws:vpc:SecurityGroupEgressRule
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 SecurityGroupEgressRuleArgs
- 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 SecurityGroupEgressRuleArgs
- 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 SecurityGroupEgressRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecurityGroupEgressRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecurityGroupEgressRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var securityGroupEgressRuleResource = new Aws.Vpc.SecurityGroupEgressRule("securityGroupEgressRuleResource", new()
{
IpProtocol = "string",
SecurityGroupId = "string",
CidrIpv4 = "string",
CidrIpv6 = "string",
Description = "string",
FromPort = 0,
PrefixListId = "string",
ReferencedSecurityGroupId = "string",
Tags =
{
{ "string", "string" },
},
ToPort = 0,
});
example, err := vpc.NewSecurityGroupEgressRule(ctx, "securityGroupEgressRuleResource", &vpc.SecurityGroupEgressRuleArgs{
IpProtocol: pulumi.String("string"),
SecurityGroupId: pulumi.String("string"),
CidrIpv4: pulumi.String("string"),
CidrIpv6: pulumi.String("string"),
Description: pulumi.String("string"),
FromPort: pulumi.Int(0),
PrefixListId: pulumi.String("string"),
ReferencedSecurityGroupId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
ToPort: pulumi.Int(0),
})
var securityGroupEgressRuleResource = new SecurityGroupEgressRule("securityGroupEgressRuleResource", SecurityGroupEgressRuleArgs.builder()
.ipProtocol("string")
.securityGroupId("string")
.cidrIpv4("string")
.cidrIpv6("string")
.description("string")
.fromPort(0)
.prefixListId("string")
.referencedSecurityGroupId("string")
.tags(Map.of("string", "string"))
.toPort(0)
.build());
security_group_egress_rule_resource = aws.vpc.SecurityGroupEgressRule("securityGroupEgressRuleResource",
ip_protocol="string",
security_group_id="string",
cidr_ipv4="string",
cidr_ipv6="string",
description="string",
from_port=0,
prefix_list_id="string",
referenced_security_group_id="string",
tags={
"string": "string",
},
to_port=0)
const securityGroupEgressRuleResource = new aws.vpc.SecurityGroupEgressRule("securityGroupEgressRuleResource", {
ipProtocol: "string",
securityGroupId: "string",
cidrIpv4: "string",
cidrIpv6: "string",
description: "string",
fromPort: 0,
prefixListId: "string",
referencedSecurityGroupId: "string",
tags: {
string: "string",
},
toPort: 0,
});
type: aws:vpc:SecurityGroupEgressRule
properties:
cidrIpv4: string
cidrIpv6: string
description: string
fromPort: 0
ipProtocol: string
prefixListId: string
referencedSecurityGroupId: string
securityGroupId: string
tags:
string: string
toPort: 0
SecurityGroupEgressRule 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 SecurityGroupEgressRule resource accepts the following input properties:
- Ip
Protocol string - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - Security
Group stringId - The ID of the security group.
- Cidr
Ipv4 string - The destination IPv4 CIDR range.
- Cidr
Ipv6 string - The destination IPv6 CIDR range.
- Description string
- The security group rule description.
- From
Port int - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- Prefix
List stringId - The ID of the destination prefix list.
- Referenced
Security stringGroup Id - The destination security group that is referenced in the rule.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - To
Port int - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
- Ip
Protocol string - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - Security
Group stringId - The ID of the security group.
- Cidr
Ipv4 string - The destination IPv4 CIDR range.
- Cidr
Ipv6 string - The destination IPv6 CIDR range.
- Description string
- The security group rule description.
- From
Port int - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- Prefix
List stringId - The ID of the destination prefix list.
- Referenced
Security stringGroup Id - The destination security group that is referenced in the rule.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - To
Port int - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
- ip
Protocol String - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - security
Group StringId - The ID of the security group.
- cidr
Ipv4 String - The destination IPv4 CIDR range.
- cidr
Ipv6 String - The destination IPv6 CIDR range.
- description String
- The security group rule description.
- from
Port Integer - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- prefix
List StringId - The ID of the destination prefix list.
- referenced
Security StringGroup Id - The destination security group that is referenced in the rule.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - to
Port Integer - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
- ip
Protocol string - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - security
Group stringId - The ID of the security group.
- cidr
Ipv4 string - The destination IPv4 CIDR range.
- cidr
Ipv6 string - The destination IPv6 CIDR range.
- description string
- The security group rule description.
- from
Port number - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- prefix
List stringId - The ID of the destination prefix list.
- referenced
Security stringGroup Id - The destination security group that is referenced in the rule.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - to
Port number - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
- ip_
protocol str - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - security_
group_ strid - The ID of the security group.
- cidr_
ipv4 str - The destination IPv4 CIDR range.
- cidr_
ipv6 str - The destination IPv6 CIDR range.
- description str
- The security group rule description.
- from_
port int - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- prefix_
list_ strid - The ID of the destination prefix list.
- referenced_
security_ strgroup_ id - The destination security group that is referenced in the rule.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - to_
port int - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
- ip
Protocol String - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - security
Group StringId - The ID of the security group.
- cidr
Ipv4 String - The destination IPv4 CIDR range.
- cidr
Ipv6 String - The destination IPv6 CIDR range.
- description String
- The security group rule description.
- from
Port Number - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- prefix
List StringId - The ID of the destination prefix list.
- referenced
Security StringGroup Id - The destination security group that is referenced in the rule.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - to
Port Number - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecurityGroupEgressRule resource produces the following output properties:
- Arn string
- The Amazon Resource Name (ARN) of the security group rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Security
Group stringRule Id - The ID of the security group rule.
- Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- Arn string
- The Amazon Resource Name (ARN) of the security group rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Security
Group stringRule Id - The ID of the security group rule.
- map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The Amazon Resource Name (ARN) of the security group rule.
- id String
- The provider-assigned unique ID for this managed resource.
- security
Group StringRule Id - The ID of the security group rule.
- Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn string
- The Amazon Resource Name (ARN) of the security group rule.
- id string
- The provider-assigned unique ID for this managed resource.
- security
Group stringRule Id - The ID of the security group rule.
- {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn str
- The Amazon Resource Name (ARN) of the security group rule.
- id str
- The provider-assigned unique ID for this managed resource.
- security_
group_ strrule_ id - The ID of the security group rule.
- Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
- arn String
- The Amazon Resource Name (ARN) of the security group rule.
- id String
- The provider-assigned unique ID for this managed resource.
- security
Group StringRule Id - The ID of the security group rule.
- Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block.
Look up Existing SecurityGroupEgressRule Resource
Get an existing SecurityGroupEgressRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: SecurityGroupEgressRuleState, opts?: CustomResourceOptions): SecurityGroupEgressRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
cidr_ipv4: Optional[str] = None,
cidr_ipv6: Optional[str] = None,
description: Optional[str] = None,
from_port: Optional[int] = None,
ip_protocol: Optional[str] = None,
prefix_list_id: Optional[str] = None,
referenced_security_group_id: Optional[str] = None,
security_group_id: Optional[str] = None,
security_group_rule_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
tags_all: Optional[Mapping[str, str]] = None,
to_port: Optional[int] = None) -> SecurityGroupEgressRule
func GetSecurityGroupEgressRule(ctx *Context, name string, id IDInput, state *SecurityGroupEgressRuleState, opts ...ResourceOption) (*SecurityGroupEgressRule, error)
public static SecurityGroupEgressRule Get(string name, Input<string> id, SecurityGroupEgressRuleState? state, CustomResourceOptions? opts = null)
public static SecurityGroupEgressRule get(String name, Output<String> id, SecurityGroupEgressRuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Arn string
- The Amazon Resource Name (ARN) of the security group rule.
- Cidr
Ipv4 string - The destination IPv4 CIDR range.
- Cidr
Ipv6 string - The destination IPv6 CIDR range.
- Description string
- The security group rule description.
- From
Port int - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- Ip
Protocol string - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - Prefix
List stringId - The ID of the destination prefix list.
- Referenced
Security stringGroup Id - The destination security group that is referenced in the rule.
- Security
Group stringId - The ID of the security group.
- Security
Group stringRule Id - The ID of the security group rule.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Dictionary<string, string>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - To
Port int - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
- Arn string
- The Amazon Resource Name (ARN) of the security group rule.
- Cidr
Ipv4 string - The destination IPv4 CIDR range.
- Cidr
Ipv6 string - The destination IPv6 CIDR range.
- Description string
- The security group rule description.
- From
Port int - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- Ip
Protocol string - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - Prefix
List stringId - The ID of the destination prefix list.
- Referenced
Security stringGroup Id - The destination security group that is referenced in the rule.
- Security
Group stringId - The ID of the security group.
- Security
Group stringRule Id - The ID of the security group rule.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - map[string]string
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - To
Port int - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
- arn String
- The Amazon Resource Name (ARN) of the security group rule.
- cidr
Ipv4 String - The destination IPv4 CIDR range.
- cidr
Ipv6 String - The destination IPv6 CIDR range.
- description String
- The security group rule description.
- from
Port Integer - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- ip
Protocol String - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - prefix
List StringId - The ID of the destination prefix list.
- referenced
Security StringGroup Id - The destination security group that is referenced in the rule.
- security
Group StringId - The ID of the security group.
- security
Group StringRule Id - The ID of the security group rule.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String,String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - to
Port Integer - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
- arn string
- The Amazon Resource Name (ARN) of the security group rule.
- cidr
Ipv4 string - The destination IPv4 CIDR range.
- cidr
Ipv6 string - The destination IPv6 CIDR range.
- description string
- The security group rule description.
- from
Port number - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- ip
Protocol string - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - prefix
List stringId - The ID of the destination prefix list.
- referenced
Security stringGroup Id - The destination security group that is referenced in the rule.
- security
Group stringId - The ID of the security group.
- security
Group stringRule Id - The ID of the security group rule.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - {[key: string]: string}
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - to
Port number - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
- arn str
- The Amazon Resource Name (ARN) of the security group rule.
- cidr_
ipv4 str - The destination IPv4 CIDR range.
- cidr_
ipv6 str - The destination IPv6 CIDR range.
- description str
- The security group rule description.
- from_
port int - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- ip_
protocol str - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - prefix_
list_ strid - The ID of the destination prefix list.
- referenced_
security_ strgroup_ id - The destination security group that is referenced in the rule.
- security_
group_ strid - The ID of the security group.
- security_
group_ strrule_ id - The ID of the security group rule.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Mapping[str, str]
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - to_
port int - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
- arn String
- The Amazon Resource Name (ARN) of the security group rule.
- cidr
Ipv4 String - The destination IPv4 CIDR range.
- cidr
Ipv6 String - The destination IPv6 CIDR range.
- description String
- The security group rule description.
- from
Port Number - The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
- ip
Protocol String - The IP protocol name or number. Use
-1
to specify all protocols. Note that ifip_protocol
is set to-1
, it translates to all protocols, all port ranges, andfrom_port
andto_port
values should not be defined. - prefix
List StringId - The ID of the destination prefix list.
- referenced
Security StringGroup Id - The destination security group that is referenced in the rule.
- security
Group StringId - The ID of the security group.
- security
Group StringRule Id - The ID of the security group rule.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider
default_tags
configuration block present, tags with matching keys will overwrite those defined at the provider-level. - Map<String>
- A map of tags assigned to the resource, including those inherited from the provider
default_tags
configuration block. - to
Port Number - The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
Import
Using pulumi import
, import security group egress rules using the security_group_rule_id
. For example:
$ pulumi import aws:vpc/securityGroupEgressRule:SecurityGroupEgressRule example sgr-02108b27edd666983
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.