HostedPublicVirtualInterfaceAccepter
Provides a resource to manage the accepter’s side of a Direct Connect hosted public virtual interface. This resource accepts ownership of a public virtual interface created by another AWS account.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var accepter = new Aws.Provider("accepter", new Aws.ProviderArgs
{
});
var accepterCallerIdentity = Output.Create(Aws.GetCallerIdentity.InvokeAsync());
// Creator's side of the VIF
var creator = new Aws.DirectConnect.HostedPublicVirtualInterface("creator", new Aws.DirectConnect.HostedPublicVirtualInterfaceArgs
{
AddressFamily = "ipv4",
AmazonAddress = "175.45.176.2/30",
BgpAsn = 65352,
ConnectionId = "dxcon-zzzzzzzz",
CustomerAddress = "175.45.176.1/30",
OwnerAccountId = accepterCallerIdentity.Apply(accepterCallerIdentity => accepterCallerIdentity.AccountId),
RouteFilterPrefixes =
{
"210.52.109.0/24",
"175.45.176.0/22",
},
Vlan = 4094,
});
// Accepter's side of the VIF.
var accepterHostedPublicVirtualInterfaceAccepter = new Aws.DirectConnect.HostedPublicVirtualInterfaceAccepter("accepterHostedPublicVirtualInterfaceAccepter", new Aws.DirectConnect.HostedPublicVirtualInterfaceAccepterArgs
{
Tags =
{
{ "Side", "Accepter" },
},
VirtualInterfaceId = creator.Id,
}, new CustomResourceOptions
{
Provider = "aws.accepter",
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/directconnect"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/providers"
"github.com/pulumi/pulumi/sdk/v2/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
}
creator, err := directconnect.NewHostedPublicVirtualInterface(ctx, "creator", &directconnect.HostedPublicVirtualInterfaceArgs{
AddressFamily: pulumi.String("ipv4"),
AmazonAddress: pulumi.String("175.45.176.2/30"),
BgpAsn: pulumi.Int(65352),
ConnectionId: pulumi.String("dxcon-zzzzzzzz"),
CustomerAddress: pulumi.String("175.45.176.1/30"),
OwnerAccountId: pulumi.String(accepterCallerIdentity.AccountId),
RouteFilterPrefixes: pulumi.StringArray{
pulumi.String("210.52.109.0/24"),
pulumi.String("175.45.176.0/22"),
},
Vlan: pulumi.Int(4094),
})
if err != nil {
return err
}
_, err = directconnect.NewHostedPublicVirtualInterfaceAccepter(ctx, "accepterHostedPublicVirtualInterfaceAccepter", &directconnect.HostedPublicVirtualInterfaceAccepterArgs{
Tags: pulumi.StringMap{
"Side": pulumi.String("Accepter"),
},
VirtualInterfaceId: creator.ID(),
}, pulumi.Provider("aws.accepter"))
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
import pulumi_pulumi as pulumi
accepter = pulumi.providers.Aws("accepter")
accepter_caller_identity = aws.get_caller_identity()
# Creator's side of the VIF
creator = aws.directconnect.HostedPublicVirtualInterface("creator",
address_family="ipv4",
amazon_address="175.45.176.2/30",
bgp_asn=65352,
connection_id="dxcon-zzzzzzzz",
customer_address="175.45.176.1/30",
owner_account_id=accepter_caller_identity.account_id,
route_filter_prefixes=[
"210.52.109.0/24",
"175.45.176.0/22",
],
vlan=4094)
# Accepter's side of the VIF.
accepter_hosted_public_virtual_interface_accepter = aws.directconnect.HostedPublicVirtualInterfaceAccepter("accepterHostedPublicVirtualInterfaceAccepter",
tags={
"Side": "Accepter",
},
virtual_interface_id=creator.id,
opts=ResourceOptions(provider="aws.accepter"))import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const accepter = new aws.Provider("accepter", {});
const accepterCallerIdentity = pulumi.output(aws.getCallerIdentity({ provider: accepter, async: true }));
// Creator's side of the VIF
const creator = new aws.directconnect.HostedPublicVirtualInterface("creator", {
addressFamily: "ipv4",
amazonAddress: "175.45.176.2/30",
bgpAsn: 65352,
connectionId: "dxcon-zzzzzzzz",
customerAddress: "175.45.176.1/30",
ownerAccountId: accepterCallerIdentity.accountId,
routeFilterPrefixes: [
"210.52.109.0/24",
"175.45.176.0/22",
],
vlan: 4094,
});
// Accepter's side of the VIF.
const accepterHostedPublicVirtualInterfaceAccepter = new aws.directconnect.HostedPublicVirtualInterfaceAccepter("accepter", {
tags: {
Side: "Accepter",
},
virtualInterfaceId: creator.id,
}, { provider: accepter });Create a HostedPublicVirtualInterfaceAccepter Resource
new HostedPublicVirtualInterfaceAccepter(name: string, args: HostedPublicVirtualInterfaceAccepterArgs, opts?: CustomResourceOptions);def HostedPublicVirtualInterfaceAccepter(resource_name, opts=None, tags=None, virtual_interface_id=None, __props__=None);func NewHostedPublicVirtualInterfaceAccepter(ctx *Context, name string, args HostedPublicVirtualInterfaceAccepterArgs, opts ...ResourceOption) (*HostedPublicVirtualInterfaceAccepter, error)public HostedPublicVirtualInterfaceAccepter(string name, HostedPublicVirtualInterfaceAccepterArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args HostedPublicVirtualInterfaceAccepterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args HostedPublicVirtualInterfaceAccepterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args HostedPublicVirtualInterfaceAccepterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
HostedPublicVirtualInterfaceAccepter Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The HostedPublicVirtualInterfaceAccepter resource accepts the following input properties:
- 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.
- 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.
- 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.
- virtual_
interface_ strid The ID of the Direct Connect virtual interface to accept.
- Dict[str, str]
A map of tags to assign to the resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the HostedPublicVirtualInterfaceAccepter resource produces the following output properties:
Look up an Existing HostedPublicVirtualInterfaceAccepter Resource
Get an existing HostedPublicVirtualInterfaceAccepter 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?: HostedPublicVirtualInterfaceAccepterState, opts?: CustomResourceOptions): HostedPublicVirtualInterfaceAccepterstatic get(resource_name, id, opts=None, arn=None, tags=None, virtual_interface_id=None, __props__=None);func GetHostedPublicVirtualInterfaceAccepter(ctx *Context, name string, id IDInput, state *HostedPublicVirtualInterfaceAccepterState, opts ...ResourceOption) (*HostedPublicVirtualInterfaceAccepter, error)public static HostedPublicVirtualInterfaceAccepter Get(string name, Input<string> id, HostedPublicVirtualInterfaceAccepterState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Arn string
The ARN of the virtual interface.
- Dictionary<string, string>
A map of tags to assign to the resource.
- Virtual
Interface stringId The ID of the Direct Connect virtual interface to accept.
- Arn string
The ARN of the virtual interface.
- map[string]string
A map of tags to assign to the resource.
- Virtual
Interface stringId The ID of the Direct Connect virtual interface to accept.
- arn string
The ARN of the virtual interface.
- {[key: string]: string}
A map of tags to assign to the resource.
- virtual
Interface stringId The ID of the Direct Connect virtual interface to accept.
- arn str
The ARN of the virtual interface.
- Dict[str, str]
A map of tags to assign to the resource.
- virtual_
interface_ strid The ID of the Direct Connect virtual interface to accept.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.