1. Packages
  2. Packages
  3. Spectrocloud Provider
Viewing docs for spectrocloud 0.29.3
published on Sunday, May 31, 2026 by spectrocloud

Spectrocloud Provider

Viewing docs for spectrocloud 0.29.3
published on Sunday, May 31, 2026 by spectrocloud

    Generate Provider

    The Spectrocloud provider must be installed as a Local Package by following the instructions for Any Terraform Provider:

    pulumi package add terraform-provider spectrocloud/spectrocloud
    

    Overview

    The Spectro Cloud provider provides resources to interact with Palette and Palette VerteX through Infrastructure as code. The provider supports both SaaS and on-prem deployments of Palette and Palette VerteX.

    What is Palette?

    Palette brings the managed Kubernetes experience to users’ own unique enterprise Kubernetes infrastructure stacks deployed in any public cloud, or private cloud environments. Palette allows users to not have to trade-off between flexibility and manageability. Palette provides a platform-as-a-service experience to users by automating the lifecycle of multiple Kubernetes clusters based on user-defined Kubernetes infrastructure stacks.

    Palette Account

    To get started with Palette, sign up for an account here. Use your Palette API key to authenticate. For more details on the authentication, navigate to the authentication section.

    Example Usage

    Create a Pulumi.yaml file with the following:

    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: nodejs
    config:
        spectrocloud:apiKey:
            value: 'TODO: var.sc_api_key'
        spectrocloud:host:
            value: 'TODO: var.sc_host'
        spectrocloud:projectName:
            value: 'TODO: var.sc_project_name'
    
    import * as pulumi from "@pulumi/pulumi";
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: python
    config:
        spectrocloud:apiKey:
            value: 'TODO: var.sc_api_key'
        spectrocloud:host:
            value: 'TODO: var.sc_host'
        spectrocloud:projectName:
            value: 'TODO: var.sc_project_name'
    
    import pulumi
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: dotnet
    config:
        spectrocloud:apiKey:
            value: 'TODO: var.sc_api_key'
        spectrocloud:host:
            value: 'TODO: var.sc_host'
        spectrocloud:projectName:
            value: 'TODO: var.sc_project_name'
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() =>
    {
    });
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: go
    config:
        spectrocloud:apiKey:
            value: 'TODO: var.sc_api_key'
        spectrocloud:host:
            value: 'TODO: var.sc_host'
        spectrocloud:projectName:
            value: 'TODO: var.sc_project_name'
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: yaml
    config:
        spectrocloud:apiKey:
            value: 'TODO: var.sc_api_key'
        spectrocloud:host:
            value: 'TODO: var.sc_host'
        spectrocloud:projectName:
            value: 'TODO: var.sc_project_name'
    
    {}
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime: java
    config:
        spectrocloud:apiKey:
            value: 'TODO: var.sc_api_key'
        spectrocloud:host:
            value: 'TODO: var.sc_host'
        spectrocloud:projectName:
            value: 'TODO: var.sc_project_name'
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    

    Copy pulumi.template.tfvars file to a pulumi.tfvars file and modify its content:

    Be sure to populate the scHost, scApiKey, and other pulumi vars.

    Copy one of the resource configuration files (e.g: spectrocloud_cluster_profile) from the Resources documentation. Be sure to specify all required parameters.

    Next, run pulumi using:

    pulumi up && pulumi up
    

    Detailed schema definitions for each resource are listed in the Resources menu on the left.

    For an end-to-end example of provisioning Spectro Cloud resources, visit: Spectro Cloud E2E Examples.

    Environment Variables

    Credentials and other configurations can be provided through environment variables. The following environment variables are availabe.

    • SPECTROCLOUD_HOST
    • SPECTROCLOUD_APIKEY
    • SPECTROCLOUD_TRACE
    • SPECTROCLOUD_RETRY_ATTEMPTS

    Authentication

    You can use an API key to authenticate with Spectro Cloud. Visit the User Management API Key documentation to learn more about Spectro Cloud API keys.

    export SPECTROCLOUD_APIKEY=5b7aad.........
    
    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime:
    

    Feature Flags

    The provider accepts optional feature flags through the featureFlag map argument in the provider configuration. Unknown keys are ignored.

    disableAddonDeploymentResource

    When set to true, the provider disallows the spectrocloud.AddonDeployment resource. Any configuration that references this resource fails during pulumi preview (including refresh) and apply with an error indicating the feature flag is disabled. Defaults to false.

    clusterProfile and clusterTemplate are mutually exclusive on spectrocloud_cluster_* resources. The provider returns an error if both are set in the same resource.

    When this flag is enabled:

    • clusterProfile only — On read, the provider refreshes every profile attached to the cluster from the Palette API into the top-level clusterProfile block (including addon profiles previously managed by spectrocloud.AddonDeployment). Pack and variable fields in state follow what you declare in configuration.
    • clusterTemplate only — The provider does not modify top-level clusterProfile. Profiles are managed inside clusterTemplate (nested clusterProfile blocks). Read continues to refresh clusterTemplate variables from the API via the existing template flow.
    • Neither — No profile sync from this flag.

    To destroy existing addon deployments still in Pulumi state, set the flag back to false, run pulumi destroy on those resources, then set the flag to true again if you want to keep spectrocloud.AddonDeployment blocked.

    # Pulumi.yaml provider configuration file
    name: configuration-example
    runtime:
    config:
        spectrocloud:apiKey:
            value: 'TODO: var.sc_api_key'
        spectrocloud:featureFlag:
            value:
                disable_addon_deployment_resource: true
        spectrocloud:host:
            value: 'TODO: var.sc_host'
    

    Import

    Starting with Pulumi v1.5.0 and later, you can use an import block to import resources into your state file.

    Each resource type has its own specific requirements for the import process. We recommend you refer to the documentation for each resource to better understand the exact format of the id and any other required parameters. The import block specifies the resource you want to import and its unique identifier with the following structure:

    • <resource>: The type of the resource you are importing.
    • <name>: A name you assign to the resource within your Pulumi configuration.
    • <unique_identifier>: The ID of the resource you are importing. This can include additional context if required.

    Examples

    The following examples showcase how to import a resource. Some resource requires the context to be specified during the import action. The context refers to the Palette scope. Allowed values are either project or tenant.

    Import With Context

    When importing resources that require additional context, the id is followed by a context, separated by a colon.

    You can also import a resource using the Pulumi CLI and the import command.

    pulumi import spectrocloud_cluster_aks.example example_id:project
    
    Specify' tenant' after the colon if you want to import a resource at the tenant scope.
    

    Example of importing a resource with the tenant context through the Pulumi CLI.

    pulumi import spectrocloud_cluster_aks.example example_id:tenant
    

    Ensure you have tenant admin access when importing a resource at the tenant scope.

    Import Without Context

    For resources that do not require additional context, the id is the only provided argument. The following is an example of a resource that does not require the context and only provides the ID.

    Below is an example of using the Pulumi CLI and the import command without specifying the context.

    pulumi import spectrocloud_cluster_profile.example id
    

    Support

    For questions or issues with the provider, open up an issue in the provider GitHub discussion board.

    Configuration Reference

    • apiKey (String, Sensitive) The Spectro Cloud API key. Can also be set with the SPECTROCLOUD_APIKEY environment variable.
    • featureFlag (Map of Boolean) Optional provider feature flags (map of booleans). Unknown keys are ignored. Set disableAddonDeploymentResource to true to block the spectrocloud.AddonDeployment resource during plan and apply.
    • host (String) The Spectro Cloud API host url. Can also be set with the SPECTROCLOUD_HOST environment variable. Defaults to https://api.spectrocloud.com
    • ignoreInsecureTlsError (Boolean) Ignore insecure TLS errors for Spectro Cloud API endpoints. ⚠️ WARNING: Setting this to true disables SSL certificate verification and makes connections vulnerable to man-in-the-middle attacks. Only use this in development/testing environments or when connecting to self-signed certificates in trusted networks. Defaults to false.
    • projectName (String) The Palette project the provider will target. If no value is provided, the Default Palette project is used. The default value is Default.
    • retryAttempts (Number) Number of retry attempts. Can also be set with the SPECTROCLOUD_RETRY_ATTEMPTS environment variable. Defaults to 10.
    • trace (Boolean) Enable HTTP request tracing. Can also be set with the SPECTROCLOUD_TRACE environment variable. To enable Pulumi debug logging, set TF_LOG=DEBUG. Visit the Pulumi documentation to learn more about Pulumi debugging.
    Viewing docs for spectrocloud 0.29.3
    published on Sunday, May 31, 2026 by spectrocloud

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial