Manages the accepter's side of a Direct Connect hosted private virtual interface, accepting ownership from another AWS account.

Terraform Template

data "aws_caller_identity" "accepter" {
  provider = "aws.accepter"
}

resource "aws_dx_hosted_private_virtual_interface" "creator" {
  address_family = "ipv4"
  bgp_asn = 65352
  connection_id = "dxcon-zzzzzzzz"
  depends_on = ["aws_vpn_gateway.vpn_gw"]
  name = "vif-foo"
  owner_account_id = data.aws_caller_identity.accepter.account_id
  vlan = 4094
}

resource "aws_dx_hosted_private_virtual_interface_accepter" "accepter" {
  provider = "aws.accepter"

  tags = {
    Side = "Accepter"
  }
  virtual_interface_id = aws_dx_hosted_private_virtual_interface.creator.id
  vpn_gateway_id = aws_vpn_gateway.vpn_gw.id
}

resource "aws_vpn_gateway" "vpn_gw" {
  provider = "aws.accepter"
}