Note
This module is part of the community.general collection (version 10.7.3).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.general. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: community.general.hwc_network_vpc.
The below requirements are needed on the host that executes this module.
Parameter | Comments |
|---|---|
cidr string / required | The range of available subnets in the VPC. |
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. |
name string / required | The name of vpc. |
password string / required | The password to login with. |
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 | Whether the given object should exist in VPC. Choices:
|
timeouts dictionary | The timeouts for each operations. Default: |
|
create string |
The timeout for create operation. Default: |
|
delete string |
The timeout for delete operation. Default: |
|
update string |
The timeout for update operation. Default: |
user string / required | The user name to login with. Currently only user names are supported, and not user IDs. |
Attribute | Support | Description |
|---|---|---|
check_mode | Support: full | Can run in |
diff_mode | Support: none | Will return details on what has changed (or possibly needs changing in |
Note
ANSIBLE_HWC_IDENTITY_ENDPOINT environment variable.ANSIBLE_HWC_USER environment variable.ANSIBLE_HWC_PASSWORD environment variable.ANSIBLE_HWC_DOMAIN environment variable.ANSIBLE_HWC_PROJECT environment variable.ANSIBLE_HWC_REGION environment variable.- 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
Common return values are documented here, the following are the fields unique to this module:
Key | Description |
|---|---|
cidr string | The range of available subnets in the VPC. Returned: success |
boolean | Show whether the shared SNAT is enabled. Returned: success |
id string | The ID of VPC. Returned: success |
name string | The name of VPC. Returned: success |
routes complex | The route information. Returned: success |
|
destination string |
The destination network segment of a route. Returned: success |
|
next_hop string |
The next hop of a route. If the route type is peering, it provides VPC peering connection ID. Returned: success |
status string | The status of VPC. Returned: success |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/general/hwc_network_vpc_module.html