community.general.hwc_vpc_peering_connect – Creates a resource of Vpc/PeeringConnect in Huawei Cloud

Note

This plugin is part of the community.general collection (version 2.5.1).

To install it use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.hwc_vpc_peering_connect.

New in version 0.2.0: of community.general

Synopsis

  • vpc peering management.

Requirements

The below requirements are needed on the host that executes this module.

  • keystoneauth1 >= 3.6.0

Parameters

Parameter Choices/Defaults Comments
description
string
The description of vpc peering connection.
domain
string / required
The name of the Domain to scope to (Identity v3). (currently only domain names are supported, and not domain IDs).
id
string
The id of resource to be managed.
identity_endpoint
string / required
The Identity authentication URL.
local_vpc_id
string / required
Specifies the ID of local VPC.
name
string / required
Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.
password
string / required
The password to login with.
peering_vpc
dictionary / required
Specifies information about the peering VPC.
project_id
string
Specifies the ID of the project which the peering vpc belongs to.
vpc_id
string / required
Specifies the ID of peering VPC.
project
string / required
The name of the Tenant (Identity v2) or Project (Identity v3). (currently only project names are supported, and not project IDs).
region
string
The region to which the project belongs.
state
string
    Choices:
  • present ←
  • absent
Whether the given object should exist in Huawei Cloud.
timeouts
dictionary
The timeouts for each operations.
create
string
Default:
"15m"
The timeouts for create operation.
user
string / required
The user name to login with (currently only user names are supported, and not user IDs).

Notes

Note

  • For authentication, you can set identity_endpoint using the ANSIBLE_HWC_IDENTITY_ENDPOINT env variable.

  • For authentication, you can set user using the ANSIBLE_HWC_USER env variable.

  • For authentication, you can set password using the ANSIBLE_HWC_PASSWORD env variable.

  • For authentication, you can set domain using the ANSIBLE_HWC_DOMAIN env variable.

  • For authentication, you can set project using the ANSIBLE_HWC_PROJECT env variable.

  • For authentication, you can set region using the ANSIBLE_HWC_REGION env variable.

  • Environment variables values will only be used if the playbook values are not set.

Examples

# create a peering connect
- name: Create a local vpc
  hwc_network_vpc:
    cidr: "192.168.0.0/16"
    name: "ansible_network_vpc_test_local"
  register: vpc1
- name: Create a peering vpc
  hwc_network_vpc:
    cidr: "192.168.0.0/16"
    name: "ansible_network_vpc_test_peering"
  register: vpc2
- name: Create a peering connect
  community.general.hwc_vpc_peering_connect:
    local_vpc_id: "{{ vpc1.id }}"
    name: "ansible_network_peering_test"
    peering_vpc:
      vpc_id: "{{ vpc2.id }}"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
description
string
success
The description of vpc peering connection.

local_vpc_id
string
success
Specifies the ID of local VPC.

name
string
success
Specifies the name of the VPC peering connection. The value can contain 1 to 64 characters.

peering_vpc
dictionary
success
Specifies information about the peering VPC.

 
project_id
string
success
Specifies the ID of the project which the peering vpc belongs to.

 
vpc_id
string
success
Specifies the ID of peering VPC.



Authors

  • Huawei Inc. (@huaweicloud)