Skip to content

Latest commit

 

History

History
85 lines (68 loc) · 3.46 KB

File metadata and controls

85 lines (68 loc) · 3.46 KB

vpc

Create, read, and update a Linode VPC.

Minimum Required Fields

Field Type Required Description
api_token str Required The Linode account personal access token. It is necessary to run the module.
It can be exposed by the environment variable LINODE_API_TOKEN instead.
See details in Usage.

Examples

- name: Create a VPC 
  linode.cloud.vpc:
    label: my-vpc
    region: us-east
    description: A description of this VPC.
    state: present
# NOTE: IPv6 VPCs may not currently be available to all users.
- name: Create a VPC with an auto-allocated IPv6 range
  linode.cloud.vpc:
    label: my-vpc
    region: us-east
    ipv6:
    - range: auto
    state: present
- name: Delete a VPC
  linode.cloud.vpc:
    label: my-vpc
    state: absent

Parameters

Field Type Required Description
label str Required This VPC's unique label.
state str Required The state of this token. (Choices: present, absent)
description str Optional A description describing this VPC.
region str Optional The region this VPC is located in.
ipv6 (sub-options) list Optional A list of IPv6 ranges in CIDR notation. NOTE: IPv6 VPCs may not currently be available to all users.

ipv6

Field Type Required Description
range str Optional The IPv6 range assigned to this VPC.
allocation_class str Optional The labeled IPv6 Inventory that the VPC Prefix should be allocated from.

Return Values

  • vpc - The VPC in JSON serialized form.

    • Sample Response:
      {
          "created": "2023-08-31T18:35:01",
          "description": "A description of this VPC",
          "id": 344,
          "ipv6": [
              {
                  "range": "2001:db8:acad:0::/52"
              }
          ],
          "label": "my-vpc",
          "region": "us-east",
          "subnets": [],
          "updated": "2023-08-31T18:35:03"
      }
    • See the Linode API response documentation for a list of returned fields