community.general.hwc_network_vpc (8.5.0) — module

Creates a Huawei Cloud VPC

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

Represents an vpc resource.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create a vpc
  community.general.hwc_network_vpc:
      identity_endpoint: "{{ identity_endpoint }}"
      user: "{{ user }}"
      password: "{{ password }}"
      domain: "{{ domain }}"
      project: "{{ project }}"
      region: "{{ region }}"
      name: "vpc_1"
      cidr: "192.168.100.0/24"
      state: present

Inputs

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

cidr:
    description:
    - The range of available subnets in the vpc.
    required: true
    type: str

name:
    description:
    - The name of vpc.
    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 vpc.
    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 timeout for create operation.
        type: str
      delete:
        default: 15m
        description:
        - The timeout for delete operation.
        type: str
      update:
        default: 15m
        description:
        - The timeout for update operation.
        type: str
    type: dict

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

Outputs

cidr:
  description:
  - the range of available subnets in the vpc.
  returned: success
  type: str
enable_shared_snat:
  description:
  - show whether the shared snat is enabled.
  returned: success
  type: bool
id:
  description:
  - the id of vpc.
  returned: success
  type: str
name:
  description:
  - the name of vpc.
  returned: success
  type: str
routes:
  contains:
    destination:
      description:
      - the destination network segment of a route.
      returned: success
      type: str
    next_hop:
      description:
      - the next hop of a route. If the route type is peering, it will provide VPC
        peering connection ID.
      returned: success
      type: str
  description:
  - the route information.
  returned: success
  type: complex
status:
  description:
  - the status of vpc.
  returned: success
  type: str