github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/directconnect/gatewayAssociation.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 directconnect
     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  // Associates a Direct Connect Gateway with a VGW or transit gateway.
    16  //
    17  // To create a cross-account association, create an `directconnect.GatewayAssociationProposal` resource
    18  // in the AWS account that owns the VGW or transit gateway and then accept the proposal in the AWS account that owns the Direct Connect Gateway
    19  // by creating an `directconnect.GatewayAssociation` resource with the `proposalId` and `associatedGatewayOwnerAccountId` attributes set.
    20  //
    21  // ## Example Usage
    22  //
    23  // ### VPN Gateway Association
    24  //
    25  // <!--Start PulumiCodeChooser -->
    26  // ```go
    27  // package main
    28  //
    29  // import (
    30  //
    31  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect"
    32  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
    33  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    34  //
    35  // )
    36  //
    37  //	func main() {
    38  //		pulumi.Run(func(ctx *pulumi.Context) error {
    39  //			example, err := directconnect.NewGateway(ctx, "example", &directconnect.GatewayArgs{
    40  //				Name:          pulumi.String("example"),
    41  //				AmazonSideAsn: pulumi.String("64512"),
    42  //			})
    43  //			if err != nil {
    44  //				return err
    45  //			}
    46  //			exampleVpc, err := ec2.NewVpc(ctx, "example", &ec2.VpcArgs{
    47  //				CidrBlock: pulumi.String("10.255.255.0/28"),
    48  //			})
    49  //			if err != nil {
    50  //				return err
    51  //			}
    52  //			exampleVpnGateway, err := ec2.NewVpnGateway(ctx, "example", &ec2.VpnGatewayArgs{
    53  //				VpcId: exampleVpc.ID(),
    54  //			})
    55  //			if err != nil {
    56  //				return err
    57  //			}
    58  //			_, err = directconnect.NewGatewayAssociation(ctx, "example", &directconnect.GatewayAssociationArgs{
    59  //				DxGatewayId:         example.ID(),
    60  //				AssociatedGatewayId: exampleVpnGateway.ID(),
    61  //			})
    62  //			if err != nil {
    63  //				return err
    64  //			}
    65  //			return nil
    66  //		})
    67  //	}
    68  //
    69  // ```
    70  // <!--End PulumiCodeChooser -->
    71  //
    72  // ### Transit Gateway Association
    73  //
    74  // <!--Start PulumiCodeChooser -->
    75  // ```go
    76  // package main
    77  //
    78  // import (
    79  //
    80  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect"
    81  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2transitgateway"
    82  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    83  //
    84  // )
    85  //
    86  //	func main() {
    87  //		pulumi.Run(func(ctx *pulumi.Context) error {
    88  //			example, err := directconnect.NewGateway(ctx, "example", &directconnect.GatewayArgs{
    89  //				Name:          pulumi.String("example"),
    90  //				AmazonSideAsn: pulumi.String("64512"),
    91  //			})
    92  //			if err != nil {
    93  //				return err
    94  //			}
    95  //			exampleTransitGateway, err := ec2transitgateway.NewTransitGateway(ctx, "example", nil)
    96  //			if err != nil {
    97  //				return err
    98  //			}
    99  //			_, err = directconnect.NewGatewayAssociation(ctx, "example", &directconnect.GatewayAssociationArgs{
   100  //				DxGatewayId:         example.ID(),
   101  //				AssociatedGatewayId: exampleTransitGateway.ID(),
   102  //				AllowedPrefixes: pulumi.StringArray{
   103  //					pulumi.String("10.255.255.0/30"),
   104  //					pulumi.String("10.255.255.8/30"),
   105  //				},
   106  //			})
   107  //			if err != nil {
   108  //				return err
   109  //			}
   110  //			return nil
   111  //		})
   112  //	}
   113  //
   114  // ```
   115  // <!--End PulumiCodeChooser -->
   116  //
   117  // ### Allowed Prefixes
   118  //
   119  // <!--Start PulumiCodeChooser -->
   120  // ```go
   121  // package main
   122  //
   123  // import (
   124  //
   125  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect"
   126  //	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
   127  //	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
   128  //
   129  // )
   130  //
   131  //	func main() {
   132  //		pulumi.Run(func(ctx *pulumi.Context) error {
   133  //			example, err := directconnect.NewGateway(ctx, "example", &directconnect.GatewayArgs{
   134  //				Name:          pulumi.String("example"),
   135  //				AmazonSideAsn: pulumi.String("64512"),
   136  //			})
   137  //			if err != nil {
   138  //				return err
   139  //			}
   140  //			exampleVpc, err := ec2.NewVpc(ctx, "example", &ec2.VpcArgs{
   141  //				CidrBlock: pulumi.String("10.255.255.0/28"),
   142  //			})
   143  //			if err != nil {
   144  //				return err
   145  //			}
   146  //			exampleVpnGateway, err := ec2.NewVpnGateway(ctx, "example", &ec2.VpnGatewayArgs{
   147  //				VpcId: exampleVpc.ID(),
   148  //			})
   149  //			if err != nil {
   150  //				return err
   151  //			}
   152  //			_, err = directconnect.NewGatewayAssociation(ctx, "example", &directconnect.GatewayAssociationArgs{
   153  //				DxGatewayId:         example.ID(),
   154  //				AssociatedGatewayId: exampleVpnGateway.ID(),
   155  //				AllowedPrefixes: pulumi.StringArray{
   156  //					pulumi.String("210.52.109.0/24"),
   157  //					pulumi.String("175.45.176.0/22"),
   158  //				},
   159  //			})
   160  //			if err != nil {
   161  //				return err
   162  //			}
   163  //			return nil
   164  //		})
   165  //	}
   166  //
   167  // ```
   168  // <!--End PulumiCodeChooser -->
   169  //
   170  // ## Import
   171  //
   172  // Using `pulumi import`, import Direct Connect gateway associations using `dx_gateway_id` together with `associated_gateway_id`. For example:
   173  //
   174  // ```sh
   175  // $ pulumi import aws:directconnect/gatewayAssociation:GatewayAssociation example 345508c3-7215-4aef-9832-07c125d5bd0f/vgw-98765432
   176  // ```
   177  type GatewayAssociation struct {
   178  	pulumi.CustomResourceState
   179  
   180  	// VPC prefixes (CIDRs) to advertise to the Direct Connect gateway. Defaults to the CIDR block of the VPC associated with the Virtual Gateway. To enable drift detection, must be configured.
   181  	AllowedPrefixes pulumi.StringArrayOutput `pulumi:"allowedPrefixes"`
   182  	// The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
   183  	// Used for single account Direct Connect gateway associations.
   184  	AssociatedGatewayId pulumi.StringOutput `pulumi:"associatedGatewayId"`
   185  	// The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
   186  	// Used for cross-account Direct Connect gateway associations.
   187  	AssociatedGatewayOwnerAccountId pulumi.StringOutput `pulumi:"associatedGatewayOwnerAccountId"`
   188  	// The type of the associated gateway, `transitGateway` or `virtualPrivateGateway`.
   189  	AssociatedGatewayType pulumi.StringOutput `pulumi:"associatedGatewayType"`
   190  	// The ID of the Direct Connect gateway association.
   191  	DxGatewayAssociationId pulumi.StringOutput `pulumi:"dxGatewayAssociationId"`
   192  	// The ID of the Direct Connect gateway.
   193  	DxGatewayId pulumi.StringOutput `pulumi:"dxGatewayId"`
   194  	// The ID of the AWS account that owns the Direct Connect gateway.
   195  	DxGatewayOwnerAccountId pulumi.StringOutput `pulumi:"dxGatewayOwnerAccountId"`
   196  	// The ID of the Direct Connect gateway association proposal.
   197  	// Used for cross-account Direct Connect gateway associations.
   198  	ProposalId pulumi.StringPtrOutput `pulumi:"proposalId"`
   199  	// Deprecated: use 'associated_gateway_id' argument instead
   200  	VpnGatewayId pulumi.StringPtrOutput `pulumi:"vpnGatewayId"`
   201  }
   202  
   203  // NewGatewayAssociation registers a new resource with the given unique name, arguments, and options.
   204  func NewGatewayAssociation(ctx *pulumi.Context,
   205  	name string, args *GatewayAssociationArgs, opts ...pulumi.ResourceOption) (*GatewayAssociation, error) {
   206  	if args == nil {
   207  		return nil, errors.New("missing one or more required arguments")
   208  	}
   209  
   210  	if args.DxGatewayId == nil {
   211  		return nil, errors.New("invalid value for required argument 'DxGatewayId'")
   212  	}
   213  	opts = internal.PkgResourceDefaultOpts(opts)
   214  	var resource GatewayAssociation
   215  	err := ctx.RegisterResource("aws:directconnect/gatewayAssociation:GatewayAssociation", name, args, &resource, opts...)
   216  	if err != nil {
   217  		return nil, err
   218  	}
   219  	return &resource, nil
   220  }
   221  
   222  // GetGatewayAssociation gets an existing GatewayAssociation resource's state with the given name, ID, and optional
   223  // state properties that are used to uniquely qualify the lookup (nil if not required).
   224  func GetGatewayAssociation(ctx *pulumi.Context,
   225  	name string, id pulumi.IDInput, state *GatewayAssociationState, opts ...pulumi.ResourceOption) (*GatewayAssociation, error) {
   226  	var resource GatewayAssociation
   227  	err := ctx.ReadResource("aws:directconnect/gatewayAssociation:GatewayAssociation", name, id, state, &resource, opts...)
   228  	if err != nil {
   229  		return nil, err
   230  	}
   231  	return &resource, nil
   232  }
   233  
   234  // Input properties used for looking up and filtering GatewayAssociation resources.
   235  type gatewayAssociationState struct {
   236  	// VPC prefixes (CIDRs) to advertise to the Direct Connect gateway. Defaults to the CIDR block of the VPC associated with the Virtual Gateway. To enable drift detection, must be configured.
   237  	AllowedPrefixes []string `pulumi:"allowedPrefixes"`
   238  	// The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
   239  	// Used for single account Direct Connect gateway associations.
   240  	AssociatedGatewayId *string `pulumi:"associatedGatewayId"`
   241  	// The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
   242  	// Used for cross-account Direct Connect gateway associations.
   243  	AssociatedGatewayOwnerAccountId *string `pulumi:"associatedGatewayOwnerAccountId"`
   244  	// The type of the associated gateway, `transitGateway` or `virtualPrivateGateway`.
   245  	AssociatedGatewayType *string `pulumi:"associatedGatewayType"`
   246  	// The ID of the Direct Connect gateway association.
   247  	DxGatewayAssociationId *string `pulumi:"dxGatewayAssociationId"`
   248  	// The ID of the Direct Connect gateway.
   249  	DxGatewayId *string `pulumi:"dxGatewayId"`
   250  	// The ID of the AWS account that owns the Direct Connect gateway.
   251  	DxGatewayOwnerAccountId *string `pulumi:"dxGatewayOwnerAccountId"`
   252  	// The ID of the Direct Connect gateway association proposal.
   253  	// Used for cross-account Direct Connect gateway associations.
   254  	ProposalId *string `pulumi:"proposalId"`
   255  	// Deprecated: use 'associated_gateway_id' argument instead
   256  	VpnGatewayId *string `pulumi:"vpnGatewayId"`
   257  }
   258  
   259  type GatewayAssociationState struct {
   260  	// VPC prefixes (CIDRs) to advertise to the Direct Connect gateway. Defaults to the CIDR block of the VPC associated with the Virtual Gateway. To enable drift detection, must be configured.
   261  	AllowedPrefixes pulumi.StringArrayInput
   262  	// The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
   263  	// Used for single account Direct Connect gateway associations.
   264  	AssociatedGatewayId pulumi.StringPtrInput
   265  	// The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
   266  	// Used for cross-account Direct Connect gateway associations.
   267  	AssociatedGatewayOwnerAccountId pulumi.StringPtrInput
   268  	// The type of the associated gateway, `transitGateway` or `virtualPrivateGateway`.
   269  	AssociatedGatewayType pulumi.StringPtrInput
   270  	// The ID of the Direct Connect gateway association.
   271  	DxGatewayAssociationId pulumi.StringPtrInput
   272  	// The ID of the Direct Connect gateway.
   273  	DxGatewayId pulumi.StringPtrInput
   274  	// The ID of the AWS account that owns the Direct Connect gateway.
   275  	DxGatewayOwnerAccountId pulumi.StringPtrInput
   276  	// The ID of the Direct Connect gateway association proposal.
   277  	// Used for cross-account Direct Connect gateway associations.
   278  	ProposalId pulumi.StringPtrInput
   279  	// Deprecated: use 'associated_gateway_id' argument instead
   280  	VpnGatewayId pulumi.StringPtrInput
   281  }
   282  
   283  func (GatewayAssociationState) ElementType() reflect.Type {
   284  	return reflect.TypeOf((*gatewayAssociationState)(nil)).Elem()
   285  }
   286  
   287  type gatewayAssociationArgs struct {
   288  	// VPC prefixes (CIDRs) to advertise to the Direct Connect gateway. Defaults to the CIDR block of the VPC associated with the Virtual Gateway. To enable drift detection, must be configured.
   289  	AllowedPrefixes []string `pulumi:"allowedPrefixes"`
   290  	// The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
   291  	// Used for single account Direct Connect gateway associations.
   292  	AssociatedGatewayId *string `pulumi:"associatedGatewayId"`
   293  	// The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
   294  	// Used for cross-account Direct Connect gateway associations.
   295  	AssociatedGatewayOwnerAccountId *string `pulumi:"associatedGatewayOwnerAccountId"`
   296  	// The ID of the Direct Connect gateway.
   297  	DxGatewayId string `pulumi:"dxGatewayId"`
   298  	// The ID of the Direct Connect gateway association proposal.
   299  	// Used for cross-account Direct Connect gateway associations.
   300  	ProposalId *string `pulumi:"proposalId"`
   301  	// Deprecated: use 'associated_gateway_id' argument instead
   302  	VpnGatewayId *string `pulumi:"vpnGatewayId"`
   303  }
   304  
   305  // The set of arguments for constructing a GatewayAssociation resource.
   306  type GatewayAssociationArgs struct {
   307  	// VPC prefixes (CIDRs) to advertise to the Direct Connect gateway. Defaults to the CIDR block of the VPC associated with the Virtual Gateway. To enable drift detection, must be configured.
   308  	AllowedPrefixes pulumi.StringArrayInput
   309  	// The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
   310  	// Used for single account Direct Connect gateway associations.
   311  	AssociatedGatewayId pulumi.StringPtrInput
   312  	// The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
   313  	// Used for cross-account Direct Connect gateway associations.
   314  	AssociatedGatewayOwnerAccountId pulumi.StringPtrInput
   315  	// The ID of the Direct Connect gateway.
   316  	DxGatewayId pulumi.StringInput
   317  	// The ID of the Direct Connect gateway association proposal.
   318  	// Used for cross-account Direct Connect gateway associations.
   319  	ProposalId pulumi.StringPtrInput
   320  	// Deprecated: use 'associated_gateway_id' argument instead
   321  	VpnGatewayId pulumi.StringPtrInput
   322  }
   323  
   324  func (GatewayAssociationArgs) ElementType() reflect.Type {
   325  	return reflect.TypeOf((*gatewayAssociationArgs)(nil)).Elem()
   326  }
   327  
   328  type GatewayAssociationInput interface {
   329  	pulumi.Input
   330  
   331  	ToGatewayAssociationOutput() GatewayAssociationOutput
   332  	ToGatewayAssociationOutputWithContext(ctx context.Context) GatewayAssociationOutput
   333  }
   334  
   335  func (*GatewayAssociation) ElementType() reflect.Type {
   336  	return reflect.TypeOf((**GatewayAssociation)(nil)).Elem()
   337  }
   338  
   339  func (i *GatewayAssociation) ToGatewayAssociationOutput() GatewayAssociationOutput {
   340  	return i.ToGatewayAssociationOutputWithContext(context.Background())
   341  }
   342  
   343  func (i *GatewayAssociation) ToGatewayAssociationOutputWithContext(ctx context.Context) GatewayAssociationOutput {
   344  	return pulumi.ToOutputWithContext(ctx, i).(GatewayAssociationOutput)
   345  }
   346  
   347  // GatewayAssociationArrayInput is an input type that accepts GatewayAssociationArray and GatewayAssociationArrayOutput values.
   348  // You can construct a concrete instance of `GatewayAssociationArrayInput` via:
   349  //
   350  //	GatewayAssociationArray{ GatewayAssociationArgs{...} }
   351  type GatewayAssociationArrayInput interface {
   352  	pulumi.Input
   353  
   354  	ToGatewayAssociationArrayOutput() GatewayAssociationArrayOutput
   355  	ToGatewayAssociationArrayOutputWithContext(context.Context) GatewayAssociationArrayOutput
   356  }
   357  
   358  type GatewayAssociationArray []GatewayAssociationInput
   359  
   360  func (GatewayAssociationArray) ElementType() reflect.Type {
   361  	return reflect.TypeOf((*[]*GatewayAssociation)(nil)).Elem()
   362  }
   363  
   364  func (i GatewayAssociationArray) ToGatewayAssociationArrayOutput() GatewayAssociationArrayOutput {
   365  	return i.ToGatewayAssociationArrayOutputWithContext(context.Background())
   366  }
   367  
   368  func (i GatewayAssociationArray) ToGatewayAssociationArrayOutputWithContext(ctx context.Context) GatewayAssociationArrayOutput {
   369  	return pulumi.ToOutputWithContext(ctx, i).(GatewayAssociationArrayOutput)
   370  }
   371  
   372  // GatewayAssociationMapInput is an input type that accepts GatewayAssociationMap and GatewayAssociationMapOutput values.
   373  // You can construct a concrete instance of `GatewayAssociationMapInput` via:
   374  //
   375  //	GatewayAssociationMap{ "key": GatewayAssociationArgs{...} }
   376  type GatewayAssociationMapInput interface {
   377  	pulumi.Input
   378  
   379  	ToGatewayAssociationMapOutput() GatewayAssociationMapOutput
   380  	ToGatewayAssociationMapOutputWithContext(context.Context) GatewayAssociationMapOutput
   381  }
   382  
   383  type GatewayAssociationMap map[string]GatewayAssociationInput
   384  
   385  func (GatewayAssociationMap) ElementType() reflect.Type {
   386  	return reflect.TypeOf((*map[string]*GatewayAssociation)(nil)).Elem()
   387  }
   388  
   389  func (i GatewayAssociationMap) ToGatewayAssociationMapOutput() GatewayAssociationMapOutput {
   390  	return i.ToGatewayAssociationMapOutputWithContext(context.Background())
   391  }
   392  
   393  func (i GatewayAssociationMap) ToGatewayAssociationMapOutputWithContext(ctx context.Context) GatewayAssociationMapOutput {
   394  	return pulumi.ToOutputWithContext(ctx, i).(GatewayAssociationMapOutput)
   395  }
   396  
   397  type GatewayAssociationOutput struct{ *pulumi.OutputState }
   398  
   399  func (GatewayAssociationOutput) ElementType() reflect.Type {
   400  	return reflect.TypeOf((**GatewayAssociation)(nil)).Elem()
   401  }
   402  
   403  func (o GatewayAssociationOutput) ToGatewayAssociationOutput() GatewayAssociationOutput {
   404  	return o
   405  }
   406  
   407  func (o GatewayAssociationOutput) ToGatewayAssociationOutputWithContext(ctx context.Context) GatewayAssociationOutput {
   408  	return o
   409  }
   410  
   411  // VPC prefixes (CIDRs) to advertise to the Direct Connect gateway. Defaults to the CIDR block of the VPC associated with the Virtual Gateway. To enable drift detection, must be configured.
   412  func (o GatewayAssociationOutput) AllowedPrefixes() pulumi.StringArrayOutput {
   413  	return o.ApplyT(func(v *GatewayAssociation) pulumi.StringArrayOutput { return v.AllowedPrefixes }).(pulumi.StringArrayOutput)
   414  }
   415  
   416  // The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
   417  // Used for single account Direct Connect gateway associations.
   418  func (o GatewayAssociationOutput) AssociatedGatewayId() pulumi.StringOutput {
   419  	return o.ApplyT(func(v *GatewayAssociation) pulumi.StringOutput { return v.AssociatedGatewayId }).(pulumi.StringOutput)
   420  }
   421  
   422  // The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
   423  // Used for cross-account Direct Connect gateway associations.
   424  func (o GatewayAssociationOutput) AssociatedGatewayOwnerAccountId() pulumi.StringOutput {
   425  	return o.ApplyT(func(v *GatewayAssociation) pulumi.StringOutput { return v.AssociatedGatewayOwnerAccountId }).(pulumi.StringOutput)
   426  }
   427  
   428  // The type of the associated gateway, `transitGateway` or `virtualPrivateGateway`.
   429  func (o GatewayAssociationOutput) AssociatedGatewayType() pulumi.StringOutput {
   430  	return o.ApplyT(func(v *GatewayAssociation) pulumi.StringOutput { return v.AssociatedGatewayType }).(pulumi.StringOutput)
   431  }
   432  
   433  // The ID of the Direct Connect gateway association.
   434  func (o GatewayAssociationOutput) DxGatewayAssociationId() pulumi.StringOutput {
   435  	return o.ApplyT(func(v *GatewayAssociation) pulumi.StringOutput { return v.DxGatewayAssociationId }).(pulumi.StringOutput)
   436  }
   437  
   438  // The ID of the Direct Connect gateway.
   439  func (o GatewayAssociationOutput) DxGatewayId() pulumi.StringOutput {
   440  	return o.ApplyT(func(v *GatewayAssociation) pulumi.StringOutput { return v.DxGatewayId }).(pulumi.StringOutput)
   441  }
   442  
   443  // The ID of the AWS account that owns the Direct Connect gateway.
   444  func (o GatewayAssociationOutput) DxGatewayOwnerAccountId() pulumi.StringOutput {
   445  	return o.ApplyT(func(v *GatewayAssociation) pulumi.StringOutput { return v.DxGatewayOwnerAccountId }).(pulumi.StringOutput)
   446  }
   447  
   448  // The ID of the Direct Connect gateway association proposal.
   449  // Used for cross-account Direct Connect gateway associations.
   450  func (o GatewayAssociationOutput) ProposalId() pulumi.StringPtrOutput {
   451  	return o.ApplyT(func(v *GatewayAssociation) pulumi.StringPtrOutput { return v.ProposalId }).(pulumi.StringPtrOutput)
   452  }
   453  
   454  // Deprecated: use 'associated_gateway_id' argument instead
   455  func (o GatewayAssociationOutput) VpnGatewayId() pulumi.StringPtrOutput {
   456  	return o.ApplyT(func(v *GatewayAssociation) pulumi.StringPtrOutput { return v.VpnGatewayId }).(pulumi.StringPtrOutput)
   457  }
   458  
   459  type GatewayAssociationArrayOutput struct{ *pulumi.OutputState }
   460  
   461  func (GatewayAssociationArrayOutput) ElementType() reflect.Type {
   462  	return reflect.TypeOf((*[]*GatewayAssociation)(nil)).Elem()
   463  }
   464  
   465  func (o GatewayAssociationArrayOutput) ToGatewayAssociationArrayOutput() GatewayAssociationArrayOutput {
   466  	return o
   467  }
   468  
   469  func (o GatewayAssociationArrayOutput) ToGatewayAssociationArrayOutputWithContext(ctx context.Context) GatewayAssociationArrayOutput {
   470  	return o
   471  }
   472  
   473  func (o GatewayAssociationArrayOutput) Index(i pulumi.IntInput) GatewayAssociationOutput {
   474  	return pulumi.All(o, i).ApplyT(func(vs []interface{}) *GatewayAssociation {
   475  		return vs[0].([]*GatewayAssociation)[vs[1].(int)]
   476  	}).(GatewayAssociationOutput)
   477  }
   478  
   479  type GatewayAssociationMapOutput struct{ *pulumi.OutputState }
   480  
   481  func (GatewayAssociationMapOutput) ElementType() reflect.Type {
   482  	return reflect.TypeOf((*map[string]*GatewayAssociation)(nil)).Elem()
   483  }
   484  
   485  func (o GatewayAssociationMapOutput) ToGatewayAssociationMapOutput() GatewayAssociationMapOutput {
   486  	return o
   487  }
   488  
   489  func (o GatewayAssociationMapOutput) ToGatewayAssociationMapOutputWithContext(ctx context.Context) GatewayAssociationMapOutput {
   490  	return o
   491  }
   492  
   493  func (o GatewayAssociationMapOutput) MapIndex(k pulumi.StringInput) GatewayAssociationOutput {
   494  	return pulumi.All(o, k).ApplyT(func(vs []interface{}) *GatewayAssociation {
   495  		return vs[0].(map[string]*GatewayAssociation)[vs[1].(string)]
   496  	}).(GatewayAssociationOutput)
   497  }
   498  
   499  func init() {
   500  	pulumi.RegisterInputType(reflect.TypeOf((*GatewayAssociationInput)(nil)).Elem(), &GatewayAssociation{})
   501  	pulumi.RegisterInputType(reflect.TypeOf((*GatewayAssociationArrayInput)(nil)).Elem(), GatewayAssociationArray{})
   502  	pulumi.RegisterInputType(reflect.TypeOf((*GatewayAssociationMapInput)(nil)).Elem(), GatewayAssociationMap{})
   503  	pulumi.RegisterOutputType(GatewayAssociationOutput{})
   504  	pulumi.RegisterOutputType(GatewayAssociationArrayOutput{})
   505  	pulumi.RegisterOutputType(GatewayAssociationMapOutput{})
   506  }