spectrocloud 0.23.4 published on Monday, Apr 14, 2025 by spectrocloud
spectrocloud.getClusterGroup
Explore with Pulumi AI
spectrocloud 0.23.4 published on Monday, Apr 14, 2025 by spectrocloud
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as spectrocloud from "@pulumi/spectrocloud";
const beehive = spectrocloud.getClusterGroup({
name: "beehive",
context: "system",
});
export const outBeehive = beehive.then(beehive => beehive.id);
const tenantCl = spectrocloud.getClusterGroup({
name: "sanfrancisco",
context: "tenant",
});
export const outTenantCl = tenantCl.then(tenantCl => tenantCl.id);
const projectSc = spectrocloud.getClusterGroup({
name: "cg-1",
context: "project",
});
export const outProjectSc = projectSc.then(projectSc => projectSc.id);
import pulumi
import pulumi_spectrocloud as spectrocloud
beehive = spectrocloud.get_cluster_group(name="beehive",
context="system")
pulumi.export("outBeehive", beehive.id)
tenant_cl = spectrocloud.get_cluster_group(name="sanfrancisco",
context="tenant")
pulumi.export("outTenantCl", tenant_cl.id)
project_sc = spectrocloud.get_cluster_group(name="cg-1",
context="project")
pulumi.export("outProjectSc", project_sc.id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/spectrocloud/spectrocloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
beehive, err := spectrocloud.LookupClusterGroup(ctx, &spectrocloud.LookupClusterGroupArgs{
Name: "beehive",
Context: pulumi.StringRef("system"),
}, nil)
if err != nil {
return err
}
ctx.Export("outBeehive", beehive.Id)
tenantCl, err := spectrocloud.LookupClusterGroup(ctx, &spectrocloud.LookupClusterGroupArgs{
Name: "sanfrancisco",
Context: pulumi.StringRef("tenant"),
}, nil)
if err != nil {
return err
}
ctx.Export("outTenantCl", tenantCl.Id)
projectSc, err := spectrocloud.LookupClusterGroup(ctx, &spectrocloud.LookupClusterGroupArgs{
Name: "cg-1",
Context: pulumi.StringRef("project"),
}, nil)
if err != nil {
return err
}
ctx.Export("outProjectSc", projectSc.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;
return await Deployment.RunAsync(() =>
{
var beehive = Spectrocloud.GetClusterGroup.Invoke(new()
{
Name = "beehive",
Context = "system",
});
var tenantCl = Spectrocloud.GetClusterGroup.Invoke(new()
{
Name = "sanfrancisco",
Context = "tenant",
});
var projectSc = Spectrocloud.GetClusterGroup.Invoke(new()
{
Name = "cg-1",
Context = "project",
});
return new Dictionary<string, object?>
{
["outBeehive"] = beehive.Apply(getClusterGroupResult => getClusterGroupResult.Id),
["outTenantCl"] = tenantCl.Apply(getClusterGroupResult => getClusterGroupResult.Id),
["outProjectSc"] = projectSc.Apply(getClusterGroupResult => getClusterGroupResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.spectrocloud.SpectrocloudFunctions;
import com.pulumi.spectrocloud.inputs.GetClusterGroupArgs;
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 beehive = SpectrocloudFunctions.getClusterGroup(GetClusterGroupArgs.builder()
.name("beehive")
.context("system")
.build());
ctx.export("outBeehive", beehive.applyValue(getClusterGroupResult -> getClusterGroupResult.id()));
final var tenantCl = SpectrocloudFunctions.getClusterGroup(GetClusterGroupArgs.builder()
.name("sanfrancisco")
.context("tenant")
.build());
ctx.export("outTenantCl", tenantCl.applyValue(getClusterGroupResult -> getClusterGroupResult.id()));
final var projectSc = SpectrocloudFunctions.getClusterGroup(GetClusterGroupArgs.builder()
.name("cg-1")
.context("project")
.build());
ctx.export("outProjectSc", projectSc.applyValue(getClusterGroupResult -> getClusterGroupResult.id()));
}
}
variables:
beehive:
fn::invoke:
function: spectrocloud:getClusterGroup
arguments:
name: beehive
context: system
tenantCl:
fn::invoke:
function: spectrocloud:getClusterGroup
arguments:
name: sanfrancisco
context: tenant
projectSc:
fn::invoke:
function: spectrocloud:getClusterGroup
arguments:
name: cg-1
context: project
outputs:
outBeehive: ${beehive.id}
outTenantCl: ${tenantCl.id}
outProjectSc: ${projectSc.id}
Using getClusterGroup
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 getClusterGroup(args: GetClusterGroupArgs, opts?: InvokeOptions): Promise<GetClusterGroupResult>
function getClusterGroupOutput(args: GetClusterGroupOutputArgs, opts?: InvokeOptions): Output<GetClusterGroupResult>
def get_cluster_group(context: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetClusterGroupResult
def get_cluster_group_output(context: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetClusterGroupResult]
func LookupClusterGroup(ctx *Context, args *LookupClusterGroupArgs, opts ...InvokeOption) (*LookupClusterGroupResult, error)
func LookupClusterGroupOutput(ctx *Context, args *LookupClusterGroupOutputArgs, opts ...InvokeOption) LookupClusterGroupResultOutput
> Note: This function is named LookupClusterGroup
in the Go SDK.
public static class GetClusterGroup
{
public static Task<GetClusterGroupResult> InvokeAsync(GetClusterGroupArgs args, InvokeOptions? opts = null)
public static Output<GetClusterGroupResult> Invoke(GetClusterGroupInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetClusterGroupResult> getClusterGroup(GetClusterGroupArgs args, InvokeOptions options)
public static Output<GetClusterGroupResult> getClusterGroup(GetClusterGroupArgs args, InvokeOptions options)
fn::invoke:
function: spectrocloud:index/getClusterGroup:getClusterGroup
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- The name of the cluster group.
- Context string
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
. - Id string
- The ID of this resource.
- Name string
- The name of the cluster group.
- Context string
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
. - Id string
- The ID of this resource.
- name String
- The name of the cluster group.
- context String
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
. - id String
- The ID of this resource.
- name string
- The name of the cluster group.
- context string
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
. - id string
- The ID of this resource.
- name str
- The name of the cluster group.
- context str
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
. - id str
- The ID of this resource.
- name String
- The name of the cluster group.
- context String
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
. - id String
- The ID of this resource.
getClusterGroup Result
The following output properties are available:
- Id string
- The ID of this resource.
- Name string
- The name of the cluster group.
- Context string
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
.
- Id string
- The ID of this resource.
- Name string
- The name of the cluster group.
- Context string
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
.
- id String
- The ID of this resource.
- name String
- The name of the cluster group.
- context String
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
.
- id string
- The ID of this resource.
- name string
- The name of the cluster group.
- context string
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
.
- id str
- The ID of this resource.
- name str
- The name of the cluster group.
- context str
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
.
- id String
- The ID of this resource.
- name String
- The name of the cluster group.
- context String
- The context of where the cluster group is located. Allowed values are
system
ortenant
. Defaults totenant
.If theproject
context is specified, the project name will sourced from the provider configuration parameterproject_name
.
Package Details
- Repository
- spectrocloud spectrocloud/terraform-provider-spectrocloud
- License
- Notes
- This Pulumi package is based on the
spectrocloud
Terraform Provider.
spectrocloud 0.23.4 published on Monday, Apr 14, 2025 by spectrocloud