HostedPrivateVirtualInterfaceAccepter

class HostedPrivateVirtualInterfaceAccepter : KotlinCustomResource

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

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.Provider;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.ec2.VpnGateway;
import com.pulumi.aws.ec2.VpnGatewayArgs;
import com.pulumi.aws.directconnect.HostedPrivateVirtualInterface;
import com.pulumi.aws.directconnect.HostedPrivateVirtualInterfaceArgs;
import com.pulumi.aws.directconnect.HostedPrivateVirtualInterfaceAccepter;
import com.pulumi.aws.directconnect.HostedPrivateVirtualInterfaceAccepterArgs;
import com.pulumi.resources.CustomResourceOptions;
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 accepter = new Provider("accepter");
final var accepterCallerIdentity = AwsFunctions.getCallerIdentity();
var vpnGw = new VpnGateway("vpnGw", VpnGatewayArgs.Empty, CustomResourceOptions.builder()
.provider(aws.accepter())
.build());
var creator = new HostedPrivateVirtualInterface("creator", HostedPrivateVirtualInterfaceArgs.builder()
.connectionId("dxcon-zzzzzzzz")
.ownerAccountId(accepterCallerIdentity.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
.vlan(4094)
.addressFamily("ipv4")
.bgpAsn(65352)
.build(), CustomResourceOptions.builder()
.dependsOn(vpnGw)
.build());
var accepterHostedPrivateVirtualInterfaceAccepter = new HostedPrivateVirtualInterfaceAccepter("accepterHostedPrivateVirtualInterfaceAccepter", HostedPrivateVirtualInterfaceAccepterArgs.builder()
.virtualInterfaceId(creator.id())
.vpnGatewayId(vpnGw.id())
.tags(Map.of("Side", "Accepter"))
.build(), CustomResourceOptions.builder()
.provider(aws.accepter())
.build());
}
}

Import

Direct Connect hosted private virtual interfaces can be imported using the vif id, e.g.,

$ pulumi import aws:directconnect/hostedPrivateVirtualInterfaceAccepter:HostedPrivateVirtualInterfaceAccepter test dxvif-33cc44dd

Properties

Link copied to clipboard
val arn: Output<String>

The ARN of the virtual interface.

Link copied to clipboard
val dxGatewayId: Output<String>?

The ID of the Direct Connect gateway to which to connect the virtual interface.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val tags: Output<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.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

The ID of the Direct Connect virtual interface to accept.

Link copied to clipboard
val vpnGatewayId: Output<String>?

The ID of the virtual private gateway to which to connect the virtual interface.