diff --git a/docs/data-sources/equinix_metal_ip_block_ranges.md b/docs/data-sources/equinix_metal_ip_block_ranges.md index 93ceb5587..5603c3b14 100644 --- a/docs/data-sources/equinix_metal_ip_block_ranges.md +++ b/docs/data-sources/equinix_metal_ip_block_ranges.md @@ -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 diff --git a/docs/data-sources/equinix_metal_precreated_ip_block.md b/docs/data-sources/equinix_metal_precreated_ip_block.md index a9f13e28c..4a878a7ea 100644 --- a/docs/data-sources/equinix_metal_precreated_ip_block.md +++ b/docs/data-sources/equinix_metal_precreated_ip_block.md @@ -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 diff --git a/docs/data-sources/equinix_metal_reserved_ip_block.md b/docs/data-sources/equinix_metal_reserved_ip_block.md index 56594317b..20b62ca46 100644 --- a/docs/data-sources/equinix_metal_reserved_ip_block.md +++ b/docs/data-sources/equinix_metal_reserved_ip_block.md @@ -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 diff --git a/equinix/data_source_metal_ip_block_ranges.go b/equinix/data_source_metal_ip_block_ranges.go index 0769b91ca..50158109f 100644 --- a/equinix/data_source_metal_ip_block_ranges.go +++ b/equinix/data_source_metal_ip_block_ranges.go @@ -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, }, diff --git a/equinix/data_source_metal_reserved_ip_block.go b/equinix/data_source_metal_reserved_ip_block.go index 8210440cd..e847d7d36 100644 --- a/equinix/data_source_metal_reserved_ip_block.go +++ b/equinix/data_source_metal_reserved_ip_block.go @@ -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": {