ibm.SmIamCredentialsSecret
Explore with Pulumi AI
Provides a resource for IAMCredentialsSecret. This allows IAMCredentialsSecret to be created, updated and deleted.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ibm from "@pulumi/ibm";
const smIamCredentialsSecret = new ibm.SmIamCredentialsSecret("smIamCredentialsSecret", {
instanceId: ibm_resource_instance.sm_instance.guid,
region: "us-south",
accessGroups: ["AccessGroupId-45884031-54be-4dd7-86ff-112511e92699"],
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,
serviceId: "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
ttl: "1800",
});
import pulumi
import pulumi_ibm as ibm
sm_iam_credentials_secret = ibm.SmIamCredentialsSecret("smIamCredentialsSecret",
instance_id=ibm_resource_instance["sm_instance"]["guid"],
region="us-south",
access_groups=["AccessGroupId-45884031-54be-4dd7-86ff-112511e92699"],
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"],
service_id="ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
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.NewSmIamCredentialsSecret(ctx, "smIamCredentialsSecret", &ibm.SmIamCredentialsSecretArgs{
InstanceId: pulumi.Any(ibm_resource_instance.Sm_instance.Guid),
Region: pulumi.String("us-south"),
AccessGroups: pulumi.StringArray{
pulumi.String("AccessGroupId-45884031-54be-4dd7-86ff-112511e92699"),
},
CustomMetadata: pulumi.StringMap{
"key": pulumi.String("value"),
},
Description: pulumi.String("Extended description for this secret."),
Labels: pulumi.StringArray{
pulumi.String("my-label"),
},
Rotation: &ibm.SmIamCredentialsSecretRotationArgs{
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),
ServiceId: pulumi.String("ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be"),
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 smIamCredentialsSecret = new Ibm.SmIamCredentialsSecret("smIamCredentialsSecret", new()
{
InstanceId = ibm_resource_instance.Sm_instance.Guid,
Region = "us-south",
AccessGroups = new[]
{
"AccessGroupId-45884031-54be-4dd7-86ff-112511e92699",
},
CustomMetadata =
{
{ "key", "value" },
},
Description = "Extended description for this secret.",
Labels = new[]
{
"my-label",
},
Rotation = new Ibm.Inputs.SmIamCredentialsSecretRotationArgs
{
AutoRotate = true,
Interval = 1,
Unit = "day",
},
SecretGroupId = ibm_sm_secret_group.Sm_secret_group.Secret_group_id,
ServiceId = "ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be",
Ttl = "1800",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ibm.SmIamCredentialsSecret;
import com.pulumi.ibm.SmIamCredentialsSecretArgs;
import com.pulumi.ibm.inputs.SmIamCredentialsSecretRotationArgs;
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 smIamCredentialsSecret = new SmIamCredentialsSecret("smIamCredentialsSecret", SmIamCredentialsSecretArgs.builder()
.instanceId(ibm_resource_instance.sm_instance().guid())
.region("us-south")
.accessGroups("AccessGroupId-45884031-54be-4dd7-86ff-112511e92699")
.customMetadata(Map.of("key", "value"))
.description("Extended description for this secret.")
.labels("my-label")
.rotation(SmIamCredentialsSecretRotationArgs.builder()
.autoRotate(true)
.interval(1)
.unit("day")
.build())
.secretGroupId(ibm_sm_secret_group.sm_secret_group().secret_group_id())
.serviceId("ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be")
.ttl("1800")
.build());
}
}
resources:
smIamCredentialsSecret:
type: ibm:SmIamCredentialsSecret
properties:
instanceId: ${ibm_resource_instance.sm_instance.guid}
region: us-south
accessGroups:
- AccessGroupId-45884031-54be-4dd7-86ff-112511e92699
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}
serviceId: ServiceId-bb4ccc31-bd31-493a-bb58-52ec399800be
ttl: '1800'
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:
- Create or find your
ibmcloud_api_key
andiaas_classic_api_key
here.
- Select
My IBM Cloud API Keys
option from view dropdown foribmcloud_api_key
- Select
Classic Infrastructure API Keys
option from view dropdown foriaas_classic_api_key
- For iaas_classic_username
- Go to Users
- Click on user.
- Find user name in the
VPN password
section underUser Details
tab
For more informaton, see here.
Create SmIamCredentialsSecret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SmIamCredentialsSecret(name: string, args: SmIamCredentialsSecretArgs, opts?: CustomResourceOptions);
@overload
def SmIamCredentialsSecret(resource_name: str,
args: SmIamCredentialsSecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SmIamCredentialsSecret(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
ttl: Optional[str] = None,
region: Optional[str] = None,
reuse_api_key: Optional[bool] = None,
endpoint_type: Optional[str] = None,
custom_metadata: Optional[Mapping[str, str]] = None,
labels: Optional[Sequence[str]] = None,
name: Optional[str] = None,
access_groups: Optional[Sequence[str]] = None,
description: Optional[str] = None,
rotation: Optional[SmIamCredentialsSecretRotationArgs] = None,
secret_group_id: Optional[str] = None,
service_id: Optional[str] = None,
sm_iam_credentials_secret_id: Optional[str] = None,
account_id: Optional[str] = None,
version_custom_metadata: Optional[Mapping[str, str]] = None)
func NewSmIamCredentialsSecret(ctx *Context, name string, args SmIamCredentialsSecretArgs, opts ...ResourceOption) (*SmIamCredentialsSecret, error)
public SmIamCredentialsSecret(string name, SmIamCredentialsSecretArgs args, CustomResourceOptions? opts = null)
public SmIamCredentialsSecret(String name, SmIamCredentialsSecretArgs args)
public SmIamCredentialsSecret(String name, SmIamCredentialsSecretArgs args, CustomResourceOptions options)
type: ibm:SmIamCredentialsSecret
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 SmIamCredentialsSecretArgs
- 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 SmIamCredentialsSecretArgs
- 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 SmIamCredentialsSecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SmIamCredentialsSecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SmIamCredentialsSecretArgs
- 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 smIamCredentialsSecretResource = new Ibm.SmIamCredentialsSecret("smIamCredentialsSecretResource", new()
{
InstanceId = "string",
Ttl = "string",
Region = "string",
ReuseApiKey = false,
EndpointType = "string",
CustomMetadata =
{
{ "string", "string" },
},
Labels = new[]
{
"string",
},
Name = "string",
AccessGroups = new[]
{
"string",
},
Description = "string",
Rotation = new Ibm.Inputs.SmIamCredentialsSecretRotationArgs
{
AutoRotate = false,
Interval = 0,
Unit = "string",
},
SecretGroupId = "string",
ServiceId = "string",
SmIamCredentialsSecretId = "string",
AccountId = "string",
VersionCustomMetadata =
{
{ "string", "string" },
},
});
example, err := ibm.NewSmIamCredentialsSecret(ctx, "smIamCredentialsSecretResource", &ibm.SmIamCredentialsSecretArgs{
InstanceId: pulumi.String("string"),
Ttl: pulumi.String("string"),
Region: pulumi.String("string"),
ReuseApiKey: pulumi.Bool(false),
EndpointType: pulumi.String("string"),
CustomMetadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
Labels: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
AccessGroups: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
Rotation: &ibm.SmIamCredentialsSecretRotationArgs{
AutoRotate: pulumi.Bool(false),
Interval: pulumi.Float64(0),
Unit: pulumi.String("string"),
},
SecretGroupId: pulumi.String("string"),
ServiceId: pulumi.String("string"),
SmIamCredentialsSecretId: pulumi.String("string"),
AccountId: pulumi.String("string"),
VersionCustomMetadata: pulumi.StringMap{
"string": pulumi.String("string"),
},
})
var smIamCredentialsSecretResource = new SmIamCredentialsSecret("smIamCredentialsSecretResource", SmIamCredentialsSecretArgs.builder()
.instanceId("string")
.ttl("string")
.region("string")
.reuseApiKey(false)
.endpointType("string")
.customMetadata(Map.of("string", "string"))
.labels("string")
.name("string")
.accessGroups("string")
.description("string")
.rotation(SmIamCredentialsSecretRotationArgs.builder()
.autoRotate(false)
.interval(0)
.unit("string")
.build())
.secretGroupId("string")
.serviceId("string")
.smIamCredentialsSecretId("string")
.accountId("string")
.versionCustomMetadata(Map.of("string", "string"))
.build());
sm_iam_credentials_secret_resource = ibm.SmIamCredentialsSecret("smIamCredentialsSecretResource",
instance_id="string",
ttl="string",
region="string",
reuse_api_key=False,
endpoint_type="string",
custom_metadata={
"string": "string",
},
labels=["string"],
name="string",
access_groups=["string"],
description="string",
rotation={
"auto_rotate": False,
"interval": 0,
"unit": "string",
},
secret_group_id="string",
service_id="string",
sm_iam_credentials_secret_id="string",
account_id="string",
version_custom_metadata={
"string": "string",
})
const smIamCredentialsSecretResource = new ibm.SmIamCredentialsSecret("smIamCredentialsSecretResource", {
instanceId: "string",
ttl: "string",
region: "string",
reuseApiKey: false,
endpointType: "string",
customMetadata: {
string: "string",
},
labels: ["string"],
name: "string",
accessGroups: ["string"],
description: "string",
rotation: {
autoRotate: false,
interval: 0,
unit: "string",
},
secretGroupId: "string",
serviceId: "string",
smIamCredentialsSecretId: "string",
accountId: "string",
versionCustomMetadata: {
string: "string",
},
});
type: ibm:SmIamCredentialsSecret
properties:
accessGroups:
- string
accountId: string
customMetadata:
string: string
description: string
endpointType: string
instanceId: string
labels:
- string
name: string
region: string
reuseApiKey: false
rotation:
autoRotate: false
interval: 0
unit: string
secretGroupId: string
serviceId: string
smIamCredentialsSecretId: string
ttl: string
versionCustomMetadata:
string: string
SmIamCredentialsSecret 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 SmIamCredentialsSecret resource accepts the following input properties:
- Instance
Id string - The GUID of the Secrets Manager instance.
- Ttl string
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- Access
Groups List<string> - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- Account
Id string - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- Custom
Metadata 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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- Endpoint
Type 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
.
- Constraints: Allowable values are:
- 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- Name string
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- Region string
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
- Reuse
Api boolKey - Rotation
Sm
Iam Credentials Secret Rotation - Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- Secret
Group stringId - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- Service
Id string - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- Sm
Iam stringCredentials Secret Id - Version
Custom Dictionary<string, string>Metadata - The secret version metadata that a user can customize.
- Instance
Id string - The GUID of the Secrets Manager instance.
- Ttl string
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- Access
Groups []string - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- Account
Id string - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- Custom
Metadata 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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- Endpoint
Type 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
.
- Constraints: Allowable values are:
- 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- Name string
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- Region string
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
- Reuse
Api boolKey - Rotation
Sm
Iam Credentials Secret Rotation Args - Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- Secret
Group stringId - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- Service
Id string - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- Sm
Iam stringCredentials Secret Id - Version
Custom map[string]stringMetadata - The secret version metadata that a user can customize.
- instance
Id String - The GUID of the Secrets Manager instance.
- ttl String
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- access
Groups List<String> - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- account
Id String - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- custom
Metadata 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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- endpoint
Type 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
.
- Constraints: Allowable values are:
- 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- name String
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- region String
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
- reuse
Api BooleanKey - rotation
Sm
Iam Credentials Secret Rotation - Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- secret
Group StringId - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- service
Id String - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- sm
Iam StringCredentials Secret Id - version
Custom Map<String,String>Metadata - The secret version metadata that a user can customize.
- instance
Id string - The GUID of the Secrets Manager instance.
- ttl string
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- access
Groups string[] - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- account
Id string - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- custom
Metadata {[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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- endpoint
Type 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
.
- Constraints: Allowable values are:
- 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- name string
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- region string
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
- reuse
Api booleanKey - rotation
Sm
Iam Credentials Secret Rotation - Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- secret
Group stringId - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- service
Id string - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- sm
Iam stringCredentials Secret Id - version
Custom {[key: string]: string}Metadata - The secret version metadata that a user can customize.
- instance_
id str - The GUID of the Secrets Manager instance.
- ttl str
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- access_
groups Sequence[str] - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- account_
id str - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- 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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- 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
.
- Constraints: Allowable values are:
- 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- name str
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- region str
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
- reuse_
api_ boolkey - rotation
Sm
Iam Credentials Secret Rotation Args - Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- secret_
group_ strid - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- service_
id str - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- sm_
iam_ strcredentials_ secret_ id - version_
custom_ Mapping[str, str]metadata - The secret version metadata that a user can customize.
- instance
Id String - The GUID of the Secrets Manager instance.
- ttl String
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- access
Groups List<String> - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- account
Id String - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- custom
Metadata 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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- endpoint
Type 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
.
- Constraints: Allowable values are:
- 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- name String
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- region String
- The region of the Secrets Manager instance. If not provided defaults to the region defined in the IBM provider configuration.
- reuse
Api BooleanKey - rotation Property Map
- Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- secret
Group StringId - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- service
Id String - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- sm
Iam StringCredentials Secret Id - version
Custom Map<String>Metadata - The secret version metadata that a user can customize.
Outputs
All input properties are implicitly available as output properties. Additionally, the SmIamCredentialsSecret resource produces the following output properties:
- Api
Key string - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- Api
Key stringId - (String) The ID of the API key that is generated for this secret.
- Created
At string - (String) The date when a resource was created. The date format follows RFC 3339.
- Created
By 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 is4
characters.
- Constraints: The maximum length is
- Crn string
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- 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 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.
- Locks
Total double - (Integer) The number of locks of the secret.
- Constraints: The maximum value is
1000
. The minimum value is0
.
- Constraints: The maximum value is
- Next
Rotation stringDate - (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 string - The unique identifier of the IAMCredentialsSecret.
- Secret
Type 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
.
- Constraints: Allowable values are:
- Service
Id boolIs Static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- State
Description string - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- Updated
At string - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- Versions
Total double - (Integer) The number of versions of the secret.
- Constraints: The maximum value is
50
. The minimum value is0
.
- Constraints: The maximum value is
- Api
Key string - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- Api
Key stringId - (String) The ID of the API key that is generated for this secret.
- Created
At string - (String) The date when a resource was created. The date format follows RFC 3339.
- Created
By 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 is4
characters.
- Constraints: The maximum length is
- Crn string
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- 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 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.
- Locks
Total float64 - (Integer) The number of locks of the secret.
- Constraints: The maximum value is
1000
. The minimum value is0
.
- Constraints: The maximum value is
- Next
Rotation stringDate - (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 string - The unique identifier of the IAMCredentialsSecret.
- Secret
Type 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
.
- Constraints: Allowable values are:
- Service
Id boolIs Static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- State
Description string - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- Updated
At string - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- Versions
Total float64 - (Integer) The number of versions of the secret.
- Constraints: The maximum value is
50
. The minimum value is0
.
- Constraints: The maximum value is
- api
Key String - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- api
Key StringId - (String) The ID of the API key that is generated for this secret.
- created
At String - (String) The date when a resource was created. The date format follows RFC 3339.
- created
By 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 is4
characters.
- Constraints: The maximum length is
- crn String
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- downloaded Boolean
- (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
- expiration
Date 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.
- locks
Total Double - (Integer) The number of locks of the secret.
- Constraints: The maximum value is
1000
. The minimum value is0
.
- Constraints: The maximum value is
- next
Rotation StringDate - (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 String - The unique identifier of the IAMCredentialsSecret.
- secret
Type 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
.
- Constraints: Allowable values are:
- service
Id BooleanIs Static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- state
Description String - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- updated
At String - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- versions
Total Double - (Integer) The number of versions of the secret.
- Constraints: The maximum value is
50
. The minimum value is0
.
- Constraints: The maximum value is
- api
Key string - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- api
Key stringId - (String) The ID of the API key that is generated for this secret.
- created
At string - (String) The date when a resource was created. The date format follows RFC 3339.
- created
By 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 is4
characters.
- Constraints: The maximum length is
- crn string
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- downloaded boolean
- (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
- expiration
Date 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.
- locks
Total number - (Integer) The number of locks of the secret.
- Constraints: The maximum value is
1000
. The minimum value is0
.
- Constraints: The maximum value is
- next
Rotation stringDate - (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 string - The unique identifier of the IAMCredentialsSecret.
- secret
Type 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
.
- Constraints: Allowable values are:
- service
Id booleanIs Static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- state
Description string - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- updated
At string - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- versions
Total number - (Integer) The number of versions of the secret.
- Constraints: The maximum value is
50
. The minimum value is0
.
- Constraints: The maximum value is
- api_
key str - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- api_
key_ strid - (String) The ID of the API key that is generated for this secret.
- 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 is4
characters.
- Constraints: The maximum length is
- crn str
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- 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 is0
.
- Constraints: The maximum value is
- next_
rotation_ strdate - (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 IAMCredentialsSecret.
- 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
.
- Constraints: Allowable values are:
- service_
id_ boolis_ static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- state_
description str - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- 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 is0
.
- Constraints: The maximum value is
- api
Key String - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- api
Key StringId - (String) The ID of the API key that is generated for this secret.
- created
At String - (String) The date when a resource was created. The date format follows RFC 3339.
- created
By 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 is4
characters.
- Constraints: The maximum length is
- crn String
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- downloaded Boolean
- (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
- expiration
Date 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.
- locks
Total Number - (Integer) The number of locks of the secret.
- Constraints: The maximum value is
1000
. The minimum value is0
.
- Constraints: The maximum value is
- next
Rotation StringDate - (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 String - The unique identifier of the IAMCredentialsSecret.
- secret
Type 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
.
- Constraints: Allowable values are:
- service
Id BooleanIs Static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- state
Description String - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- updated
At String - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- versions
Total Number - (Integer) The number of versions of the secret.
- Constraints: The maximum value is
50
. The minimum value is0
.
- Constraints: The maximum value is
Look up Existing SmIamCredentialsSecret Resource
Get an existing SmIamCredentialsSecret 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?: SmIamCredentialsSecretState, opts?: CustomResourceOptions): SmIamCredentialsSecret
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
access_groups: Optional[Sequence[str]] = None,
account_id: Optional[str] = None,
api_key: Optional[str] = None,
api_key_id: Optional[str] = None,
created_at: Optional[str] = None,
created_by: Optional[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,
reuse_api_key: Optional[bool] = None,
rotation: Optional[SmIamCredentialsSecretRotationArgs] = None,
secret_group_id: Optional[str] = None,
secret_id: Optional[str] = None,
secret_type: Optional[str] = None,
service_id: Optional[str] = None,
service_id_is_static: Optional[bool] = None,
sm_iam_credentials_secret_id: Optional[str] = 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) -> SmIamCredentialsSecret
func GetSmIamCredentialsSecret(ctx *Context, name string, id IDInput, state *SmIamCredentialsSecretState, opts ...ResourceOption) (*SmIamCredentialsSecret, error)
public static SmIamCredentialsSecret Get(string name, Input<string> id, SmIamCredentialsSecretState? state, CustomResourceOptions? opts = null)
public static SmIamCredentialsSecret get(String name, Output<String> id, SmIamCredentialsSecretState state, CustomResourceOptions options)
resources: _: type: ibm:SmIamCredentialsSecret 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.
- Access
Groups List<string> - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- Account
Id string - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- Api
Key string - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- Api
Key stringId - (String) The ID of the API key that is generated for this secret.
- Created
At string - (String) The date when a resource was created. The date format follows RFC 3339.
- Created
By 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 is4
characters.
- Constraints: The maximum length is
- Crn string
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- Custom
Metadata 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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- 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 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
.
- Constraints: Allowable values are:
- Expiration
Date string - (String) The date a secret is expired. The date format follows RFC 3339.
- Instance
Id 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- Locks
Total double - (Integer) The number of locks of the secret.
- Constraints: The maximum value is
1000
. The minimum value is0
.
- Constraints: The maximum value is
- Name string
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- Next
Rotation stringDate - (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.
- Reuse
Api boolKey - Rotation
Sm
Iam Credentials Secret Rotation - Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- Secret
Group stringId - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- Secret
Id string - The unique identifier of the IAMCredentialsSecret.
- Secret
Type 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
.
- Constraints: Allowable values are:
- Service
Id string - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- Service
Id boolIs Static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - Sm
Iam stringCredentials Secret Id - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- State
Description string - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- Ttl string
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- Updated
At string - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- Version
Custom Dictionary<string, string>Metadata - The secret version metadata that a user can customize.
- Versions
Total double - (Integer) The number of versions of the secret.
- Constraints: The maximum value is
50
. The minimum value is0
.
- Constraints: The maximum value is
- Access
Groups []string - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- Account
Id string - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- Api
Key string - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- Api
Key stringId - (String) The ID of the API key that is generated for this secret.
- Created
At string - (String) The date when a resource was created. The date format follows RFC 3339.
- Created
By 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 is4
characters.
- Constraints: The maximum length is
- Crn string
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- Custom
Metadata 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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- 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 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
.
- Constraints: Allowable values are:
- Expiration
Date string - (String) The date a secret is expired. The date format follows RFC 3339.
- Instance
Id 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- Locks
Total float64 - (Integer) The number of locks of the secret.
- Constraints: The maximum value is
1000
. The minimum value is0
.
- Constraints: The maximum value is
- Name string
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- Next
Rotation stringDate - (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.
- Reuse
Api boolKey - Rotation
Sm
Iam Credentials Secret Rotation Args - Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- Secret
Group stringId - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- Secret
Id string - The unique identifier of the IAMCredentialsSecret.
- Secret
Type 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
.
- Constraints: Allowable values are:
- Service
Id string - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- Service
Id boolIs Static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - Sm
Iam stringCredentials Secret Id - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- State
Description string - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- Ttl string
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- Updated
At string - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- Version
Custom map[string]stringMetadata - The secret version metadata that a user can customize.
- Versions
Total float64 - (Integer) The number of versions of the secret.
- Constraints: The maximum value is
50
. The minimum value is0
.
- Constraints: The maximum value is
- access
Groups List<String> - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- account
Id String - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- api
Key String - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- api
Key StringId - (String) The ID of the API key that is generated for this secret.
- created
At String - (String) The date when a resource was created. The date format follows RFC 3339.
- created
By 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 is4
characters.
- Constraints: The maximum length is
- crn String
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- custom
Metadata 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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- downloaded Boolean
- (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
- endpoint
Type 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
.
- Constraints: Allowable values are:
- expiration
Date String - (String) The date a secret is expired. The date format follows RFC 3339.
- instance
Id 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- locks
Total Double - (Integer) The number of locks of the secret.
- Constraints: The maximum value is
1000
. The minimum value is0
.
- Constraints: The maximum value is
- name String
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- next
Rotation StringDate - (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.
- reuse
Api BooleanKey - rotation
Sm
Iam Credentials Secret Rotation - Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- secret
Group StringId - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- secret
Id String - The unique identifier of the IAMCredentialsSecret.
- secret
Type 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
.
- Constraints: Allowable values are:
- service
Id String - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- service
Id BooleanIs Static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - sm
Iam StringCredentials Secret Id - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- state
Description String - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- ttl String
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- updated
At String - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- version
Custom Map<String,String>Metadata - The secret version metadata that a user can customize.
- versions
Total Double - (Integer) The number of versions of the secret.
- Constraints: The maximum value is
50
. The minimum value is0
.
- Constraints: The maximum value is
- access
Groups string[] - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- account
Id string - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- api
Key string - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- api
Key stringId - (String) The ID of the API key that is generated for this secret.
- created
At string - (String) The date when a resource was created. The date format follows RFC 3339.
- created
By 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 is4
characters.
- Constraints: The maximum length is
- crn string
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- custom
Metadata {[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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- downloaded boolean
- (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
- endpoint
Type 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
.
- Constraints: Allowable values are:
- expiration
Date string - (String) The date a secret is expired. The date format follows RFC 3339.
- instance
Id 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- locks
Total number - (Integer) The number of locks of the secret.
- Constraints: The maximum value is
1000
. The minimum value is0
.
- Constraints: The maximum value is
- name string
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- next
Rotation stringDate - (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.
- reuse
Api booleanKey - rotation
Sm
Iam Credentials Secret Rotation - Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- secret
Group stringId - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- secret
Id string - The unique identifier of the IAMCredentialsSecret.
- secret
Type 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
.
- Constraints: Allowable values are:
- service
Id string - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- service
Id booleanIs Static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - sm
Iam stringCredentials Secret Id - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- state
Description string - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- ttl string
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- updated
At string - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- version
Custom {[key: string]: string}Metadata - The secret version metadata that a user can customize.
- versions
Total number - (Integer) The number of versions of the secret.
- Constraints: The maximum value is
50
. The minimum value is0
.
- Constraints: The maximum value is
- access_
groups Sequence[str] - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- account_
id str - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- api_
key str - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- api_
key_ strid - (String) The ID of the API key that is generated for this secret.
- 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 is4
characters.
- Constraints: The maximum length is
- crn str
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- 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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- 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
.
- Constraints: Allowable values are:
- 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- locks_
total float - (Integer) The number of locks of the secret.
- Constraints: The maximum value is
1000
. The minimum value is0
.
- Constraints: The maximum value is
- name str
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- next_
rotation_ strdate - (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.
- reuse_
api_ boolkey - rotation
Sm
Iam Credentials Secret Rotation Args - Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- secret_
group_ strid - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- secret_
id str - The unique identifier of the IAMCredentialsSecret.
- 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
.
- Constraints: Allowable values are:
- service_
id str - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- service_
id_ boolis_ static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - sm_
iam_ strcredentials_ secret_ id - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- state_
description str - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- ttl str
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- updated_
at str - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- version_
custom_ Mapping[str, str]metadata - 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 is0
.
- Constraints: The maximum value is
- access
Groups List<String> - Access Groups that you can use for an
iam_credentials
secret.Up to 10 Access Groups can be used for each secret.- Constraints: The list items must match regular expression
/^AccessGroupId-[a-z0-9-]+[a-z0-9]$/
. The maximum length is10
items. The minimum length is1
item.
- Constraints: The list items must match regular expression
- account
Id String - The ID of the account in which the IAM credentials are created. Use this field only if the target account is not the same as the account of the Secrets Manager instance. Otherwise, the field can be omitted.
- api
Key String - (String) The API key that is generated for this secret.After the secret reaches the end of its lease (see the
ttl
field), the API key is deleted automatically.- Constraints: The maximum length is
60
characters. The minimum length is5
characters. The value must match regular expression/^(?:[A-Za-z0-9_\\-]{4})*(?:[A-Za-z0-9_\\-]{2}==|[A-Za-z0-9_\\-]{3}=)?$/
.
- Constraints: The maximum length is
- api
Key StringId - (String) The ID of the API key that is generated for this secret.
- created
At String - (String) The date when a resource was created. The date format follows RFC 3339.
- created
By 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 is4
characters.
- Constraints: The maximum length is
- crn String
- (String) A CRN that uniquely identifies an IBM Cloud resource.
- Constraints: The maximum length is
512
characters. The minimum length is9
characters. The value must match regular expression/^crn:v0-9*+,;=@\/]|%[0-9A-Z]{2})*){8}$/
.
- Constraints: The maximum length is
- custom
Metadata 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 is0
characters. The value must match regular expression/(.*?)/
.
- Constraints: The maximum length is
- downloaded Boolean
- (Boolean) Indicates whether the secret data that is associated with a secret version was retrieved in a call to the service API.
- endpoint
Type 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
.
- Constraints: Allowable values are:
- expiration
Date String - (String) The date a secret is expired. The date format follows RFC 3339.
- instance
Id 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 is30
items. The minimum length is0
items.
- Constraints: The list items must match regular expression
- locks
Total Number - (Integer) The number of locks of the secret.
- Constraints: The maximum value is
1000
. The minimum value is0
.
- Constraints: The maximum value is
- name String
- The human-readable name of your secret.
- Constraints: The maximum length is
256
characters. The minimum length is2
characters. The value must match regular expression^[A-Za-z0-9_][A-Za-z0-9_]*(?:_*-*\.*[A-Za-z0-9]*)*[A-Za-z0-9]+$
.
- Constraints: The maximum length is
- next
Rotation StringDate - (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.
- reuse
Api BooleanKey - rotation Property Map
- Determines whether Secrets Manager rotates your secrets automatically. Nested scheme for rotation:
- secret
Group StringId - A UUID identifier, or
default
secret group.- Constraints: The maximum length is
36
characters. The minimum length is7
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)$/
.
- Constraints: The maximum length is
- secret
Id String - The unique identifier of the IAMCredentialsSecret.
- secret
Type 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
.
- Constraints: Allowable values are:
- service
Id String - The service ID under which the API key (see the
api_key
field) is created.If you omit this parameter, Secrets Manager generates a new service ID for your secret at its creation and adds it to the access groups that you assign.Optionally, you can use this field to provide your own service ID if you prefer to manage its access directly or retain the service ID after your secret expires, is rotated, or deleted. If you provide a service ID, do not include theaccess_groups
parameter.- Constraints: The maximum length is
50
characters. The minimum length is40
characters. The value must match regular expression/^[A-Za-z0-9][A-Za-z0-9]*(?:-?[A-Za-z0-9]+)*$/
.
- Constraints: The maximum length is
- service
Id BooleanIs Static - (Boolean) Indicates whether an
iam_credentials
secret was created with a static service ID.If it is set totrue
, the service ID for the secret was provided by the user at secret creation. If it is set tofalse
, the service ID was generated by Secrets Manager. - sm
Iam StringCredentials Secret Id - 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
, andDestroyed = 5
values.- Constraints: Allowable values are:
0
,1
,2
,3
,5
.
- Constraints: Allowable values are:
- state
Description String - (String) A text representation of the secret state.
- Constraints: Allowable values are:
pre_activation
,active
,suspended
,deactivated
,destroyed
.
- Constraints: Allowable values are:
- ttl String
- The time-to-live (TTL) or lease duration to assign to generated credentials.For
iam_credentials
secrets, the TTL defines for how long each generated API key remains valid. The value should be an integer that specifies the number of seconds. Minimum duration is 60 seconds. Maximum is 7776000 seconds (90 days).- Constraints: The maximum length is
7
characters. The minimum length is2
characters.
- Constraints: The maximum length is
- updated
At String - (String) The date when a resource was recently modified. The date format follows RFC 3339.
- version
Custom Map<String>Metadata - The secret version metadata that a user can customize.
- versions
Total Number - (Integer) The number of versions of the secret.
- Constraints: The maximum value is
50
. The minimum value is0
.
- Constraints: The maximum value is
Supporting Types
SmIamCredentialsSecretRotation, SmIamCredentialsSecretRotationArgs
- Auto
Rotate bool - Determines whether Secrets Manager rotates your secret automatically.Default is
false
. Ifauto_rotate
is set totrue
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
.
- Constraints: The minimum value is
- Unit string
- The units for the secret rotation time interval.
- Constraints: Allowable values are:
day
,month
.
- Constraints: Allowable values are:
- Auto
Rotate bool - Determines whether Secrets Manager rotates your secret automatically.Default is
false
. Ifauto_rotate
is set totrue
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
.
- Constraints: The minimum value is
- Unit string
- The units for the secret rotation time interval.
- Constraints: Allowable values are:
day
,month
.
- Constraints: Allowable values are:
- auto
Rotate Boolean - Determines whether Secrets Manager rotates your secret automatically.Default is
false
. Ifauto_rotate
is set totrue
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
.
- Constraints: The minimum value is
- unit String
- The units for the secret rotation time interval.
- Constraints: Allowable values are:
day
,month
.
- Constraints: Allowable values are:
- auto
Rotate boolean - Determines whether Secrets Manager rotates your secret automatically.Default is
false
. Ifauto_rotate
is set totrue
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
.
- Constraints: The minimum value is
- unit string
- The units for the secret rotation time interval.
- Constraints: Allowable values are:
day
,month
.
- Constraints: Allowable values are:
- auto_
rotate bool - Determines whether Secrets Manager rotates your secret automatically.Default is
false
. Ifauto_rotate
is set totrue
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
.
- Constraints: The minimum value is
- unit str
- The units for the secret rotation time interval.
- Constraints: Allowable values are:
day
,month
.
- Constraints: Allowable values are:
- auto
Rotate Boolean - Determines whether Secrets Manager rotates your secret automatically.Default is
false
. Ifauto_rotate
is set totrue
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
.
- Constraints: The minimum value is
- unit String
- The units for the secret rotation time interval.
- Constraints: Allowable values are:
day
,month
.
- Constraints: Allowable values are:
Import
You can import the ibm_sm_iam_credentials_secret
resource by using region
, instance_id
, and secret_id
.
For more information, see the documentation
Syntax
bash
$ pulumi import ibm:index/smIamCredentialsSecret:SmIamCredentialsSecret sm_iam_credentials_secret <region>/<instance_id>/<secret_id>
Example
bash
$ pulumi import ibm:index/smIamCredentialsSecret:SmIamCredentialsSecret sm_iam_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.