1. Packages
  2. AWS Classic
  3. API Docs
  4. directconnect
  5. GatewayAssociationProposal

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

aws.directconnect.GatewayAssociationProposal

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi

    Manages a Direct Connect Gateway Association Proposal, typically for enabling cross-account associations. For single account associations, see the aws.directconnect.GatewayAssociation resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.directconnect.GatewayAssociationProposal("example", {
        dxGatewayId: exampleAwsDxGateway.id,
        dxGatewayOwnerAccountId: exampleAwsDxGateway.ownerAccountId,
        associatedGatewayId: exampleAwsVpnGateway.id,
    });
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.directconnect.GatewayAssociationProposal("example",
        dx_gateway_id=example_aws_dx_gateway["id"],
        dx_gateway_owner_account_id=example_aws_dx_gateway["ownerAccountId"],
        associated_gateway_id=example_aws_vpn_gateway["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := directconnect.NewGatewayAssociationProposal(ctx, "example", &directconnect.GatewayAssociationProposalArgs{
    			DxGatewayId:             pulumi.Any(exampleAwsDxGateway.Id),
    			DxGatewayOwnerAccountId: pulumi.Any(exampleAwsDxGateway.OwnerAccountId),
    			AssociatedGatewayId:     pulumi.Any(exampleAwsVpnGateway.Id),
    		})
    		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.DirectConnect.GatewayAssociationProposal("example", new()
        {
            DxGatewayId = exampleAwsDxGateway.Id,
            DxGatewayOwnerAccountId = exampleAwsDxGateway.OwnerAccountId,
            AssociatedGatewayId = exampleAwsVpnGateway.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.directconnect.GatewayAssociationProposal;
    import com.pulumi.aws.directconnect.GatewayAssociationProposalArgs;
    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 GatewayAssociationProposal("example", GatewayAssociationProposalArgs.builder()
                .dxGatewayId(exampleAwsDxGateway.id())
                .dxGatewayOwnerAccountId(exampleAwsDxGateway.ownerAccountId())
                .associatedGatewayId(exampleAwsVpnGateway.id())
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:directconnect:GatewayAssociationProposal
        properties:
          dxGatewayId: ${exampleAwsDxGateway.id}
          dxGatewayOwnerAccountId: ${exampleAwsDxGateway.ownerAccountId}
          associatedGatewayId: ${exampleAwsVpnGateway.id}
    

    Create GatewayAssociationProposal Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new GatewayAssociationProposal(name: string, args: GatewayAssociationProposalArgs, opts?: CustomResourceOptions);
    @overload
    def GatewayAssociationProposal(resource_name: str,
                                   args: GatewayAssociationProposalArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def GatewayAssociationProposal(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   associated_gateway_id: Optional[str] = None,
                                   dx_gateway_id: Optional[str] = None,
                                   dx_gateway_owner_account_id: Optional[str] = None,
                                   allowed_prefixes: Optional[Sequence[str]] = None)
    func NewGatewayAssociationProposal(ctx *Context, name string, args GatewayAssociationProposalArgs, opts ...ResourceOption) (*GatewayAssociationProposal, error)
    public GatewayAssociationProposal(string name, GatewayAssociationProposalArgs args, CustomResourceOptions? opts = null)
    public GatewayAssociationProposal(String name, GatewayAssociationProposalArgs args)
    public GatewayAssociationProposal(String name, GatewayAssociationProposalArgs args, CustomResourceOptions options)
    
    type: aws:directconnect:GatewayAssociationProposal
    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 GatewayAssociationProposalArgs
    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 GatewayAssociationProposalArgs
    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 GatewayAssociationProposalArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args GatewayAssociationProposalArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args GatewayAssociationProposalArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var gatewayAssociationProposalResource = new Aws.DirectConnect.GatewayAssociationProposal("gatewayAssociationProposalResource", new()
    {
        AssociatedGatewayId = "string",
        DxGatewayId = "string",
        DxGatewayOwnerAccountId = "string",
        AllowedPrefixes = new[]
        {
            "string",
        },
    });
    
    example, err := directconnect.NewGatewayAssociationProposal(ctx, "gatewayAssociationProposalResource", &directconnect.GatewayAssociationProposalArgs{
    	AssociatedGatewayId:     pulumi.String("string"),
    	DxGatewayId:             pulumi.String("string"),
    	DxGatewayOwnerAccountId: pulumi.String("string"),
    	AllowedPrefixes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var gatewayAssociationProposalResource = new GatewayAssociationProposal("gatewayAssociationProposalResource", GatewayAssociationProposalArgs.builder()
        .associatedGatewayId("string")
        .dxGatewayId("string")
        .dxGatewayOwnerAccountId("string")
        .allowedPrefixes("string")
        .build());
    
    gateway_association_proposal_resource = aws.directconnect.GatewayAssociationProposal("gatewayAssociationProposalResource",
        associated_gateway_id="string",
        dx_gateway_id="string",
        dx_gateway_owner_account_id="string",
        allowed_prefixes=["string"])
    
    const gatewayAssociationProposalResource = new aws.directconnect.GatewayAssociationProposal("gatewayAssociationProposalResource", {
        associatedGatewayId: "string",
        dxGatewayId: "string",
        dxGatewayOwnerAccountId: "string",
        allowedPrefixes: ["string"],
    });
    
    type: aws:directconnect:GatewayAssociationProposal
    properties:
        allowedPrefixes:
            - string
        associatedGatewayId: string
        dxGatewayId: string
        dxGatewayOwnerAccountId: string
    

    GatewayAssociationProposal Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The GatewayAssociationProposal resource accepts the following input properties:

    AssociatedGatewayId string
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    DxGatewayId string
    Direct Connect Gateway identifier.
    DxGatewayOwnerAccountId string
    AWS Account identifier of the Direct Connect Gateway's owner.
    AllowedPrefixes List<string>
    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.
    AssociatedGatewayId string
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    DxGatewayId string
    Direct Connect Gateway identifier.
    DxGatewayOwnerAccountId string
    AWS Account identifier of the Direct Connect Gateway's owner.
    AllowedPrefixes []string
    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.
    associatedGatewayId String
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    dxGatewayId String
    Direct Connect Gateway identifier.
    dxGatewayOwnerAccountId String
    AWS Account identifier of the Direct Connect Gateway's owner.
    allowedPrefixes List<String>
    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.
    associatedGatewayId string
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    dxGatewayId string
    Direct Connect Gateway identifier.
    dxGatewayOwnerAccountId string
    AWS Account identifier of the Direct Connect Gateway's owner.
    allowedPrefixes string[]
    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.
    associated_gateway_id str
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    dx_gateway_id str
    Direct Connect Gateway identifier.
    dx_gateway_owner_account_id str
    AWS Account identifier of the Direct Connect Gateway's owner.
    allowed_prefixes Sequence[str]
    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.
    associatedGatewayId String
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    dxGatewayId String
    Direct Connect Gateway identifier.
    dxGatewayOwnerAccountId String
    AWS Account identifier of the Direct Connect Gateway's owner.
    allowedPrefixes List<String>
    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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the GatewayAssociationProposal resource produces the following output properties:

    AssociatedGatewayOwnerAccountId string
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    AssociatedGatewayType string
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    AssociatedGatewayOwnerAccountId string
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    AssociatedGatewayType string
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    Id string
    The provider-assigned unique ID for this managed resource.
    associatedGatewayOwnerAccountId String
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    associatedGatewayType String
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    id String
    The provider-assigned unique ID for this managed resource.
    associatedGatewayOwnerAccountId string
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    associatedGatewayType string
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    id string
    The provider-assigned unique ID for this managed resource.
    associated_gateway_owner_account_id str
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    associated_gateway_type str
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    id str
    The provider-assigned unique ID for this managed resource.
    associatedGatewayOwnerAccountId String
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    associatedGatewayType String
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing GatewayAssociationProposal Resource

    Get an existing GatewayAssociationProposal 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?: GatewayAssociationProposalState, opts?: CustomResourceOptions): GatewayAssociationProposal
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allowed_prefixes: Optional[Sequence[str]] = None,
            associated_gateway_id: Optional[str] = None,
            associated_gateway_owner_account_id: Optional[str] = None,
            associated_gateway_type: Optional[str] = None,
            dx_gateway_id: Optional[str] = None,
            dx_gateway_owner_account_id: Optional[str] = None) -> GatewayAssociationProposal
    func GetGatewayAssociationProposal(ctx *Context, name string, id IDInput, state *GatewayAssociationProposalState, opts ...ResourceOption) (*GatewayAssociationProposal, error)
    public static GatewayAssociationProposal Get(string name, Input<string> id, GatewayAssociationProposalState? state, CustomResourceOptions? opts = null)
    public static GatewayAssociationProposal get(String name, Output<String> id, GatewayAssociationProposalState 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:
    AllowedPrefixes List<string>
    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.
    AssociatedGatewayId string
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    AssociatedGatewayOwnerAccountId string
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    AssociatedGatewayType string
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    DxGatewayId string
    Direct Connect Gateway identifier.
    DxGatewayOwnerAccountId string
    AWS Account identifier of the Direct Connect Gateway's owner.
    AllowedPrefixes []string
    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.
    AssociatedGatewayId string
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    AssociatedGatewayOwnerAccountId string
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    AssociatedGatewayType string
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    DxGatewayId string
    Direct Connect Gateway identifier.
    DxGatewayOwnerAccountId string
    AWS Account identifier of the Direct Connect Gateway's owner.
    allowedPrefixes List<String>
    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.
    associatedGatewayId String
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    associatedGatewayOwnerAccountId String
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    associatedGatewayType String
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    dxGatewayId String
    Direct Connect Gateway identifier.
    dxGatewayOwnerAccountId String
    AWS Account identifier of the Direct Connect Gateway's owner.
    allowedPrefixes string[]
    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.
    associatedGatewayId string
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    associatedGatewayOwnerAccountId string
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    associatedGatewayType string
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    dxGatewayId string
    Direct Connect Gateway identifier.
    dxGatewayOwnerAccountId string
    AWS Account identifier of the Direct Connect Gateway's owner.
    allowed_prefixes Sequence[str]
    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.
    associated_gateway_id str
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    associated_gateway_owner_account_id str
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    associated_gateway_type str
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    dx_gateway_id str
    Direct Connect Gateway identifier.
    dx_gateway_owner_account_id str
    AWS Account identifier of the Direct Connect Gateway's owner.
    allowedPrefixes List<String>
    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.
    associatedGatewayId String
    The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
    associatedGatewayOwnerAccountId String
    The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
    associatedGatewayType String
    The type of the associated gateway, transitGateway or virtualPrivateGateway.
    dxGatewayId String
    Direct Connect Gateway identifier.
    dxGatewayOwnerAccountId String
    AWS Account identifier of the Direct Connect Gateway's owner.

    Import

    Using a proposal ID, Direct Connect Gateway ID and associated gateway ID separated by /:

    With pulumi import, import Direct Connect Gateway Association Proposals using either a proposal ID or proposal ID, Direct Connect Gateway ID and associated gateway ID separated by /. For example:

    Using a proposal ID:

    $ pulumi import aws:directconnect/gatewayAssociationProposal:GatewayAssociationProposal example ac90e981-b718-4364-872d-65478c84fafe
    

    Using a proposal ID, Direct Connect Gateway ID and associated gateway ID separated by /:

    $ pulumi import aws:directconnect/gatewayAssociationProposal:GatewayAssociationProposal example ac90e981-b718-4364-872d-65478c84fafe/abcd1234-dcba-5678-be23-cdef9876ab45/vgw-12345678
    

    The latter case is useful when a previous proposal has been accepted and deleted by AWS. The aws_dx_gateway_association_proposal resource will then represent a pseudo-proposal for the same Direct Connect Gateway and associated gateway. If no previous proposal is available, use a tool like uuidgen to generate a new random pseudo-proposal ID.

    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

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.40.0 published on Wednesday, Jun 12, 2024 by Pulumi