community.general.hwc_vpc_peering_connect (8.5.0) — module

Creates a resource of Vpc/PeeringConnect in Huawei Cloud

| "added in version" 0.2.0 of community.general"

Authors: Huawei Inc. (@huaweicloud)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

vpc peering management.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# 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
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a peering vpc
  hwc_network_vpc:
    cidr: "192.168.0.0/16"
    name: "ansible_network_vpc_test_peering"
  register: vpc2
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- 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 }}"

Inputs

    
id:
    description:
    - The ID of resource to be managed.
    type: str

name:
    description:
    - Specifies the name of the VPC peering connection. The value can contain 1 to 64
      characters.
    required: true
    type: str

user:
    description:
    - The user name to login with.
    - Currently only user names are supported, and not user IDs.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Whether the given object should exist in Huawei Cloud.
    type: str

domain:
    description:
    - The name of the Domain to scope to (Identity v3).
    - Currently only domain names are supported, and not domain IDs.
    required: true
    type: str

region:
    description:
    - The region to which the project belongs.
    type: str

project:
    description:
    - The name of the Tenant (Identity v2) or Project (Identity v3).
    - Currently only project names are supported, and not project IDs.
    required: true
    type: str

password:
    description:
    - The password to login with.
    required: true
    type: str

timeouts:
    default: {}
    description:
    - The timeouts for each operations.
    suboptions:
      create:
        default: 15m
        description:
        - The timeouts for create operation.
        type: str
    type: dict

description:
    description:
    - The description of vpc peering connection.
    required: false
    type: str

peering_vpc:
    description:
    - Specifies information about the peering VPC.
    required: true
    suboptions:
      project_id:
        description:
        - Specifies the ID of the project which the peering vpc belongs to.
        required: false
        type: str
      vpc_id:
        description:
        - Specifies the ID of peering VPC.
        required: true
        type: str
    type: dict

local_vpc_id:
    description:
    - Specifies the ID of local VPC.
    required: true
    type: str

identity_endpoint:
    description:
    - The Identity authentication URL.
    required: true
    type: str

Outputs

description:
  description:
  - The description of vpc peering connection.
  returned: success
  type: str
local_vpc_id:
  description:
  - Specifies the ID of local VPC.
  returned: success
  type: str
name:
  description:
  - Specifies the name of the VPC peering connection. The value can contain 1 to 64
    characters.
  returned: success
  type: str
peering_vpc:
  contains:
    project_id:
      description:
      - Specifies the ID of the project which the peering vpc belongs to.
      returned: success
      type: str
    vpc_id:
      description:
      - Specifies the ID of peering VPC.
      returned: success
      type: str
  description:
  - Specifies information about the peering VPC.
  returned: success
  type: dict