Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
Tag data source
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scm from "@pulumi/scm";
// Look up the "production" tag by its name.
const scmTagDs = scm.getTag({
id: "66cbe56c-0300-4905-8455-d384978a0082",
});
export const tagOutputs = {
productionId: scmTagDs.then(scmTagDs => scmTagDs.id),
productionColor: scmTagDs.then(scmTagDs => scmTagDs.color),
productionFolder: scmTagDs.then(scmTagDs => scmTagDs.folder),
productionSnippet: scmTagDs.then(scmTagDs => scmTagDs.snippet),
productionDevice: scmTagDs.then(scmTagDs => scmTagDs.device),
};
import pulumi
import pulumi_scm as scm
# Look up the "production" tag by its name.
scm_tag_ds = scm.get_tag(id="66cbe56c-0300-4905-8455-d384978a0082")
pulumi.export("tagOutputs", {
"productionId": scm_tag_ds.id,
"productionColor": scm_tag_ds.color,
"productionFolder": scm_tag_ds.folder,
"productionSnippet": scm_tag_ds.snippet,
"productionDevice": scm_tag_ds.device,
})
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 "production" tag by its name.
scmTagDs, err := scm.LookupTag(ctx, &scm.LookupTagArgs{
Id: "66cbe56c-0300-4905-8455-d384978a0082",
}, nil)
if err != nil {
return err
}
ctx.Export("tagOutputs", pulumi.StringMap{
"productionId": scmTagDs.Id,
"productionColor": scmTagDs.Color,
"productionFolder": scmTagDs.Folder,
"productionSnippet": scmTagDs.Snippet,
"productionDevice": scmTagDs.Device,
})
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scm = Pulumi.Scm;
return await Deployment.RunAsync(() =>
{
// Look up the "production" tag by its name.
var scmTagDs = Scm.GetTag.Invoke(new()
{
Id = "66cbe56c-0300-4905-8455-d384978a0082",
});
return new Dictionary<string, object?>
{
["tagOutputs"] =
{
{ "productionId", scmTagDs.Apply(getTagResult => getTagResult.Id) },
{ "productionColor", scmTagDs.Apply(getTagResult => getTagResult.Color) },
{ "productionFolder", scmTagDs.Apply(getTagResult => getTagResult.Folder) },
{ "productionSnippet", scmTagDs.Apply(getTagResult => getTagResult.Snippet) },
{ "productionDevice", scmTagDs.Apply(getTagResult => getTagResult.Device) },
},
};
});
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.GetTagArgs;
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 "production" tag by its name.
final var scmTagDs = ScmFunctions.getTag(GetTagArgs.builder()
.id("66cbe56c-0300-4905-8455-d384978a0082")
.build());
ctx.export("tagOutputs", Map.ofEntries(
Map.entry("productionId", scmTagDs.id()),
Map.entry("productionColor", scmTagDs.color()),
Map.entry("productionFolder", scmTagDs.folder()),
Map.entry("productionSnippet", scmTagDs.snippet()),
Map.entry("productionDevice", scmTagDs.device())
));
}
}
variables:
# Look up the "production" tag by its name.
scmTagDs:
fn::invoke:
function: scm:getTag
arguments:
id: 66cbe56c-0300-4905-8455-d384978a0082
outputs:
# Output the details of the found tags to verify they were read correctly.
tagOutputs:
productionId: ${scmTagDs.id}
productionColor: ${scmTagDs.color}
productionFolder: ${scmTagDs.folder}
productionSnippet: ${scmTagDs.snippet}
productionDevice: ${scmTagDs.device}
Using getTag
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 getTag(args: GetTagArgs, opts?: InvokeOptions): Promise<GetTagResult>
function getTagOutput(args: GetTagOutputArgs, opts?: InvokeOptions): Output<GetTagResult>def get_tag(id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTagResult
def get_tag_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTagResult]func LookupTag(ctx *Context, args *LookupTagArgs, opts ...InvokeOption) (*LookupTagResult, error)
func LookupTagOutput(ctx *Context, args *LookupTagOutputArgs, opts ...InvokeOption) LookupTagResultOutput> Note: This function is named LookupTag in the Go SDK.
public static class GetTag
{
public static Task<GetTagResult> InvokeAsync(GetTagArgs args, InvokeOptions? opts = null)
public static Output<GetTagResult> Invoke(GetTagInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTagResult> getTag(GetTagArgs args, InvokeOptions options)
public static Output<GetTagResult> getTag(GetTagArgs args, InvokeOptions options)
fn::invoke:
function: scm:index/getTag:getTag
arguments:
# arguments dictionaryThe following arguments are supported:
getTag Result
The following output properties are available:
- Color string
- The color of the tag
- Comments string
- The description of the tag
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Id string
- The UUID of the tag
- Name string
- The name of the tag
- Snippet string
- The snippet in which the resource is defined
- Tfid string
- Color string
- The color of the tag
- Comments string
- The description of the tag
- Device string
- The device in which the resource is defined
- Folder string
- The folder in which the resource is defined
- Id string
- The UUID of the tag
- Name string
- The name of the tag
- Snippet string
- The snippet in which the resource is defined
- Tfid string
- color String
- The color of the tag
- comments String
- The description of the tag
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- id String
- The UUID of the tag
- name String
- The name of the tag
- snippet String
- The snippet in which the resource is defined
- tfid String
- color string
- The color of the tag
- comments string
- The description of the tag
- device string
- The device in which the resource is defined
- folder string
- The folder in which the resource is defined
- id string
- The UUID of the tag
- name string
- The name of the tag
- snippet string
- The snippet in which the resource is defined
- tfid string
- color String
- The color of the tag
- comments String
- The description of the tag
- device String
- The device in which the resource is defined
- folder String
- The folder in which the resource is defined
- id String
- The UUID of the tag
- name String
- The name of the tag
- snippet String
- The snippet in which the resource is defined
- tfid String
Package Details
- Repository
- scm pulumi/pulumi-scm
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scmTerraform Provider.
Strata Cloud Manager v0.4.3 published on Saturday, Nov 8, 2025 by Pulumi
