Skip to content

Latest commit

 

History

History
61 lines (47 loc) · 2.35 KB

vpc_subnet_info.md

File metadata and controls

61 lines (47 loc) · 2.35 KB

vpc_subnet_info

Get info about a Linode VPC Subnet.

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: Get info about a VPC Subnet by label
  linode.cloud.vpc_subnet_info:
    vpc_id: 12345
    label: my-subnet
- name: Get info about a VPC Subnet by ID
  linode.cloud.vpc_subnet_info:
    vpc_id: 12345
    id: 123

Parameters

Field Type Required Description
vpc_id int Required The ID of the VPC for this resource.
label str Optional The label of the VPC Subnet to resolve. (Conflicts With: id)
id int Optional The ID of the VPC Subnet to resolve. (Conflicts With: label)

Return Values

  • subnet - The returned VPC Subnet.

    • Sample Response:
      {
          "created": "2023-08-31T18:53:04",
          "id": 271,
          "ipv4": "10.0.0.0/24",
          "label": "test-subnet",
          "linodes": [
              {
                  "id": 1234567,
                  "interfaces": [{"active": false, "id": 654321}],
              }
          ],
          "updated": "2023-08-31T18:53:04"
      }