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

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

AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi

aws.directconnect.HostedTransitVirtualInterfaceAcceptor

Explore with Pulumi AI

aws logo

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

AWS Classic v6.27.0 published on Monday, Mar 18, 2024 by Pulumi

    Provides a resource to manage the accepter’s side of a Direct Connect hosted transit virtual interface. This resource accepts ownership of a transit virtual interface created by another AWS account.

    NOTE: AWS allows a Direct Connect hosted transit virtual interface to be deleted from either the allocator’s or accepter’s side. However, this provider only allows the Direct Connect hosted transit virtual interface to be deleted from the allocator’s side by removing the corresponding aws.directconnect.HostedTransitVirtualInterface resource from your configuration. Removing a aws.directconnect.HostedTransitVirtualInterfaceAcceptor resource from your configuration will remove it from your statefile and management, but will not delete the Direct Connect virtual interface.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const accepter = aws.getCallerIdentity({});
    // Creator's side of the VIF
    const creator = new aws.directconnect.HostedTransitVirtualInterface("creator", {
        connectionId: "dxcon-zzzzzzzz",
        ownerAccountId: accepter.then(accepter => accepter.accountId),
        name: "tf-transit-vif-example",
        vlan: 4094,
        addressFamily: "ipv4",
        bgpAsn: 65352,
    });
    // Accepter's side of the VIF.
    const example = new aws.directconnect.Gateway("example", {
        name: "tf-dxg-example",
        amazonSideAsn: "64512",
    });
    const accepterHostedTransitVirtualInterfaceAcceptor = new aws.directconnect.HostedTransitVirtualInterfaceAcceptor("accepter", {
        virtualInterfaceId: creator.id,
        dxGatewayId: example.id,
        tags: {
            Side: "Accepter",
        },
    });
    
    import pulumi
    import pulumi_aws as aws
    
    accepter = aws.get_caller_identity()
    # Creator's side of the VIF
    creator = aws.directconnect.HostedTransitVirtualInterface("creator",
        connection_id="dxcon-zzzzzzzz",
        owner_account_id=accepter.account_id,
        name="tf-transit-vif-example",
        vlan=4094,
        address_family="ipv4",
        bgp_asn=65352)
    # Accepter's side of the VIF.
    example = aws.directconnect.Gateway("example",
        name="tf-dxg-example",
        amazon_side_asn="64512")
    accepter_hosted_transit_virtual_interface_acceptor = aws.directconnect.HostedTransitVirtualInterfaceAcceptor("accepter",
        virtual_interface_id=creator.id,
        dx_gateway_id=example.id,
        tags={
            "Side": "Accepter",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
    	"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 {
    		accepter, err := aws.GetCallerIdentity(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		// Creator's side of the VIF
    		creator, err := directconnect.NewHostedTransitVirtualInterface(ctx, "creator", &directconnect.HostedTransitVirtualInterfaceArgs{
    			ConnectionId:   pulumi.String("dxcon-zzzzzzzz"),
    			OwnerAccountId: *pulumi.String(accepter.AccountId),
    			Name:           pulumi.String("tf-transit-vif-example"),
    			Vlan:           pulumi.Int(4094),
    			AddressFamily:  pulumi.String("ipv4"),
    			BgpAsn:         pulumi.Int(65352),
    		})
    		if err != nil {
    			return err
    		}
    		// Accepter's side of the VIF.
    		example, err := directconnect.NewGateway(ctx, "example", &directconnect.GatewayArgs{
    			Name:          pulumi.String("tf-dxg-example"),
    			AmazonSideAsn: pulumi.String("64512"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = directconnect.NewHostedTransitVirtualInterfaceAcceptor(ctx, "accepter", &directconnect.HostedTransitVirtualInterfaceAcceptorArgs{
    			VirtualInterfaceId: creator.ID(),
    			DxGatewayId:        example.ID(),
    			Tags: pulumi.StringMap{
    				"Side": pulumi.String("Accepter"),
    			},
    		})
    		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 accepter = Aws.GetCallerIdentity.Invoke();
    
        // Creator's side of the VIF
        var creator = new Aws.DirectConnect.HostedTransitVirtualInterface("creator", new()
        {
            ConnectionId = "dxcon-zzzzzzzz",
            OwnerAccountId = accepter.Apply(getCallerIdentityResult => getCallerIdentityResult.AccountId),
            Name = "tf-transit-vif-example",
            Vlan = 4094,
            AddressFamily = "ipv4",
            BgpAsn = 65352,
        });
    
        // Accepter's side of the VIF.
        var example = new Aws.DirectConnect.Gateway("example", new()
        {
            Name = "tf-dxg-example",
            AmazonSideAsn = "64512",
        });
    
        var accepterHostedTransitVirtualInterfaceAcceptor = new Aws.DirectConnect.HostedTransitVirtualInterfaceAcceptor("accepter", new()
        {
            VirtualInterfaceId = creator.Id,
            DxGatewayId = example.Id,
            Tags = 
            {
                { "Side", "Accepter" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.AwsFunctions;
    import com.pulumi.aws.inputs.GetCallerIdentityArgs;
    import com.pulumi.aws.directconnect.HostedTransitVirtualInterface;
    import com.pulumi.aws.directconnect.HostedTransitVirtualInterfaceArgs;
    import com.pulumi.aws.directconnect.Gateway;
    import com.pulumi.aws.directconnect.GatewayArgs;
    import com.pulumi.aws.directconnect.HostedTransitVirtualInterfaceAcceptor;
    import com.pulumi.aws.directconnect.HostedTransitVirtualInterfaceAcceptorArgs;
    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) {
            final var accepter = AwsFunctions.getCallerIdentity();
    
            var creator = new HostedTransitVirtualInterface("creator", HostedTransitVirtualInterfaceArgs.builder()        
                .connectionId("dxcon-zzzzzzzz")
                .ownerAccountId(accepter.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
                .name("tf-transit-vif-example")
                .vlan(4094)
                .addressFamily("ipv4")
                .bgpAsn(65352)
                .build());
    
            var example = new Gateway("example", GatewayArgs.builder()        
                .name("tf-dxg-example")
                .amazonSideAsn(64512)
                .build());
    
            var accepterHostedTransitVirtualInterfaceAcceptor = new HostedTransitVirtualInterfaceAcceptor("accepterHostedTransitVirtualInterfaceAcceptor", HostedTransitVirtualInterfaceAcceptorArgs.builder()        
                .virtualInterfaceId(creator.id())
                .dxGatewayId(example.id())
                .tags(Map.of("Side", "Accepter"))
                .build());
    
        }
    }
    
    resources:
      # Creator's side of the VIF
      creator:
        type: aws:directconnect:HostedTransitVirtualInterface
        properties:
          connectionId: dxcon-zzzzzzzz
          ownerAccountId: ${accepter.accountId}
          name: tf-transit-vif-example
          vlan: 4094
          addressFamily: ipv4
          bgpAsn: 65352 # The aws_dx_hosted_transit_virtual_interface
          #   # must be destroyed before the aws_dx_gateway.
      # Accepter's side of the VIF.
      example:
        type: aws:directconnect:Gateway
        properties:
          name: tf-dxg-example
          amazonSideAsn: 64512
      accepterHostedTransitVirtualInterfaceAcceptor:
        type: aws:directconnect:HostedTransitVirtualInterfaceAcceptor
        name: accepter
        properties:
          virtualInterfaceId: ${creator.id}
          dxGatewayId: ${example.id}
          tags:
            Side: Accepter
    variables:
      accepter:
        fn::invoke:
          Function: aws:getCallerIdentity
          Arguments: {}
    

    Create HostedTransitVirtualInterfaceAcceptor Resource

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

    HostedTransitVirtualInterfaceAcceptor 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 HostedTransitVirtualInterfaceAcceptor resource accepts the following input properties:

    DxGatewayId string
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    VirtualInterfaceId string
    The ID of the Direct Connect virtual interface to accept.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    DxGatewayId string
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    VirtualInterfaceId string
    The ID of the Direct Connect virtual interface to accept.
    Tags map[string]string
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    dxGatewayId String
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    virtualInterfaceId String
    The ID of the Direct Connect virtual interface to accept.
    tags Map<String,String>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    dxGatewayId string
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    virtualInterfaceId string
    The ID of the Direct Connect virtual interface to accept.
    tags {[key: string]: string}
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    dx_gateway_id str
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    virtual_interface_id str
    The ID of the Direct Connect virtual interface to accept.
    tags Mapping[str, str]
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    dxGatewayId String
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    virtualInterfaceId String
    The ID of the Direct Connect virtual interface to accept.
    tags Map<String>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

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

    Arn string
    The ARN of the virtual interface.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Arn string
    The ARN of the virtual interface.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    The ARN of the virtual interface.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn string
    The ARN of the virtual interface.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn str
    The ARN of the virtual interface.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    arn String
    The ARN of the virtual interface.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    Look up Existing HostedTransitVirtualInterfaceAcceptor Resource

    Get an existing HostedTransitVirtualInterfaceAcceptor 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?: HostedTransitVirtualInterfaceAcceptorState, opts?: CustomResourceOptions): HostedTransitVirtualInterfaceAcceptor
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            dx_gateway_id: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            virtual_interface_id: Optional[str] = None) -> HostedTransitVirtualInterfaceAcceptor
    func GetHostedTransitVirtualInterfaceAcceptor(ctx *Context, name string, id IDInput, state *HostedTransitVirtualInterfaceAcceptorState, opts ...ResourceOption) (*HostedTransitVirtualInterfaceAcceptor, error)
    public static HostedTransitVirtualInterfaceAcceptor Get(string name, Input<string> id, HostedTransitVirtualInterfaceAcceptorState? state, CustomResourceOptions? opts = null)
    public static HostedTransitVirtualInterfaceAcceptor get(String name, Output<String> id, HostedTransitVirtualInterfaceAcceptorState 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:
    Arn string
    The ARN of the virtual interface.
    DxGatewayId string
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    Tags Dictionary<string, string>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    VirtualInterfaceId string
    The ID of the Direct Connect virtual interface to accept.
    Arn string
    The ARN of the virtual interface.
    DxGatewayId string
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    Tags map[string]string
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    VirtualInterfaceId string
    The ID of the Direct Connect virtual interface to accept.
    arn String
    The ARN of the virtual interface.
    dxGatewayId String
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    tags Map<String,String>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    virtualInterfaceId String
    The ID of the Direct Connect virtual interface to accept.
    arn string
    The ARN of the virtual interface.
    dxGatewayId string
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    tags {[key: string]: string}
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    virtualInterfaceId string
    The ID of the Direct Connect virtual interface to accept.
    arn str
    The ARN of the virtual interface.
    dx_gateway_id str
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    tags Mapping[str, str]
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    virtual_interface_id str
    The ID of the Direct Connect virtual interface to accept.
    arn String
    The ARN of the virtual interface.
    dxGatewayId String
    The ID of the Direct Connect gateway to which to connect the virtual interface.
    tags Map<String>
    A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:Please use tags instead.

    virtualInterfaceId String
    The ID of the Direct Connect virtual interface to accept.

    Import

    Using pulumi import, import Direct Connect hosted transit virtual interfaces using the VIF id. For example:

    $ pulumi import aws:directconnect/hostedTransitVirtualInterfaceAcceptor:HostedTransitVirtualInterfaceAcceptor test dxvif-33cc44dd
    

    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.27.0 published on Monday, Mar 18, 2024 by Pulumi