Viewing docs for spectrocloud 0.28.3
published on Friday, Mar 6, 2026 by spectrocloud
published on Friday, Mar 6, 2026 by spectrocloud
Viewing docs for spectrocloud 0.28.3
published on Friday, Mar 6, 2026 by spectrocloud
published on Friday, Mar 6, 2026 by spectrocloud
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as local from "@pulumi/local";
import * as spectrocloud from "@pulumi/spectrocloud";
// Retrieve cluster details by name
const exampleCluster = spectrocloud.getCluster({
name: "my-cluster",
context: "project",
virtual: false,
});
const kubeConfig = new local.index.File("kube_config", {
content: cluster.kubeConfig,
filename: "client-101.kubeconfig",
filePermission: "0644",
directoryPermission: "0755",
});
const adminKubeConfig = new local.index.File("admin_kube_config", {
content: cluster.adminKubeConfig,
filename: "admin-client-101.kubeconfig",
filePermission: "0644",
directoryPermission: "0755",
});
import pulumi
import pulumi_local as local
import pulumi_spectrocloud as spectrocloud
# Retrieve cluster details by name
example_cluster = spectrocloud.get_cluster(name="my-cluster",
context="project",
virtual=False)
kube_config = local.index.File("kube_config",
content=cluster.kube_config,
filename=client-101.kubeconfig,
file_permission=0644,
directory_permission=0755)
admin_kube_config = local.index.File("admin_kube_config",
content=cluster.admin_kube_config,
filename=admin-client-101.kubeconfig,
file_permission=0644,
directory_permission=0755)
package main
import (
"github.com/pulumi/pulumi-local/sdk/go/local"
"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 {
// Retrieve cluster details by name
_, err := spectrocloud.GetCluster(ctx, &spectrocloud.GetClusterArgs{
Name: "my-cluster",
Context: pulumi.StringRef("project"),
Virtual: pulumi.BoolRef(false),
}, nil)
if err != nil {
return err
}
_, err = local.NewFile(ctx, "kube_config", &local.FileArgs{
Content: cluster.KubeConfig,
Filename: "client-101.kubeconfig",
FilePermission: "0644",
DirectoryPermission: "0755",
})
if err != nil {
return err
}
_, err = local.NewFile(ctx, "admin_kube_config", &local.FileArgs{
Content: cluster.AdminKubeConfig,
Filename: "admin-client-101.kubeconfig",
FilePermission: "0644",
DirectoryPermission: "0755",
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Local = Pulumi.Local;
using Spectrocloud = Pulumi.Spectrocloud;
return await Deployment.RunAsync(() =>
{
// Retrieve cluster details by name
var exampleCluster = Spectrocloud.GetCluster.Invoke(new()
{
Name = "my-cluster",
Context = "project",
Virtual = false,
});
var kubeConfig = new Local.Index.File("kube_config", new()
{
Content = cluster.KubeConfig,
Filename = "client-101.kubeconfig",
FilePermission = "0644",
DirectoryPermission = "0755",
});
var adminKubeConfig = new Local.Index.File("admin_kube_config", new()
{
Content = cluster.AdminKubeConfig,
Filename = "admin-client-101.kubeconfig",
FilePermission = "0644",
DirectoryPermission = "0755",
});
});
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.GetClusterArgs;
import com.pulumi.local.File;
import com.pulumi.local.FileArgs;
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) {
// Retrieve cluster details by name
final var exampleCluster = SpectrocloudFunctions.getCluster(GetClusterArgs.builder()
.name("my-cluster")
.context("project")
.virtual(false)
.build());
var kubeConfig = new File("kubeConfig", FileArgs.builder()
.content(cluster.kubeConfig())
.filename("client-101.kubeconfig")
.filePermission("0644")
.directoryPermission("0755")
.build());
var adminKubeConfig = new File("adminKubeConfig", FileArgs.builder()
.content(cluster.adminKubeConfig())
.filename("admin-client-101.kubeconfig")
.filePermission("0644")
.directoryPermission("0755")
.build());
}
}
resources:
kubeConfig:
type: local:File
name: kube_config
properties:
content: ${cluster.kubeConfig}
filename: client-101.kubeconfig
filePermission: '0644'
directoryPermission: '0755'
adminKubeConfig:
type: local:File
name: admin_kube_config
properties:
content: ${cluster.adminKubeConfig}
filename: admin-client-101.kubeconfig
filePermission: '0644'
directoryPermission: '0755'
variables:
# Retrieve cluster details by name
exampleCluster:
fn::invoke:
function: spectrocloud:getCluster
arguments:
name: my-cluster
context: project
virtual: false
Using getCluster
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 getCluster(args: GetClusterArgs, opts?: InvokeOptions): Promise<GetClusterResult>
function getClusterOutput(args: GetClusterOutputArgs, opts?: InvokeOptions): Output<GetClusterResult>def get_cluster(context: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
virtual: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetClusterResult
def get_cluster_output(context: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
virtual: Optional[pulumi.Input[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetClusterResult]func GetCluster(ctx *Context, args *GetClusterArgs, opts ...InvokeOption) (*GetClusterResult, error)
func GetClusterOutput(ctx *Context, args *GetClusterOutputArgs, opts ...InvokeOption) GetClusterResultOutput> Note: This function is named GetCluster in the Go SDK.
public static class GetCluster
{
public static Task<GetClusterResult> InvokeAsync(GetClusterArgs args, InvokeOptions? opts = null)
public static Output<GetClusterResult> Invoke(GetClusterInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
public static Output<GetClusterResult> getCluster(GetClusterArgs args, InvokeOptions options)
fn::invoke:
function: spectrocloud:index/getCluster:getCluster
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of the cluster.
- Context string
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - Id string
- The ID of this resource.
- Virtual bool
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
- Name string
- The name of the cluster.
- Context string
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - Id string
- The ID of this resource.
- Virtual bool
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
- name String
- The name of the cluster.
- context String
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - id String
- The ID of this resource.
- virtual Boolean
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
- name string
- The name of the cluster.
- context string
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - id string
- The ID of this resource.
- virtual boolean
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
- name str
- The name of the cluster.
- context str
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - id str
- The ID of this resource.
- virtual bool
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
- name String
- The name of the cluster.
- context String
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - id String
- The ID of this resource.
- virtual Boolean
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
getCluster Result
The following output properties are available:
- Admin
Kube stringConfig - The admin kubeconfig file for accessing the cluster. This is computed automatically.
- Cluster
Timezone string - The time zone used by this cluster to interpret scheduled operations. Maintenance tasks like upgrades follow this time zone to ensure they run at the appropriate local time for the cluster. Value is in IANA timezone format (e.g., 'America/New_York', 'Asia/Kolkata').
- Health string
- The current health status of the cluster. This is computed automatically.
- Id string
- The ID of this resource.
- Kube
Config string - The kubeconfig file for accessing the cluster as a non-admin user. This is computed automatically.
- Name string
- The name of the cluster.
- State string
- The current state of the cluster. This is computed automatically.
- Context string
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - Virtual bool
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
- Admin
Kube stringConfig - The admin kubeconfig file for accessing the cluster. This is computed automatically.
- Cluster
Timezone string - The time zone used by this cluster to interpret scheduled operations. Maintenance tasks like upgrades follow this time zone to ensure they run at the appropriate local time for the cluster. Value is in IANA timezone format (e.g., 'America/New_York', 'Asia/Kolkata').
- Health string
- The current health status of the cluster. This is computed automatically.
- Id string
- The ID of this resource.
- Kube
Config string - The kubeconfig file for accessing the cluster as a non-admin user. This is computed automatically.
- Name string
- The name of the cluster.
- State string
- The current state of the cluster. This is computed automatically.
- Context string
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - Virtual bool
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
- admin
Kube StringConfig - The admin kubeconfig file for accessing the cluster. This is computed automatically.
- cluster
Timezone String - The time zone used by this cluster to interpret scheduled operations. Maintenance tasks like upgrades follow this time zone to ensure they run at the appropriate local time for the cluster. Value is in IANA timezone format (e.g., 'America/New_York', 'Asia/Kolkata').
- health String
- The current health status of the cluster. This is computed automatically.
- id String
- The ID of this resource.
- kube
Config String - The kubeconfig file for accessing the cluster as a non-admin user. This is computed automatically.
- name String
- The name of the cluster.
- state String
- The current state of the cluster. This is computed automatically.
- context String
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - virtual Boolean
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
- admin
Kube stringConfig - The admin kubeconfig file for accessing the cluster. This is computed automatically.
- cluster
Timezone string - The time zone used by this cluster to interpret scheduled operations. Maintenance tasks like upgrades follow this time zone to ensure they run at the appropriate local time for the cluster. Value is in IANA timezone format (e.g., 'America/New_York', 'Asia/Kolkata').
- health string
- The current health status of the cluster. This is computed automatically.
- id string
- The ID of this resource.
- kube
Config string - The kubeconfig file for accessing the cluster as a non-admin user. This is computed automatically.
- name string
- The name of the cluster.
- state string
- The current state of the cluster. This is computed automatically.
- context string
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - virtual boolean
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
- admin_
kube_ strconfig - The admin kubeconfig file for accessing the cluster. This is computed automatically.
- cluster_
timezone str - The time zone used by this cluster to interpret scheduled operations. Maintenance tasks like upgrades follow this time zone to ensure they run at the appropriate local time for the cluster. Value is in IANA timezone format (e.g., 'America/New_York', 'Asia/Kolkata').
- health str
- The current health status of the cluster. This is computed automatically.
- id str
- The ID of this resource.
- kube_
config str - The kubeconfig file for accessing the cluster as a non-admin user. This is computed automatically.
- name str
- The name of the cluster.
- state str
- The current state of the cluster. This is computed automatically.
- context str
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - virtual bool
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
- admin
Kube StringConfig - The admin kubeconfig file for accessing the cluster. This is computed automatically.
- cluster
Timezone String - The time zone used by this cluster to interpret scheduled operations. Maintenance tasks like upgrades follow this time zone to ensure they run at the appropriate local time for the cluster. Value is in IANA timezone format (e.g., 'America/New_York', 'Asia/Kolkata').
- health String
- The current health status of the cluster. This is computed automatically.
- id String
- The ID of this resource.
- kube
Config String - The kubeconfig file for accessing the cluster as a non-admin user. This is computed automatically.
- name String
- The name of the cluster.
- state String
- The current state of the cluster. This is computed automatically.
- context String
- The context of the cluster. Allowed values are
projectortenant. Defaults toproject.If theprojectcontext is specified, the project name will sourced from the provider configuration parameterproject_name. - virtual Boolean
- If set to true, the cluster will treated as a virtual cluster. Defaults to
false.
Package Details
- Repository
- spectrocloud spectrocloud/terraform-provider-spectrocloud
- License
- Notes
- This Pulumi package is based on the
spectrocloudTerraform Provider.
Viewing docs for spectrocloud 0.28.3
published on Friday, Mar 6, 2026 by spectrocloud
published on Friday, Mar 6, 2026 by spectrocloud
