Hosted Public Virtual Interface Accepter Args
data class HostedPublicVirtualInterfaceAccepterArgs(val tags: Output<Map<String, String>>? = null, val virtualInterfaceId: Output<String>? = null) : ConvertibleToJava<HostedPublicVirtualInterfaceAccepterArgs>
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
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.directconnect.HostedPublicVirtualInterface;
import com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceArgs;
import com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceAccepter;
import com.pulumi.aws.directconnect.HostedPublicVirtualInterfaceAccepterArgs;
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 creator = new HostedPublicVirtualInterface("creator", HostedPublicVirtualInterfaceArgs.builder()
.connectionId("dxcon-zzzzzzzz")
.ownerAccountId(accepterCallerIdentity.applyValue(getCallerIdentityResult -> getCallerIdentityResult.accountId()))
.vlan(4094)
.addressFamily("ipv4")
.bgpAsn(65352)
.customerAddress("175.45.176.1/30")
.amazonAddress("175.45.176.2/30")
.routeFilterPrefixes(
"210.52.109.0/24",
"175.45.176.0/22")
.build());
var accepterHostedPublicVirtualInterfaceAccepter = new HostedPublicVirtualInterfaceAccepter("accepterHostedPublicVirtualInterfaceAccepter", HostedPublicVirtualInterfaceAccepterArgs.builder()
.virtualInterfaceId(creator.id())
.tags(Map.of("Side", "Accepter"))
.build(), CustomResourceOptions.builder()
.provider(aws.accepter())
.build());
}
}
Content copied to clipboard
Import
Direct Connect hosted public virtual interfaces can be imported using the vif id
, e.g.,
$ pulumi import aws:directconnect/hostedPublicVirtualInterfaceAccepter:HostedPublicVirtualInterfaceAccepter test dxvif-33cc44dd
Content copied to clipboard