This package is deprecated. We recommend using the new Equinix package.
equinix-metal.getIpBlockRanges
Explore with Pulumi AI
This package is deprecated. We recommend using the new Equinix package.
Use this datasource to get CIDR expressions for allocated IP blocks of all the types in a project, optionally filtered by facility or metro.
There are four types of IP blocks in Equinix Metal: global IPv4, public IPv4, private IPv4 and IPv6. Both global and public IPv4 are routable from the Internet. Public IPv4 blocks are allocated in a facility or metro, and addresses from it can only be assigned to devices in that location. Addresses from Global IPv4 block can be assigned to a device in any metro.
The datasource has 4 list attributes: global_ipv4
, public_ipv4
, private_ipv4
and ipv6
, each listing CIDR notation (<network>/<mask>
) of respective blocks from the project.
Example Usage
using Pulumi;
using EquinixMetal = Pulumi.EquinixMetal;
class MyStack : Stack
{
public MyStack()
{
var projectId = "<UUID_of_your_project>";
var test = Output.Create(EquinixMetal.GetIpBlockRanges.InvokeAsync(new EquinixMetal.GetIpBlockRangesArgs
{
ProjectId = projectId,
}));
this.Out = test;
}
[Output("out")]
public Output<string> Out { get; set; }
}
package main
import (
"github.com/pulumi/pulumi-equinix-metal/sdk/v3/go/equinix-metal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
projectId := "<UUID_of_your_project>"
test, err := equinix - metal.GetIpBlockRanges(ctx, &GetIpBlockRangesArgs{
ProjectId: projectId,
}, nil)
if err != nil {
return err
}
ctx.Export("out", test)
return nil
})
}
Coming soon!
import pulumi
import pulumi_equinix_metal as equinix_metal
project_id = "<UUID_of_your_project>"
test = equinix_metal.get_ip_block_ranges(project_id=project_id)
pulumi.export("out", test)
import * as pulumi from "@pulumi/pulumi";
import * as equinix_metal from "@pulumi/equinix-metal";
const projectId = "<UUID_of_your_project>";
const test = equinix_metal.getIpBlockRanges({
projectId: projectId,
});
export const out = test;
Coming soon!
Using getIpBlockRanges
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getIpBlockRanges(args: GetIpBlockRangesArgs, opts?: InvokeOptions): Promise<GetIpBlockRangesResult>
function getIpBlockRangesOutput(args: GetIpBlockRangesOutputArgs, opts?: InvokeOptions): Output<GetIpBlockRangesResult>
def get_ip_block_ranges(facility: Optional[str] = None,
metro: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetIpBlockRangesResult
def get_ip_block_ranges_output(facility: Optional[pulumi.Input[str]] = None,
metro: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIpBlockRangesResult]
func GetIpBlockRanges(ctx *Context, args *GetIpBlockRangesArgs, opts ...InvokeOption) (*GetIpBlockRangesResult, error)
func GetIpBlockRangesOutput(ctx *Context, args *GetIpBlockRangesOutputArgs, opts ...InvokeOption) GetIpBlockRangesResultOutput
> Note: This function is named GetIpBlockRanges
in the Go SDK.
public static class GetIpBlockRanges
{
public static Task<GetIpBlockRangesResult> InvokeAsync(GetIpBlockRangesArgs args, InvokeOptions? opts = null)
public static Output<GetIpBlockRangesResult> Invoke(GetIpBlockRangesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIpBlockRangesResult> getIpBlockRanges(GetIpBlockRangesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: equinix-metal:index/getIpBlockRanges:getIpBlockRanges
arguments:
# arguments dictionary
The following arguments are supported:
- Project
Id string - ID of the project from which to list the blocks.
- Facility string
- 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.
- Metro string
- 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.
- Project
Id string - ID of the project from which to list the blocks.
- Facility string
- 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.
- Metro string
- 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.
- project
Id String - ID of the project from which to list the blocks.
- facility String
- 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.
- metro String
- 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.
- project
Id string - ID of the project from which to list the blocks.
- facility string
- 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.
- metro string
- 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.
- project_
id str - ID of the project from which to list the blocks.
- facility str
- 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.
- metro str
- 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.
- project
Id String - ID of the project from which to list the blocks.
- facility String
- 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.
- metro String
- 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.
getIpBlockRanges Result
The following output properties are available:
- Global
Ipv4s List<string> - list of CIDR expressions for Global IPv4 blocks in the project
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6s List<string>
- list of CIDR expressions for IPv6 blocks in the project
- Private
Ipv4s List<string> - list of CIDR expressions for Private IPv4 blocks in the project
- Project
Id string - Public
Ipv4s List<string> - list of CIDR expressions for Public IPv4 blocks in the project
- Facility string
- Metro string
- Global
Ipv4s []string - list of CIDR expressions for Global IPv4 blocks in the project
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6s []string
- list of CIDR expressions for IPv6 blocks in the project
- Private
Ipv4s []string - list of CIDR expressions for Private IPv4 blocks in the project
- Project
Id string - Public
Ipv4s []string - list of CIDR expressions for Public IPv4 blocks in the project
- Facility string
- Metro string
- global
Ipv4s List<String> - list of CIDR expressions for Global IPv4 blocks in the project
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6s List<String>
- list of CIDR expressions for IPv6 blocks in the project
- private
Ipv4s List<String> - list of CIDR expressions for Private IPv4 blocks in the project
- project
Id String - public
Ipv4s List<String> - list of CIDR expressions for Public IPv4 blocks in the project
- facility String
- metro String
- global
Ipv4s string[] - list of CIDR expressions for Global IPv4 blocks in the project
- id string
- The provider-assigned unique ID for this managed resource.
- ipv6s string[]
- list of CIDR expressions for IPv6 blocks in the project
- private
Ipv4s string[] - list of CIDR expressions for Private IPv4 blocks in the project
- project
Id string - public
Ipv4s string[] - list of CIDR expressions for Public IPv4 blocks in the project
- facility string
- metro string
- global_
ipv4s Sequence[str] - list of CIDR expressions for Global IPv4 blocks in the project
- id str
- The provider-assigned unique ID for this managed resource.
- ipv6s Sequence[str]
- list of CIDR expressions for IPv6 blocks in the project
- private_
ipv4s Sequence[str] - list of CIDR expressions for Private IPv4 blocks in the project
- project_
id str - public_
ipv4s Sequence[str] - list of CIDR expressions for Public IPv4 blocks in the project
- facility str
- metro str
- global
Ipv4s List<String> - list of CIDR expressions for Global IPv4 blocks in the project
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6s List<String>
- list of CIDR expressions for IPv6 blocks in the project
- private
Ipv4s List<String> - list of CIDR expressions for Private IPv4 blocks in the project
- project
Id String - public
Ipv4s List<String> - list of CIDR expressions for Public IPv4 blocks in the project
- facility String
- metro String
Package Details
- Repository
- Equinix Metal pulumi/pulumi-equinix-metal
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
metal
Terraform Provider.
This package is deprecated. We recommend using the new Equinix package.