ionoscloud.Ipblock
Explore with Pulumi AI
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.
- Ip
Consumers List<IpblockIp Consumer> - Read-Only attribute. Lists consumption detail of an individual ip
- Ipblock
Id string - Name string
- [string] The name of Ip Block
- Timeouts
Ipblock
Timeouts
- 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.
- Ip
Consumers []IpblockIp Consumer Args - Read-Only attribute. Lists consumption detail of an individual ip
- Ipblock
Id string - Name string
- [string] The name of Ip Block
- Timeouts
Ipblock
Timeouts Args
- 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.
- ip
Consumers List<IpblockIp Consumer> - Read-Only attribute. Lists consumption detail of an individual ip
- ipblock
Id String - name String
- [string] The name of Ip Block
- timeouts
Ipblock
Timeouts
- 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.
- ip
Consumers IpblockIp Consumer[] - Read-Only attribute. Lists consumption detail of an individual ip
- ipblock
Id string - name string
- [string] The name of Ip Block
- timeouts
Ipblock
Timeouts
- 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[IpblockIp Consumer Args] - Read-Only attribute. Lists consumption detail of an individual ip
- ipblock_
id str - name str
- [string] The name of Ip Block
- timeouts
Ipblock
Timeouts Args
- 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.
- ip
Consumers List<Property Map> - Read-Only attribute. Lists consumption detail of an individual ip
- ipblock
Id 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:
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.
- Ip
Consumers List<IpblockIp Consumer> - Read-Only attribute. Lists consumption detail of an individual ip
- Ipblock
Id 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
Ipblock
Timeouts
- Ip
Consumers []IpblockIp Consumer Args - Read-Only attribute. Lists consumption detail of an individual ip
- Ipblock
Id 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
Ipblock
Timeouts Args
- ip
Consumers List<IpblockIp Consumer> - Read-Only attribute. Lists consumption detail of an individual ip
- ipblock
Id 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
Ipblock
Timeouts
- ip
Consumers IpblockIp Consumer[] - Read-Only attribute. Lists consumption detail of an individual ip
- ipblock
Id 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
Ipblock
Timeouts
- ip_
consumers Sequence[IpblockIp Consumer Args] - 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
Ipblock
Timeouts Args
- ip
Consumers List<Property Map> - Read-Only attribute. Lists consumption detail of an individual ip
- ipblock
Id 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
- 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
IpblockTimeouts, IpblockTimeoutsArgs
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.