Viewing docs for Hetzner Cloud v1.34.0
published on Wednesday, Apr 29, 2026 by Pulumi
published on Wednesday, Apr 29, 2026 by Pulumi
Viewing docs for Hetzner Cloud v1.34.0
published on Wednesday, Apr 29, 2026 by Pulumi
published on Wednesday, Apr 29, 2026 by Pulumi
Provides details about multiple Hetzner Cloud Primary IPs.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as hcloud from "@pulumi/hcloud";
const ip2 = hcloud.getPrimaryIps({
withSelector: "key=value",
});
import pulumi
import pulumi_hcloud as hcloud
ip2 = hcloud.get_primary_ips(with_selector="key=value")
package main
import (
"github.com/pulumi/pulumi-hcloud/sdk/go/hcloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := hcloud.GetPrimaryIps(ctx, &hcloud.GetPrimaryIpsArgs{
WithSelector: pulumi.StringRef("key=value"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using HCloud = Pulumi.HCloud;
return await Deployment.RunAsync(() =>
{
var ip2 = HCloud.Index.GetPrimaryIps.Invoke(new()
{
WithSelector = "key=value",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.hcloud.HcloudFunctions;
import com.pulumi.hcloud.inputs.GetPrimaryIpsArgs;
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 ip2 = HcloudFunctions.getPrimaryIps(GetPrimaryIpsArgs.builder()
.withSelector("key=value")
.build());
}
}
variables:
ip2:
fn::invoke:
function: hcloud:getPrimaryIps
arguments:
withSelector: key=value
Using getPrimaryIps
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 getPrimaryIps(args: GetPrimaryIpsArgs, opts?: InvokeOptions): Promise<GetPrimaryIpsResult>
function getPrimaryIpsOutput(args: GetPrimaryIpsOutputArgs, opts?: InvokeOptions): Output<GetPrimaryIpsResult>def get_primary_ips(id: Optional[str] = None,
with_selector: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPrimaryIpsResult
def get_primary_ips_output(id: pulumi.Input[Optional[str]] = None,
with_selector: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPrimaryIpsResult]func GetPrimaryIps(ctx *Context, args *GetPrimaryIpsArgs, opts ...InvokeOption) (*GetPrimaryIpsResult, error)
func GetPrimaryIpsOutput(ctx *Context, args *GetPrimaryIpsOutputArgs, opts ...InvokeOption) GetPrimaryIpsResultOutput> Note: This function is named GetPrimaryIps in the Go SDK.
public static class GetPrimaryIps
{
public static Task<GetPrimaryIpsResult> InvokeAsync(GetPrimaryIpsArgs args, InvokeOptions? opts = null)
public static Output<GetPrimaryIpsResult> Invoke(GetPrimaryIpsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetPrimaryIpsResult> getPrimaryIps(GetPrimaryIpsArgs args, InvokeOptions options)
public static Output<GetPrimaryIpsResult> getPrimaryIps(GetPrimaryIpsArgs args, InvokeOptions options)
fn::invoke:
function: hcloud:index/getPrimaryIps:getPrimaryIps
arguments:
# arguments dictionaryThe following arguments are supported:
- Id string
- With
Selector string - Label selector
- Id string
- With
Selector string - Label selector
- id String
- with
Selector String - Label selector
- id string
- with
Selector string - Label selector
- id str
- with_
selector str - Label selector
- id String
- with
Selector String - Label selector
getPrimaryIps Result
The following output properties are available:
- Id string
- Primary
Ips List<Pulumi.HCloud. Outputs. Get Primary Ips Primary Ip> - (list) List of all matching primary ips. See
data.hcloud_primary_ipfor schema. - With
Selector string
- Id string
- Primary
Ips []GetPrimary Ips Primary Ip - (list) List of all matching primary ips. See
data.hcloud_primary_ipfor schema. - With
Selector string
- id String
- primary
Ips List<GetPrimary Ips Primary Ip> - (list) List of all matching primary ips. See
data.hcloud_primary_ipfor schema. - with
Selector String
- id string
- primary
Ips GetPrimary Ips Primary Ip[] - (list) List of all matching primary ips. See
data.hcloud_primary_ipfor schema. - with
Selector string
- id str
- primary_
ips Sequence[GetPrimary Ips Primary Ip] - (list) List of all matching primary ips. See
data.hcloud_primary_ipfor schema. - with_
selector str
- id String
- primary
Ips List<Property Map> - (list) List of all matching primary ips. See
data.hcloud_primary_ipfor schema. - with
Selector String
Supporting Types
GetPrimaryIpsPrimaryIp
- Assignee
Id int - ID of the resource the Primary IP is assigned to.
- Assignee
Type string - Type of the resource the Primary IP is assigned to.
- Auto
Delete bool - Whether auto delete is enabled.
- Datacenter string
- Name of the Datacenter of the Primary IP.
- Delete
Protection bool - Whether delete protection is enabled.
- Id int
- ID of the Primary IP.
- Ip
Address string - IP address of the Primary IP.
- Ip
Network string - IP network of the Primary IP for IPv6 addresses. Only set if
typeisipv6. - Labels Dictionary<string, string>
- User-defined labels (key-value pairs) for the resource.
- Location string
- Name of the Location of the Primary IP.
- Name string
- Name of the Primary IP.
- Type string
- Type of the Primary IP (
ipv4oripv6).
- Assignee
Id int - ID of the resource the Primary IP is assigned to.
- Assignee
Type string - Type of the resource the Primary IP is assigned to.
- Auto
Delete bool - Whether auto delete is enabled.
- Datacenter string
- Name of the Datacenter of the Primary IP.
- Delete
Protection bool - Whether delete protection is enabled.
- Id int
- ID of the Primary IP.
- Ip
Address string - IP address of the Primary IP.
- Ip
Network string - IP network of the Primary IP for IPv6 addresses. Only set if
typeisipv6. - Labels map[string]string
- User-defined labels (key-value pairs) for the resource.
- Location string
- Name of the Location of the Primary IP.
- Name string
- Name of the Primary IP.
- Type string
- Type of the Primary IP (
ipv4oripv6).
- assignee
Id Integer - ID of the resource the Primary IP is assigned to.
- assignee
Type String - Type of the resource the Primary IP is assigned to.
- auto
Delete Boolean - Whether auto delete is enabled.
- datacenter String
- Name of the Datacenter of the Primary IP.
- delete
Protection Boolean - Whether delete protection is enabled.
- id Integer
- ID of the Primary IP.
- ip
Address String - IP address of the Primary IP.
- ip
Network String - IP network of the Primary IP for IPv6 addresses. Only set if
typeisipv6. - labels Map<String,String>
- User-defined labels (key-value pairs) for the resource.
- location String
- Name of the Location of the Primary IP.
- name String
- Name of the Primary IP.
- type String
- Type of the Primary IP (
ipv4oripv6).
- assignee
Id number - ID of the resource the Primary IP is assigned to.
- assignee
Type string - Type of the resource the Primary IP is assigned to.
- auto
Delete boolean - Whether auto delete is enabled.
- datacenter string
- Name of the Datacenter of the Primary IP.
- delete
Protection boolean - Whether delete protection is enabled.
- id number
- ID of the Primary IP.
- ip
Address string - IP address of the Primary IP.
- ip
Network string - IP network of the Primary IP for IPv6 addresses. Only set if
typeisipv6. - labels {[key: string]: string}
- User-defined labels (key-value pairs) for the resource.
- location string
- Name of the Location of the Primary IP.
- name string
- Name of the Primary IP.
- type string
- Type of the Primary IP (
ipv4oripv6).
- assignee_
id int - ID of the resource the Primary IP is assigned to.
- assignee_
type str - Type of the resource the Primary IP is assigned to.
- auto_
delete bool - Whether auto delete is enabled.
- datacenter str
- Name of the Datacenter of the Primary IP.
- delete_
protection bool - Whether delete protection is enabled.
- id int
- ID of the Primary IP.
- ip_
address str - IP address of the Primary IP.
- ip_
network str - IP network of the Primary IP for IPv6 addresses. Only set if
typeisipv6. - labels Mapping[str, str]
- User-defined labels (key-value pairs) for the resource.
- location str
- Name of the Location of the Primary IP.
- name str
- Name of the Primary IP.
- type str
- Type of the Primary IP (
ipv4oripv6).
- assignee
Id Number - ID of the resource the Primary IP is assigned to.
- assignee
Type String - Type of the resource the Primary IP is assigned to.
- auto
Delete Boolean - Whether auto delete is enabled.
- datacenter String
- Name of the Datacenter of the Primary IP.
- delete
Protection Boolean - Whether delete protection is enabled.
- id Number
- ID of the Primary IP.
- ip
Address String - IP address of the Primary IP.
- ip
Network String - IP network of the Primary IP for IPv6 addresses. Only set if
typeisipv6. - labels Map<String>
- User-defined labels (key-value pairs) for the resource.
- location String
- Name of the Location of the Primary IP.
- name String
- Name of the Primary IP.
- type String
- Type of the Primary IP (
ipv4oripv6).
Package Details
- Repository
- Hetzner Cloud pulumi/pulumi-hcloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
hcloudTerraform Provider.
Viewing docs for Hetzner Cloud v1.34.0
published on Wednesday, Apr 29, 2026 by Pulumi
published on Wednesday, Apr 29, 2026 by Pulumi
