Skip to main content

Retrieving the Data Source

This data source can be retrieved by one of ID or name.
Retrieve by ID
To retrieve by ID, fill in only the id field:
data ... {
    id = "your-ID"
}
Retrieve by Name
To retrieve by name, fill in only the name and parent_id fields:
data ... {
    name      = "your name"
    parent_id = "data-source-parent-id"
}

Schema

Optional

  • id (String) Identifier for the resource, unique for its resource type.
  • name (String) Human readable name for the resource.
  • parent_id (String) Identifier of the parent resource to which the resource belongs.

Read-Only

  • created_at (String) : Timestamp indicating when the resource was created. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM
  • ipv4_private (Attributes) Cannot be set alongside ipv4_public. (see below for nested schema)
  • ipv4_public (Attributes) Cannot be set alongside ipv4_private. (see below for nested schema)
  • labels (Map of String) : Labels associated with the resource.
  • metadata (Attributes) : Metadata for the Allocation. metadata.parent_id represents IAM Container.

    Inner value description

    Common resource metadata. (see below for nested schema)
  • resource_version (Number) : Version of the resource for safe concurrent modifications and consistent reads. Positive and monotonically increases on each resource spec change (but not on each change of the resource’s container(s) or status). Service allows zero value or current.
  • status (Attributes) Contains the current status of the allocation, indicating its state and any additional details. (see below for nested schema)
  • updated_at (String) : Timestamp indicating when the resource was last updated. A string representing a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ or YYYY-MM-DDTHH:MM:SS.SSS±HH:MM

Nested Schema for ipv4_private

Read-Only:
  • cidr (String) : CIDR block for IPv4 Allocation. May be a single IP address (such as 10.2.3.4), a prefix length (such as /24) or a CIDR-formatted string (such as 10.1.2.0/24). Random address (/32) from pool would be allocated if field is omitted.
  • pool_id (String) : Pool for the IPv4 private allocation. Cannot be set alongside subnet_id.
  • subnet_id (String) : Subnet ID. Required same subnet to use allocation in subnet-resources (e.g. Network Interface) Cannot be set alongside pool_id.

Nested Schema for ipv4_public

Read-Only:
  • cidr (String) : CIDR block for IPv4 Allocation. May be a single IP address (such as 10.2.3.4), a prefix length (such as /32) or a CIDR-formatted string (such as 10.1.2.0/32). Random address (/32) from pool would be allocated if field is omitted.
  • pool_id (String) Pool for the IPv4 public allocation.

Nested Schema for metadata

Nested Schema for status

Read-Only:
  • assignment (Attributes) : Information about the assignment associated with the allocation, such as network interface or load balancer assignment. (see below for nested schema)
  • details (Attributes) : Detailed information about the allocation status, including the allocated CIDR, pool ID, scope type, and IP version. (see below for nested schema)
  • state (String) : This field represents the current state of the allocation.

    Supported values

    Enumeration of possible states of the Allocation. Possible values:
    • STATE_UNSPECIFIED - Default state, unspecified.
    • CREATING - Allocation is being created.
    • ALLOCATED - Allocation is ready for use.
    • ASSIGNED - Allocation is used.
    • DELETING - Allocation is being deleted.
  • static (Boolean) If false - Lifecycle of allocation depends on resource that using it.

Nested Schema for status.assignment

Read-Only:

Nested Schema for status.assignment.load_balancer

Read-Only:
  • id (String) ID of the Load Balancer.

Nested Schema for status.assignment.network_interface

Read-Only:
  • instance_id (String) ID of the Compute instance network interface belongs to.
  • name (String) Network interface name

Nested Schema for status.details

Read-Only:
  • allocated_cidr (String)
  • pool_id (String)
  • version (String) :

    Supported values

    Possible values:
    • IP_VERSION_UNSPECIFIED - Default, unspecified IP version.
    • IPV4 - IPv4 address.
    • IPV6 - IPv6 address.