title: "PeeringConnection" title_tag: "huaweicloud.Vpc.PeeringConnection" meta_desc: "Documentation for the huaweicloud.Vpc.PeeringConnection resource with examples, input properties, output properties, lookup functions, and supporting types." layout: api no_edit_this_page: true


Provides a resource to manage a VPC Peering Connection resource.

NOTE: For cross-tenant (requester's tenant differs from the accepter's tenant) VPC Peering Connections, use the huaweicloud.Vpc.PeeringConnection resource to manage the requester's side of the connection and use the huaweicloud.Vpc.PeeringConnectionAccepter resource to manage the accepter's side of the connection.

Notes

If you create a VPC peering connection with another VPC of your own, the connection is created without the need for you to accept the connection.

Create PeeringConnection Resource {#create}

new PeeringConnection(name: string, args: PeeringConnectionArgs, opts?: CustomResourceOptions);
@overload
def PeeringConnection(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      name: Optional[str] = None,
                      peer_tenant_id: Optional[str] = None,
                      peer_vpc_id: Optional[str] = None,
                      region: Optional[str] = None,
                      vpc_id: Optional[str] = None)
@overload
def PeeringConnection(resource_name: str,
                      args: PeeringConnectionArgs,
                      opts: Optional[ResourceOptions] = None)
func NewPeeringConnection(ctx *Context, name string, args PeeringConnectionArgs, opts ...ResourceOption) (*PeeringConnection, error)
public PeeringConnection(string name, PeeringConnectionArgs args, CustomResourceOptions? opts = null)
public PeeringConnection(String name, PeeringConnectionArgs args)
public PeeringConnection(String name, PeeringConnectionArgs args, CustomResourceOptions options)
type: huaweicloud:Vpc:PeeringConnection
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args PeeringConnectionArgs
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 PeeringConnectionArgs
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 PeeringConnectionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PeeringConnectionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args PeeringConnectionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

PeeringConnection Resource Properties {#properties}

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The PeeringConnection resource accepts the following input properties:

PeerVpcId string
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
VpcId string
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
Name string
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
PeerTenantId string
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
Region string

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

PeerVpcId string
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
VpcId string
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
Name string
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
PeerTenantId string
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
Region string

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

peerVpcId String
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
vpcId String
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
name String
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
peerTenantId String
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
region String

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

peerVpcId string
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
vpcId string
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
name string
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
peerTenantId string
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
region string

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

peer_vpc_id str
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
vpc_id str
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
name str
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
peer_tenant_id str
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
region str

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

peerVpcId String
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
vpcId String
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
name String
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
peerTenantId String
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
region String

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the PeeringConnection resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Status string

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

id String

The provider-assigned unique ID for this managed resource.

status String

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

id string

The provider-assigned unique ID for this managed resource.

status string

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

id str

The provider-assigned unique ID for this managed resource.

status str

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

id String

The provider-assigned unique ID for this managed resource.

status String

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

Look up Existing PeeringConnection Resource {#look-up}

Get an existing PeeringConnection 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?: PeeringConnectionState, opts?: CustomResourceOptions): PeeringConnection
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        name: Optional[str] = None,
        peer_tenant_id: Optional[str] = None,
        peer_vpc_id: Optional[str] = None,
        region: Optional[str] = None,
        status: Optional[str] = None,
        vpc_id: Optional[str] = None) -> PeeringConnection
func GetPeeringConnection(ctx *Context, name string, id IDInput, state *PeeringConnectionState, opts ...ResourceOption) (*PeeringConnection, error)
public static PeeringConnection Get(string name, Input<string> id, PeeringConnectionState? state, CustomResourceOptions? opts = null)
public static PeeringConnection get(String name, Output<String> id, PeeringConnectionState 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.
The following state arguments are supported:
Name string
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
PeerTenantId string
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
PeerVpcId string
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
Region string

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

Status string

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

VpcId string
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
Name string
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
PeerTenantId string
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
PeerVpcId string
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
Region string

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

Status string

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

VpcId string
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
name String
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
peerTenantId String
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
peerVpcId String
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
region String

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

status String

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

vpcId String
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
name string
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
peerTenantId string
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
peerVpcId string
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
region string

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

status string

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

vpcId string
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
name str
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
peer_tenant_id str
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
peer_vpc_id str
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
region str

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

status str

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

vpc_id str
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.
name String
  • Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
peerTenantId String
  • Specified the Tenant Id of the accepter tenant. Changing this creates a new VPC peering connection.
peerVpcId String
  • Specifies the VPC ID of the accepter tenant. Changing this creates a new VPC peering connection.
region String

The region in which to create the VPC peering connection. If omitted, the provider-level region will be used. Changing this creates a new VPC peering connection resource.

status String

The VPC peering connection status. The value can be PENDING_ACCEPTANCE, REJECTED, EXPIRED, DELETED, or ACTIVE.

vpcId String
  • Specifies the ID of a VPC involved in a VPC peering connection. Changing this creates a new VPC peering connection.

Import

VPC Peering resources can be imported using the vpc peering id, e.g.

 $ pulumi import huaweicloud:Vpc/peeringConnection:PeeringConnection test_connection 22b76469-08e3-4937-8c1d-7aad34892be1

Package Details

Repository
https://github.com/huaweicloud/pulumi-huaweicloud
License
Apache-2.0
Notes

This Pulumi package is based on the huaweicloud Terraform Provider.