community / community.general / 6.6.8 / module / hwc_vpc_route Creates a resource of Vpc/Route in Huawei Cloud | "added in version" 0.2.0 of community.general" Authors: Huawei Inc. (@huaweicloud)community.general.hwc_vpc_route (6.6.8) — module
Install with ansible-galaxy collection install community.general:==6.6.8
collections: - name: community.general version: 6.6.8
vpc route management.
# 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 hwc_vpc_peering_connect: local_vpc_id: "{{ vpc1.id }}" name: "ansible_network_peering_test" filters: - "name" peering_vpc: vpc_id: "{{ vpc2.id }}" register: connect
- name: Create a route community.general.hwc_vpc_route: vpc_id: "{{ vpc1.id }}" destination: "192.168.0.0/16" next_hop: "{{ connect.id }}"
id: description: - The id of resource to be managed. type: str type: default: peering description: - Specifies the type of route. required: false 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 vpc_id: description: - Specifies the VPC ID to which route is added. required: true 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 next_hop: description: - Specifies the next hop. The value is VPC peering connection ID. required: true type: str password: description: - The password to login with. required: true type: str destination: description: - Specifies the destination IP address or CIDR block. required: true type: str identity_endpoint: description: - The Identity authentication URL. required: true type: str
destination: description: - Specifies the destination IP address or CIDR block. returned: success type: str id: description: - UUID of the route. returned: success type: str next_hop: description: - Specifies the next hop. The value is VPC peering connection ID. returned: success type: str type: description: - Specifies the type of route. returned: success type: str vpc_id: description: - Specifies the VPC ID to which route is added. returned: success type: str