Skip to content

Commit

Permalink
fix docs typos and improve ds metal reserved ip block schema validations
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscar Cobles committed Nov 17, 2022
1 parent 6247834 commit 3a521d4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/data-sources/equinix_metal_ip_block_ranges.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ output "out" {
The following arguments are supported:

* `project_id` - (Required) ID of the project from which to list the blocks.
* `facility` - (Optional) Facility code filtering the IP blocks. Global IPv4 blcoks will be listed
* `facility` - (Optional) Facility code filtering the IP blocks. Global IPv4 blocks will be listed
anyway. If you omit this and metro, all the block from the project will be listed.
* `metro` - (Optional) Metro code filtering the IP blocks. Global IPv4 blcoks will be listed
* `metro` - (Optional) Metro code filtering the IP blocks. Global IPv4 blocks will be listed
anyway. If you omit this and facility, all the block from the project will be listed.

## Attributes Reference
Expand Down
8 changes: 5 additions & 3 deletions docs/data-sources/equinix_metal_precreated_ip_block.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ subcategory: "Metal"

# equinix_metal_precreated_ip_block (Data Source)

Use this data source to get CIDR expression for both precreated(management)/elastic IPv6 and IPv4 blocks in Equinix Metal.
Use this data source to get CIDR expression for recreated(management) IPv6 and IPv4 blocks in Equinix Metal.
You can then use the cidrsubnet TF builtin function to derive subnets.

-> **NOTE:** Precreated IP blocks for a metro will not be available until first device is created in that metro.
~> For backward compatibility, this data source will also return reserved (elastic) IP blocks.

-> **NOTE:** Public IPv4 blocks auto-assigned to a device cannot be retrieved. If you need that information, consider using the [equinix_metal_device](equinix_metal_device.md) data source instead.
-> Precreated IP blocks for a metro will not be available until first device is created in that metro.

-> Public IPv4 blocks auto-assigned to a device cannot be retrieved. If you need that information, consider using the [equinix_metal_device](equinix_metal_device.md) data source instead.

## Example Usage

Expand Down
2 changes: 2 additions & 0 deletions docs/data-sources/equinix_metal_reserved_ip_block.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ subcategory: "Metal"
Use this data source to find IP address blocks in Equinix Metal. You can use IP address or a block
ID for lookup.

~> For backward compatibility, this data source can be also used for precreated (management) IP blocks.

~> VRF features are not generally available. The interfaces related to VRF resources may change ahead of general availability.

## Example Usage
Expand Down
4 changes: 2 additions & 2 deletions equinix/data_source_metal_ip_block_ranges.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ func dataSourceMetalIPBlockRanges() *schema.Resource {
},
"facility": {
Type: schema.TypeString,
Description: "Facility code filtering the IP blocks. Global IPv4 blcoks will be listed anyway. If you omit this and metro, all the block from the project will be listed",
Description: "Facility code filtering the IP blocks. Global IPv4 blocks will be listed anyway. If you omit this and metro, all the block from the project will be listed",
Optional: true,
},
"metro": {
Type: schema.TypeString,
Description: "Metro code filtering the IP blocks. Global IPv4 blcoks will be listed anyway. If you omit this and facility, all the block from the project will be listed",
Description: "Metro code filtering the IP blocks. Global IPv4 blocks will be listed anyway. If you omit this and facility, all the block from the project will be listed",
Optional: true,
StateFunc: toLower,
},
Expand Down
2 changes: 2 additions & 0 deletions equinix/data_source_metal_reserved_ip_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ func dataSourceMetalReservedIPBlock() *schema.Resource {
Computed: true,
Description: "ID of the project where the searched block should be",
ConflictsWith: []string{"id"},
RequiredWith: []string{"ip_address"},
},
"ip_address": {
Type: schema.TypeString,
Optional: true,
Description: "Find block containing this IP address in given project",
ConflictsWith: []string{"id"},
RequiredWith: []string{"project_id"},
},

"global": {
Expand Down

0 comments on commit 3a521d4

Please sign in to comment.