aws.directconnect.GatewayAssociationProposal
Explore with Pulumi AI
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.
Constructor 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:
- Associated
Gateway stringId - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- Dx
Gateway stringId - Direct Connect Gateway identifier.
- Dx
Gateway stringOwner Account Id - AWS Account identifier of the Direct Connect Gateway's owner.
- Allowed
Prefixes 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.
- Associated
Gateway stringId - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- Dx
Gateway stringId - Direct Connect Gateway identifier.
- Dx
Gateway stringOwner Account Id - AWS Account identifier of the Direct Connect Gateway's owner.
- Allowed
Prefixes []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 StringId - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- dx
Gateway StringId - Direct Connect Gateway identifier.
- dx
Gateway StringOwner Account Id - AWS Account identifier of the Direct Connect Gateway's owner.
- allowed
Prefixes 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.
- associated
Gateway stringId - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- dx
Gateway stringId - Direct Connect Gateway identifier.
- dx
Gateway stringOwner Account Id - AWS Account identifier of the Direct Connect Gateway's owner.
- allowed
Prefixes 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_ strid - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- dx_
gateway_ strid - Direct Connect Gateway identifier.
- dx_
gateway_ strowner_ account_ id - 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 StringId - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- dx
Gateway StringId - Direct Connect Gateway identifier.
- dx
Gateway StringOwner Account Id - AWS Account identifier of the Direct Connect Gateway's owner.
- allowed
Prefixes 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:
- Associated
Gateway stringOwner Account Id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- Associated
Gateway stringType - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - Id string
- The provider-assigned unique ID for this managed resource.
- Associated
Gateway stringOwner Account Id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- Associated
Gateway stringType - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - Id string
- The provider-assigned unique ID for this managed resource.
- associated
Gateway StringOwner Account Id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated
Gateway StringType - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - id String
- The provider-assigned unique ID for this managed resource.
- associated
Gateway stringOwner Account Id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated
Gateway stringType - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - id string
- The provider-assigned unique ID for this managed resource.
- associated_
gateway_ strowner_ account_ id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated_
gateway_ strtype - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - id str
- The provider-assigned unique ID for this managed resource.
- associated
Gateway StringOwner Account Id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated
Gateway StringType - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - 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.
- Allowed
Prefixes 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.
- Associated
Gateway stringId - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- Associated
Gateway stringOwner Account Id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- Associated
Gateway stringType - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - Dx
Gateway stringId - Direct Connect Gateway identifier.
- Dx
Gateway stringOwner Account Id - AWS Account identifier of the Direct Connect Gateway's owner.
- Allowed
Prefixes []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 stringId - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- Associated
Gateway stringOwner Account Id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- Associated
Gateway stringType - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - Dx
Gateway stringId - Direct Connect Gateway identifier.
- Dx
Gateway stringOwner Account Id - AWS Account identifier of the Direct Connect Gateway's owner.
- allowed
Prefixes 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.
- associated
Gateway StringId - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated
Gateway StringOwner Account Id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated
Gateway StringType - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - dx
Gateway StringId - Direct Connect Gateway identifier.
- dx
Gateway StringOwner Account Id - AWS Account identifier of the Direct Connect Gateway's owner.
- allowed
Prefixes 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 stringId - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated
Gateway stringOwner Account Id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated
Gateway stringType - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - dx
Gateway stringId - Direct Connect Gateway identifier.
- dx
Gateway stringOwner Account Id - 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_ strid - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated_
gateway_ strowner_ account_ id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated_
gateway_ strtype - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - dx_
gateway_ strid - Direct Connect Gateway identifier.
- dx_
gateway_ strowner_ account_ id - AWS Account identifier of the Direct Connect Gateway's owner.
- allowed
Prefixes 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.
- associated
Gateway StringId - The ID of the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated
Gateway StringOwner Account Id - The ID of the AWS account that owns the VGW or transit gateway with which to associate the Direct Connect gateway.
- associated
Gateway StringType - The type of the associated gateway,
transitGateway
orvirtualPrivateGateway
. - dx
Gateway StringId - Direct Connect Gateway identifier.
- dx
Gateway StringOwner Account Id - 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.