community / community.general / 0.1.1 / module / hwc_vpc_private_ip Creates a resource of Vpc/PrivateIP in Huawei Cloud Authors: Huawei Inc. (@huaweicloud) preview | supported by communitycommunity.general.hwc_vpc_private_ip (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
vpc private ip management.
# create a private ip - name: create vpc hwc_network_vpc: cidr: "192.168.100.0/24" name: "ansible_network_vpc_test" register: vpc
- name: create subnet hwc_vpc_subnet: gateway_ip: "192.168.100.32" name: "ansible_network_subnet_test" dhcp_enable: True vpc_id: "{{ vpc.id }}" cidr: "192.168.100.0/26" register: subnet
- name: create a private ip hwc_vpc_private_ip: subnet_id: "{{ subnet.id }}" ip_address: "192.168.100.33"
id: description: - The id of resource to be managed. 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 subnet_id: description: - Specifies the ID of the subnet from which IP addresses are assigned. Cannot be changed after creating the private ip. required: true type: str ip_address: description: - Specifies the target IP address. The value can be an available IP address in the subnet. If it is not specified, the system automatically assigns an IP address. Cannot be changed after creating the private ip. required: false type: str identity_endpoint: description: - The Identity authentication URL. required: true type: str
ip_address: description: - Specifies the target IP address. The value can be an available IP address in the subnet. If it is not specified, the system automatically assigns an IP address. returned: success type: str subnet_id: description: - Specifies the ID of the subnet from which IP addresses are assigned. returned: success type: str