published on Wednesday, Sep 16, 2026 by ibm-cloud
published on Wednesday, Sep 16, 2026 by ibm-cloud
A resource for creating a Vault admin token for authenticating to your Vault Dedicated cluster. The token is valid for 1 hour and grants administrative privileges. The token is automatically refreshed if it expired or it is about to expire.
Create SmAdminToken Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SmAdminToken(name: string, args: SmAdminTokenArgs, opts?: CustomResourceOptions);@overload
def SmAdminToken(resource_name: str,
args: SmAdminTokenArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SmAdminToken(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
sm_admin_token_id: Optional[str] = None)func NewSmAdminToken(ctx *Context, name string, args SmAdminTokenArgs, opts ...ResourceOption) (*SmAdminToken, error)public SmAdminToken(string name, SmAdminTokenArgs args, CustomResourceOptions? opts = null)
public SmAdminToken(String name, SmAdminTokenArgs args)
public SmAdminToken(String name, SmAdminTokenArgs args, CustomResourceOptions options)
type: ibm:SmAdminToken
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "ibm_sm_admin_token" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SmAdminTokenArgs
- 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 SmAdminTokenArgs
- 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 SmAdminTokenArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SmAdminTokenArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SmAdminTokenArgs
- 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 smAdminTokenResource = new Ibm.SmAdminToken("smAdminTokenResource", new()
{
InstanceId = "string",
SmAdminTokenId = "string",
});
example, err := ibm.NewSmAdminToken(ctx, "smAdminTokenResource", &ibm.SmAdminTokenArgs{
InstanceId: pulumi.String("string"),
SmAdminTokenId: pulumi.String("string"),
})
resource "ibm_sm_admin_token" "smAdminTokenResource" {
lifecycle {
create_before_destroy = true
}
instance_id = "string"
sm_admin_token_id = "string"
}
var smAdminTokenResource = new SmAdminToken("smAdminTokenResource", SmAdminTokenArgs.builder()
.instanceId("string")
.smAdminTokenId("string")
.build());
sm_admin_token_resource = ibm.SmAdminToken("smAdminTokenResource",
instance_id="string",
sm_admin_token_id="string")
const smAdminTokenResource = new ibm.SmAdminToken("smAdminTokenResource", {
instanceId: "string",
smAdminTokenId: "string",
});
type: ibm:SmAdminToken
properties:
instanceId: string
smAdminTokenId: string
SmAdminToken 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 SmAdminToken resource accepts the following input properties:
- Instance
Id string - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- Sm
Admin stringToken Id - The unique identifier of the sm_admin_token.
- Instance
Id string - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- Sm
Admin stringToken Id - The unique identifier of the sm_admin_token.
- instance_
id string - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- sm_
admin_ stringtoken_ id - The unique identifier of the sm_admin_token.
- instance
Id String - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- sm
Admin StringToken Id - The unique identifier of the sm_admin_token.
- instance
Id string - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- sm
Admin stringToken Id - The unique identifier of the sm_admin_token.
- instance_
id str - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- sm_
admin_ strtoken_ id - The unique identifier of the sm_admin_token.
- instance
Id String - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- sm
Admin StringToken Id - The unique identifier of the sm_admin_token.
Outputs
All input properties are implicitly available as output properties. Additionally, the SmAdminToken resource produces the following output properties:
- Created
At string - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- Id string
- The provider-assigned unique ID for this managed resource.
- Token string
- The admin token.
- Created
At string - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- Id string
- The provider-assigned unique ID for this managed resource.
- Token string
- The admin token.
- created_
at string - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- id string
- The provider-assigned unique ID for this managed resource.
- token string
- The admin token.
- created
At String - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- id String
- The provider-assigned unique ID for this managed resource.
- token String
- The admin token.
- created
At string - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- id string
- The provider-assigned unique ID for this managed resource.
- token string
- The admin token.
- created_
at str - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- id str
- The provider-assigned unique ID for this managed resource.
- token str
- The admin token.
- created
At String - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- id String
- The provider-assigned unique ID for this managed resource.
- token String
- The admin token.
Look up Existing SmAdminToken Resource
Get an existing SmAdminToken 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?: SmAdminTokenState, opts?: CustomResourceOptions): SmAdminToken@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_at: Optional[str] = None,
instance_id: Optional[str] = None,
sm_admin_token_id: Optional[str] = None,
token: Optional[str] = None) -> SmAdminTokenfunc GetSmAdminToken(ctx *Context, name string, id IDInput, state *SmAdminTokenState, opts ...ResourceOption) (*SmAdminToken, error)public static SmAdminToken Get(string name, Input<string> id, SmAdminTokenState? state, CustomResourceOptions? opts = null)public static SmAdminToken get(String name, Output<String> id, SmAdminTokenState state, CustomResourceOptions options)resources: _: type: ibm:SmAdminToken get: id: ${id}import {
to = ibm_sm_admin_token.example
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.
- Created
At string - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- Instance
Id string - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- Sm
Admin stringToken Id - The unique identifier of the sm_admin_token.
- Token string
- The admin token.
- Created
At string - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- Instance
Id string - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- Sm
Admin stringToken Id - The unique identifier of the sm_admin_token.
- Token string
- The admin token.
- created_
at string - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- instance_
id string - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- sm_
admin_ stringtoken_ id - The unique identifier of the sm_admin_token.
- token string
- The admin token.
- created
At String - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- instance
Id String - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- sm
Admin StringToken Id - The unique identifier of the sm_admin_token.
- token String
- The admin token.
- created
At string - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- instance
Id string - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- sm
Admin stringToken Id - The unique identifier of the sm_admin_token.
- token string
- The admin token.
- created_
at str - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- instance_
id str - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- sm_
admin_ strtoken_ id - The unique identifier of the sm_admin_token.
- token str
- The admin token.
- created
At String - (String) The date that the admin token was created. The date format follows RFC 3339.
token- (String) The token value.- Constraints: The maximum length is
4096characters. The minimum length is16characters. The value must match regular expression/^hvs.[\\s\\S]+$/.
- instance
Id String - The service instance ID.
- Constraints: Length must be
36characters. 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}$/.
- Constraints: Length must be
- sm
Admin StringToken Id - The unique identifier of the sm_admin_token.
- token String
- The admin token.
Package Details
- Repository
- ibm ibm-cloud/terraform-provider-ibm
- License
- Notes
- This Pulumi package is based on the
ibmTerraform Provider.
published on Wednesday, Sep 16, 2026 by ibm-cloud