ionoscloud.getKafkaCluster
Explore with Pulumi AI
The Kafka Cluster data source can be used to search for and return an existing Kafka Cluster. You can provide a string for the name parameter which will be compared with provisioned Kafka Clusters. 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.getKafkaCluster({
id: "your_kafka_cluster_id",
location: "location_of_kafka_cluster",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_kafka_cluster(id="your_kafka_cluster_id",
location="location_of_kafka_cluster")
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.LookupKafkaCluster(ctx, &ionoscloud.LookupKafkaClusterArgs{
Id: pulumi.StringRef("your_kafka_cluster_id"),
Location: "location_of_kafka_cluster",
}, 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.GetKafkaCluster.Invoke(new()
{
Id = "your_kafka_cluster_id",
Location = "location_of_kafka_cluster",
});
});
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.GetKafkaClusterArgs;
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.getKafkaCluster(GetKafkaClusterArgs.builder()
.id("your_kafka_cluster_id")
.location("location_of_kafka_cluster")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getKafkaCluster
arguments:
id: your_kafka_cluster_id
location: location_of_kafka_cluster
By Name
Needs to have the resource be previously created, or a depends_on clause to ensure that the resource is created before this data source is called.
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = ionoscloud.getKafkaCluster({
location: "location_of_kafka_cluster",
name: "kafka-cluster",
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.get_kafka_cluster(location="location_of_kafka_cluster",
name="kafka-cluster")
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.LookupKafkaCluster(ctx, &ionoscloud.LookupKafkaClusterArgs{
Location: "location_of_kafka_cluster",
Name: pulumi.StringRef("kafka-cluster"),
}, 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.GetKafkaCluster.Invoke(new()
{
Location = "location_of_kafka_cluster",
Name = "kafka-cluster",
});
});
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.GetKafkaClusterArgs;
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.getKafkaCluster(GetKafkaClusterArgs.builder()
.location("location_of_kafka_cluster")
.name("kafka-cluster")
.build());
}
}
variables:
example:
fn::invoke:
function: ionoscloud:getKafkaCluster
arguments:
location: location_of_kafka_cluster
name: kafka-cluster
Using getKafkaCluster
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 getKafkaCluster(args: GetKafkaClusterArgs, opts?: InvokeOptions): Promise<GetKafkaClusterResult>
function getKafkaClusterOutput(args: GetKafkaClusterOutputArgs, opts?: InvokeOptions): Output<GetKafkaClusterResult>
def get_kafka_cluster(id: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
partial_match: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetKafkaClusterResult
def get_kafka_cluster_output(id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
partial_match: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetKafkaClusterResult]
func LookupKafkaCluster(ctx *Context, args *LookupKafkaClusterArgs, opts ...InvokeOption) (*LookupKafkaClusterResult, error)
func LookupKafkaClusterOutput(ctx *Context, args *LookupKafkaClusterOutputArgs, opts ...InvokeOption) LookupKafkaClusterResultOutput
> Note: This function is named LookupKafkaCluster
in the Go SDK.
public static class GetKafkaCluster
{
public static Task<GetKafkaClusterResult> InvokeAsync(GetKafkaClusterArgs args, InvokeOptions? opts = null)
public static Output<GetKafkaClusterResult> Invoke(GetKafkaClusterInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetKafkaClusterResult> getKafkaCluster(GetKafkaClusterArgs args, InvokeOptions options)
public static Output<GetKafkaClusterResult> getKafkaCluster(GetKafkaClusterArgs args, InvokeOptions options)
fn::invoke:
function: ionoscloud:index/getKafkaCluster:getKafkaCluster
arguments:
# arguments dictionary
The following arguments are supported:
- Location string
- The location of the Kafka Cluster. Possible values:
de/fra
,de/txl
- Id string
- ID of an existing Kafka Cluster that you want to search for.
- Name string
- Name of an existing Kafka Cluster that you want to search for.
- Partial
Match bool
- Location string
- The location of the Kafka Cluster. Possible values:
de/fra
,de/txl
- Id string
- ID of an existing Kafka Cluster that you want to search for.
- Name string
- Name of an existing Kafka Cluster that you want to search for.
- Partial
Match bool
- location String
- The location of the Kafka Cluster. Possible values:
de/fra
,de/txl
- id String
- ID of an existing Kafka Cluster that you want to search for.
- name String
- Name of an existing Kafka Cluster that you want to search for.
- partial
Match Boolean
- location string
- The location of the Kafka Cluster. Possible values:
de/fra
,de/txl
- id string
- ID of an existing Kafka Cluster that you want to search for.
- name string
- Name of an existing Kafka Cluster that you want to search for.
- partial
Match boolean
- location str
- The location of the Kafka Cluster. Possible values:
de/fra
,de/txl
- id str
- ID of an existing Kafka Cluster that you want to search for.
- name str
- Name of an existing Kafka Cluster that you want to search for.
- partial_
match bool
- location String
- The location of the Kafka Cluster. Possible values:
de/fra
,de/txl
- id String
- ID of an existing Kafka Cluster that you want to search for.
- name String
- Name of an existing Kafka Cluster that you want to search for.
- partial
Match Boolean
getKafkaCluster Result
The following output properties are available:
- Broker
Addresses List<string> - IP address and port of cluster brokers.
- Connections
List<Get
Kafka Cluster Connection> - Connection information of the Kafka Cluster. Minimum items: 1, maximum items: 1.
- Id string
- UUID of the Kafka Cluster.
- Location string
- Name string
- The name of the Kafka Cluster.
- Size string
- The size of the Kafka Cluster.
- Version string
- The version of the Kafka Cluster.
- Partial
Match bool
- Broker
Addresses []string - IP address and port of cluster brokers.
- Connections
[]Get
Kafka Cluster Connection - Connection information of the Kafka Cluster. Minimum items: 1, maximum items: 1.
- Id string
- UUID of the Kafka Cluster.
- Location string
- Name string
- The name of the Kafka Cluster.
- Size string
- The size of the Kafka Cluster.
- Version string
- The version of the Kafka Cluster.
- Partial
Match bool
- broker
Addresses List<String> - IP address and port of cluster brokers.
- connections
List<Get
Kafka Cluster Connection> - Connection information of the Kafka Cluster. Minimum items: 1, maximum items: 1.
- id String
- UUID of the Kafka Cluster.
- location String
- name String
- The name of the Kafka Cluster.
- size String
- The size of the Kafka Cluster.
- version String
- The version of the Kafka Cluster.
- partial
Match Boolean
- broker
Addresses string[] - IP address and port of cluster brokers.
- connections
Get
Kafka Cluster Connection[] - Connection information of the Kafka Cluster. Minimum items: 1, maximum items: 1.
- id string
- UUID of the Kafka Cluster.
- location string
- name string
- The name of the Kafka Cluster.
- size string
- The size of the Kafka Cluster.
- version string
- The version of the Kafka Cluster.
- partial
Match boolean
- broker_
addresses Sequence[str] - IP address and port of cluster brokers.
- connections
Sequence[Get
Kafka Cluster Connection] - Connection information of the Kafka Cluster. Minimum items: 1, maximum items: 1.
- id str
- UUID of the Kafka Cluster.
- location str
- name str
- The name of the Kafka Cluster.
- size str
- The size of the Kafka Cluster.
- version str
- The version of the Kafka Cluster.
- partial_
match bool
- broker
Addresses List<String> - IP address and port of cluster brokers.
- connections List<Property Map>
- Connection information of the Kafka Cluster. Minimum items: 1, maximum items: 1.
- id String
- UUID of the Kafka Cluster.
- location String
- name String
- The name of the Kafka Cluster.
- size String
- The size of the Kafka Cluster.
- version String
- The version of the Kafka Cluster.
- partial
Match Boolean
Supporting Types
GetKafkaClusterConnection
- Broker
Addresses List<string> - IP address and port of cluster brokers.
- Datacenter
Id string - The datacenter that your instance is connected to.
- Lan
Id string - The numeric LAN ID your instance is connected to.
- Broker
Addresses []string - IP address and port of cluster brokers.
- Datacenter
Id string - The datacenter that your instance is connected to.
- Lan
Id string - The numeric LAN ID your instance is connected to.
- broker
Addresses List<String> - IP address and port of cluster brokers.
- datacenter
Id String - The datacenter that your instance is connected to.
- lan
Id String - The numeric LAN ID your instance is connected to.
- broker
Addresses string[] - IP address and port of cluster brokers.
- datacenter
Id string - The datacenter that your instance is connected to.
- lan
Id string - The numeric LAN ID your instance is connected to.
- broker_
addresses Sequence[str] - IP address and port of cluster brokers.
- datacenter_
id str - The datacenter that your instance is connected to.
- lan_
id str - The numeric LAN ID your instance is connected to.
- broker
Addresses List<String> - IP address and port of cluster brokers.
- datacenter
Id String - The datacenter that your instance is connected to.
- lan
Id String - The numeric LAN ID your instance is connected to.
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.