spectrocloud 0.26.2 published on Friday, Dec 19, 2025 by spectrocloud
spectrocloud 0.26.2 published on Friday, Dec 19, 2025 by spectrocloud
Example Usage
You can retrieve the details of an Apache CloudStack cloud account registered in Palette by specifying either the name or ID of the cloud account.
Using Retrieved Account in Cluster Creation
import * as pulumi from "@pulumi/pulumi";
import * as spectrocloud from "@pulumi/spectrocloud";
// Retrieve Apache CloudStack account
const account = spectrocloud.getCloudaccountApacheCloudstack({
name: "my-cloudstack-account",
context: "project",
});
// Use the account to create a cluster
const cluster = new spectrocloud.ClusterApacheCloudstack("cluster", {
name: "cloudstack-cluster",
cloudAccountId: account.then(account => account.id),
});
import pulumi
import pulumi_spectrocloud as spectrocloud
# Retrieve Apache CloudStack account
account = spectrocloud.get_cloudaccount_apache_cloudstack(name="my-cloudstack-account",
context="project")
# Use the account to create a cluster
cluster = spectrocloud.ClusterApacheCloudstack("cluster",
name="cloudstack-cluster",
cloud_account_id=account.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 {
// Retrieve Apache CloudStack account
account, err := spectrocloud.LookupCloudaccountApacheCloudstack(ctx, &spectrocloud.LookupCloudaccountApacheCloudstackArgs{
Name: pulumi.StringRef("my-cloudstack-account"),
Context: pulumi.StringRef("project"),
}, nil)
if err != nil {
return err
}
// Use the account to create a cluster
_, err = spectrocloud.NewClusterApacheCloudstack(ctx, "cluster", &spectrocloud.ClusterApacheCloudstackArgs{
Name: pulumi.String("cloudstack-cluster"),
CloudAccountId: pulumi.String(account.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;
return await Deployment.RunAsync(() =>
{
// Retrieve Apache CloudStack account
var account = Spectrocloud.GetCloudaccountApacheCloudstack.Invoke(new()
{
Name = "my-cloudstack-account",
Context = "project",
});
// Use the account to create a cluster
var cluster = new Spectrocloud.ClusterApacheCloudstack("cluster", new()
{
Name = "cloudstack-cluster",
CloudAccountId = account.Apply(getCloudaccountApacheCloudstackResult => getCloudaccountApacheCloudstackResult.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.GetCloudaccountApacheCloudstackArgs;
import com.pulumi.spectrocloud.ClusterApacheCloudstack;
import com.pulumi.spectrocloud.ClusterApacheCloudstackArgs;
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 Apache CloudStack account
final var account = SpectrocloudFunctions.getCloudaccountApacheCloudstack(GetCloudaccountApacheCloudstackArgs.builder()
.name("my-cloudstack-account")
.context("project")
.build());
// Use the account to create a cluster
var cluster = new ClusterApacheCloudstack("cluster", ClusterApacheCloudstackArgs.builder()
.name("cloudstack-cluster")
.cloudAccountId(account.id())
.build());
}
}
resources:
# Use the account to create a cluster
cluster:
type: spectrocloud:ClusterApacheCloudstack
properties:
name: cloudstack-cluster
cloudAccountId: ${account.id}
variables:
# Retrieve Apache CloudStack account
account:
fn::invoke:
function: spectrocloud:getCloudaccountApacheCloudstack
arguments:
name: my-cloudstack-account
context: project
Using getCloudaccountApacheCloudstack
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 getCloudaccountApacheCloudstack(args: GetCloudaccountApacheCloudstackArgs, opts?: InvokeOptions): Promise<GetCloudaccountApacheCloudstackResult>
function getCloudaccountApacheCloudstackOutput(args: GetCloudaccountApacheCloudstackOutputArgs, opts?: InvokeOptions): Output<GetCloudaccountApacheCloudstackResult>def get_cloudaccount_apache_cloudstack(context: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCloudaccountApacheCloudstackResult
def get_cloudaccount_apache_cloudstack_output(context: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCloudaccountApacheCloudstackResult]func LookupCloudaccountApacheCloudstack(ctx *Context, args *LookupCloudaccountApacheCloudstackArgs, opts ...InvokeOption) (*LookupCloudaccountApacheCloudstackResult, error)
func LookupCloudaccountApacheCloudstackOutput(ctx *Context, args *LookupCloudaccountApacheCloudstackOutputArgs, opts ...InvokeOption) LookupCloudaccountApacheCloudstackResultOutput> Note: This function is named LookupCloudaccountApacheCloudstack in the Go SDK.
public static class GetCloudaccountApacheCloudstack
{
public static Task<GetCloudaccountApacheCloudstackResult> InvokeAsync(GetCloudaccountApacheCloudstackArgs args, InvokeOptions? opts = null)
public static Output<GetCloudaccountApacheCloudstackResult> Invoke(GetCloudaccountApacheCloudstackInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCloudaccountApacheCloudstackResult> getCloudaccountApacheCloudstack(GetCloudaccountApacheCloudstackArgs args, InvokeOptions options)
public static Output<GetCloudaccountApacheCloudstackResult> getCloudaccountApacheCloudstack(GetCloudaccountApacheCloudstackArgs args, InvokeOptions options)
fn::invoke:
function: spectrocloud:index/getCloudaccountApacheCloudstack:getCloudaccountApacheCloudstack
arguments:
# arguments dictionaryThe following arguments are supported:
- Context string
- The context of the account. Allowed values are
projectortenantor ``. - Id string
- The unique ID of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - Name string
- The name of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both.
- Context string
- The context of the account. Allowed values are
projectortenantor ``. - Id string
- The unique ID of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - Name string
- The name of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both.
- context String
- The context of the account. Allowed values are
projectortenantor ``. - id String
- The unique ID of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - name String
- The name of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both.
- context string
- The context of the account. Allowed values are
projectortenantor ``. - id string
- The unique ID of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - name string
- The name of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both.
- context String
- The context of the account. Allowed values are
projectortenantor ``. - id String
- The unique ID of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - name String
- The name of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both.
getCloudaccountApacheCloudstack Result
The following output properties are available:
- Id string
- The unique ID of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - Name string
- The name of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - Context string
- The context of the account. Allowed values are
projectortenantor ``.
- Id string
- The unique ID of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - Name string
- The name of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - Context string
- The context of the account. Allowed values are
projectortenantor ``.
- id String
- The unique ID of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - name String
- The name of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - context String
- The context of the account. Allowed values are
projectortenantor ``.
- id string
- The unique ID of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - name string
- The name of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - context string
- The context of the account. Allowed values are
projectortenantor ``.
- id String
- The unique ID of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - name String
- The name of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - context String
- The context of the account. Allowed values are
projectortenantor ``.
Package Details
- Repository
- spectrocloud spectrocloud/terraform-provider-spectrocloud
- License
- Notes
- This Pulumi package is based on the
spectrocloudTerraform Provider.
spectrocloud 0.26.2 published on Friday, Dec 19, 2025 by spectrocloud
