1. Packages
  2. Ibm Provider
  3. API Docs
  4. getSmSecretGroup
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getSmSecretGroup

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Provides a read-only data source for a secret group. You can then reference the fields of the data source in other resources within the same configuration using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const secretGroup = ibm.getSmSecretGroup({
        instanceId: ibm_resource_instance.sm_instance.guid,
        region: "us-south",
        secretGroupId: ibm_sm_secret_group.sm_secret_group_instance.secret_group_id,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    secret_group = ibm.get_sm_secret_group(instance_id=ibm_resource_instance["sm_instance"]["guid"],
        region="us-south",
        secret_group_id=ibm_sm_secret_group["sm_secret_group_instance"]["secret_group_id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.LookupSmSecretGroup(ctx, &ibm.LookupSmSecretGroupArgs{
    			InstanceId:    ibm_resource_instance.Sm_instance.Guid,
    			Region:        pulumi.StringRef("us-south"),
    			SecretGroupId: ibm_sm_secret_group.Sm_secret_group_instance.Secret_group_id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var secretGroup = Ibm.GetSmSecretGroup.Invoke(new()
        {
            InstanceId = ibm_resource_instance.Sm_instance.Guid,
            Region = "us-south",
            SecretGroupId = ibm_sm_secret_group.Sm_secret_group_instance.Secret_group_id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetSmSecretGroupArgs;
    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) {
            final var secretGroup = IbmFunctions.getSmSecretGroup(GetSmSecretGroupArgs.builder()
                .instanceId(ibm_resource_instance.sm_instance().guid())
                .region("us-south")
                .secretGroupId(ibm_sm_secret_group.sm_secret_group_instance().secret_group_id())
                .build());
    
        }
    }
    
    variables:
      secretGroup:
        fn::invoke:
          function: ibm:getSmSecretGroup
          arguments:
            instanceId: ${ibm_resource_instance.sm_instance.guid}
            region: us-south
            secretGroupId: ${ibm_sm_secret_group.sm_secret_group_instance.secret_group_id}
    

    Using getSmSecretGroup

    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 getSmSecretGroup(args: GetSmSecretGroupArgs, opts?: InvokeOptions): Promise<GetSmSecretGroupResult>
    function getSmSecretGroupOutput(args: GetSmSecretGroupOutputArgs, opts?: InvokeOptions): Output<GetSmSecretGroupResult>
    def get_sm_secret_group(endpoint_type: Optional[str] = None,
                            id: Optional[str] = None,
                            instance_id: Optional[str] = None,
                            region: Optional[str] = None,
                            secret_group_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetSmSecretGroupResult
    def get_sm_secret_group_output(endpoint_type: Optional[pulumi.Input[str]] = None,
                            id: Optional[pulumi.Input[str]] = None,
                            instance_id: Optional[pulumi.Input[str]] = None,
                            region: Optional[pulumi.Input[str]] = None,
                            secret_group_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetSmSecretGroupResult]
    func LookupSmSecretGroup(ctx *Context, args *LookupSmSecretGroupArgs, opts ...InvokeOption) (*LookupSmSecretGroupResult, error)
    func LookupSmSecretGroupOutput(ctx *Context, args *LookupSmSecretGroupOutputArgs, opts ...InvokeOption) LookupSmSecretGroupResultOutput

    > Note: This function is named LookupSmSecretGroup in the Go SDK.

    public static class GetSmSecretGroup 
    {
        public static Task<GetSmSecretGroupResult> InvokeAsync(GetSmSecretGroupArgs args, InvokeOptions? opts = null)
        public static Output<GetSmSecretGroupResult> Invoke(GetSmSecretGroupInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSmSecretGroupResult> getSmSecretGroup(GetSmSecretGroupArgs args, InvokeOptions options)
    public static Output<GetSmSecretGroupResult> getSmSecretGroup(GetSmSecretGroupArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getSmSecretGroup:getSmSecretGroup
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    The GUID of the Secrets Manager instance.
    SecretGroupId string
    The ID of the secret group.

    • Constraints: The maximum length is 36 characters. The minimum length is 7 characters. The value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/.
    EndpointType string
    The endpoint type. If not provided the endpoint type is determined by the visibility argument provided in the provider configuration.

    • Constraints: Allowable values are: private, public.
    Id string
    The unique identifier of the data source.
    Region string
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    InstanceId string
    The GUID of the Secrets Manager instance.
    SecretGroupId string
    The ID of the secret group.

    • Constraints: The maximum length is 36 characters. The minimum length is 7 characters. The value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/.
    EndpointType string
    The endpoint type. If not provided the endpoint type is determined by the visibility argument provided in the provider configuration.

    • Constraints: Allowable values are: private, public.
    Id string
    The unique identifier of the data source.
    Region string
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    instanceId String
    The GUID of the Secrets Manager instance.
    secretGroupId String
    The ID of the secret group.

    • Constraints: The maximum length is 36 characters. The minimum length is 7 characters. The value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/.
    endpointType String
    The endpoint type. If not provided the endpoint type is determined by the visibility argument provided in the provider configuration.

    • Constraints: Allowable values are: private, public.
    id String
    The unique identifier of the data source.
    region String
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    instanceId string
    The GUID of the Secrets Manager instance.
    secretGroupId string
    The ID of the secret group.

    • Constraints: The maximum length is 36 characters. The minimum length is 7 characters. The value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/.
    endpointType string
    The endpoint type. If not provided the endpoint type is determined by the visibility argument provided in the provider configuration.

    • Constraints: Allowable values are: private, public.
    id string
    The unique identifier of the data source.
    region string
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    instance_id str
    The GUID of the Secrets Manager instance.
    secret_group_id str
    The ID of the secret group.

    • Constraints: The maximum length is 36 characters. The minimum length is 7 characters. The value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/.
    endpoint_type str
    The endpoint type. If not provided the endpoint type is determined by the visibility argument provided in the provider configuration.

    • Constraints: Allowable values are: private, public.
    id str
    The unique identifier of the data source.
    region str
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    instanceId String
    The GUID of the Secrets Manager instance.
    secretGroupId String
    The ID of the secret group.

    • Constraints: The maximum length is 36 characters. The minimum length is 7 characters. The value must match regular expression /^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|default)$/.
    endpointType String
    The endpoint type. If not provided the endpoint type is determined by the visibility argument provided in the provider configuration.

    • Constraints: Allowable values are: private, public.
    id String
    The unique identifier of the data source.
    region String
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.

    getSmSecretGroup Result

    The following output properties are available:

    CreatedAt string
    (String) The date when a resource was created. The date format follows RFC 3339.
    Description string
    (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.

    • Constraints: The maximum length is 1024 characters. The minimum length is 0 characters. The value must match regular expression /(.*?)/.
    Id string
    The unique identifier of the data source.
    InstanceId string
    Name string
    (String) The name of your existing secret group.

    • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
    Region string
    SecretGroupId string
    UpdatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    EndpointType string
    CreatedAt string
    (String) The date when a resource was created. The date format follows RFC 3339.
    Description string
    (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.

    • Constraints: The maximum length is 1024 characters. The minimum length is 0 characters. The value must match regular expression /(.*?)/.
    Id string
    The unique identifier of the data source.
    InstanceId string
    Name string
    (String) The name of your existing secret group.

    • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
    Region string
    SecretGroupId string
    UpdatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    EndpointType string
    createdAt String
    (String) The date when a resource was created. The date format follows RFC 3339.
    description String
    (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.

    • Constraints: The maximum length is 1024 characters. The minimum length is 0 characters. The value must match regular expression /(.*?)/.
    id String
    The unique identifier of the data source.
    instanceId String
    name String
    (String) The name of your existing secret group.

    • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
    region String
    secretGroupId String
    updatedAt String
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    endpointType String
    createdAt string
    (String) The date when a resource was created. The date format follows RFC 3339.
    description string
    (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.

    • Constraints: The maximum length is 1024 characters. The minimum length is 0 characters. The value must match regular expression /(.*?)/.
    id string
    The unique identifier of the data source.
    instanceId string
    name string
    (String) The name of your existing secret group.

    • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
    region string
    secretGroupId string
    updatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    endpointType string
    created_at str
    (String) The date when a resource was created. The date format follows RFC 3339.
    description str
    (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.

    • Constraints: The maximum length is 1024 characters. The minimum length is 0 characters. The value must match regular expression /(.*?)/.
    id str
    The unique identifier of the data source.
    instance_id str
    name str
    (String) The name of your existing secret group.

    • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
    region str
    secret_group_id str
    updated_at str
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    endpoint_type str
    createdAt String
    (String) The date when a resource was created. The date format follows RFC 3339.
    description String
    (String) An extended description of your secret group.To protect your privacy, do not use personal data, such as your name or location, as a description for your secret group.

    • Constraints: The maximum length is 1024 characters. The minimum length is 0 characters. The value must match regular expression /(.*?)/.
    id String
    The unique identifier of the data source.
    instanceId String
    name String
    (String) The name of your existing secret group.

    • Constraints: The maximum length is 64 characters. The minimum length is 2 characters. The value must match regular expression /(.*?)/.
    region String
    secretGroupId String
    updatedAt String
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    endpointType String

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud