1. Registry
  2. Packages
  3. Strata Cloud Manager Provider
  4. API Docs
  5. getTag
Viewing docs for Strata Cloud Manager v1.2.1
published on Friday, Oct 16, 2026 by Pulumi
scm logo Strata Cloud Manager
Viewing docs for Strata Cloud Manager v1.2.1
published on Friday, Oct 16, 2026 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.GetTag(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"] = new Dictionary<string, object?>
            {
                ["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.ArrayList;
    import java.util.Arrays;
    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}
    
    terraform {
      required_providers {
        scm = {
          source = "pulumi/scm"
        }
      }
    }
    
    data "scm_tag" "scmTagDs" {
      id = "66cbe56c-0300-4905-8455-d384978a0082"
    }
    
    # Look up the "production" tag by its name.
    # Output the details of the found tags to verify they were read correctly.
    output "tagOutputs" {
      value = {
        "productionId"      = data.scm_tag.scmTagDs.id
        "productionColor"   = data.scm_tag.scmTagDs.color
        "productionFolder"  = data.scm_tag.scmTagDs.folder
        "productionSnippet" = data.scm_tag.scmTagDs.snippet
        "productionDevice"  = data.scm_tag.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?: InvokeOutputOptions): Output<GetTagResult>
    def get_tag(device: Optional[str] = None,
                folder: Optional[str] = None,
                id: Optional[str] = None,
                name: Optional[str] = None,
                snippet: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetTagResult
    def get_tag_output(device: pulumi.Input[Optional[str]] = None,
                folder: pulumi.Input[Optional[str]] = None,
                id: pulumi.Input[Optional[str]] = None,
                name: pulumi.Input[Optional[str]] = None,
                snippet: pulumi.Input[Optional[str]] = None,
                opts: Optional[InvokeOutputOptions] = 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 Output<GetTagResult> Invoke(GetTagInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetTagResult> getTag(GetTagArgs args, InvokeOptions options)
    public static Output<GetTagResult> getTag(GetTagArgs args, InvokeOptions options)
    public static Output<GetTagResult> getTag(GetTagArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: scm:index/getTag:getTag
      arguments:
        # arguments dictionary
    data "scm_get_tag" "name" {
        # arguments
    }

    The following arguments are supported:

    Id string
    The UUID of the tag
    Device string
    The device in which the resource is defined
    Folder string
    The folder in which the resource is defined
    Name string
    The name of the tag
    Snippet string
    The snippet in which the resource is defined
    Id string
    The UUID of the tag
    Device string
    The device in which the resource is defined
    Folder string
    The folder in which the resource is defined
    Name string
    The name of the tag
    Snippet string
    The snippet in which the resource is defined
    id string
    The UUID of the tag
    device string
    The device in which the resource is defined
    folder string
    The folder in which the resource is defined
    name string
    The name of the tag
    snippet string
    The snippet in which the resource is defined
    id String
    The UUID of the tag
    device String
    The device in which the resource is defined
    folder String
    The folder in which the resource is defined
    name String
    The name of the tag
    snippet String
    The snippet in which the resource is defined
    id string
    The UUID of the tag
    device string
    The device in which the resource is defined
    folder string
    The folder in which the resource is defined
    name string
    The name of the tag
    snippet string
    The snippet in which the resource is defined
    id str
    The UUID of the tag
    device str
    The device in which the resource is defined
    folder str
    The folder in which the resource is defined
    name str
    The name of the tag
    snippet str
    The snippet in which the resource is defined
    id String
    The UUID of the tag
    device String
    The device in which the resource is defined
    folder String
    The folder in which the resource is defined
    name String
    The name of the tag
    snippet String
    The snippet in which the resource is defined

    getTag Result

    The following output properties are available:

    Color string
    The color of the tag. Possible values are Red, Green, Blue, Yellow, Copper, Orange, Purple, Gray, Light Green, Cyan, Light Gray, Blue Gray, Lime, Black, Gold, Brown, Olive, Maroon, Red-Orange, Yellow-Orange, Forest Green, Turquoise Blue, Azure Blue, Cerulean Blue, Midnight Blue, Medium Blue, Cobalt Blue, Violet Blue, Blue Violet, Medium Violet, Medium Rose, Lavender, Orchid, Thistle, Peach, Salmon, Magenta, Red Violet, Mahogany, Burnt Sienna and Chestnut.
    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
    The Terraform ID.
    Color string
    The color of the tag. Possible values are Red, Green, Blue, Yellow, Copper, Orange, Purple, Gray, Light Green, Cyan, Light Gray, Blue Gray, Lime, Black, Gold, Brown, Olive, Maroon, Red-Orange, Yellow-Orange, Forest Green, Turquoise Blue, Azure Blue, Cerulean Blue, Midnight Blue, Medium Blue, Cobalt Blue, Violet Blue, Blue Violet, Medium Violet, Medium Rose, Lavender, Orchid, Thistle, Peach, Salmon, Magenta, Red Violet, Mahogany, Burnt Sienna and Chestnut.
    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
    The Terraform ID.
    color string
    The color of the tag. Possible values are Red, Green, Blue, Yellow, Copper, Orange, Purple, Gray, Light Green, Cyan, Light Gray, Blue Gray, Lime, Black, Gold, Brown, Olive, Maroon, Red-Orange, Yellow-Orange, Forest Green, Turquoise Blue, Azure Blue, Cerulean Blue, Midnight Blue, Medium Blue, Cobalt Blue, Violet Blue, Blue Violet, Medium Violet, Medium Rose, Lavender, Orchid, Thistle, Peach, Salmon, Magenta, Red Violet, Mahogany, Burnt Sienna and Chestnut.
    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
    The Terraform ID.
    color String
    The color of the tag. Possible values are Red, Green, Blue, Yellow, Copper, Orange, Purple, Gray, Light Green, Cyan, Light Gray, Blue Gray, Lime, Black, Gold, Brown, Olive, Maroon, Red-Orange, Yellow-Orange, Forest Green, Turquoise Blue, Azure Blue, Cerulean Blue, Midnight Blue, Medium Blue, Cobalt Blue, Violet Blue, Blue Violet, Medium Violet, Medium Rose, Lavender, Orchid, Thistle, Peach, Salmon, Magenta, Red Violet, Mahogany, Burnt Sienna and Chestnut.
    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
    The Terraform ID.
    color string
    The color of the tag. Possible values are Red, Green, Blue, Yellow, Copper, Orange, Purple, Gray, Light Green, Cyan, Light Gray, Blue Gray, Lime, Black, Gold, Brown, Olive, Maroon, Red-Orange, Yellow-Orange, Forest Green, Turquoise Blue, Azure Blue, Cerulean Blue, Midnight Blue, Medium Blue, Cobalt Blue, Violet Blue, Blue Violet, Medium Violet, Medium Rose, Lavender, Orchid, Thistle, Peach, Salmon, Magenta, Red Violet, Mahogany, Burnt Sienna and Chestnut.
    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
    The Terraform ID.
    color str
    The color of the tag. Possible values are Red, Green, Blue, Yellow, Copper, Orange, Purple, Gray, Light Green, Cyan, Light Gray, Blue Gray, Lime, Black, Gold, Brown, Olive, Maroon, Red-Orange, Yellow-Orange, Forest Green, Turquoise Blue, Azure Blue, Cerulean Blue, Midnight Blue, Medium Blue, Cobalt Blue, Violet Blue, Blue Violet, Medium Violet, Medium Rose, Lavender, Orchid, Thistle, Peach, Salmon, Magenta, Red Violet, Mahogany, Burnt Sienna and Chestnut.
    comments str
    The description of the tag
    device str
    The device in which the resource is defined
    folder str
    The folder in which the resource is defined
    id str
    The UUID of the tag
    name str
    The name of the tag
    snippet str
    The snippet in which the resource is defined
    tfid str
    The Terraform ID.
    color String
    The color of the tag. Possible values are Red, Green, Blue, Yellow, Copper, Orange, Purple, Gray, Light Green, Cyan, Light Gray, Blue Gray, Lime, Black, Gold, Brown, Olive, Maroon, Red-Orange, Yellow-Orange, Forest Green, Turquoise Blue, Azure Blue, Cerulean Blue, Midnight Blue, Medium Blue, Cobalt Blue, Violet Blue, Blue Violet, Medium Violet, Medium Rose, Lavender, Orchid, Thistle, Peach, Salmon, Magenta, Red Violet, Mahogany, Burnt Sienna and Chestnut.
    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
    The Terraform ID.

    Package Details

    Repository
    scm pulumi/pulumi-scm
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scm Terraform Provider.
    scm logo Strata Cloud Manager
    Viewing docs for Strata Cloud Manager v1.2.1
    published on Friday, Oct 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial