AWS Classic
HostedTransitVirtualInterfaceAcceptor
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 aaws.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
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var accepter = new Aws.Provider("accepter", new Aws.ProviderArgs
{
});
// Accepter's credentials.
var accepterCallerIdentity = Output.Create(Aws.GetCallerIdentity.InvokeAsync());
// Accepter's side of the VIF.
var example = new Aws.DirectConnect.Gateway("example", new Aws.DirectConnect.GatewayArgs
{
AmazonSideAsn = "64512",
}, new CustomResourceOptions
{
Provider = aws.Accepter,
});
// Creator's side of the VIF
var creator = new Aws.DirectConnect.HostedTransitVirtualInterface("creator", new Aws.DirectConnect.HostedTransitVirtualInterfaceArgs
{
ConnectionId = "dxcon-zzzzzzzz",
OwnerAccountId = accepterCallerIdentity.Apply(accepterCallerIdentity => accepterCallerIdentity.AccountId),
Vlan = 4094,
AddressFamily = "ipv4",
BgpAsn = 65352,
}, new CustomResourceOptions
{
DependsOn =
{
example,
},
});
var accepterHostedTransitVirtualInterfaceAcceptor = new Aws.DirectConnect.HostedTransitVirtualInterfaceAcceptor("accepterHostedTransitVirtualInterfaceAcceptor", new Aws.DirectConnect.HostedTransitVirtualInterfaceAcceptorArgs
{
VirtualInterfaceId = creator.Id,
DxGatewayId = example.Id,
Tags =
{
{ "Side", "Accepter" },
},
}, new CustomResourceOptions
{
Provider = aws.Accepter,
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/directconnect"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/providers"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := providers.Newaws(ctx, "accepter", nil)
if err != nil {
return err
}
accepterCallerIdentity, err := aws.GetCallerIdentity(ctx, nil, nil)
if err != nil {
return err
}
example, err := directconnect.NewGateway(ctx, "example", &directconnect.GatewayArgs{
AmazonSideAsn: pulumi.String("64512"),
}, pulumi.Provider(aws.Accepter))
if err != nil {
return err
}
creator, err := directconnect.NewHostedTransitVirtualInterface(ctx, "creator", &directconnect.HostedTransitVirtualInterfaceArgs{
ConnectionId: pulumi.String("dxcon-zzzzzzzz"),
OwnerAccountId: pulumi.String(accepterCallerIdentity.AccountId),
Vlan: pulumi.Int(4094),
AddressFamily: pulumi.String("ipv4"),
BgpAsn: pulumi.Int(65352),
}, pulumi.DependsOn([]pulumi.Resource{
example,
}))
if err != nil {
return err
}
_, err = directconnect.NewHostedTransitVirtualInterfaceAcceptor(ctx, "accepterHostedTransitVirtualInterfaceAcceptor", &directconnect.HostedTransitVirtualInterfaceAcceptorArgs{
VirtualInterfaceId: creator.ID(),
DxGatewayId: example.ID(),
Tags: pulumi.StringMap{
"Side": pulumi.String("Accepter"),
},
}, pulumi.Provider(aws.Accepter))
if err != nil {
return err
}
return nil
})
}
package generated_program;
import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;
import com.pulumi.resources.CustomResourceOptions;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var accepter = new Provider("accepter");
final var accepterCallerIdentity = Output.of(AwsFunctions.getCallerIdentity());
var example = new Gateway("example", GatewayArgs.builder()
.amazonSideAsn(64512)
.build(), CustomResourceOptions.builder()
.provider(aws.accepter())
.build());
var creator = new HostedTransitVirtualInterface("creator", HostedTransitVirtualInterfaceArgs.builder()
.connectionId("dxcon-zzzzzzzz")
.ownerAccountId(accepterCallerIdentity.apply(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
.vlan(4094)
.addressFamily("ipv4")
.bgpAsn(65352)
.build(), CustomResourceOptions.builder()
.dependsOn(example)
.build());
var accepterHostedTransitVirtualInterfaceAcceptor = new HostedTransitVirtualInterfaceAcceptor("accepterHostedTransitVirtualInterfaceAcceptor", HostedTransitVirtualInterfaceAcceptorArgs.builder()
.virtualInterfaceId(creator.id())
.dxGatewayId(example.id())
.tags(Map.of("Side", "Accepter"))
.build(), CustomResourceOptions.builder()
.provider(aws.accepter())
.build());
}
}
import pulumi
import pulumi_aws as aws
import pulumi_pulumi as pulumi
accepter = pulumi.providers.Aws("accepter")
# Accepter's credentials.
accepter_caller_identity = aws.get_caller_identity()
# Accepter's side of the VIF.
example = aws.directconnect.Gateway("example", amazon_side_asn="64512",
opts=pulumi.ResourceOptions(provider=aws["accepter"]))
# Creator's side of the VIF
creator = aws.directconnect.HostedTransitVirtualInterface("creator",
connection_id="dxcon-zzzzzzzz",
owner_account_id=accepter_caller_identity.account_id,
vlan=4094,
address_family="ipv4",
bgp_asn=65352,
opts=pulumi.ResourceOptions(depends_on=[example]))
accepter_hosted_transit_virtual_interface_acceptor = aws.directconnect.HostedTransitVirtualInterfaceAcceptor("accepterHostedTransitVirtualInterfaceAcceptor",
virtual_interface_id=creator.id,
dx_gateway_id=example.id,
tags={
"Side": "Accepter",
},
opts=pulumi.ResourceOptions(provider=aws["accepter"]))
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const accepter = new aws.Provider("accepter", {});
// Accepter's credentials.
const accepterCallerIdentity = aws.getCallerIdentity({});
// Accepter's side of the VIF.
const example = new aws.directconnect.Gateway("example", {amazonSideAsn: "64512"}, {
provider: aws.accepter,
});
// Creator's side of the VIF
const creator = new aws.directconnect.HostedTransitVirtualInterface("creator", {
connectionId: "dxcon-zzzzzzzz",
ownerAccountId: accepterCallerIdentity.then(accepterCallerIdentity => accepterCallerIdentity.accountId),
vlan: 4094,
addressFamily: "ipv4",
bgpAsn: 65352,
}, {
dependsOn: [example],
});
const accepterHostedTransitVirtualInterfaceAcceptor = new aws.directconnect.HostedTransitVirtualInterfaceAcceptor("accepterHostedTransitVirtualInterfaceAcceptor", {
virtualInterfaceId: creator.id,
dxGatewayId: example.id,
tags: {
Side: "Accepter",
},
}, {
provider: aws.accepter,
});
resources:
accepter:
type: pulumi:providers:aws
creator:
type: aws:directconnect:HostedTransitVirtualInterface
properties:
connectionId: dxcon-zzzzzzzz
ownerAccountId: ${accepterCallerIdentity.accountId}
vlan: 4094
addressFamily: ipv4
bgpAsn: 65352
options:
dependson:
- ${example}
example:
type: aws:directconnect:Gateway
properties:
amazonSideAsn: 64512
options:
provider: ${aws.accepter}
accepterHostedTransitVirtualInterfaceAcceptor:
type: aws:directconnect:HostedTransitVirtualInterfaceAcceptor
properties:
virtualInterfaceId: ${creator.id}
dxGatewayId: ${example.id}
tags:
Side: Accepter
options:
provider: ${aws.accepter}
variables:
accepterCallerIdentity:
Fn::Invoke:
Function: aws:getCallerIdentity
Arguments: {}
Create a 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:
- Dx
Gateway stringId The ID of the Direct Connect gateway to which to connect the virtual interface.
- Virtual
Interface stringId The ID of the Direct Connect virtual interface to accept.
- 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.
- Dx
Gateway stringId The ID of the Direct Connect gateway to which to connect the virtual interface.
- Virtual
Interface stringId The ID of the Direct Connect virtual interface to accept.
- 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.
- dx
Gateway StringId The ID of the Direct Connect gateway to which to connect the virtual interface.
- virtual
Interface StringId The ID of the Direct Connect virtual interface to accept.
- 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.
- dx
Gateway stringId The ID of the Direct Connect gateway to which to connect the virtual interface.
- virtual
Interface stringId The ID of the Direct Connect virtual interface to accept.
- {[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_ strid The ID of the Direct Connect gateway to which to connect the virtual interface.
- virtual_
interface_ strid The ID of the Direct Connect virtual interface to accept.
- 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.
- dx
Gateway StringId The ID of the Direct Connect gateway to which to connect the virtual interface.
- virtual
Interface StringId The ID of the Direct Connect virtual interface to accept.
- 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:
Look up an 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.
- Arn string
The ARN of the virtual interface.
- Dx
Gateway stringId The ID of the Direct Connect gateway to which to connect the virtual interface.
- 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.- Dictionary<string, string>
A map of tags assigned to the resource, including those inherited from the provider .
- Virtual
Interface stringId The ID of the Direct Connect virtual interface to accept.
- Arn string
The ARN of the virtual interface.
- Dx
Gateway stringId The ID of the Direct Connect gateway to which to connect the virtual interface.
- 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.- map[string]string
A map of tags assigned to the resource, including those inherited from the provider .
- Virtual
Interface stringId The ID of the Direct Connect virtual interface to accept.
- arn String
The ARN of the virtual interface.
- dx
Gateway StringId The ID of the Direct Connect gateway to which to connect the virtual interface.
- 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.- Map<String,String>
A map of tags assigned to the resource, including those inherited from the provider .
- virtual
Interface StringId The ID of the Direct Connect virtual interface to accept.
- arn string
The ARN of the virtual interface.
- dx
Gateway stringId The ID of the Direct Connect gateway to which to connect the virtual interface.
- {[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.- {[key: string]: string}
A map of tags assigned to the resource, including those inherited from the provider .
- virtual
Interface stringId The ID of the Direct Connect virtual interface to accept.
- arn str
The ARN of the virtual interface.
- dx_
gateway_ strid The ID of the Direct Connect gateway to which to connect the virtual interface.
- 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.- Mapping[str, str]
A map of tags assigned to the resource, including those inherited from the provider .
- virtual_
interface_ strid The ID of the Direct Connect virtual interface to accept.
- arn String
The ARN of the virtual interface.
- dx
Gateway StringId The ID of the Direct Connect gateway to which to connect the virtual interface.
- 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.- Map<String>
A map of tags assigned to the resource, including those inherited from the provider .
- virtual
Interface StringId The ID of the Direct Connect virtual interface to accept.
Import
Direct Connect hosted transit virtual interfaces can be imported using the vif id
, e.g.,
$ pulumi import aws:directconnect/hostedTransitVirtualInterfaceAcceptor:HostedTransitVirtualInterfaceAcceptor test dxvif-33cc44dd
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.