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

ibm.getSmSecretGroups

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 secret group collection. 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 secretGroups = ibm.getSmSecretGroups({
        instanceId: ibm_resource_instance.sm_instance.guid,
        region: "us-south",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    secret_groups = ibm.get_sm_secret_groups(instance_id=ibm_resource_instance["sm_instance"]["guid"],
        region="us-south")
    
    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.GetSmSecretGroups(ctx, &ibm.GetSmSecretGroupsArgs{
    			InstanceId: ibm_resource_instance.Sm_instance.Guid,
    			Region:     pulumi.StringRef("us-south"),
    		}, 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 secretGroups = Ibm.GetSmSecretGroups.Invoke(new()
        {
            InstanceId = ibm_resource_instance.Sm_instance.Guid,
            Region = "us-south",
        });
    
    });
    
    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.GetSmSecretGroupsArgs;
    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 secretGroups = IbmFunctions.getSmSecretGroups(GetSmSecretGroupsArgs.builder()
                .instanceId(ibm_resource_instance.sm_instance().guid())
                .region("us-south")
                .build());
    
        }
    }
    
    variables:
      secretGroups:
        fn::invoke:
          function: ibm:getSmSecretGroups
          arguments:
            instanceId: ${ibm_resource_instance.sm_instance.guid}
            region: us-south
    

    Using getSmSecretGroups

    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 getSmSecretGroups(args: GetSmSecretGroupsArgs, opts?: InvokeOptions): Promise<GetSmSecretGroupsResult>
    function getSmSecretGroupsOutput(args: GetSmSecretGroupsOutputArgs, opts?: InvokeOptions): Output<GetSmSecretGroupsResult>
    def get_sm_secret_groups(endpoint_type: Optional[str] = None,
                             id: Optional[str] = None,
                             instance_id: Optional[str] = None,
                             region: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetSmSecretGroupsResult
    def get_sm_secret_groups_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,
                             opts: Optional[InvokeOptions] = None) -> Output[GetSmSecretGroupsResult]
    func GetSmSecretGroups(ctx *Context, args *GetSmSecretGroupsArgs, opts ...InvokeOption) (*GetSmSecretGroupsResult, error)
    func GetSmSecretGroupsOutput(ctx *Context, args *GetSmSecretGroupsOutputArgs, opts ...InvokeOption) GetSmSecretGroupsResultOutput

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

    public static class GetSmSecretGroups 
    {
        public static Task<GetSmSecretGroupsResult> InvokeAsync(GetSmSecretGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetSmSecretGroupsResult> Invoke(GetSmSecretGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSmSecretGroupsResult> getSmSecretGroups(GetSmSecretGroupsArgs args, InvokeOptions options)
    public static Output<GetSmSecretGroupsResult> getSmSecretGroups(GetSmSecretGroupsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getSmSecretGroups:getSmSecretGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    The GUID of the Secrets Manager instance.
    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
    (String) A UUID identifier, or default 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)$/.
    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.
    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
    (String) A UUID identifier, or default 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)$/.
    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.
    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
    (String) A UUID identifier, or default 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)$/.
    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.
    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
    (String) A UUID identifier, or default 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)$/.
    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.
    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
    (String) A UUID identifier, or default 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)$/.
    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.
    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
    (String) A UUID identifier, or default 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)$/.
    region String
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.

    getSmSecretGroups Result

    The following output properties are available:

    Id string
    (String) A UUID identifier, or default 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)$/.
    InstanceId string
    Region string
    SecretGroups List<GetSmSecretGroupsSecretGroup>
    (List) A collection of secret groups.

    • Constraints: The maximum length is 201 items. The minimum length is 1 item. Nested scheme for secret_groups:
    TotalCount double
    (Integer) The total number of resources in a collection.

    • Constraints: The minimum value is 0.
    EndpointType string
    Id string
    (String) A UUID identifier, or default 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)$/.
    InstanceId string
    Region string
    SecretGroups []GetSmSecretGroupsSecretGroup
    (List) A collection of secret groups.

    • Constraints: The maximum length is 201 items. The minimum length is 1 item. Nested scheme for secret_groups:
    TotalCount float64
    (Integer) The total number of resources in a collection.

    • Constraints: The minimum value is 0.
    EndpointType string
    id String
    (String) A UUID identifier, or default 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)$/.
    instanceId String
    region String
    secretGroups List<GetSmSecretGroupsSecretGroup>
    (List) A collection of secret groups.

    • Constraints: The maximum length is 201 items. The minimum length is 1 item. Nested scheme for secret_groups:
    totalCount Double
    (Integer) The total number of resources in a collection.

    • Constraints: The minimum value is 0.
    endpointType String
    id string
    (String) A UUID identifier, or default 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)$/.
    instanceId string
    region string
    secretGroups GetSmSecretGroupsSecretGroup[]
    (List) A collection of secret groups.

    • Constraints: The maximum length is 201 items. The minimum length is 1 item. Nested scheme for secret_groups:
    totalCount number
    (Integer) The total number of resources in a collection.

    • Constraints: The minimum value is 0.
    endpointType string
    id str
    (String) A UUID identifier, or default 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)$/.
    instance_id str
    region str
    secret_groups Sequence[GetSmSecretGroupsSecretGroup]
    (List) A collection of secret groups.

    • Constraints: The maximum length is 201 items. The minimum length is 1 item. Nested scheme for secret_groups:
    total_count float
    (Integer) The total number of resources in a collection.

    • Constraints: The minimum value is 0.
    endpoint_type str
    id String
    (String) A UUID identifier, or default 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)$/.
    instanceId String
    region String
    secretGroups List<Property Map>
    (List) A collection of secret groups.

    • Constraints: The maximum length is 201 items. The minimum length is 1 item. Nested scheme for secret_groups:
    totalCount Number
    (Integer) The total number of resources in a collection.

    • Constraints: The minimum value is 0.
    endpointType String

    Supporting Types

    GetSmSecretGroupsSecretGroup

    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
    (String) A UUID identifier, or default 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)$/.
    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 /(.*?)/.
    UpdatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    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
    (String) A UUID identifier, or default 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)$/.
    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 /(.*?)/.
    UpdatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    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
    (String) A UUID identifier, or default 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)$/.
    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 /(.*?)/.
    updatedAt String
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    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
    (String) A UUID identifier, or default 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)$/.
    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 /(.*?)/.
    updatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    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
    (String) A UUID identifier, or default 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)$/.
    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 /(.*?)/.
    updated_at str
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    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
    (String) A UUID identifier, or default 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)$/.
    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 /(.*?)/.
    updatedAt String
    (String) The date when a resource was recently modified. The date format follows RFC 3339.

    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