ionoscloud.getIpblock
Explore with Pulumi AI
The IP Block data source can be used to search for and return an existing Ip Block. You can provide a string for the id, the name or the location parameters which will be compared with the provisioned Ip Blocks. If a single match is found, it will be returned. If your search results in multiple matches, an error will be returned. When this happens, please refine your search string so that it is specific enough to return only one result.
Example Usage
By ID
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getIpblock({
id: "ipblock_id",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_ipblock(id="ipblock_id")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupIpblock(ctx, &ionoscloud.LookupIpblockArgs{
Id: pulumi.StringRef("ipblock_id"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetIpblock.Invoke(new()
{
Id = "ipblock_id",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetIpblockArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = IonoscloudFunctions.getIpblock(GetIpblockArgs.builder()
.id("ipblock_id")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getIpblock
arguments:
id: ipblock_id
By Name
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getIpblock({
name: "IP Block Name",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_ipblock(name="IP Block Name")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupIpblock(ctx, &ionoscloud.LookupIpblockArgs{
Name: pulumi.StringRef("IP Block Name"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetIpblock.Invoke(new()
{
Name = "IP Block Name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetIpblockArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = IonoscloudFunctions.getIpblock(GetIpblockArgs.builder()
.name("IP Block Name")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getIpblock
arguments:
name: IP Block Name
By Location
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getIpblock({
location: "us/las",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_ipblock(location="us/las")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupIpblock(ctx, &ionoscloud.LookupIpblockArgs{
Location: pulumi.StringRef("us/las"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetIpblock.Invoke(new()
{
Location = "us/las",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetIpblockArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = IonoscloudFunctions.getIpblock(GetIpblockArgs.builder()
.location("us/las")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getIpblock
arguments:
location: us/las
By Name & Location
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getIpblock({
location: "us/las",
name: "IP Block Name",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_ipblock(location="us/las",
name="IP Block Name")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.LookupIpblock(ctx, &ionoscloud.LookupIpblockArgs{
Location: pulumi.StringRef("us/las"),
Name: pulumi.StringRef("IP Block Name"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = Ionoscloud.GetIpblock.Invoke(new()
{
Location = "us/las",
Name = "IP Block Name",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.IonoscloudFunctions;
import com.pulumi.ionoscloud.inputs.GetIpblockArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var example = IonoscloudFunctions.getIpblock(GetIpblockArgs.builder()
.location("us/las")
.name("IP Block Name")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getIpblock
arguments:
location: us/las
name: IP Block Name
Using getIpblock
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 getIpblock(args: GetIpblockArgs, opts?: InvokeOptions): Promise<GetIpblockResult>
function getIpblockOutput(args: GetIpblockOutputArgs, opts?: InvokeOptions): Output<GetIpblockResult>
def get_ipblock(id: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
size: Optional[float] = None,
timeouts: Optional[GetIpblockTimeouts] = None,
opts: Optional[InvokeOptions] = None) -> GetIpblockResult
def get_ipblock_output(id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
size: Optional[pulumi.Input[float]] = None,
timeouts: Optional[pulumi.Input[GetIpblockTimeoutsArgs]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetIpblockResult]
func LookupIpblock(ctx *Context, args *LookupIpblockArgs, opts ...InvokeOption) (*LookupIpblockResult, error)
func LookupIpblockOutput(ctx *Context, args *LookupIpblockOutputArgs, opts ...InvokeOption) LookupIpblockResultOutput
> Note: This function is named LookupIpblock
in the Go SDK.
public static class GetIpblock
{
public static Task<GetIpblockResult> InvokeAsync(GetIpblockArgs args, InvokeOptions? opts = null)
public static Output<GetIpblockResult> Invoke(GetIpblockInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetIpblockResult> getIpblock(GetIpblockArgs args, InvokeOptions options)
public static Output<GetIpblockResult> getIpblock(GetIpblockArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:index/getIpblock:getIpblock
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- ID of an existing Ip Block that you want to search for.
- Location string
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- Name string
- Name of an existing Ip Block that you want to search for.
- Size double
- The number of IP addresses to reserve for this block.
- Timeouts
Get
Ipblock Timeouts
- Id string
- ID of an existing Ip Block that you want to search for.
- Location string
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- Name string
- Name of an existing Ip Block that you want to search for.
- Size float64
- The number of IP addresses to reserve for this block.
- Timeouts
Get
Ipblock Timeouts
- id String
- ID of an existing Ip Block that you want to search for.
- location String
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- name String
- Name of an existing Ip Block that you want to search for.
- size Double
- The number of IP addresses to reserve for this block.
- timeouts
Get
Ipblock Timeouts
- id string
- ID of an existing Ip Block that you want to search for.
- location string
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- name string
- Name of an existing Ip Block that you want to search for.
- size number
- The number of IP addresses to reserve for this block.
- timeouts
Get
Ipblock Timeouts
- id str
- ID of an existing Ip Block that you want to search for.
- location str
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- name str
- Name of an existing Ip Block that you want to search for.
- size float
- The number of IP addresses to reserve for this block.
- timeouts
Get
Ipblock Timeouts
- id String
- ID of an existing Ip Block that you want to search for.
- location String
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- name String
- Name of an existing Ip Block that you want to search for.
- size Number
- The number of IP addresses to reserve for this block.
- timeouts Property Map
getIpblock Result
The following output properties are available:
- Id string
- The id of Ip Block
- Ip
Consumers List<GetIpblock Ip Consumer> - Read-Only attribute. Lists consumption detail of an individual ip
- Ips List<string>
- The list of IP addresses associated with this block.
- Location string
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- Name string
- The name of Ip Block
- Size double
- The number of IP addresses to reserve for this block.
- Timeouts
Get
Ipblock Timeouts
- Id string
- The id of Ip Block
- Ip
Consumers []GetIpblock Ip Consumer - Read-Only attribute. Lists consumption detail of an individual ip
- Ips []string
- The list of IP addresses associated with this block.
- Location string
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- Name string
- The name of Ip Block
- Size float64
- The number of IP addresses to reserve for this block.
- Timeouts
Get
Ipblock Timeouts
- id String
- The id of Ip Block
- ip
Consumers List<GetIpblock Ip Consumer> - Read-Only attribute. Lists consumption detail of an individual ip
- ips List<String>
- The list of IP addresses associated with this block.
- location String
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- name String
- The name of Ip Block
- size Double
- The number of IP addresses to reserve for this block.
- timeouts
Get
Ipblock Timeouts
- id string
- The id of Ip Block
- ip
Consumers GetIpblock Ip Consumer[] - Read-Only attribute. Lists consumption detail of an individual ip
- ips string[]
- The list of IP addresses associated with this block.
- location string
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- name string
- The name of Ip Block
- size number
- The number of IP addresses to reserve for this block.
- timeouts
Get
Ipblock Timeouts
- id str
- The id of Ip Block
- ip_
consumers Sequence[GetIpblock Ip Consumer] - Read-Only attribute. Lists consumption detail of an individual ip
- ips Sequence[str]
- The list of IP addresses associated with this block.
- location str
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- name str
- The name of Ip Block
- size float
- The number of IP addresses to reserve for this block.
- timeouts
Get
Ipblock Timeouts
- id String
- The id of Ip Block
- ip
Consumers List<Property Map> - Read-Only attribute. Lists consumption detail of an individual ip
- ips List<String>
- The list of IP addresses associated with this block.
- location String
- The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
- name String
- The name of Ip Block
- size Number
- The number of IP addresses to reserve for this block.
- timeouts Property Map
Supporting Types
GetIpblockIpConsumer
- Datacenter
Id string - Datacenter
Name string - Ip string
- K8s
Cluster stringUuid - K8s
Nodepool stringUuid - Mac string
- Nic
Id string - Server
Id string - Server
Name string
- Datacenter
Id string - Datacenter
Name string - Ip string
- K8s
Cluster stringUuid - K8s
Nodepool stringUuid - Mac string
- Nic
Id string - Server
Id string - Server
Name string
- datacenter
Id String - datacenter
Name String - ip String
- k8s
Cluster StringUuid - k8s
Nodepool StringUuid - mac String
- nic
Id String - server
Id String - server
Name String
- datacenter
Id string - datacenter
Name string - ip string
- k8s
Cluster stringUuid - k8s
Nodepool stringUuid - mac string
- nic
Id string - server
Id string - server
Name string
- datacenter_
id str - datacenter_
name str - ip str
- k8s_
cluster_ struuid - k8s_
nodepool_ struuid - mac str
- nic_
id str - server_
id str - server_
name str
- datacenter
Id String - datacenter
Name String - ip String
- k8s
Cluster StringUuid - k8s
Nodepool StringUuid - mac String
- nic
Id String - server
Id String - server
Name String
GetIpblockTimeouts
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.