Viewing docs for Strata Cloud Manager v1.0.5
published on Saturday, Mar 21, 2026 by Pulumi
published on Saturday, Mar 21, 2026 by Pulumi
Viewing docs for Strata Cloud Manager v1.0.5
published on Saturday, Mar 21, 2026 by Pulumi
published on Saturday, Mar 21, 2026 by Pulumi
Variable data source
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scm from "@pulumi/scm";
// Look up the "$example" variable by its name.
const scmVariableDs = scm.getVariable({
id: "66cbe56c-0300-4905-8455-d384978a0081",
});
export const variableOutputs = {
exampleId: scmVariableDs.then(scmVariableDs => scmVariableDs.id),
exampleName: scmVariableDs.then(scmVariableDs => scmVariableDs.name),
exampleType: scmVariableDs.then(scmVariableDs => scmVariableDs.type),
exampleValue: scmVariableDs.then(scmVariableDs => scmVariableDs.value),
};
import pulumi
import pulumi_scm as scm
# Look up the "$example" variable by its name.
scm_variable_ds = scm.get_variable(id="66cbe56c-0300-4905-8455-d384978a0081")
pulumi.export("variableOutputs", {
"exampleId": scm_variable_ds.id,
"exampleName": scm_variable_ds.name,
"exampleType": scm_variable_ds.type,
"exampleValue": scm_variable_ds.value,
})
package main
import (
"github.com/pulumi/pulumi-scm/sdk/go/scm"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Look up the "$example" variable by its name.
scmVariableDs, err := scm.LookupVariable(ctx, &scm.LookupVariableArgs{
Id: "66cbe56c-0300-4905-8455-d384978a0081",
}, nil)
if err != nil {
return err
}
ctx.Export("variableOutputs", pulumi.StringMap{
"exampleId": scmVariableDs.Id,
"exampleName": scmVariableDs.Name,
"exampleType": scmVariableDs.Type,
"exampleValue": scmVariableDs.Value,
})
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scm = Pulumi.Scm;
return await Deployment.RunAsync(() =>
{
// Look up the "$example" variable by its name.
var scmVariableDs = Scm.GetVariable.Invoke(new()
{
Id = "66cbe56c-0300-4905-8455-d384978a0081",
});
return new Dictionary<string, object?>
{
["variableOutputs"] =
{
{ "exampleId", scmVariableDs.Apply(getVariableResult => getVariableResult.Id) },
{ "exampleName", scmVariableDs.Apply(getVariableResult => getVariableResult.Name) },
{ "exampleType", scmVariableDs.Apply(getVariableResult => getVariableResult.Type) },
{ "exampleValue", scmVariableDs.Apply(getVariableResult => getVariableResult.Value) },
},
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scm.ScmFunctions;
import com.pulumi.scm.inputs.GetVariableArgs;
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) {
// Look up the "$example" variable by its name.
final var scmVariableDs = ScmFunctions.getVariable(GetVariableArgs.builder()
.id("66cbe56c-0300-4905-8455-d384978a0081")
.build());
ctx.export("variableOutputs", Map.ofEntries(
Map.entry("exampleId", scmVariableDs.id()),
Map.entry("exampleName", scmVariableDs.name()),
Map.entry("exampleType", scmVariableDs.type()),
Map.entry("exampleValue", scmVariableDs.value())
));
}
}
variables:
# Look up the "$example" variable by its name.
scmVariableDs:
fn::invoke:
function: scm:getVariable
arguments:
id: 66cbe56c-0300-4905-8455-d384978a0081
outputs:
# Output the details of the found variable to verify they were read correctly.
variableOutputs:
exampleId: ${scmVariableDs.id}
exampleName: ${scmVariableDs.name}
exampleType: ${scmVariableDs.type}
exampleValue: ${scmVariableDs.value}
Using getVariable
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 getVariable(args: GetVariableArgs, opts?: InvokeOptions): Promise<GetVariableResult>
function getVariableOutput(args: GetVariableOutputArgs, opts?: InvokeOptions): Output<GetVariableResult>def get_variable(device: Optional[str] = None,
folder: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
snippet: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVariableResult
def get_variable_output(device: Optional[pulumi.Input[str]] = None,
folder: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
snippet: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVariableResult]func LookupVariable(ctx *Context, args *LookupVariableArgs, opts ...InvokeOption) (*LookupVariableResult, error)
func LookupVariableOutput(ctx *Context, args *LookupVariableOutputArgs, opts ...InvokeOption) LookupVariableResultOutput> Note: This function is named LookupVariable in the Go SDK.
public static class GetVariable
{
public static Task<GetVariableResult> InvokeAsync(GetVariableArgs args, InvokeOptions? opts = null)
public static Output<GetVariableResult> Invoke(GetVariableInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVariableResult> getVariable(GetVariableArgs args, InvokeOptions options)
public static Output<GetVariableResult> getVariable(GetVariableArgs args, InvokeOptions options)
fn::invoke:
function: scm:index/getVariable:getVariable
arguments:
# arguments dictionaryThe following arguments are supported:
getVariable Result
The following output properties are available:
- Description string
- Device string
- The device in which the resource is defined
- Folder string
- Id string
- UUID of the variable
- Name string
- Overridden bool
- Snippet string
- Tfid string
- Type string
- Value string
- Description string
- Device string
- The device in which the resource is defined
- Folder string
- Id string
- UUID of the variable
- Name string
- Overridden bool
- Snippet string
- Tfid string
- Type string
- Value string
- description String
- device String
- The device in which the resource is defined
- folder String
- id String
- UUID of the variable
- name String
- overridden Boolean
- snippet String
- tfid String
- type String
- value String
- description string
- device string
- The device in which the resource is defined
- folder string
- id string
- UUID of the variable
- name string
- overridden boolean
- snippet string
- tfid string
- type string
- value string
- description str
- device str
- The device in which the resource is defined
- folder str
- id str
- UUID of the variable
- name str
- overridden bool
- snippet str
- tfid str
- type str
- value str
- description String
- device String
- The device in which the resource is defined
- folder String
- id String
- UUID of the variable
- name String
- overridden Boolean
- snippet String
- tfid String
- type String
- value String
Package Details
- Repository
- scm pulumi/pulumi-scm
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scmTerraform Provider.
Viewing docs for Strata Cloud Manager v1.0.5
published on Saturday, Mar 21, 2026 by Pulumi
published on Saturday, Mar 21, 2026 by Pulumi
