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

ibm.SmServiceCredentialsSecret

Explore with Pulumi AI

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

    Provides a resource for ServiceCredentialsSecret. This allows ServiceCredentialsSecret to be created, updated and deleted.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const smServiceCredentialsSecret = new ibm.SmServiceCredentialsSecret("smServiceCredentialsSecret", {
        instanceId: ibm_resource_instance.sm_instance.guid,
        region: "us-south",
        customMetadata: {
            key: "value",
        },
        description: "Extended description for this secret.",
        labels: ["my-label"],
        rotation: {
            autoRotate: true,
            interval: 1,
            unit: "day",
        },
        secretGroupId: ibm_sm_secret_group.sm_secret_group.secret_group_id,
        sourceService: {
            instance: {
                crn: "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::",
            },
            role: {
                crn: "crn:v1:bluemix:public:iam::::serviceRole:Writer",
            },
            parameters: {
                HMAC: "true",
            },
        },
        ttl: "1800",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    sm_service_credentials_secret = ibm.SmServiceCredentialsSecret("smServiceCredentialsSecret",
        instance_id=ibm_resource_instance["sm_instance"]["guid"],
        region="us-south",
        custom_metadata={
            "key": "value",
        },
        description="Extended description for this secret.",
        labels=["my-label"],
        rotation={
            "auto_rotate": True,
            "interval": 1,
            "unit": "day",
        },
        secret_group_id=ibm_sm_secret_group["sm_secret_group"]["secret_group_id"],
        source_service={
            "instance": {
                "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::",
            },
            "role": {
                "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
            },
            "parameters": {
                "HMAC": "true",
            },
        },
        ttl="1800")
    
    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.NewSmServiceCredentialsSecret(ctx, "smServiceCredentialsSecret", &ibm.SmServiceCredentialsSecretArgs{
    			InstanceId: pulumi.Any(ibm_resource_instance.Sm_instance.Guid),
    			Region:     pulumi.String("us-south"),
    			CustomMetadata: pulumi.StringMap{
    				"key": pulumi.String("value"),
    			},
    			Description: pulumi.String("Extended description for this secret."),
    			Labels: pulumi.StringArray{
    				pulumi.String("my-label"),
    			},
    			Rotation: &ibm.SmServiceCredentialsSecretRotationArgs{
    				AutoRotate: pulumi.Bool(true),
    				Interval:   pulumi.Float64(1),
    				Unit:       pulumi.String("day"),
    			},
    			SecretGroupId: pulumi.Any(ibm_sm_secret_group.Sm_secret_group.Secret_group_id),
    			SourceService: &ibm.SmServiceCredentialsSecretSourceServiceArgs{
    				Instance: &ibm.SmServiceCredentialsSecretSourceServiceInstanceArgs{
    					Crn: pulumi.String("crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::"),
    				},
    				Role: &ibm.SmServiceCredentialsSecretSourceServiceRoleArgs{
    					Crn: pulumi.String("crn:v1:bluemix:public:iam::::serviceRole:Writer"),
    				},
    				Parameters: pulumi.StringMap{
    					"HMAC": pulumi.String("true"),
    				},
    			},
    			Ttl: pulumi.String("1800"),
    		})
    		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 smServiceCredentialsSecret = new Ibm.SmServiceCredentialsSecret("smServiceCredentialsSecret", new()
        {
            InstanceId = ibm_resource_instance.Sm_instance.Guid,
            Region = "us-south",
            CustomMetadata = 
            {
                { "key", "value" },
            },
            Description = "Extended description for this secret.",
            Labels = new[]
            {
                "my-label",
            },
            Rotation = new Ibm.Inputs.SmServiceCredentialsSecretRotationArgs
            {
                AutoRotate = true,
                Interval = 1,
                Unit = "day",
            },
            SecretGroupId = ibm_sm_secret_group.Sm_secret_group.Secret_group_id,
            SourceService = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceArgs
            {
                Instance = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceInstanceArgs
                {
                    Crn = "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::",
                },
                Role = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceRoleArgs
                {
                    Crn = "crn:v1:bluemix:public:iam::::serviceRole:Writer",
                },
                Parameters = 
                {
                    { "HMAC", "true" },
                },
            },
            Ttl = "1800",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.SmServiceCredentialsSecret;
    import com.pulumi.ibm.SmServiceCredentialsSecretArgs;
    import com.pulumi.ibm.inputs.SmServiceCredentialsSecretRotationArgs;
    import com.pulumi.ibm.inputs.SmServiceCredentialsSecretSourceServiceArgs;
    import com.pulumi.ibm.inputs.SmServiceCredentialsSecretSourceServiceInstanceArgs;
    import com.pulumi.ibm.inputs.SmServiceCredentialsSecretSourceServiceRoleArgs;
    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) {
            var smServiceCredentialsSecret = new SmServiceCredentialsSecret("smServiceCredentialsSecret", SmServiceCredentialsSecretArgs.builder()
                .instanceId(ibm_resource_instance.sm_instance().guid())
                .region("us-south")
                .customMetadata(Map.of("key", "value"))
                .description("Extended description for this secret.")
                .labels("my-label")
                .rotation(SmServiceCredentialsSecretRotationArgs.builder()
                    .autoRotate(true)
                    .interval(1)
                    .unit("day")
                    .build())
                .secretGroupId(ibm_sm_secret_group.sm_secret_group().secret_group_id())
                .sourceService(SmServiceCredentialsSecretSourceServiceArgs.builder()
                    .instance(SmServiceCredentialsSecretSourceServiceInstanceArgs.builder()
                        .crn("crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::")
                        .build())
                    .role(SmServiceCredentialsSecretSourceServiceRoleArgs.builder()
                        .crn("crn:v1:bluemix:public:iam::::serviceRole:Writer")
                        .build())
                    .parameters(Map.of("HMAC", true))
                    .build())
                .ttl("1800")
                .build());
    
        }
    }
    
    resources:
      smServiceCredentialsSecret:
        type: ibm:SmServiceCredentialsSecret
        properties:
          instanceId: ${ibm_resource_instance.sm_instance.guid}
          region: us-south
          customMetadata:
            key: value
          description: Extended description for this secret.
          labels:
            - my-label
          rotation:
            autoRotate: true
            interval: 1
            unit: day
          secretGroupId: ${ibm_sm_secret_group.sm_secret_group.secret_group_id}
          sourceService:
            instance:
              crn: 'crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::'
            role:
              crn: crn:v1:bluemix:public:iam::::serviceRole:Writer
            parameters:
              HMAC: true
          ttl: '1800'
    

    With Existing Service ID

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const smServiceCredentialsSecret = new ibm.SmServiceCredentialsSecret("smServiceCredentialsSecret", {
        instanceId: ibm_resource_instance.sm_instance.guid,
        region: "us-south",
        customMetadata: {
            key: "value",
        },
        description: "Extended description for this secret.",
        labels: ["my-label"],
        rotation: {
            autoRotate: true,
            interval: 1,
            unit: "day",
        },
        secretGroupId: ibm_sm_secret_group.sm_secret_group.secret_group_id,
        sourceService: {
            instance: {
                crn: "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::",
            },
            role: {
                crn: "crn:v1:bluemix:public:iam::::serviceRole:Writer",
            },
            parameters: {
                HMAC: "true",
                serviceid_crn: "crn:v1:bluemix:public:iam-identity::a/22222f3c34444ff155555d15ca616946::serviceid:ServiceId-1234f56e-1d23-45e6-123c-cfb456b87fyb",
            },
        },
        ttl: "1800",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    sm_service_credentials_secret = ibm.SmServiceCredentialsSecret("smServiceCredentialsSecret",
        instance_id=ibm_resource_instance["sm_instance"]["guid"],
        region="us-south",
        custom_metadata={
            "key": "value",
        },
        description="Extended description for this secret.",
        labels=["my-label"],
        rotation={
            "auto_rotate": True,
            "interval": 1,
            "unit": "day",
        },
        secret_group_id=ibm_sm_secret_group["sm_secret_group"]["secret_group_id"],
        source_service={
            "instance": {
                "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::",
            },
            "role": {
                "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
            },
            "parameters": {
                "HMAC": "true",
                "serviceid_crn": "crn:v1:bluemix:public:iam-identity::a/22222f3c34444ff155555d15ca616946::serviceid:ServiceId-1234f56e-1d23-45e6-123c-cfb456b87fyb",
            },
        },
        ttl="1800")
    
    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.NewSmServiceCredentialsSecret(ctx, "smServiceCredentialsSecret", &ibm.SmServiceCredentialsSecretArgs{
    			InstanceId: pulumi.Any(ibm_resource_instance.Sm_instance.Guid),
    			Region:     pulumi.String("us-south"),
    			CustomMetadata: pulumi.StringMap{
    				"key": pulumi.String("value"),
    			},
    			Description: pulumi.String("Extended description for this secret."),
    			Labels: pulumi.StringArray{
    				pulumi.String("my-label"),
    			},
    			Rotation: &ibm.SmServiceCredentialsSecretRotationArgs{
    				AutoRotate: pulumi.Bool(true),
    				Interval:   pulumi.Float64(1),
    				Unit:       pulumi.String("day"),
    			},
    			SecretGroupId: pulumi.Any(ibm_sm_secret_group.Sm_secret_group.Secret_group_id),
    			SourceService: &ibm.SmServiceCredentialsSecretSourceServiceArgs{
    				Instance: &ibm.SmServiceCredentialsSecretSourceServiceInstanceArgs{
    					Crn: pulumi.String("crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::"),
    				},
    				Role: &ibm.SmServiceCredentialsSecretSourceServiceRoleArgs{
    					Crn: pulumi.String("crn:v1:bluemix:public:iam::::serviceRole:Writer"),
    				},
    				Parameters: pulumi.StringMap{
    					"HMAC":          pulumi.String("true"),
    					"serviceid_crn": pulumi.String("crn:v1:bluemix:public:iam-identity::a/22222f3c34444ff155555d15ca616946::serviceid:ServiceId-1234f56e-1d23-45e6-123c-cfb456b87fyb"),
    				},
    			},
    			Ttl: pulumi.String("1800"),
    		})
    		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 smServiceCredentialsSecret = new Ibm.SmServiceCredentialsSecret("smServiceCredentialsSecret", new()
        {
            InstanceId = ibm_resource_instance.Sm_instance.Guid,
            Region = "us-south",
            CustomMetadata = 
            {
                { "key", "value" },
            },
            Description = "Extended description for this secret.",
            Labels = new[]
            {
                "my-label",
            },
            Rotation = new Ibm.Inputs.SmServiceCredentialsSecretRotationArgs
            {
                AutoRotate = true,
                Interval = 1,
                Unit = "day",
            },
            SecretGroupId = ibm_sm_secret_group.Sm_secret_group.Secret_group_id,
            SourceService = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceArgs
            {
                Instance = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceInstanceArgs
                {
                    Crn = "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::",
                },
                Role = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceRoleArgs
                {
                    Crn = "crn:v1:bluemix:public:iam::::serviceRole:Writer",
                },
                Parameters = 
                {
                    { "HMAC", "true" },
                    { "serviceid_crn", "crn:v1:bluemix:public:iam-identity::a/22222f3c34444ff155555d15ca616946::serviceid:ServiceId-1234f56e-1d23-45e6-123c-cfb456b87fyb" },
                },
            },
            Ttl = "1800",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.SmServiceCredentialsSecret;
    import com.pulumi.ibm.SmServiceCredentialsSecretArgs;
    import com.pulumi.ibm.inputs.SmServiceCredentialsSecretRotationArgs;
    import com.pulumi.ibm.inputs.SmServiceCredentialsSecretSourceServiceArgs;
    import com.pulumi.ibm.inputs.SmServiceCredentialsSecretSourceServiceInstanceArgs;
    import com.pulumi.ibm.inputs.SmServiceCredentialsSecretSourceServiceRoleArgs;
    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) {
            var smServiceCredentialsSecret = new SmServiceCredentialsSecret("smServiceCredentialsSecret", SmServiceCredentialsSecretArgs.builder()
                .instanceId(ibm_resource_instance.sm_instance().guid())
                .region("us-south")
                .customMetadata(Map.of("key", "value"))
                .description("Extended description for this secret.")
                .labels("my-label")
                .rotation(SmServiceCredentialsSecretRotationArgs.builder()
                    .autoRotate(true)
                    .interval(1)
                    .unit("day")
                    .build())
                .secretGroupId(ibm_sm_secret_group.sm_secret_group().secret_group_id())
                .sourceService(SmServiceCredentialsSecretSourceServiceArgs.builder()
                    .instance(SmServiceCredentialsSecretSourceServiceInstanceArgs.builder()
                        .crn("crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::")
                        .build())
                    .role(SmServiceCredentialsSecretSourceServiceRoleArgs.builder()
                        .crn("crn:v1:bluemix:public:iam::::serviceRole:Writer")
                        .build())
                    .parameters(Map.ofEntries(
                        Map.entry("HMAC", true),
                        Map.entry("serviceid_crn", "crn:v1:bluemix:public:iam-identity::a/22222f3c34444ff155555d15ca616946::serviceid:ServiceId-1234f56e-1d23-45e6-123c-cfb456b87fyb")
                    ))
                    .build())
                .ttl("1800")
                .build());
    
        }
    }
    
    resources:
      smServiceCredentialsSecret:
        type: ibm:SmServiceCredentialsSecret
        properties:
          instanceId: ${ibm_resource_instance.sm_instance.guid}
          region: us-south
          customMetadata:
            key: value
          description: Extended description for this secret.
          labels:
            - my-label
          rotation:
            autoRotate: true
            interval: 1
            unit: day
          secretGroupId: ${ibm_sm_secret_group.sm_secret_group.secret_group_id}
          sourceService:
            instance:
              crn: 'crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::'
            role:
              crn: crn:v1:bluemix:public:iam::::serviceRole:Writer
            parameters:
              HMAC: true
              serviceid_crn: crn:v1:bluemix:public:iam-identity::a/22222f3c34444ff155555d15ca616946::serviceid:ServiceId-1234f56e-1d23-45e6-123c-cfb456b87fyb
          ttl: '1800'
    

    Example to access resource credentials using credentials attribute:

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const smServiceCredentialsSecret = new ibm.SmServiceCredentialsSecret("smServiceCredentialsSecret", {
        instanceId: ibm_resource_instance.sm_instance.guid,
        region: "us-south",
        sourceService: {
            instance: {
                crn: "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::",
            },
            role: {
                crn: "crn:v1:bluemix:public:iam::::serviceRole:Writer",
            },
            parameters: {
                HMAC: "true",
            },
        },
        ttl: "1800",
    });
    export const accessKeyId = smServiceCredentialsSecret.credentials["cos_hmac_keys.access_key_id"];
    export const secretAccessKey = smServiceCredentialsSecret.credentials["cos_hmac_keys.secret_access_key"];
    
    import pulumi
    import pulumi_ibm as ibm
    
    sm_service_credentials_secret = ibm.SmServiceCredentialsSecret("smServiceCredentialsSecret",
        instance_id=ibm_resource_instance["sm_instance"]["guid"],
        region="us-south",
        source_service={
            "instance": {
                "crn": "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::",
            },
            "role": {
                "crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
            },
            "parameters": {
                "HMAC": "true",
            },
        },
        ttl="1800")
    pulumi.export("accessKeyId", sm_service_credentials_secret.credentials["cos_hmac_keys.access_key_id"])
    pulumi.export("secretAccessKey", sm_service_credentials_secret.credentials["cos_hmac_keys.secret_access_key"])
    
    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 {
    		smServiceCredentialsSecret, err := ibm.NewSmServiceCredentialsSecret(ctx, "smServiceCredentialsSecret", &ibm.SmServiceCredentialsSecretArgs{
    			InstanceId: pulumi.Any(ibm_resource_instance.Sm_instance.Guid),
    			Region:     pulumi.String("us-south"),
    			SourceService: &ibm.SmServiceCredentialsSecretSourceServiceArgs{
    				Instance: &ibm.SmServiceCredentialsSecretSourceServiceInstanceArgs{
    					Crn: pulumi.String("crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::"),
    				},
    				Role: &ibm.SmServiceCredentialsSecretSourceServiceRoleArgs{
    					Crn: pulumi.String("crn:v1:bluemix:public:iam::::serviceRole:Writer"),
    				},
    				Parameters: pulumi.StringMap{
    					"HMAC": pulumi.String("true"),
    				},
    			},
    			Ttl: pulumi.String("1800"),
    		})
    		if err != nil {
    			return err
    		}
    		ctx.Export("accessKeyId", smServiceCredentialsSecret.Credentials.ApplyT(func(credentials map[string]string) (string, error) {
    			return credentials.Cos_hmac_keys.access_key_id, nil
    		}).(pulumi.StringOutput))
    		ctx.Export("secretAccessKey", smServiceCredentialsSecret.Credentials.ApplyT(func(credentials map[string]string) (string, error) {
    			return credentials.Cos_hmac_keys.secret_access_key, nil
    		}).(pulumi.StringOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var smServiceCredentialsSecret = new Ibm.SmServiceCredentialsSecret("smServiceCredentialsSecret", new()
        {
            InstanceId = ibm_resource_instance.Sm_instance.Guid,
            Region = "us-south",
            SourceService = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceArgs
            {
                Instance = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceInstanceArgs
                {
                    Crn = "crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::",
                },
                Role = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceRoleArgs
                {
                    Crn = "crn:v1:bluemix:public:iam::::serviceRole:Writer",
                },
                Parameters = 
                {
                    { "HMAC", "true" },
                },
            },
            Ttl = "1800",
        });
    
        return new Dictionary<string, object?>
        {
            ["accessKeyId"] = smServiceCredentialsSecret.Credentials.Apply(credentials => credentials.Cos_hmac_keys_access_key_id),
            ["secretAccessKey"] = smServiceCredentialsSecret.Credentials.Apply(credentials => credentials.Cos_hmac_keys_secret_access_key),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.SmServiceCredentialsSecret;
    import com.pulumi.ibm.SmServiceCredentialsSecretArgs;
    import com.pulumi.ibm.inputs.SmServiceCredentialsSecretSourceServiceArgs;
    import com.pulumi.ibm.inputs.SmServiceCredentialsSecretSourceServiceInstanceArgs;
    import com.pulumi.ibm.inputs.SmServiceCredentialsSecretSourceServiceRoleArgs;
    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) {
            var smServiceCredentialsSecret = new SmServiceCredentialsSecret("smServiceCredentialsSecret", SmServiceCredentialsSecretArgs.builder()
                .instanceId(ibm_resource_instance.sm_instance().guid())
                .region("us-south")
                .sourceService(SmServiceCredentialsSecretSourceServiceArgs.builder()
                    .instance(SmServiceCredentialsSecretSourceServiceInstanceArgs.builder()
                        .crn("crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::")
                        .build())
                    .role(SmServiceCredentialsSecretSourceServiceRoleArgs.builder()
                        .crn("crn:v1:bluemix:public:iam::::serviceRole:Writer")
                        .build())
                    .parameters(Map.of("HMAC", true))
                    .build())
                .ttl("1800")
                .build());
    
            ctx.export("accessKeyId", smServiceCredentialsSecret.credentials().applyValue(credentials -> credentials.cos_hmac_keys.access_key_id()));
            ctx.export("secretAccessKey", smServiceCredentialsSecret.credentials().applyValue(credentials -> credentials.cos_hmac_keys.secret_access_key()));
        }
    }
    
    resources:
      smServiceCredentialsSecret:
        type: ibm:SmServiceCredentialsSecret
        properties:
          instanceId: ${ibm_resource_instance.sm_instance.guid}
          region: us-south
          sourceService:
            instance:
              crn: 'crn:v1:bluemix:public:cloud-object-storage:global:a/111f5fb10986423e9saa8512f1db7e65:111133c8-49ea-41xe-8c40-122038246f5b::'
            role:
              crn: crn:v1:bluemix:public:iam::::serviceRole:Writer
            parameters:
              HMAC: true
          ttl: '1800'
    outputs:
      accessKeyId: ${smServiceCredentialsSecret.credentials"cos_hmac_keys.access_key_id"[%!s(MISSING)]}
      secretAccessKey: ${smServiceCredentialsSecret.credentials"cos_hmac_keys.secret_access_key"[%!s(MISSING)]}
    

    Provider Configuration

    The IBM Cloud provider offers a flexible means of providing credentials for authentication. The following methods are supported, in this order, and explained below:

    • Static credentials
    • Environment variables

    To find which credentials are required for this resource, see the service table here.

    Static credentials

    You can provide your static credentials by adding the ibmcloud_api_key, iaas_classic_username, and iaas_classic_api_key arguments in the IBM Cloud provider block.

    Usage:

    provider "ibm" {
        ibmcloud_api_key = ""
        iaas_classic_username = ""
        iaas_classic_api_key = ""
    }
    

    Environment variables

    You can provide your credentials by exporting the IC_API_KEY, IAAS_CLASSIC_USERNAME, and IAAS_CLASSIC_API_KEY environment variables, representing your IBM Cloud platform API key, IBM Cloud Classic Infrastructure (SoftLayer) user name, and IBM Cloud infrastructure API key, respectively.

    provider "ibm" {}
    

    Usage:

    export IC_API_KEY="ibmcloud_api_key"
    export IAAS_CLASSIC_USERNAME="iaas_classic_username"
    export IAAS_CLASSIC_API_KEY="iaas_classic_api_key"
    pulumi preview
    

    Note:

    1. Create or find your ibmcloud_api_key and iaas_classic_api_key here.
    • Select My IBM Cloud API Keys option from view dropdown for ibmcloud_api_key
    • Select Classic Infrastructure API Keys option from view dropdown for iaas_classic_api_key
    1. For iaas_classic_username
    • Go to Users
    • Click on user.
    • Find user name in the VPN password section under User Details tab

    For more informaton, see here.

    Create SmServiceCredentialsSecret Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SmServiceCredentialsSecret(name: string, args: SmServiceCredentialsSecretArgs, opts?: CustomResourceOptions);
    @overload
    def SmServiceCredentialsSecret(resource_name: str,
                                   args: SmServiceCredentialsSecretArgs,
                                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def SmServiceCredentialsSecret(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   instance_id: Optional[str] = None,
                                   source_service: Optional[SmServiceCredentialsSecretSourceServiceArgs] = None,
                                   region: Optional[str] = None,
                                   endpoint_type: Optional[str] = None,
                                   labels: Optional[Sequence[str]] = None,
                                   name: Optional[str] = None,
                                   custom_metadata: Optional[Mapping[str, str]] = None,
                                   rotation: Optional[SmServiceCredentialsSecretRotationArgs] = None,
                                   secret_group_id: Optional[str] = None,
                                   sm_service_credentials_secret_id: Optional[str] = None,
                                   description: Optional[str] = None,
                                   ttl: Optional[str] = None,
                                   version_custom_metadata: Optional[Mapping[str, str]] = None)
    func NewSmServiceCredentialsSecret(ctx *Context, name string, args SmServiceCredentialsSecretArgs, opts ...ResourceOption) (*SmServiceCredentialsSecret, error)
    public SmServiceCredentialsSecret(string name, SmServiceCredentialsSecretArgs args, CustomResourceOptions? opts = null)
    public SmServiceCredentialsSecret(String name, SmServiceCredentialsSecretArgs args)
    public SmServiceCredentialsSecret(String name, SmServiceCredentialsSecretArgs args, CustomResourceOptions options)
    
    type: ibm:SmServiceCredentialsSecret
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args SmServiceCredentialsSecretArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args SmServiceCredentialsSecretArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args SmServiceCredentialsSecretArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SmServiceCredentialsSecretArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SmServiceCredentialsSecretArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var smServiceCredentialsSecretResource = new Ibm.SmServiceCredentialsSecret("smServiceCredentialsSecretResource", new()
    {
        InstanceId = "string",
        SourceService = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceArgs
        {
            Instance = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceInstanceArgs
            {
                Crn = "string",
            },
            Iams = new[]
            {
                new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceIamArgs
                {
                    Apikeys = new[]
                    {
                        new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceIamApikeyArgs
                        {
                            Description = "string",
                            Name = "string",
                        },
                    },
                    Roles = new[]
                    {
                        new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceIamRoleArgs
                        {
                            Crn = "string",
                        },
                    },
                    Serviceids = new[]
                    {
                        new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceIamServiceidArgs
                        {
                            Crn = "string",
                        },
                    },
                },
            },
            Parameters = 
            {
                { "string", "string" },
            },
            ResourceKeys = new[]
            {
                new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceResourceKeyArgs
                {
                    Crn = "string",
                    Name = "string",
                },
            },
            Role = new Ibm.Inputs.SmServiceCredentialsSecretSourceServiceRoleArgs
            {
                Crn = "string",
            },
        },
        Region = "string",
        EndpointType = "string",
        Labels = new[]
        {
            "string",
        },
        Name = "string",
        CustomMetadata = 
        {
            { "string", "string" },
        },
        Rotation = new Ibm.Inputs.SmServiceCredentialsSecretRotationArgs
        {
            AutoRotate = false,
            Interval = 0,
            Unit = "string",
        },
        SecretGroupId = "string",
        SmServiceCredentialsSecretId = "string",
        Description = "string",
        Ttl = "string",
        VersionCustomMetadata = 
        {
            { "string", "string" },
        },
    });
    
    example, err := ibm.NewSmServiceCredentialsSecret(ctx, "smServiceCredentialsSecretResource", &ibm.SmServiceCredentialsSecretArgs{
    	InstanceId: pulumi.String("string"),
    	SourceService: &ibm.SmServiceCredentialsSecretSourceServiceArgs{
    		Instance: &ibm.SmServiceCredentialsSecretSourceServiceInstanceArgs{
    			Crn: pulumi.String("string"),
    		},
    		Iams: ibm.SmServiceCredentialsSecretSourceServiceIamArray{
    			&ibm.SmServiceCredentialsSecretSourceServiceIamArgs{
    				Apikeys: ibm.SmServiceCredentialsSecretSourceServiceIamApikeyArray{
    					&ibm.SmServiceCredentialsSecretSourceServiceIamApikeyArgs{
    						Description: pulumi.String("string"),
    						Name:        pulumi.String("string"),
    					},
    				},
    				Roles: ibm.SmServiceCredentialsSecretSourceServiceIamRoleArray{
    					&ibm.SmServiceCredentialsSecretSourceServiceIamRoleArgs{
    						Crn: pulumi.String("string"),
    					},
    				},
    				Serviceids: ibm.SmServiceCredentialsSecretSourceServiceIamServiceidArray{
    					&ibm.SmServiceCredentialsSecretSourceServiceIamServiceidArgs{
    						Crn: pulumi.String("string"),
    					},
    				},
    			},
    		},
    		Parameters: pulumi.StringMap{
    			"string": pulumi.String("string"),
    		},
    		ResourceKeys: ibm.SmServiceCredentialsSecretSourceServiceResourceKeyArray{
    			&ibm.SmServiceCredentialsSecretSourceServiceResourceKeyArgs{
    				Crn:  pulumi.String("string"),
    				Name: pulumi.String("string"),
    			},
    		},
    		Role: &ibm.SmServiceCredentialsSecretSourceServiceRoleArgs{
    			Crn: pulumi.String("string"),
    		},
    	},
    	Region:       pulumi.String("string"),
    	EndpointType: pulumi.String("string"),
    	Labels: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    	CustomMetadata: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Rotation: &ibm.SmServiceCredentialsSecretRotationArgs{
    		AutoRotate: pulumi.Bool(false),
    		Interval:   pulumi.Float64(0),
    		Unit:       pulumi.String("string"),
    	},
    	SecretGroupId:                pulumi.String("string"),
    	SmServiceCredentialsSecretId: pulumi.String("string"),
    	Description:                  pulumi.String("string"),
    	Ttl:                          pulumi.String("string"),
    	VersionCustomMetadata: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var smServiceCredentialsSecretResource = new SmServiceCredentialsSecret("smServiceCredentialsSecretResource", SmServiceCredentialsSecretArgs.builder()
        .instanceId("string")
        .sourceService(SmServiceCredentialsSecretSourceServiceArgs.builder()
            .instance(SmServiceCredentialsSecretSourceServiceInstanceArgs.builder()
                .crn("string")
                .build())
            .iams(SmServiceCredentialsSecretSourceServiceIamArgs.builder()
                .apikeys(SmServiceCredentialsSecretSourceServiceIamApikeyArgs.builder()
                    .description("string")
                    .name("string")
                    .build())
                .roles(SmServiceCredentialsSecretSourceServiceIamRoleArgs.builder()
                    .crn("string")
                    .build())
                .serviceids(SmServiceCredentialsSecretSourceServiceIamServiceidArgs.builder()
                    .crn("string")
                    .build())
                .build())
            .parameters(Map.of("string", "string"))
            .resourceKeys(SmServiceCredentialsSecretSourceServiceResourceKeyArgs.builder()
                .crn("string")
                .name("string")
                .build())
            .role(SmServiceCredentialsSecretSourceServiceRoleArgs.builder()
                .crn("string")
                .build())
            .build())
        .region("string")
        .endpointType("string")
        .labels("string")
        .name("string")
        .customMetadata(Map.of("string", "string"))
        .rotation(SmServiceCredentialsSecretRotationArgs.builder()
            .autoRotate(false)
            .interval(0)
            .unit("string")
            .build())
        .secretGroupId("string")
        .smServiceCredentialsSecretId("string")
        .description("string")
        .ttl("string")
        .versionCustomMetadata(Map.of("string", "string"))
        .build());
    
    sm_service_credentials_secret_resource = ibm.SmServiceCredentialsSecret("smServiceCredentialsSecretResource",
        instance_id="string",
        source_service={
            "instance": {
                "crn": "string",
            },
            "iams": [{
                "apikeys": [{
                    "description": "string",
                    "name": "string",
                }],
                "roles": [{
                    "crn": "string",
                }],
                "serviceids": [{
                    "crn": "string",
                }],
            }],
            "parameters": {
                "string": "string",
            },
            "resource_keys": [{
                "crn": "string",
                "name": "string",
            }],
            "role": {
                "crn": "string",
            },
        },
        region="string",
        endpoint_type="string",
        labels=["string"],
        name="string",
        custom_metadata={
            "string": "string",
        },
        rotation={
            "auto_rotate": False,
            "interval": 0,
            "unit": "string",
        },
        secret_group_id="string",
        sm_service_credentials_secret_id="string",
        description="string",
        ttl="string",
        version_custom_metadata={
            "string": "string",
        })
    
    const smServiceCredentialsSecretResource = new ibm.SmServiceCredentialsSecret("smServiceCredentialsSecretResource", {
        instanceId: "string",
        sourceService: {
            instance: {
                crn: "string",
            },
            iams: [{
                apikeys: [{
                    description: "string",
                    name: "string",
                }],
                roles: [{
                    crn: "string",
                }],
                serviceids: [{
                    crn: "string",
                }],
            }],
            parameters: {
                string: "string",
            },
            resourceKeys: [{
                crn: "string",
                name: "string",
            }],
            role: {
                crn: "string",
            },
        },
        region: "string",
        endpointType: "string",
        labels: ["string"],
        name: "string",
        customMetadata: {
            string: "string",
        },
        rotation: {
            autoRotate: false,
            interval: 0,
            unit: "string",
        },
        secretGroupId: "string",
        smServiceCredentialsSecretId: "string",
        description: "string",
        ttl: "string",
        versionCustomMetadata: {
            string: "string",
        },
    });
    
    type: ibm:SmServiceCredentialsSecret
    properties:
        customMetadata:
            string: string
        description: string
        endpointType: string
        instanceId: string
        labels:
            - string
        name: string
        region: string
        rotation:
            autoRotate: false
            interval: 0
            unit: string
        secretGroupId: string
        smServiceCredentialsSecretId: string
        sourceService:
            iams:
                - apikeys:
                    - description: string
                      name: string
                  roles:
                    - crn: string
                  serviceids:
                    - crn: string
            instance:
                crn: string
            parameters:
                string: string
            resourceKeys:
                - crn: string
                  name: string
            role:
                crn: string
        ttl: string
        versionCustomMetadata:
            string: string
    

    SmServiceCredentialsSecret Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SmServiceCredentialsSecret resource accepts the following input properties:

    InstanceId string
    The GUID of the Secrets Manager instance.
    SourceService SmServiceCredentialsSecretSourceService
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    CustomMetadata Dictionary<string, string>
    The secret metadata that a user can customize.
    Description string
    An extended description of your secret.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 /(.*?)/.
    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.
    Labels List<string>
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    Name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    Region string
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    Rotation SmServiceCredentialsSecretRotation
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    SecretGroupId 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)$/.
    SmServiceCredentialsSecretId string
    Ttl string
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    VersionCustomMetadata Dictionary<string, string>
    The secret version metadata that a user can customize.
    InstanceId string
    The GUID of the Secrets Manager instance.
    SourceService SmServiceCredentialsSecretSourceServiceArgs
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    CustomMetadata map[string]string
    The secret metadata that a user can customize.
    Description string
    An extended description of your secret.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 /(.*?)/.
    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.
    Labels []string
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    Name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    Region string
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    Rotation SmServiceCredentialsSecretRotationArgs
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    SecretGroupId 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)$/.
    SmServiceCredentialsSecretId string
    Ttl string
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    VersionCustomMetadata map[string]string
    The secret version metadata that a user can customize.
    instanceId String
    The GUID of the Secrets Manager instance.
    sourceService SmServiceCredentialsSecretSourceService
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    customMetadata Map<String,String>
    The secret metadata that a user can customize.
    description String
    An extended description of your secret.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 /(.*?)/.
    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.
    labels List<String>
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    name String
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    region String
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    rotation SmServiceCredentialsSecretRotation
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    secretGroupId 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)$/.
    smServiceCredentialsSecretId String
    ttl String
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    versionCustomMetadata Map<String,String>
    The secret version metadata that a user can customize.
    instanceId string
    The GUID of the Secrets Manager instance.
    sourceService SmServiceCredentialsSecretSourceService
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    customMetadata {[key: string]: string}
    The secret metadata that a user can customize.
    description string
    An extended description of your secret.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 /(.*?)/.
    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.
    labels string[]
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    region string
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    rotation SmServiceCredentialsSecretRotation
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    secretGroupId 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)$/.
    smServiceCredentialsSecretId string
    ttl string
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    versionCustomMetadata {[key: string]: string}
    The secret version metadata that a user can customize.
    instance_id str
    The GUID of the Secrets Manager instance.
    source_service SmServiceCredentialsSecretSourceServiceArgs
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    custom_metadata Mapping[str, str]
    The secret metadata that a user can customize.
    description str
    An extended description of your secret.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 /(.*?)/.
    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.
    labels Sequence[str]
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    name str
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    region str
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    rotation SmServiceCredentialsSecretRotationArgs
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    secret_group_id str
    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)$/.
    sm_service_credentials_secret_id str
    ttl str
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    version_custom_metadata Mapping[str, str]
    The secret version metadata that a user can customize.
    instanceId String
    The GUID of the Secrets Manager instance.
    sourceService Property Map
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    customMetadata Map<String>
    The secret metadata that a user can customize.
    description String
    An extended description of your secret.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 /(.*?)/.
    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.
    labels List<String>
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    name String
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    region String
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    rotation Property Map
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    secretGroupId 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)$/.
    smServiceCredentialsSecretId String
    ttl String
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    versionCustomMetadata Map<String>
    The secret version metadata that a user can customize.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SmServiceCredentialsSecret resource produces the following output properties:

    CreatedAt string
    (String) The date when a resource was created. The date format follows RFC 3339.
    CreatedBy string
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    Credentials Dictionary<string, string>
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    Crn string
    (String) The resource key CRN of the generated service credentials.
    Downloaded bool
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    ExpirationDate string
    (String) The date a secret is expired. The date format follows RFC 3339.
    Id string
    The provider-assigned unique ID for this managed resource.
    LocksTotal double
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    NextRotationDate string
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    SecretId string
    The unique identifier of the ServiceCredentialsSecret.
    SecretType string
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    State double
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    StateDescription string
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    UpdatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    VersionsTotal double
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.
    CreatedAt string
    (String) The date when a resource was created. The date format follows RFC 3339.
    CreatedBy string
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    Credentials map[string]string
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    Crn string
    (String) The resource key CRN of the generated service credentials.
    Downloaded bool
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    ExpirationDate string
    (String) The date a secret is expired. The date format follows RFC 3339.
    Id string
    The provider-assigned unique ID for this managed resource.
    LocksTotal float64
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    NextRotationDate string
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    SecretId string
    The unique identifier of the ServiceCredentialsSecret.
    SecretType string
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    State float64
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    StateDescription string
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    UpdatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    VersionsTotal float64
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.
    createdAt String
    (String) The date when a resource was created. The date format follows RFC 3339.
    createdBy String
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    credentials Map<String,String>
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    crn String
    (String) The resource key CRN of the generated service credentials.
    downloaded Boolean
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    expirationDate String
    (String) The date a secret is expired. The date format follows RFC 3339.
    id String
    The provider-assigned unique ID for this managed resource.
    locksTotal Double
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    nextRotationDate String
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    secretId String
    The unique identifier of the ServiceCredentialsSecret.
    secretType String
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    state Double
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    stateDescription String
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    updatedAt String
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    versionsTotal Double
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.
    createdAt string
    (String) The date when a resource was created. The date format follows RFC 3339.
    createdBy string
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    credentials {[key: string]: string}
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    crn string
    (String) The resource key CRN of the generated service credentials.
    downloaded boolean
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    expirationDate string
    (String) The date a secret is expired. The date format follows RFC 3339.
    id string
    The provider-assigned unique ID for this managed resource.
    locksTotal number
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    nextRotationDate string
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    secretId string
    The unique identifier of the ServiceCredentialsSecret.
    secretType string
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    state number
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    stateDescription string
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    updatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    versionsTotal number
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.
    created_at str
    (String) The date when a resource was created. The date format follows RFC 3339.
    created_by str
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    credentials Mapping[str, str]
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    crn str
    (String) The resource key CRN of the generated service credentials.
    downloaded bool
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    expiration_date str
    (String) The date a secret is expired. The date format follows RFC 3339.
    id str
    The provider-assigned unique ID for this managed resource.
    locks_total float
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    next_rotation_date str
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    secret_id str
    The unique identifier of the ServiceCredentialsSecret.
    secret_type str
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    state float
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    state_description str
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    updated_at str
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    versions_total float
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.
    createdAt String
    (String) The date when a resource was created. The date format follows RFC 3339.
    createdBy String
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    credentials Map<String>
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    crn String
    (String) The resource key CRN of the generated service credentials.
    downloaded Boolean
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    expirationDate String
    (String) The date a secret is expired. The date format follows RFC 3339.
    id String
    The provider-assigned unique ID for this managed resource.
    locksTotal Number
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    nextRotationDate String
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    secretId String
    The unique identifier of the ServiceCredentialsSecret.
    secretType String
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    state Number
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    stateDescription String
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    updatedAt String
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    versionsTotal Number
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.

    Look up Existing SmServiceCredentialsSecret Resource

    Get an existing SmServiceCredentialsSecret resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: SmServiceCredentialsSecretState, opts?: CustomResourceOptions): SmServiceCredentialsSecret
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            created_at: Optional[str] = None,
            created_by: Optional[str] = None,
            credentials: Optional[Mapping[str, str]] = None,
            crn: Optional[str] = None,
            custom_metadata: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            downloaded: Optional[bool] = None,
            endpoint_type: Optional[str] = None,
            expiration_date: Optional[str] = None,
            instance_id: Optional[str] = None,
            labels: Optional[Sequence[str]] = None,
            locks_total: Optional[float] = None,
            name: Optional[str] = None,
            next_rotation_date: Optional[str] = None,
            region: Optional[str] = None,
            rotation: Optional[SmServiceCredentialsSecretRotationArgs] = None,
            secret_group_id: Optional[str] = None,
            secret_id: Optional[str] = None,
            secret_type: Optional[str] = None,
            sm_service_credentials_secret_id: Optional[str] = None,
            source_service: Optional[SmServiceCredentialsSecretSourceServiceArgs] = None,
            state: Optional[float] = None,
            state_description: Optional[str] = None,
            ttl: Optional[str] = None,
            updated_at: Optional[str] = None,
            version_custom_metadata: Optional[Mapping[str, str]] = None,
            versions_total: Optional[float] = None) -> SmServiceCredentialsSecret
    func GetSmServiceCredentialsSecret(ctx *Context, name string, id IDInput, state *SmServiceCredentialsSecretState, opts ...ResourceOption) (*SmServiceCredentialsSecret, error)
    public static SmServiceCredentialsSecret Get(string name, Input<string> id, SmServiceCredentialsSecretState? state, CustomResourceOptions? opts = null)
    public static SmServiceCredentialsSecret get(String name, Output<String> id, SmServiceCredentialsSecretState state, CustomResourceOptions options)
    resources:  _:    type: ibm:SmServiceCredentialsSecret    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CreatedAt string
    (String) The date when a resource was created. The date format follows RFC 3339.
    CreatedBy string
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    Credentials Dictionary<string, string>
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    Crn string
    (String) The resource key CRN of the generated service credentials.
    CustomMetadata Dictionary<string, string>
    The secret metadata that a user can customize.
    Description string
    An extended description of your secret.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 /(.*?)/.
    Downloaded bool
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    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.
    ExpirationDate string
    (String) The date a secret is expired. The date format follows RFC 3339.
    InstanceId string
    The GUID of the Secrets Manager instance.
    Labels List<string>
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    LocksTotal double
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    Name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    NextRotationDate string
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    Region string
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    Rotation SmServiceCredentialsSecretRotation
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    SecretGroupId 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)$/.
    SecretId string
    The unique identifier of the ServiceCredentialsSecret.
    SecretType string
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    SmServiceCredentialsSecretId string
    SourceService SmServiceCredentialsSecretSourceService
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    State double
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    StateDescription string
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    Ttl string
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    UpdatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    VersionCustomMetadata Dictionary<string, string>
    The secret version metadata that a user can customize.
    VersionsTotal double
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.
    CreatedAt string
    (String) The date when a resource was created. The date format follows RFC 3339.
    CreatedBy string
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    Credentials map[string]string
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    Crn string
    (String) The resource key CRN of the generated service credentials.
    CustomMetadata map[string]string
    The secret metadata that a user can customize.
    Description string
    An extended description of your secret.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 /(.*?)/.
    Downloaded bool
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    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.
    ExpirationDate string
    (String) The date a secret is expired. The date format follows RFC 3339.
    InstanceId string
    The GUID of the Secrets Manager instance.
    Labels []string
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    LocksTotal float64
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    Name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    NextRotationDate string
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    Region string
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    Rotation SmServiceCredentialsSecretRotationArgs
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    SecretGroupId 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)$/.
    SecretId string
    The unique identifier of the ServiceCredentialsSecret.
    SecretType string
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    SmServiceCredentialsSecretId string
    SourceService SmServiceCredentialsSecretSourceServiceArgs
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    State float64
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    StateDescription string
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    Ttl string
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    UpdatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    VersionCustomMetadata map[string]string
    The secret version metadata that a user can customize.
    VersionsTotal float64
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.
    createdAt String
    (String) The date when a resource was created. The date format follows RFC 3339.
    createdBy String
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    credentials Map<String,String>
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    crn String
    (String) The resource key CRN of the generated service credentials.
    customMetadata Map<String,String>
    The secret metadata that a user can customize.
    description String
    An extended description of your secret.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 /(.*?)/.
    downloaded Boolean
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    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.
    expirationDate String
    (String) The date a secret is expired. The date format follows RFC 3339.
    instanceId String
    The GUID of the Secrets Manager instance.
    labels List<String>
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    locksTotal Double
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    name String
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    nextRotationDate String
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    region String
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    rotation SmServiceCredentialsSecretRotation
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    secretGroupId 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)$/.
    secretId String
    The unique identifier of the ServiceCredentialsSecret.
    secretType String
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    smServiceCredentialsSecretId String
    sourceService SmServiceCredentialsSecretSourceService
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    state Double
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    stateDescription String
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    ttl String
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    updatedAt String
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    versionCustomMetadata Map<String,String>
    The secret version metadata that a user can customize.
    versionsTotal Double
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.
    createdAt string
    (String) The date when a resource was created. The date format follows RFC 3339.
    createdBy string
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    credentials {[key: string]: string}
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    crn string
    (String) The resource key CRN of the generated service credentials.
    customMetadata {[key: string]: string}
    The secret metadata that a user can customize.
    description string
    An extended description of your secret.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 /(.*?)/.
    downloaded boolean
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    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.
    expirationDate string
    (String) The date a secret is expired. The date format follows RFC 3339.
    instanceId string
    The GUID of the Secrets Manager instance.
    labels string[]
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    locksTotal number
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    nextRotationDate string
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    region string
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    rotation SmServiceCredentialsSecretRotation
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    secretGroupId 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)$/.
    secretId string
    The unique identifier of the ServiceCredentialsSecret.
    secretType string
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    smServiceCredentialsSecretId string
    sourceService SmServiceCredentialsSecretSourceService
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    state number
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    stateDescription string
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    ttl string
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    updatedAt string
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    versionCustomMetadata {[key: string]: string}
    The secret version metadata that a user can customize.
    versionsTotal number
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.
    created_at str
    (String) The date when a resource was created. The date format follows RFC 3339.
    created_by str
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    credentials Mapping[str, str]
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    crn str
    (String) The resource key CRN of the generated service credentials.
    custom_metadata Mapping[str, str]
    The secret metadata that a user can customize.
    description str
    An extended description of your secret.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 /(.*?)/.
    downloaded bool
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    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.
    expiration_date str
    (String) The date a secret is expired. The date format follows RFC 3339.
    instance_id str
    The GUID of the Secrets Manager instance.
    labels Sequence[str]
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    locks_total float
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    name str
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    next_rotation_date str
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    region str
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    rotation SmServiceCredentialsSecretRotationArgs
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    secret_group_id str
    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)$/.
    secret_id str
    The unique identifier of the ServiceCredentialsSecret.
    secret_type str
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    sm_service_credentials_secret_id str
    source_service SmServiceCredentialsSecretSourceServiceArgs
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    state float
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    state_description str
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    ttl str
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    updated_at str
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    version_custom_metadata Mapping[str, str]
    The secret version metadata that a user can customize.
    versions_total float
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.
    createdAt String
    (String) The date when a resource was created. The date format follows RFC 3339.
    createdBy String
    (String) The unique identifier that is associated with the entity that created the secret.

    • Constraints: The maximum length is 128 characters. The minimum length is 4 characters.
    credentials Map<String>
    (List) The properties of the service credentials secret payload. Nested scheme for credentials:
    crn String
    (String) The resource key CRN of the generated service credentials.
    customMetadata Map<String>
    The secret metadata that a user can customize.
    description String
    An extended description of your secret.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 /(.*?)/.
    downloaded Boolean
    (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
    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.
    expirationDate String
    (String) The date a secret is expired. The date format follows RFC 3339.
    instanceId String
    The GUID of the Secrets Manager instance.
    labels List<String>
    Labels that you can use to search for secrets in your instance.Up to 30 labels can be created.

    • Constraints: The list items must match regular expression /(.*?)/. The maximum length is 30 items. The minimum length is 0 items.
    locksTotal Number
    (Integer) The number of locks of the secret.

    • Constraints: The maximum value is 1000. The minimum value is 0.
    name String
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    nextRotationDate String
    (String) The date that the secret is scheduled for automatic rotation.The service automatically creates a new version of the secret on its next rotation date. This field exists only for secrets that have an existing rotation policy.
    region String
    The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
    rotation Property Map
    Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
    secretGroupId 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)$/.
    secretId String
    The unique identifier of the ServiceCredentialsSecret.
    secretType String
    (String) The secret type. Supported types are arbitrary, certificates (imported, public, and private), IAM credentials, key-value, and user credentials.

    • Constraints: Allowable values are: arbitrary, imported_cert, public_cert, iam_credentials, kv, username_password, private_cert.
    smServiceCredentialsSecretId String
    sourceService Property Map
    The properties required for creating the service credentials for the specified source service instance. Nested scheme for source_service:
    state Number
    (Integer) The secret state that is based on NIST SP 800-57. States are integers and correspond to the Pre-activation = 0, Active = 1, Suspended = 2, Deactivated = 3, and Destroyed = 5 values.

    • Constraints: Allowable values are: 0, 1, 2, 3, 5.
    stateDescription String
    (String) A text representation of the secret state.

    • Constraints: Allowable values are: pre_activation, active, suspended, deactivated, destroyed.
    ttl String
    The time-to-live (TTL) or lease duration to assign to generated credentials. The TTL defines for how long generated credentials remain valid. The value should be a string that specifies the number of seconds. Minimum duration is 86400 (1 day). Maximum is 7776000 seconds (90 days).

    • Constraints: The maximum length is 7 characters. The minimum length is 2 characters.
    updatedAt String
    (String) The date when a resource was recently modified. The date format follows RFC 3339.
    versionCustomMetadata Map<String>
    The secret version metadata that a user can customize.
    versionsTotal Number
    (Integer) The number of versions of the secret.

    • Constraints: The maximum value is 50. The minimum value is 0.

    Supporting Types

    SmServiceCredentialsSecretRotation, SmServiceCredentialsSecretRotationArgs

    AutoRotate bool
    Determines whether Secrets Manager rotates your secret automatically.Default is false. If auto_rotate is set to true the service rotates your secret based on the defined interval.
    Interval double
    The length of the secret rotation time interval.

    • Constraints: The minimum value is 1.
    Unit string
    The units for the secret rotation time interval.

    • Constraints: Allowable values are: day, month.
    AutoRotate bool
    Determines whether Secrets Manager rotates your secret automatically.Default is false. If auto_rotate is set to true the service rotates your secret based on the defined interval.
    Interval float64
    The length of the secret rotation time interval.

    • Constraints: The minimum value is 1.
    Unit string
    The units for the secret rotation time interval.

    • Constraints: Allowable values are: day, month.
    autoRotate Boolean
    Determines whether Secrets Manager rotates your secret automatically.Default is false. If auto_rotate is set to true the service rotates your secret based on the defined interval.
    interval Double
    The length of the secret rotation time interval.

    • Constraints: The minimum value is 1.
    unit String
    The units for the secret rotation time interval.

    • Constraints: Allowable values are: day, month.
    autoRotate boolean
    Determines whether Secrets Manager rotates your secret automatically.Default is false. If auto_rotate is set to true the service rotates your secret based on the defined interval.
    interval number
    The length of the secret rotation time interval.

    • Constraints: The minimum value is 1.
    unit string
    The units for the secret rotation time interval.

    • Constraints: Allowable values are: day, month.
    auto_rotate bool
    Determines whether Secrets Manager rotates your secret automatically.Default is false. If auto_rotate is set to true the service rotates your secret based on the defined interval.
    interval float
    The length of the secret rotation time interval.

    • Constraints: The minimum value is 1.
    unit str
    The units for the secret rotation time interval.

    • Constraints: Allowable values are: day, month.
    autoRotate Boolean
    Determines whether Secrets Manager rotates your secret automatically.Default is false. If auto_rotate is set to true the service rotates your secret based on the defined interval.
    interval Number
    The length of the secret rotation time interval.

    • Constraints: The minimum value is 1.
    unit String
    The units for the secret rotation time interval.

    • Constraints: Allowable values are: day, month.

    SmServiceCredentialsSecretSourceService, SmServiceCredentialsSecretSourceServiceArgs

    Instance SmServiceCredentialsSecretSourceServiceInstance
    The source service instance identifier. Nested scheme for instance:
    Iams List<SmServiceCredentialsSecretSourceServiceIam>
    (List) The source service IAM data is returned in case IAM credentials where created for this secret. Nested scheme for iam:
    Parameters Dictionary<string, string>
    Configuration options represented as key-value pairs. Service-defined options are used in the generation of credentials for some services. For example, Cloud Object Storage accepts the optional boolean parameter HMAC for creating specific kind of credentials.
    ResourceKeys List<SmServiceCredentialsSecretSourceServiceResourceKey>
    (List) The source service resource key data of the generated service credentials. Nested scheme for resource_key:
    Role SmServiceCredentialsSecretSourceServiceRole
    The service-specific custom role object, CRN role is accepted. Refer to the service’s documentation for supported roles. Nested scheme for role:
    Instance SmServiceCredentialsSecretSourceServiceInstance
    The source service instance identifier. Nested scheme for instance:
    Iams []SmServiceCredentialsSecretSourceServiceIam
    (List) The source service IAM data is returned in case IAM credentials where created for this secret. Nested scheme for iam:
    Parameters map[string]string
    Configuration options represented as key-value pairs. Service-defined options are used in the generation of credentials for some services. For example, Cloud Object Storage accepts the optional boolean parameter HMAC for creating specific kind of credentials.
    ResourceKeys []SmServiceCredentialsSecretSourceServiceResourceKey
    (List) The source service resource key data of the generated service credentials. Nested scheme for resource_key:
    Role SmServiceCredentialsSecretSourceServiceRole
    The service-specific custom role object, CRN role is accepted. Refer to the service’s documentation for supported roles. Nested scheme for role:
    instance SmServiceCredentialsSecretSourceServiceInstance
    The source service instance identifier. Nested scheme for instance:
    iams List<SmServiceCredentialsSecretSourceServiceIam>
    (List) The source service IAM data is returned in case IAM credentials where created for this secret. Nested scheme for iam:
    parameters Map<String,String>
    Configuration options represented as key-value pairs. Service-defined options are used in the generation of credentials for some services. For example, Cloud Object Storage accepts the optional boolean parameter HMAC for creating specific kind of credentials.
    resourceKeys List<SmServiceCredentialsSecretSourceServiceResourceKey>
    (List) The source service resource key data of the generated service credentials. Nested scheme for resource_key:
    role SmServiceCredentialsSecretSourceServiceRole
    The service-specific custom role object, CRN role is accepted. Refer to the service’s documentation for supported roles. Nested scheme for role:
    instance SmServiceCredentialsSecretSourceServiceInstance
    The source service instance identifier. Nested scheme for instance:
    iams SmServiceCredentialsSecretSourceServiceIam[]
    (List) The source service IAM data is returned in case IAM credentials where created for this secret. Nested scheme for iam:
    parameters {[key: string]: string}
    Configuration options represented as key-value pairs. Service-defined options are used in the generation of credentials for some services. For example, Cloud Object Storage accepts the optional boolean parameter HMAC for creating specific kind of credentials.
    resourceKeys SmServiceCredentialsSecretSourceServiceResourceKey[]
    (List) The source service resource key data of the generated service credentials. Nested scheme for resource_key:
    role SmServiceCredentialsSecretSourceServiceRole
    The service-specific custom role object, CRN role is accepted. Refer to the service’s documentation for supported roles. Nested scheme for role:
    instance SmServiceCredentialsSecretSourceServiceInstance
    The source service instance identifier. Nested scheme for instance:
    iams Sequence[SmServiceCredentialsSecretSourceServiceIam]
    (List) The source service IAM data is returned in case IAM credentials where created for this secret. Nested scheme for iam:
    parameters Mapping[str, str]
    Configuration options represented as key-value pairs. Service-defined options are used in the generation of credentials for some services. For example, Cloud Object Storage accepts the optional boolean parameter HMAC for creating specific kind of credentials.
    resource_keys Sequence[SmServiceCredentialsSecretSourceServiceResourceKey]
    (List) The source service resource key data of the generated service credentials. Nested scheme for resource_key:
    role SmServiceCredentialsSecretSourceServiceRole
    The service-specific custom role object, CRN role is accepted. Refer to the service’s documentation for supported roles. Nested scheme for role:
    instance Property Map
    The source service instance identifier. Nested scheme for instance:
    iams List<Property Map>
    (List) The source service IAM data is returned in case IAM credentials where created for this secret. Nested scheme for iam:
    parameters Map<String>
    Configuration options represented as key-value pairs. Service-defined options are used in the generation of credentials for some services. For example, Cloud Object Storage accepts the optional boolean parameter HMAC for creating specific kind of credentials.
    resourceKeys List<Property Map>
    (List) The source service resource key data of the generated service credentials. Nested scheme for resource_key:
    role Property Map
    The service-specific custom role object, CRN role is accepted. Refer to the service’s documentation for supported roles. Nested scheme for role:

    SmServiceCredentialsSecretSourceServiceIam, SmServiceCredentialsSecretSourceServiceIamArgs

    Apikeys List<SmServiceCredentialsSecretSourceServiceIamApikey>
    (String) The IAM apikey metadata for the IAM credentials that were generated. Nested scheme for apikey:
    Roles List<SmServiceCredentialsSecretSourceServiceIamRole>
    (String) The IAM role for the generate service credentials. Nested scheme for role:
    Serviceids List<SmServiceCredentialsSecretSourceServiceIamServiceid>
    (String) The IAM serviceid for the generated service credentials. Nested scheme for serviceid:
    Apikeys []SmServiceCredentialsSecretSourceServiceIamApikey
    (String) The IAM apikey metadata for the IAM credentials that were generated. Nested scheme for apikey:
    Roles []SmServiceCredentialsSecretSourceServiceIamRole
    (String) The IAM role for the generate service credentials. Nested scheme for role:
    Serviceids []SmServiceCredentialsSecretSourceServiceIamServiceid
    (String) The IAM serviceid for the generated service credentials. Nested scheme for serviceid:
    apikeys List<SmServiceCredentialsSecretSourceServiceIamApikey>
    (String) The IAM apikey metadata for the IAM credentials that were generated. Nested scheme for apikey:
    roles List<SmServiceCredentialsSecretSourceServiceIamRole>
    (String) The IAM role for the generate service credentials. Nested scheme for role:
    serviceids List<SmServiceCredentialsSecretSourceServiceIamServiceid>
    (String) The IAM serviceid for the generated service credentials. Nested scheme for serviceid:
    apikeys SmServiceCredentialsSecretSourceServiceIamApikey[]
    (String) The IAM apikey metadata for the IAM credentials that were generated. Nested scheme for apikey:
    roles SmServiceCredentialsSecretSourceServiceIamRole[]
    (String) The IAM role for the generate service credentials. Nested scheme for role:
    serviceids SmServiceCredentialsSecretSourceServiceIamServiceid[]
    (String) The IAM serviceid for the generated service credentials. Nested scheme for serviceid:
    apikeys Sequence[SmServiceCredentialsSecretSourceServiceIamApikey]
    (String) The IAM apikey metadata for the IAM credentials that were generated. Nested scheme for apikey:
    roles Sequence[SmServiceCredentialsSecretSourceServiceIamRole]
    (String) The IAM role for the generate service credentials. Nested scheme for role:
    serviceids Sequence[SmServiceCredentialsSecretSourceServiceIamServiceid]
    (String) The IAM serviceid for the generated service credentials. Nested scheme for serviceid:
    apikeys List<Property Map>
    (String) The IAM apikey metadata for the IAM credentials that were generated. Nested scheme for apikey:
    roles List<Property Map>
    (String) The IAM role for the generate service credentials. Nested scheme for role:
    serviceids List<Property Map>
    (String) The IAM serviceid for the generated service credentials. Nested scheme for serviceid:

    SmServiceCredentialsSecretSourceServiceIamApikey, SmServiceCredentialsSecretSourceServiceIamApikeyArgs

    Description string
    An extended description of your secret.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 /(.*?)/.
    Name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    Description string
    An extended description of your secret.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 /(.*?)/.
    Name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    description String
    An extended description of your secret.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 /(.*?)/.
    name String
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    description string
    An extended description of your secret.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 /(.*?)/.
    name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    description str
    An extended description of your secret.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 /(.*?)/.
    name str
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    description String
    An extended description of your secret.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 /(.*?)/.
    name String
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.

    SmServiceCredentialsSecretSourceServiceIamRole, SmServiceCredentialsSecretSourceServiceIamRoleArgs

    Crn string
    (String) The resource key CRN of the generated service credentials.
    Crn string
    (String) The resource key CRN of the generated service credentials.
    crn String
    (String) The resource key CRN of the generated service credentials.
    crn string
    (String) The resource key CRN of the generated service credentials.
    crn str
    (String) The resource key CRN of the generated service credentials.
    crn String
    (String) The resource key CRN of the generated service credentials.

    SmServiceCredentialsSecretSourceServiceIamServiceid, SmServiceCredentialsSecretSourceServiceIamServiceidArgs

    Crn string
    (String) The resource key CRN of the generated service credentials.
    Crn string
    (String) The resource key CRN of the generated service credentials.
    crn String
    (String) The resource key CRN of the generated service credentials.
    crn string
    (String) The resource key CRN of the generated service credentials.
    crn str
    (String) The resource key CRN of the generated service credentials.
    crn String
    (String) The resource key CRN of the generated service credentials.

    SmServiceCredentialsSecretSourceServiceInstance, SmServiceCredentialsSecretSourceServiceInstanceArgs

    Crn string
    A CRN that uniquely identifies a service credentials source.
    Crn string
    A CRN that uniquely identifies a service credentials source.
    crn String
    A CRN that uniquely identifies a service credentials source.
    crn string
    A CRN that uniquely identifies a service credentials source.
    crn str
    A CRN that uniquely identifies a service credentials source.
    crn String
    A CRN that uniquely identifies a service credentials source.

    SmServiceCredentialsSecretSourceServiceResourceKey, SmServiceCredentialsSecretSourceServiceResourceKeyArgs

    Crn string
    (String) The resource key CRN of the generated service credentials.
    Name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    Crn string
    (String) The resource key CRN of the generated service credentials.
    Name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    crn String
    (String) The resource key CRN of the generated service credentials.
    name String
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    crn string
    (String) The resource key CRN of the generated service credentials.
    name string
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    crn str
    (String) The resource key CRN of the generated service credentials.
    name str
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.
    crn String
    (String) The resource key CRN of the generated service credentials.
    name String
    The human-readable name of your secret.

    • Constraints: The maximum length is 256 characters. The minimum length is 2 characters. The value must match regular expression ^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$.

    SmServiceCredentialsSecretSourceServiceRole, SmServiceCredentialsSecretSourceServiceRoleArgs

    Crn string
    The service role CRN.
    Crn string
    The service role CRN.
    crn String
    The service role CRN.
    crn string
    The service role CRN.
    crn str
    The service role CRN.
    crn String
    The service role CRN.

    Import

    You can import the ibm_sm_service_credentials_secret resource by using region, instance_id, and secret_id.

    For more information, see the documentation

    Syntax

    bash

    $ pulumi import ibm:index/smServiceCredentialsSecret:SmServiceCredentialsSecret sm_service_credentials_secret <region>/<instance_id>/<secret_id>
    

    Example

    bash

    $ pulumi import ibm:index/smServiceCredentialsSecret:SmServiceCredentialsSecret sm_service_credentials_secret us-east/6ebc4224-e983-496a-8a54-f40a0bfa9175/b49ad24d-81d4-5ebc-b9b9-b0937d1c84d5
    

    To learn more about importing existing cloud resources, see Importing resources.

    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