goldyfruit / goldyfruit.ibmcloud_automation / 1.0.4 / module / ic_is_subnet Manage VPC subnets on IBM Cloud. | "added in version" 2.9 of goldyfruit.ibmcloud_automation" Authors: Gaëtan Trellu (@goldyfruit) preview | supported by communitygoldyfruit.ibmcloud_automation.ic_is_subnet (1.0.4) — module
Install with ansible-galaxy collection install goldyfruit.ibmcloud_automation:==1.0.4
collections: - name: goldyfruit.ibmcloud_automation version: 1.0.4
This module creates a new subnet from a subnet prototype object. The prototype object is structured in the same way as a retrieved subnet, and contains the information necessary to create the new subnet. For this request to succeed, the prototype's CIDR block must not overlap with an existing subnet in the VPC.
- name: Create subnet ic_is_subnet: subnet: ibmcloud-subnet-baby vpc: ibmcloud-vpc-baby ipv4_cidr_block: 192.168.10.0/24
- name: Delete subnet ic_is_subnet: subnet: ibmcloud-volume-baby vpc: ibmcloud-vpc-baby state: absent
vpc: description: - The VPC the subnet is to be a part of. required: true type: str zone: description: - The zone the subnet is to reside in. type: str state: choices: - present - absent default: present description: - Should the resource be present or absent. type: str subnet: description: - Subnet name or ID. required: true type: str ip_version: choices: - both - ipv4 - ipv6 description: - The IP version(s) supported by this subnet; if unspecified, ipv4 is used. type: str network_acl: description: - The network ACL to use for this subnet; if unspecified, the default network ACL for the VPC is used. type: str routing_table: description: - The routing table to use for this subnet; if unspecified, the default routing table for the VPC is used. type: str public_gateway: description: - The public gateway to handle internet bound traffic for this subnet. type: str resource_group: description: - The resource group to use. If unspecified, the account's default resource group is used. type: str ipv4_cidr_block: description: - The IPv4 range of the subnet, expressed in CIDR format. The prefix length of the subnet's CIDR must be between 8 and 29. The IPv4 range of the subnet's CIDR must fall within an existing address prefix in the VPC. The subnet will be created in the zone of the address prefix that contains the IPv4 CIDR. If zone is specified, it must match the zone of the address prefix that contains the subnet's IPv4 CIDR. type: str total_ipv4_address_count: description: - The total number of IPv4 addresses required. Must be a power of 2. The VPC must have a default address prefix in the specified zone, and that prefix must have a free CIDR range with at least this number of addresses. type: int