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
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.
Retrieve by Name
import * as pulumi from "@pulumi/pulumi";
import * as spectrocloud from "@pulumi/spectrocloud";
// Retrieve details of an Apache CloudStack cloud account using name
const example = spectrocloud.getCloudaccountApacheCloudstack({
name: "apache-cloudstack-account-1",
context: "project",
});
export const cloudstackAccountId = example.then(example => example.id);
import pulumi
import pulumi_spectrocloud as spectrocloud
# Retrieve details of an Apache CloudStack cloud account using name
example = spectrocloud.get_cloudaccount_apache_cloudstack(name="apache-cloudstack-account-1",
context="project")
pulumi.export("cloudstackAccountId", example.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 details of an Apache CloudStack cloud account using name
example, err := spectrocloud.LookupCloudaccountApacheCloudstack(ctx, &spectrocloud.LookupCloudaccountApacheCloudstackArgs{
Name: pulumi.StringRef("apache-cloudstack-account-1"),
Context: pulumi.StringRef("project"),
}, nil)
if err != nil {
return err
}
ctx.Export("cloudstackAccountId", example.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;
return await Deployment.RunAsync(() =>
{
// Retrieve details of an Apache CloudStack cloud account using name
var example = Spectrocloud.GetCloudaccountApacheCloudstack.Invoke(new()
{
Name = "apache-cloudstack-account-1",
Context = "project",
});
return new Dictionary<string, object?>
{
["cloudstackAccountId"] = example.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 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 details of an Apache CloudStack cloud account using name
final var example = SpectrocloudFunctions.getCloudaccountApacheCloudstack(GetCloudaccountApacheCloudstackArgs.builder()
.name("apache-cloudstack-account-1")
.context("project")
.build());
ctx.export("cloudstackAccountId", example.id());
}
}
variables:
# Retrieve details of an Apache CloudStack cloud account using name
example:
fn::invoke:
function: spectrocloud:getCloudaccountApacheCloudstack
arguments:
name: apache-cloudstack-account-1
context: project
outputs:
# Output cloud account details
cloudstackAccountId: ${example.id}
Retrieve by ID
import * as pulumi from "@pulumi/pulumi";
import * as spectrocloud from "@pulumi/spectrocloud";
// Retrieve details of an Apache CloudStack cloud account using ID
const byId = spectrocloud.getCloudaccountApacheCloudstack({
id: "123e4567-e89b-12d3-a456-426614174000",
});
export const pcgId = byId.then(byId => byId.privateCloudGatewayId);
import pulumi
import pulumi_spectrocloud as spectrocloud
# Retrieve details of an Apache CloudStack cloud account using ID
by_id = spectrocloud.get_cloudaccount_apache_cloudstack(id="123e4567-e89b-12d3-a456-426614174000")
pulumi.export("pcgId", by_id.private_cloud_gateway_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 details of an Apache CloudStack cloud account using ID
byId, err := spectrocloud.LookupCloudaccountApacheCloudstack(ctx, &spectrocloud.LookupCloudaccountApacheCloudstackArgs{
Id: pulumi.StringRef("123e4567-e89b-12d3-a456-426614174000"),
}, nil)
if err != nil {
return err
}
ctx.Export("pcgId", byId.PrivateCloudGatewayId)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Spectrocloud = Pulumi.Spectrocloud;
return await Deployment.RunAsync(() =>
{
// Retrieve details of an Apache CloudStack cloud account using ID
var byId = Spectrocloud.GetCloudaccountApacheCloudstack.Invoke(new()
{
Id = "123e4567-e89b-12d3-a456-426614174000",
});
return new Dictionary<string, object?>
{
["pcgId"] = byId.Apply(getCloudaccountApacheCloudstackResult => getCloudaccountApacheCloudstackResult.PrivateCloudGatewayId),
};
});
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 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 details of an Apache CloudStack cloud account using ID
final var byId = SpectrocloudFunctions.getCloudaccountApacheCloudstack(GetCloudaccountApacheCloudstackArgs.builder()
.id("123e4567-e89b-12d3-a456-426614174000")
.build());
ctx.export("pcgId", byId.privateCloudGatewayId());
}
}
variables:
# Retrieve details of an Apache CloudStack cloud account using ID
byId:
fn::invoke:
function: spectrocloud:getCloudaccountApacheCloudstack
arguments:
id: 123e4567-e89b-12d3-a456-426614174000
outputs:
# Use the retrieved account in other resources
pcgId: ${byId.privateCloudGatewayId}
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. - Private
Cloud stringGateway Id - The ID of the Private Cloud Gateway associated with this Apache CloudStack cloud account.
- 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. - Private
Cloud stringGateway Id - The ID of the Private Cloud Gateway associated with this Apache CloudStack cloud account.
- 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. - private
Cloud StringGateway Id - The ID of the Private Cloud Gateway associated with this Apache CloudStack cloud account.
- 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. - private
Cloud stringGateway Id - The ID of the Private Cloud Gateway associated with this Apache CloudStack cloud account.
- context string
- The context of the account. Allowed values are
projectortenantor ``.
- id str
- The unique ID of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - name str
- The name of the Apache CloudStack cloud account. Either
idornamemust be provided, but not both. - private_
cloud_ strgateway_ id - The ID of the Private Cloud Gateway associated with this Apache CloudStack cloud account.
- context str
- 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. - private
Cloud StringGateway Id - The ID of the Private Cloud Gateway associated with this Apache CloudStack cloud account.
- 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.
Viewing docs for spectrocloud 0.28.3
published on Friday, Mar 6, 2026 by spectrocloud
published on Friday, Mar 6, 2026 by spectrocloud
