1. Packages
  2. AWS
  3. API Docs
  4. vpc
  5. SecurityGroupEgressRule
AWS v6.63.0 published on Wednesday, Dec 4, 2024 by Pulumi

aws.vpc.SecurityGroupEgressRule

Explore with Pulumi AI

aws logo
AWS v6.63.0 published on Wednesday, Dec 4, 2024 by Pulumi

    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: Using aws.vpc.SecurityGroupEgressRule and aws.vpc.SecurityGroupIngressRule resources is the current best practice. Avoid using the aws.ec2.SecurityGroupRule resource and the ingress and egress arguments of the aws.ec2.SecurityGroup resource for configuring in-line rules, as they struggle with managing multiple CIDR blocks, and tags and descriptions due to the historical lack of unique IDs.

    !> WARNING: You should not use the aws.vpc.SecurityGroupEgressRule and aws.vpc.SecurityGroupIngressRule resources in conjunction with the aws.ec2.SecurityGroup resource with in-line rules (using the ingress and egress arguments of aws.ec2.SecurityGroup) or the aws.ec2.SecurityGroupRule resource. Doing so may cause rule conflicts, perpetual differences, and result in rules being 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

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SecurityGroupEgressRule resource accepts the following input properties:

    IpProtocol string
    The IP protocol name or number. Use -1 to specify all protocols. Note that if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    SecurityGroupId string
    The ID of the security group.
    CidrIpv4 string
    The destination IPv4 CIDR range.
    CidrIpv6 string
    The destination IPv6 CIDR range.
    Description string
    The security group rule description.
    FromPort int
    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
    PrefixListId string
    The ID of the destination prefix list.
    ReferencedSecurityGroupId string
    The destination security group that is referenced in the rule.
    Tags 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.
    ToPort int
    The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
    IpProtocol string
    The IP protocol name or number. Use -1 to specify all protocols. Note that if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    SecurityGroupId string
    The ID of the security group.
    CidrIpv4 string
    The destination IPv4 CIDR range.
    CidrIpv6 string
    The destination IPv6 CIDR range.
    Description string
    The security group rule description.
    FromPort int
    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
    PrefixListId string
    The ID of the destination prefix list.
    ReferencedSecurityGroupId string
    The destination security group that is referenced in the rule.
    Tags 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.
    ToPort int
    The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
    ipProtocol String
    The IP protocol name or number. Use -1 to specify all protocols. Note that if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    securityGroupId String
    The ID of the security group.
    cidrIpv4 String
    The destination IPv4 CIDR range.
    cidrIpv6 String
    The destination IPv6 CIDR range.
    description String
    The security group rule description.
    fromPort Integer
    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
    prefixListId String
    The ID of the destination prefix list.
    referencedSecurityGroupId String
    The destination security group that is referenced in the rule.
    tags 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.
    toPort Integer
    The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
    ipProtocol string
    The IP protocol name or number. Use -1 to specify all protocols. Note that if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    securityGroupId string
    The ID of the security group.
    cidrIpv4 string
    The destination IPv4 CIDR range.
    cidrIpv6 string
    The destination IPv6 CIDR range.
    description string
    The security group rule description.
    fromPort number
    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
    prefixListId string
    The ID of the destination prefix list.
    referencedSecurityGroupId string
    The destination security group that is referenced in the rule.
    tags {[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.
    toPort 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 if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    security_group_id str
    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_id str
    The ID of the destination prefix list.
    referenced_security_group_id str
    The destination security group that is referenced in the rule.
    tags 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.
    ipProtocol String
    The IP protocol name or number. Use -1 to specify all protocols. Note that if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    securityGroupId String
    The ID of the security group.
    cidrIpv4 String
    The destination IPv4 CIDR range.
    cidrIpv6 String
    The destination IPv6 CIDR range.
    description String
    The security group rule description.
    fromPort Number
    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
    prefixListId String
    The ID of the destination prefix list.
    referencedSecurityGroupId String
    The destination security group that is referenced in the rule.
    tags 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.
    toPort 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.
    SecurityGroupRuleId string
    The ID of the security group rule.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    Arn string
    The Amazon Resource Name (ARN) of the security group rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    SecurityGroupRuleId string
    The ID of the security group rule.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the security group rule.
    id String
    The provider-assigned unique ID for this managed resource.
    securityGroupRuleId String
    The ID of the security group rule.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn string
    The Amazon Resource Name (ARN) of the security group rule.
    id string
    The provider-assigned unique ID for this managed resource.
    securityGroupRuleId string
    The ID of the security group rule.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    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_rule_id str
    The ID of the security group rule.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    arn String
    The Amazon Resource Name (ARN) of the security group rule.
    id String
    The provider-assigned unique ID for this managed resource.
    securityGroupRuleId String
    The ID of the security group rule.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    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.
    The following state arguments are supported:
    Arn string
    The Amazon Resource Name (ARN) of the security group rule.
    CidrIpv4 string
    The destination IPv4 CIDR range.
    CidrIpv6 string
    The destination IPv6 CIDR range.
    Description string
    The security group rule description.
    FromPort int
    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
    IpProtocol string
    The IP protocol name or number. Use -1 to specify all protocols. Note that if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    PrefixListId string
    The ID of the destination prefix list.
    ReferencedSecurityGroupId string
    The destination security group that is referenced in the rule.
    SecurityGroupId string
    The ID of the security group.
    SecurityGroupRuleId string
    The ID of the security group rule.
    Tags 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.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    ToPort 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.
    CidrIpv4 string
    The destination IPv4 CIDR range.
    CidrIpv6 string
    The destination IPv6 CIDR range.
    Description string
    The security group rule description.
    FromPort int
    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
    IpProtocol string
    The IP protocol name or number. Use -1 to specify all protocols. Note that if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    PrefixListId string
    The ID of the destination prefix list.
    ReferencedSecurityGroupId string
    The destination security group that is referenced in the rule.
    SecurityGroupId string
    The ID of the security group.
    SecurityGroupRuleId string
    The ID of the security group rule.
    Tags 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.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    ToPort 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.
    cidrIpv4 String
    The destination IPv4 CIDR range.
    cidrIpv6 String
    The destination IPv6 CIDR range.
    description String
    The security group rule description.
    fromPort Integer
    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
    ipProtocol String
    The IP protocol name or number. Use -1 to specify all protocols. Note that if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    prefixListId String
    The ID of the destination prefix list.
    referencedSecurityGroupId String
    The destination security group that is referenced in the rule.
    securityGroupId String
    The ID of the security group.
    securityGroupRuleId String
    The ID of the security group rule.
    tags 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.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    toPort 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.
    cidrIpv4 string
    The destination IPv4 CIDR range.
    cidrIpv6 string
    The destination IPv6 CIDR range.
    description string
    The security group rule description.
    fromPort number
    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
    ipProtocol string
    The IP protocol name or number. Use -1 to specify all protocols. Note that if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    prefixListId string
    The ID of the destination prefix list.
    referencedSecurityGroupId string
    The destination security group that is referenced in the rule.
    securityGroupId string
    The ID of the security group.
    securityGroupRuleId string
    The ID of the security group rule.
    tags {[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.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    toPort 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 if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    prefix_list_id str
    The ID of the destination prefix list.
    referenced_security_group_id str
    The destination security group that is referenced in the rule.
    security_group_id str
    The ID of the security group.
    security_group_rule_id str
    The ID of the security group rule.
    tags 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.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    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.
    cidrIpv4 String
    The destination IPv4 CIDR range.
    cidrIpv6 String
    The destination IPv6 CIDR range.
    description String
    The security group rule description.
    fromPort Number
    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
    ipProtocol String
    The IP protocol name or number. Use -1 to specify all protocols. Note that if ip_protocol is set to -1, it translates to all protocols, all port ranges, and from_port and to_port values should not be defined.
    prefixListId String
    The ID of the destination prefix list.
    referencedSecurityGroupId String
    The destination security group that is referenced in the rule.
    securityGroupId String
    The ID of the security group.
    securityGroupRuleId String
    The ID of the security group rule.
    tags 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.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    toPort 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.
    aws logo
    AWS v6.63.0 published on Wednesday, Dec 4, 2024 by Pulumi