aws.vpc.SecurityGroupEgressRule
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.SecurityGroupEgressRuleandaws.vpc.SecurityGroupIngressRuleresources is the current best practice. Avoid using theaws.ec2.SecurityGroupRuleresource and theingressandegressarguments of theaws.ec2.SecurityGroupresource 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/v7/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,
                            region: 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",
    Region = "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"),
	Region:                    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")
    .region("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",
    region="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",
    region: "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
    region: 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 -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues should not be defined.
- SecurityGroup stringId 
- 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.
- PrefixList stringId 
- The ID of the destination prefix list.
- ReferencedSecurity stringGroup Id 
- The destination security group that is referenced in the rule.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Dictionary<string, string>
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
- IpProtocol string
- The IP protocol name or number. Use -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues should not be defined.
- SecurityGroup stringId 
- 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.
- PrefixList stringId 
- The ID of the destination prefix list.
- ReferencedSecurity stringGroup Id 
- The destination security group that is referenced in the rule.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- map[string]string
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
- ipProtocol String
- The IP protocol name or number. Use -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues should not be defined.
- securityGroup StringId 
- 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.
- prefixList StringId 
- The ID of the destination prefix list.
- referencedSecurity StringGroup Id 
- The destination security group that is referenced in the rule.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String,String>
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
- ipProtocol string
- The IP protocol name or number. Use -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues should not be defined.
- securityGroup stringId 
- 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.
- prefixList stringId 
- The ID of the destination prefix list.
- referencedSecurity stringGroup Id 
- The destination security group that is referenced in the rule.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- {[key: string]: string}
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
- ip_protocol str
- The IP protocol name or number. Use -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues 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.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Mapping[str, str]
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
- ipProtocol String
- The IP protocol name or number. Use -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues should not be defined.
- securityGroup StringId 
- 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.
- prefixList StringId 
- The ID of the destination prefix list.
- referencedSecurity StringGroup Id 
- The destination security group that is referenced in the rule.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- Map<String>
- A map of tags to assign to the resource. If configured with a provider default_tagsconfiguration 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. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
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.
- SecurityGroup 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_tagsconfiguration block.
- Arn string
- The Amazon Resource Name (ARN) of the security group rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- SecurityGroup 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_tagsconfiguration block.
- arn String
- The Amazon Resource Name (ARN) of the security group rule.
- id String
- The provider-assigned unique ID for this managed resource.
- securityGroup 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_tagsconfiguration block.
- arn string
- The Amazon Resource Name (ARN) of the security group rule.
- id string
- The provider-assigned unique ID for this managed resource.
- securityGroup 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_tagsconfiguration 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_tagsconfiguration block.
- arn String
- The Amazon Resource Name (ARN) of the security group rule.
- id String
- The provider-assigned unique ID for this managed resource.
- securityGroup 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_tagsconfiguration 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,
        region: 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) -> SecurityGroupEgressRulefunc 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)resources:  _:    type: aws:vpc:SecurityGroupEgressRule    get:      id: ${id}- 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.
- 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 -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues should not be defined.
- PrefixList stringId 
- The ID of the destination prefix list.
- ReferencedSecurity stringGroup Id 
- The destination security group that is referenced in the rule.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- SecurityGroup stringId 
- The ID of the security group.
- SecurityGroup 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_tagsconfiguration 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_tagsconfiguration block.
- ToPort int
- The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
- 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 -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues should not be defined.
- PrefixList stringId 
- The ID of the destination prefix list.
- ReferencedSecurity stringGroup Id 
- The destination security group that is referenced in the rule.
- Region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- SecurityGroup stringId 
- The ID of the security group.
- SecurityGroup 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_tagsconfiguration 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_tagsconfiguration block.
- ToPort int
- The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
- 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 -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues should not be defined.
- prefixList StringId 
- The ID of the destination prefix list.
- referencedSecurity StringGroup Id 
- The destination security group that is referenced in the rule.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- securityGroup StringId 
- The ID of the security group.
- securityGroup 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_tagsconfiguration 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_tagsconfiguration block.
- toPort Integer
- The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
- 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 -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues should not be defined.
- prefixList stringId 
- The ID of the destination prefix list.
- referencedSecurity stringGroup Id 
- The destination security group that is referenced in the rule.
- region string
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- securityGroup stringId 
- The ID of the security group.
- securityGroup 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_tagsconfiguration 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_tagsconfiguration block.
- toPort number
- The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
- 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 -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues 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.
- region str
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- 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_tagsconfiguration 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_tagsconfiguration block.
- to_port int
- The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
- 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 -1to specify all protocols. Note that ifip_protocolis set to-1, it translates to all protocols, all port ranges, andfrom_portandto_portvalues should not be defined.
- prefixList StringId 
- The ID of the destination prefix list.
- referencedSecurity StringGroup Id 
- The destination security group that is referenced in the rule.
- region String
- Region where this resource will be managed. Defaults to the Region set in the provider configuration.
- securityGroup StringId 
- The ID of the security group.
- securityGroup 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_tagsconfiguration 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_tagsconfiguration block.
- toPort Number
- The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. - Note Although - cidr_ipv4,- cidr_ipv6,- prefix_list_id, and- referenced_security_group_idare all marked as optional, you must provide one of them in order to configure the destination of the traffic. The- from_portand- to_portarguments are required unless- ip_protocolis set to- -1or- icmpv6.
Import
Identity Schema
Required
- id- (String) ID of the security group rule.
Optional
- account_id(String) AWS Account where this resource is managed.
- region(String) Region where this resource is managed.
Using pulumi import, import security group egress rules using the security_group_rule_id. For example:
console
% pulumi import aws_vpc_security_group_egress_rule.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 awsTerraform Provider.
