github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/vpc/securityGroupEgressRule.go (about)

     1  // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
     2  // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
     3  
     4  package vpc
     5  
     6  import (
     7  	"context"
     8  	"reflect"
     9  
    10  	"errors"
    11  	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal"
    12  	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    13  )
    14  
    15  // Manages an outbound (egress) rule for a security group.
    16  //
    17  // When specifying an outbound rule for your security group in a VPC, the configuration must include a destination for the traffic.
    18  //
    19  // > **NOTE on Security Groups and Security Group Rules:** this provider currently provides a Security Group resource with `ingress` and `egress` rules defined in-line and a Security Group Rule resource which manages one or more `ingress` or
    20  // `egress` rules. Both of these resource were added before AWS assigned a [security group rule unique ID](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules.html), and they do not work well in all scenarios using the`description` and `tags` attributes, which rely on the unique ID.
    21  // The `vpc.SecurityGroupEgressRule` resource has been added to address these limitations and should be used for all new security group rules.
    22  // You should not use the `vpc.SecurityGroupEgressRule` resource in conjunction with an `ec2.SecurityGroup` resource with in-line rules or with `ec2.SecurityGroupRule` resources defined for the same Security Group, as rule conflicts may occur and rules will be overwritten.
    23  //
    24  // ## Example Usage
    25  //
    26  // <!--Start PulumiCodeChooser -->
    27  // ```go
    28  // package main
    29  //
    30  // import (
    31  //
    32  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpc"
    33  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    34  //
    35  // )
    36  //
    37  //	func main() {
    38  //		pulumi.Run(func(ctx *pulumi.Context) error {
    39  //			_, err := vpc.NewSecurityGroupEgressRule(ctx, "example", &vpc.SecurityGroupEgressRuleArgs{
    40  //				SecurityGroupId: pulumi.Any(exampleAwsSecurityGroup.Id),
    41  //				CidrIpv4:        pulumi.String("10.0.0.0/8"),
    42  //				FromPort:        pulumi.Int(80),
    43  //				IpProtocol:      pulumi.String("tcp"),
    44  //				ToPort:          pulumi.Int(80),
    45  //			})
    46  //			if err != nil {
    47  //				return err
    48  //			}
    49  //			return nil
    50  //		})
    51  //	}
    52  //
    53  // ```
    54  // <!--End PulumiCodeChooser -->
    55  //
    56  // ## Import
    57  //
    58  // Using `pulumi import`, import security group egress rules using the `security_group_rule_id`. For example:
    59  //
    60  // ```sh
    61  // $ pulumi import aws:vpc/securityGroupEgressRule:SecurityGroupEgressRule example sgr-02108b27edd666983
    62  // ```
    63  type SecurityGroupEgressRule struct {
    64  	pulumi.CustomResourceState
    65  
    66  	// The Amazon Resource Name (ARN) of the security group rule.
    67  	Arn pulumi.StringOutput `pulumi:"arn"`
    68  	// The destination IPv4 CIDR range.
    69  	CidrIpv4 pulumi.StringPtrOutput `pulumi:"cidrIpv4"`
    70  	// The destination IPv6 CIDR range.
    71  	CidrIpv6 pulumi.StringPtrOutput `pulumi:"cidrIpv6"`
    72  	// The security group rule description.
    73  	Description pulumi.StringPtrOutput `pulumi:"description"`
    74  	// The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
    75  	FromPort pulumi.IntPtrOutput `pulumi:"fromPort"`
    76  	// The IP protocol name or number. Use `-1` to specify all protocols. Note that if `ipProtocol` is set to `-1`, it translates to all protocols, all port ranges, and `fromPort` and `toPort` values should not be defined.
    77  	IpProtocol pulumi.StringOutput `pulumi:"ipProtocol"`
    78  	// The ID of the destination prefix list.
    79  	PrefixListId pulumi.StringPtrOutput `pulumi:"prefixListId"`
    80  	// The destination security group that is referenced in the rule.
    81  	ReferencedSecurityGroupId pulumi.StringPtrOutput `pulumi:"referencedSecurityGroupId"`
    82  	// The ID of the security group.
    83  	SecurityGroupId pulumi.StringOutput `pulumi:"securityGroupId"`
    84  	// The ID of the security group rule.
    85  	SecurityGroupRuleId pulumi.StringOutput `pulumi:"securityGroupRuleId"`
    86  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    87  	Tags pulumi.StringMapOutput `pulumi:"tags"`
    88  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
    89  	//
    90  	// Deprecated: Please use `tags` instead.
    91  	TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
    92  	// The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
    93  	ToPort pulumi.IntPtrOutput `pulumi:"toPort"`
    94  }
    95  
    96  // NewSecurityGroupEgressRule registers a new resource with the given unique name, arguments, and options.
    97  func NewSecurityGroupEgressRule(ctx *pulumi.Context,
    98  	name string, args *SecurityGroupEgressRuleArgs, opts ...pulumi.ResourceOption) (*SecurityGroupEgressRule, error) {
    99  	if args == nil {
   100  		return nil, errors.New("missing one or more required arguments")
   101  	}
   102  
   103  	if args.IpProtocol == nil {
   104  		return nil, errors.New("invalid value for required argument 'IpProtocol'")
   105  	}
   106  	if args.SecurityGroupId == nil {
   107  		return nil, errors.New("invalid value for required argument 'SecurityGroupId'")
   108  	}
   109  	opts = internal.PkgResourceDefaultOpts(opts)
   110  	var resource SecurityGroupEgressRule
   111  	err := ctx.RegisterResource("aws:vpc/securityGroupEgressRule:SecurityGroupEgressRule", name, args, &resource, opts...)
   112  	if err != nil {
   113  		return nil, err
   114  	}
   115  	return &resource, nil
   116  }
   117  
   118  // GetSecurityGroupEgressRule gets an existing SecurityGroupEgressRule resource's state with the given name, ID, and optional
   119  // state properties that are used to uniquely qualify the lookup (nil if not required).
   120  func GetSecurityGroupEgressRule(ctx *pulumi.Context,
   121  	name string, id pulumi.IDInput, state *SecurityGroupEgressRuleState, opts ...pulumi.ResourceOption) (*SecurityGroupEgressRule, error) {
   122  	var resource SecurityGroupEgressRule
   123  	err := ctx.ReadResource("aws:vpc/securityGroupEgressRule:SecurityGroupEgressRule", name, id, state, &resource, opts...)
   124  	if err != nil {
   125  		return nil, err
   126  	}
   127  	return &resource, nil
   128  }
   129  
   130  // Input properties used for looking up and filtering SecurityGroupEgressRule resources.
   131  type securityGroupEgressRuleState struct {
   132  	// The Amazon Resource Name (ARN) of the security group rule.
   133  	Arn *string `pulumi:"arn"`
   134  	// The destination IPv4 CIDR range.
   135  	CidrIpv4 *string `pulumi:"cidrIpv4"`
   136  	// The destination IPv6 CIDR range.
   137  	CidrIpv6 *string `pulumi:"cidrIpv6"`
   138  	// The security group rule description.
   139  	Description *string `pulumi:"description"`
   140  	// The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
   141  	FromPort *int `pulumi:"fromPort"`
   142  	// The IP protocol name or number. Use `-1` to specify all protocols. Note that if `ipProtocol` is set to `-1`, it translates to all protocols, all port ranges, and `fromPort` and `toPort` values should not be defined.
   143  	IpProtocol *string `pulumi:"ipProtocol"`
   144  	// The ID of the destination prefix list.
   145  	PrefixListId *string `pulumi:"prefixListId"`
   146  	// The destination security group that is referenced in the rule.
   147  	ReferencedSecurityGroupId *string `pulumi:"referencedSecurityGroupId"`
   148  	// The ID of the security group.
   149  	SecurityGroupId *string `pulumi:"securityGroupId"`
   150  	// The ID of the security group rule.
   151  	SecurityGroupRuleId *string `pulumi:"securityGroupRuleId"`
   152  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   153  	Tags map[string]string `pulumi:"tags"`
   154  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   155  	//
   156  	// Deprecated: Please use `tags` instead.
   157  	TagsAll map[string]string `pulumi:"tagsAll"`
   158  	// The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
   159  	ToPort *int `pulumi:"toPort"`
   160  }
   161  
   162  type SecurityGroupEgressRuleState struct {
   163  	// The Amazon Resource Name (ARN) of the security group rule.
   164  	Arn pulumi.StringPtrInput
   165  	// The destination IPv4 CIDR range.
   166  	CidrIpv4 pulumi.StringPtrInput
   167  	// The destination IPv6 CIDR range.
   168  	CidrIpv6 pulumi.StringPtrInput
   169  	// The security group rule description.
   170  	Description pulumi.StringPtrInput
   171  	// The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
   172  	FromPort pulumi.IntPtrInput
   173  	// The IP protocol name or number. Use `-1` to specify all protocols. Note that if `ipProtocol` is set to `-1`, it translates to all protocols, all port ranges, and `fromPort` and `toPort` values should not be defined.
   174  	IpProtocol pulumi.StringPtrInput
   175  	// The ID of the destination prefix list.
   176  	PrefixListId pulumi.StringPtrInput
   177  	// The destination security group that is referenced in the rule.
   178  	ReferencedSecurityGroupId pulumi.StringPtrInput
   179  	// The ID of the security group.
   180  	SecurityGroupId pulumi.StringPtrInput
   181  	// The ID of the security group rule.
   182  	SecurityGroupRuleId pulumi.StringPtrInput
   183  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   184  	Tags pulumi.StringMapInput
   185  	// A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   186  	//
   187  	// Deprecated: Please use `tags` instead.
   188  	TagsAll pulumi.StringMapInput
   189  	// The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
   190  	ToPort pulumi.IntPtrInput
   191  }
   192  
   193  func (SecurityGroupEgressRuleState) ElementType() reflect.Type {
   194  	return reflect.TypeOf((*securityGroupEgressRuleState)(nil)).Elem()
   195  }
   196  
   197  type securityGroupEgressRuleArgs struct {
   198  	// The destination IPv4 CIDR range.
   199  	CidrIpv4 *string `pulumi:"cidrIpv4"`
   200  	// The destination IPv6 CIDR range.
   201  	CidrIpv6 *string `pulumi:"cidrIpv6"`
   202  	// The security group rule description.
   203  	Description *string `pulumi:"description"`
   204  	// The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
   205  	FromPort *int `pulumi:"fromPort"`
   206  	// The IP protocol name or number. Use `-1` to specify all protocols. Note that if `ipProtocol` is set to `-1`, it translates to all protocols, all port ranges, and `fromPort` and `toPort` values should not be defined.
   207  	IpProtocol string `pulumi:"ipProtocol"`
   208  	// The ID of the destination prefix list.
   209  	PrefixListId *string `pulumi:"prefixListId"`
   210  	// The destination security group that is referenced in the rule.
   211  	ReferencedSecurityGroupId *string `pulumi:"referencedSecurityGroupId"`
   212  	// The ID of the security group.
   213  	SecurityGroupId string `pulumi:"securityGroupId"`
   214  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   215  	Tags map[string]string `pulumi:"tags"`
   216  	// The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
   217  	ToPort *int `pulumi:"toPort"`
   218  }
   219  
   220  // The set of arguments for constructing a SecurityGroupEgressRule resource.
   221  type SecurityGroupEgressRuleArgs struct {
   222  	// The destination IPv4 CIDR range.
   223  	CidrIpv4 pulumi.StringPtrInput
   224  	// The destination IPv6 CIDR range.
   225  	CidrIpv6 pulumi.StringPtrInput
   226  	// The security group rule description.
   227  	Description pulumi.StringPtrInput
   228  	// The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
   229  	FromPort pulumi.IntPtrInput
   230  	// The IP protocol name or number. Use `-1` to specify all protocols. Note that if `ipProtocol` is set to `-1`, it translates to all protocols, all port ranges, and `fromPort` and `toPort` values should not be defined.
   231  	IpProtocol pulumi.StringInput
   232  	// The ID of the destination prefix list.
   233  	PrefixListId pulumi.StringPtrInput
   234  	// The destination security group that is referenced in the rule.
   235  	ReferencedSecurityGroupId pulumi.StringPtrInput
   236  	// The ID of the security group.
   237  	SecurityGroupId pulumi.StringInput
   238  	// A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   239  	Tags pulumi.StringMapInput
   240  	// The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
   241  	ToPort pulumi.IntPtrInput
   242  }
   243  
   244  func (SecurityGroupEgressRuleArgs) ElementType() reflect.Type {
   245  	return reflect.TypeOf((*securityGroupEgressRuleArgs)(nil)).Elem()
   246  }
   247  
   248  type SecurityGroupEgressRuleInput interface {
   249  	pulumi.Input
   250  
   251  	ToSecurityGroupEgressRuleOutput() SecurityGroupEgressRuleOutput
   252  	ToSecurityGroupEgressRuleOutputWithContext(ctx context.Context) SecurityGroupEgressRuleOutput
   253  }
   254  
   255  func (*SecurityGroupEgressRule) ElementType() reflect.Type {
   256  	return reflect.TypeOf((**SecurityGroupEgressRule)(nil)).Elem()
   257  }
   258  
   259  func (i *SecurityGroupEgressRule) ToSecurityGroupEgressRuleOutput() SecurityGroupEgressRuleOutput {
   260  	return i.ToSecurityGroupEgressRuleOutputWithContext(context.Background())
   261  }
   262  
   263  func (i *SecurityGroupEgressRule) ToSecurityGroupEgressRuleOutputWithContext(ctx context.Context) SecurityGroupEgressRuleOutput {
   264  	return pulumi.ToOutputWithContext(ctx, i).(SecurityGroupEgressRuleOutput)
   265  }
   266  
   267  // SecurityGroupEgressRuleArrayInput is an input type that accepts SecurityGroupEgressRuleArray and SecurityGroupEgressRuleArrayOutput values.
   268  // You can construct a concrete instance of `SecurityGroupEgressRuleArrayInput` via:
   269  //
   270  //	SecurityGroupEgressRuleArray{ SecurityGroupEgressRuleArgs{...} }
   271  type SecurityGroupEgressRuleArrayInput interface {
   272  	pulumi.Input
   273  
   274  	ToSecurityGroupEgressRuleArrayOutput() SecurityGroupEgressRuleArrayOutput
   275  	ToSecurityGroupEgressRuleArrayOutputWithContext(context.Context) SecurityGroupEgressRuleArrayOutput
   276  }
   277  
   278  type SecurityGroupEgressRuleArray []SecurityGroupEgressRuleInput
   279  
   280  func (SecurityGroupEgressRuleArray) ElementType() reflect.Type {
   281  	return reflect.TypeOf((*[]*SecurityGroupEgressRule)(nil)).Elem()
   282  }
   283  
   284  func (i SecurityGroupEgressRuleArray) ToSecurityGroupEgressRuleArrayOutput() SecurityGroupEgressRuleArrayOutput {
   285  	return i.ToSecurityGroupEgressRuleArrayOutputWithContext(context.Background())
   286  }
   287  
   288  func (i SecurityGroupEgressRuleArray) ToSecurityGroupEgressRuleArrayOutputWithContext(ctx context.Context) SecurityGroupEgressRuleArrayOutput {
   289  	return pulumi.ToOutputWithContext(ctx, i).(SecurityGroupEgressRuleArrayOutput)
   290  }
   291  
   292  // SecurityGroupEgressRuleMapInput is an input type that accepts SecurityGroupEgressRuleMap and SecurityGroupEgressRuleMapOutput values.
   293  // You can construct a concrete instance of `SecurityGroupEgressRuleMapInput` via:
   294  //
   295  //	SecurityGroupEgressRuleMap{ "key": SecurityGroupEgressRuleArgs{...} }
   296  type SecurityGroupEgressRuleMapInput interface {
   297  	pulumi.Input
   298  
   299  	ToSecurityGroupEgressRuleMapOutput() SecurityGroupEgressRuleMapOutput
   300  	ToSecurityGroupEgressRuleMapOutputWithContext(context.Context) SecurityGroupEgressRuleMapOutput
   301  }
   302  
   303  type SecurityGroupEgressRuleMap map[string]SecurityGroupEgressRuleInput
   304  
   305  func (SecurityGroupEgressRuleMap) ElementType() reflect.Type {
   306  	return reflect.TypeOf((*map[string]*SecurityGroupEgressRule)(nil)).Elem()
   307  }
   308  
   309  func (i SecurityGroupEgressRuleMap) ToSecurityGroupEgressRuleMapOutput() SecurityGroupEgressRuleMapOutput {
   310  	return i.ToSecurityGroupEgressRuleMapOutputWithContext(context.Background())
   311  }
   312  
   313  func (i SecurityGroupEgressRuleMap) ToSecurityGroupEgressRuleMapOutputWithContext(ctx context.Context) SecurityGroupEgressRuleMapOutput {
   314  	return pulumi.ToOutputWithContext(ctx, i).(SecurityGroupEgressRuleMapOutput)
   315  }
   316  
   317  type SecurityGroupEgressRuleOutput struct{ *pulumi.OutputState }
   318  
   319  func (SecurityGroupEgressRuleOutput) ElementType() reflect.Type {
   320  	return reflect.TypeOf((**SecurityGroupEgressRule)(nil)).Elem()
   321  }
   322  
   323  func (o SecurityGroupEgressRuleOutput) ToSecurityGroupEgressRuleOutput() SecurityGroupEgressRuleOutput {
   324  	return o
   325  }
   326  
   327  func (o SecurityGroupEgressRuleOutput) ToSecurityGroupEgressRuleOutputWithContext(ctx context.Context) SecurityGroupEgressRuleOutput {
   328  	return o
   329  }
   330  
   331  // The Amazon Resource Name (ARN) of the security group rule.
   332  func (o SecurityGroupEgressRuleOutput) Arn() pulumi.StringOutput {
   333  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput)
   334  }
   335  
   336  // The destination IPv4 CIDR range.
   337  func (o SecurityGroupEgressRuleOutput) CidrIpv4() pulumi.StringPtrOutput {
   338  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.StringPtrOutput { return v.CidrIpv4 }).(pulumi.StringPtrOutput)
   339  }
   340  
   341  // The destination IPv6 CIDR range.
   342  func (o SecurityGroupEgressRuleOutput) CidrIpv6() pulumi.StringPtrOutput {
   343  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.StringPtrOutput { return v.CidrIpv6 }).(pulumi.StringPtrOutput)
   344  }
   345  
   346  // The security group rule description.
   347  func (o SecurityGroupEgressRuleOutput) Description() pulumi.StringPtrOutput {
   348  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput)
   349  }
   350  
   351  // The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.
   352  func (o SecurityGroupEgressRuleOutput) FromPort() pulumi.IntPtrOutput {
   353  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.IntPtrOutput { return v.FromPort }).(pulumi.IntPtrOutput)
   354  }
   355  
   356  // The IP protocol name or number. Use `-1` to specify all protocols. Note that if `ipProtocol` is set to `-1`, it translates to all protocols, all port ranges, and `fromPort` and `toPort` values should not be defined.
   357  func (o SecurityGroupEgressRuleOutput) IpProtocol() pulumi.StringOutput {
   358  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.StringOutput { return v.IpProtocol }).(pulumi.StringOutput)
   359  }
   360  
   361  // The ID of the destination prefix list.
   362  func (o SecurityGroupEgressRuleOutput) PrefixListId() pulumi.StringPtrOutput {
   363  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.StringPtrOutput { return v.PrefixListId }).(pulumi.StringPtrOutput)
   364  }
   365  
   366  // The destination security group that is referenced in the rule.
   367  func (o SecurityGroupEgressRuleOutput) ReferencedSecurityGroupId() pulumi.StringPtrOutput {
   368  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.StringPtrOutput { return v.ReferencedSecurityGroupId }).(pulumi.StringPtrOutput)
   369  }
   370  
   371  // The ID of the security group.
   372  func (o SecurityGroupEgressRuleOutput) SecurityGroupId() pulumi.StringOutput {
   373  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.StringOutput { return v.SecurityGroupId }).(pulumi.StringOutput)
   374  }
   375  
   376  // The ID of the security group rule.
   377  func (o SecurityGroupEgressRuleOutput) SecurityGroupRuleId() pulumi.StringOutput {
   378  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.StringOutput { return v.SecurityGroupRuleId }).(pulumi.StringOutput)
   379  }
   380  
   381  // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
   382  func (o SecurityGroupEgressRuleOutput) Tags() pulumi.StringMapOutput {
   383  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput)
   384  }
   385  
   386  // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
   387  //
   388  // Deprecated: Please use `tags` instead.
   389  func (o SecurityGroupEgressRuleOutput) TagsAll() pulumi.StringMapOutput {
   390  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput)
   391  }
   392  
   393  // The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.
   394  func (o SecurityGroupEgressRuleOutput) ToPort() pulumi.IntPtrOutput {
   395  	return o.ApplyT(func(v *SecurityGroupEgressRule) pulumi.IntPtrOutput { return v.ToPort }).(pulumi.IntPtrOutput)
   396  }
   397  
   398  type SecurityGroupEgressRuleArrayOutput struct{ *pulumi.OutputState }
   399  
   400  func (SecurityGroupEgressRuleArrayOutput) ElementType() reflect.Type {
   401  	return reflect.TypeOf((*[]*SecurityGroupEgressRule)(nil)).Elem()
   402  }
   403  
   404  func (o SecurityGroupEgressRuleArrayOutput) ToSecurityGroupEgressRuleArrayOutput() SecurityGroupEgressRuleArrayOutput {
   405  	return o
   406  }
   407  
   408  func (o SecurityGroupEgressRuleArrayOutput) ToSecurityGroupEgressRuleArrayOutputWithContext(ctx context.Context) SecurityGroupEgressRuleArrayOutput {
   409  	return o
   410  }
   411  
   412  func (o SecurityGroupEgressRuleArrayOutput) Index(i pulumi.IntInput) SecurityGroupEgressRuleOutput {
   413  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *SecurityGroupEgressRule {
   414  		return vs[0].([]*SecurityGroupEgressRule)[vs[1].(int)]
   415  	}).(SecurityGroupEgressRuleOutput)
   416  }
   417  
   418  type SecurityGroupEgressRuleMapOutput struct{ *pulumi.OutputState }
   419  
   420  func (SecurityGroupEgressRuleMapOutput) ElementType() reflect.Type {
   421  	return reflect.TypeOf((*map[string]*SecurityGroupEgressRule)(nil)).Elem()
   422  }
   423  
   424  func (o SecurityGroupEgressRuleMapOutput) ToSecurityGroupEgressRuleMapOutput() SecurityGroupEgressRuleMapOutput {
   425  	return o
   426  }
   427  
   428  func (o SecurityGroupEgressRuleMapOutput) ToSecurityGroupEgressRuleMapOutputWithContext(ctx context.Context) SecurityGroupEgressRuleMapOutput {
   429  	return o
   430  }
   431  
   432  func (o SecurityGroupEgressRuleMapOutput) MapIndex(k pulumi.StringInput) SecurityGroupEgressRuleOutput {
   433  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *SecurityGroupEgressRule {
   434  		return vs[0].(map[string]*SecurityGroupEgressRule)[vs[1].(string)]
   435  	}).(SecurityGroupEgressRuleOutput)
   436  }
   437  
   438  func init() {
   439  	pulumi.RegisterInputType(reflect.TypeOf((*SecurityGroupEgressRuleInput)(nil)).Elem(), &SecurityGroupEgressRule{})
   440  	pulumi.RegisterInputType(reflect.TypeOf((*SecurityGroupEgressRuleArrayInput)(nil)).Elem(), SecurityGroupEgressRuleArray{})
   441  	pulumi.RegisterInputType(reflect.TypeOf((*SecurityGroupEgressRuleMapInput)(nil)).Elem(), SecurityGroupEgressRuleMap{})
   442  	pulumi.RegisterOutputType(SecurityGroupEgressRuleOutput{})
   443  	pulumi.RegisterOutputType(SecurityGroupEgressRuleArrayOutput{})
   444  	pulumi.RegisterOutputType(SecurityGroupEgressRuleMapOutput{})
   445  }