1. Packages
  2. Ionoscloud Provider
  3. API Docs
  4. Ipblock
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

ionoscloud.Ipblock

Explore with Pulumi AI

ionoscloud logo
ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud

    Manages IP Blocks on IonosCloud. IP Blocks contain reserved public IP addresses that can be assigned servers or other resources.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ionoscloud from "@pulumi/ionoscloud";
    
    const example = new ionoscloud.Ipblock("example", {
        location: "us/las",
        size: 1,
    });
    
    import pulumi
    import pulumi_ionoscloud as ionoscloud
    
    example = ionoscloud.Ipblock("example",
        location="us/las",
        size=1)
    
    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.NewIpblock(ctx, "example", &ionoscloud.IpblockArgs{
    			Location: pulumi.String("us/las"),
    			Size:     pulumi.Float64(1),
    		})
    		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 = new Ionoscloud.Ipblock("example", new()
        {
            Location = "us/las",
            Size = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ionoscloud.Ipblock;
    import com.pulumi.ionoscloud.IpblockArgs;
    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) {
            var example = new Ipblock("example", IpblockArgs.builder()
                .location("us/las")
                .size(1)
                .build());
    
        }
    }
    
    resources:
      example:
        type: ionoscloud:Ipblock
        properties:
          location: us/las
          size: 1
    

    Create Ipblock Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Ipblock(name: string, args: IpblockArgs, opts?: CustomResourceOptions);
    @overload
    def Ipblock(resource_name: str,
                args: IpblockArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Ipblock(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                location: Optional[str] = None,
                size: Optional[float] = None,
                ip_consumers: Optional[Sequence[IpblockIpConsumerArgs]] = None,
                ipblock_id: Optional[str] = None,
                name: Optional[str] = None,
                timeouts: Optional[IpblockTimeoutsArgs] = None)
    func NewIpblock(ctx *Context, name string, args IpblockArgs, opts ...ResourceOption) (*Ipblock, error)
    public Ipblock(string name, IpblockArgs args, CustomResourceOptions? opts = null)
    public Ipblock(String name, IpblockArgs args)
    public Ipblock(String name, IpblockArgs args, CustomResourceOptions options)
    
    type: ionoscloud:Ipblock
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args IpblockArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args IpblockArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args IpblockArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args IpblockArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args IpblockArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var ipblockResource = new Ionoscloud.Ipblock("ipblockResource", new()
    {
        Location = "string",
        Size = 0,
        IpConsumers = new[]
        {
            new Ionoscloud.Inputs.IpblockIpConsumerArgs
            {
                DatacenterId = "string",
                DatacenterName = "string",
                Ip = "string",
                K8sClusterUuid = "string",
                K8sNodepoolUuid = "string",
                Mac = "string",
                NicId = "string",
                ServerId = "string",
                ServerName = "string",
            },
        },
        IpblockId = "string",
        Name = "string",
        Timeouts = new Ionoscloud.Inputs.IpblockTimeoutsArgs
        {
            Create = "string",
            Default = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := ionoscloud.NewIpblock(ctx, "ipblockResource", &ionoscloud.IpblockArgs{
    	Location: pulumi.String("string"),
    	Size:     pulumi.Float64(0),
    	IpConsumers: ionoscloud.IpblockIpConsumerArray{
    		&ionoscloud.IpblockIpConsumerArgs{
    			DatacenterId:    pulumi.String("string"),
    			DatacenterName:  pulumi.String("string"),
    			Ip:              pulumi.String("string"),
    			K8sClusterUuid:  pulumi.String("string"),
    			K8sNodepoolUuid: pulumi.String("string"),
    			Mac:             pulumi.String("string"),
    			NicId:           pulumi.String("string"),
    			ServerId:        pulumi.String("string"),
    			ServerName:      pulumi.String("string"),
    		},
    	},
    	IpblockId: pulumi.String("string"),
    	Name:      pulumi.String("string"),
    	Timeouts: &ionoscloud.IpblockTimeoutsArgs{
    		Create:  pulumi.String("string"),
    		Default: pulumi.String("string"),
    		Delete:  pulumi.String("string"),
    		Update:  pulumi.String("string"),
    	},
    })
    
    var ipblockResource = new Ipblock("ipblockResource", IpblockArgs.builder()
        .location("string")
        .size(0)
        .ipConsumers(IpblockIpConsumerArgs.builder()
            .datacenterId("string")
            .datacenterName("string")
            .ip("string")
            .k8sClusterUuid("string")
            .k8sNodepoolUuid("string")
            .mac("string")
            .nicId("string")
            .serverId("string")
            .serverName("string")
            .build())
        .ipblockId("string")
        .name("string")
        .timeouts(IpblockTimeoutsArgs.builder()
            .create("string")
            .default_("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    ipblock_resource = ionoscloud.Ipblock("ipblockResource",
        location="string",
        size=0,
        ip_consumers=[{
            "datacenter_id": "string",
            "datacenter_name": "string",
            "ip": "string",
            "k8s_cluster_uuid": "string",
            "k8s_nodepool_uuid": "string",
            "mac": "string",
            "nic_id": "string",
            "server_id": "string",
            "server_name": "string",
        }],
        ipblock_id="string",
        name="string",
        timeouts={
            "create": "string",
            "default": "string",
            "delete": "string",
            "update": "string",
        })
    
    const ipblockResource = new ionoscloud.Ipblock("ipblockResource", {
        location: "string",
        size: 0,
        ipConsumers: [{
            datacenterId: "string",
            datacenterName: "string",
            ip: "string",
            k8sClusterUuid: "string",
            k8sNodepoolUuid: "string",
            mac: "string",
            nicId: "string",
            serverId: "string",
            serverName: "string",
        }],
        ipblockId: "string",
        name: "string",
        timeouts: {
            create: "string",
            "default": "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: ionoscloud:Ipblock
    properties:
        ipConsumers:
            - datacenterId: string
              datacenterName: string
              ip: string
              k8sClusterUuid: string
              k8sNodepoolUuid: string
              mac: string
              nicId: string
              serverId: string
              serverName: string
        ipblockId: string
        location: string
        name: string
        size: 0
        timeouts:
            create: string
            default: string
            delete: string
            update: string
    

    Ipblock Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Ipblock resource accepts the following input properties:

    Location string
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    Size double
    [integer] The number of IP addresses to reserve for this block.
    IpConsumers List<IpblockIpConsumer>
    Read-Only attribute. Lists consumption detail of an individual ip
    IpblockId string
    Name string
    [string] The name of Ip Block
    Timeouts IpblockTimeouts
    Location string
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    Size float64
    [integer] The number of IP addresses to reserve for this block.
    IpConsumers []IpblockIpConsumerArgs
    Read-Only attribute. Lists consumption detail of an individual ip
    IpblockId string
    Name string
    [string] The name of Ip Block
    Timeouts IpblockTimeoutsArgs
    location String
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    size Double
    [integer] The number of IP addresses to reserve for this block.
    ipConsumers List<IpblockIpConsumer>
    Read-Only attribute. Lists consumption detail of an individual ip
    ipblockId String
    name String
    [string] The name of Ip Block
    timeouts IpblockTimeouts
    location string
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    size number
    [integer] The number of IP addresses to reserve for this block.
    ipConsumers IpblockIpConsumer[]
    Read-Only attribute. Lists consumption detail of an individual ip
    ipblockId string
    name string
    [string] The name of Ip Block
    timeouts IpblockTimeouts
    location str
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    size float
    [integer] The number of IP addresses to reserve for this block.
    ip_consumers Sequence[IpblockIpConsumerArgs]
    Read-Only attribute. Lists consumption detail of an individual ip
    ipblock_id str
    name str
    [string] The name of Ip Block
    timeouts IpblockTimeoutsArgs
    location String
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    size Number
    [integer] The number of IP addresses to reserve for this block.
    ipConsumers List<Property Map>
    Read-Only attribute. Lists consumption detail of an individual ip
    ipblockId String
    name String
    [string] The name of Ip Block
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Ipblock resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ips List<string>
    [integer] The list of IP addresses associated with this block.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ips []string
    [integer] The list of IP addresses associated with this block.
    id String
    The provider-assigned unique ID for this managed resource.
    ips List<String>
    [integer] The list of IP addresses associated with this block.
    id string
    The provider-assigned unique ID for this managed resource.
    ips string[]
    [integer] The list of IP addresses associated with this block.
    id str
    The provider-assigned unique ID for this managed resource.
    ips Sequence[str]
    [integer] The list of IP addresses associated with this block.
    id String
    The provider-assigned unique ID for this managed resource.
    ips List<String>
    [integer] The list of IP addresses associated with this block.

    Look up Existing Ipblock Resource

    Get an existing Ipblock resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: IpblockState, opts?: CustomResourceOptions): Ipblock
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            ip_consumers: Optional[Sequence[IpblockIpConsumerArgs]] = None,
            ipblock_id: Optional[str] = None,
            ips: Optional[Sequence[str]] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            size: Optional[float] = None,
            timeouts: Optional[IpblockTimeoutsArgs] = None) -> Ipblock
    func GetIpblock(ctx *Context, name string, id IDInput, state *IpblockState, opts ...ResourceOption) (*Ipblock, error)
    public static Ipblock Get(string name, Input<string> id, IpblockState? state, CustomResourceOptions? opts = null)
    public static Ipblock get(String name, Output<String> id, IpblockState state, CustomResourceOptions options)
    resources:  _:    type: ionoscloud:Ipblock    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    IpConsumers List<IpblockIpConsumer>
    Read-Only attribute. Lists consumption detail of an individual ip
    IpblockId string
    Ips List<string>
    [integer] The list of IP addresses associated with this block.
    Location string
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    Name string
    [string] The name of Ip Block
    Size double
    [integer] The number of IP addresses to reserve for this block.
    Timeouts IpblockTimeouts
    IpConsumers []IpblockIpConsumerArgs
    Read-Only attribute. Lists consumption detail of an individual ip
    IpblockId string
    Ips []string
    [integer] The list of IP addresses associated with this block.
    Location string
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    Name string
    [string] The name of Ip Block
    Size float64
    [integer] The number of IP addresses to reserve for this block.
    Timeouts IpblockTimeoutsArgs
    ipConsumers List<IpblockIpConsumer>
    Read-Only attribute. Lists consumption detail of an individual ip
    ipblockId String
    ips List<String>
    [integer] The list of IP addresses associated with this block.
    location String
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    name String
    [string] The name of Ip Block
    size Double
    [integer] The number of IP addresses to reserve for this block.
    timeouts IpblockTimeouts
    ipConsumers IpblockIpConsumer[]
    Read-Only attribute. Lists consumption detail of an individual ip
    ipblockId string
    ips string[]
    [integer] The list of IP addresses associated with this block.
    location string
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    name string
    [string] The name of Ip Block
    size number
    [integer] The number of IP addresses to reserve for this block.
    timeouts IpblockTimeouts
    ip_consumers Sequence[IpblockIpConsumerArgs]
    Read-Only attribute. Lists consumption detail of an individual ip
    ipblock_id str
    ips Sequence[str]
    [integer] The list of IP addresses associated with this block.
    location str
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    name str
    [string] The name of Ip Block
    size float
    [integer] The number of IP addresses to reserve for this block.
    timeouts IpblockTimeoutsArgs
    ipConsumers List<Property Map>
    Read-Only attribute. Lists consumption detail of an individual ip
    ipblockId String
    ips List<String>
    [integer] The list of IP addresses associated with this block.
    location String
    [string] The regional location for this IP Block: us/las, us/ewr, de/fra, de/fkb.
    name String
    [string] The name of Ip Block
    size Number
    [integer] The number of IP addresses to reserve for this block.
    timeouts Property Map

    Supporting Types

    IpblockIpConsumer, IpblockIpConsumerArgs

    DatacenterId string
    DatacenterName string
    Ip string
    K8sClusterUuid string
    K8sNodepoolUuid string
    Mac string
    NicId string
    ServerId string
    ServerName string
    DatacenterId string
    DatacenterName string
    Ip string
    K8sClusterUuid string
    K8sNodepoolUuid string
    Mac string
    NicId string
    ServerId string
    ServerName string
    datacenterId String
    datacenterName String
    ip String
    k8sClusterUuid String
    k8sNodepoolUuid String
    mac String
    nicId String
    serverId String
    serverName String
    datacenterId string
    datacenterName string
    ip string
    k8sClusterUuid string
    k8sNodepoolUuid string
    mac string
    nicId string
    serverId string
    serverName string
    datacenterId String
    datacenterName String
    ip String
    k8sClusterUuid String
    k8sNodepoolUuid String
    mac String
    nicId String
    serverId String
    serverName String

    IpblockTimeouts, IpblockTimeoutsArgs

    Create string
    Default string
    Delete string
    Update string
    Create string
    Default string
    Delete string
    Update string
    create String
    default_ String
    delete String
    update String
    create string
    default string
    delete string
    update string
    create String
    default String
    delete String
    update String

    Import

    Resource Ipblock can be imported using the resource id, e.g.

    $ pulumi import ionoscloud:index/ipblock:Ipblock myipblock ipblock uuid
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    ionoscloud ionos-cloud/terraform-provider-ionoscloud
    License
    Notes
    This Pulumi package is based on the ionoscloud Terraform Provider.
    ionoscloud logo
    ionoscloud 6.7.6 published on Monday, Apr 14, 2025 by ionos-cloud