1. Packages
  2. Volcengine
  3. API Docs
  4. kms
  5. Secret
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

volcengine.kms.Secret

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine

    Provides a resource to manage kms secret

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    const foo = new volcengine.kms.Secret("foo", {
        description: "tf-test",
        secretName: "tf-test1",
        secretType: "Generic",
        secretValue: "{\"dasdasd\":\"dasdasd\"}",
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo = volcengine.kms.Secret("foo",
        description="tf-test",
        secret_name="tf-test1",
        secret_type="Generic",
        secret_value="{\"dasdasd\":\"dasdasd\"}")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/kms"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := kms.NewSecret(ctx, "foo", &kms.SecretArgs{
    			Description: pulumi.String("tf-test"),
    			SecretName:  pulumi.String("tf-test1"),
    			SecretType:  pulumi.String("Generic"),
    			SecretValue: pulumi.String("{\"dasdasd\":\"dasdasd\"}"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Volcengine.Kms.Secret("foo", new()
        {
            Description = "tf-test",
            SecretName = "tf-test1",
            SecretType = "Generic",
            SecretValue = "{\"dasdasd\":\"dasdasd\"}",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.kms.Secret;
    import com.pulumi.volcengine.kms.SecretArgs;
    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 foo = new Secret("foo", SecretArgs.builder()        
                .description("tf-test")
                .secretName("tf-test1")
                .secretType("Generic")
                .secretValue("{\"dasdasd\":\"dasdasd\"}")
                .build());
    
        }
    }
    
    resources:
      foo:
        type: volcengine:kms:Secret
        properties:
          description: tf-test
          secretName: tf-test1
          secretType: Generic
          secretValue: '{"dasdasd":"dasdasd"}'
    

    Create Secret Resource

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

    Constructor syntax

    new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);
    @overload
    def Secret(resource_name: str,
               args: SecretArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Secret(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               secret_name: Optional[str] = None,
               secret_type: Optional[str] = None,
               secret_value: Optional[str] = None,
               automatic_rotation: Optional[bool] = None,
               description: Optional[str] = None,
               encryption_key: Optional[str] = None,
               extended_config: Optional[str] = None,
               project_name: Optional[str] = None,
               rotation_interval: Optional[str] = None)
    func NewSecret(ctx *Context, name string, args SecretArgs, opts ...ResourceOption) (*Secret, error)
    public Secret(string name, SecretArgs args, CustomResourceOptions? opts = null)
    public Secret(String name, SecretArgs args)
    public Secret(String name, SecretArgs args, CustomResourceOptions options)
    
    type: volcengine:kms:Secret
    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 SecretArgs
    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 SecretArgs
    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 SecretArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SecretArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SecretArgs
    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 secretResource = new Volcengine.Kms.Secret("secretResource", new()
    {
        SecretName = "string",
        SecretType = "string",
        SecretValue = "string",
        AutomaticRotation = false,
        Description = "string",
        EncryptionKey = "string",
        ExtendedConfig = "string",
        ProjectName = "string",
        RotationInterval = "string",
    });
    
    example, err := kms.NewSecret(ctx, "secretResource", &kms.SecretArgs{
    	SecretName:        pulumi.String("string"),
    	SecretType:        pulumi.String("string"),
    	SecretValue:       pulumi.String("string"),
    	AutomaticRotation: pulumi.Bool(false),
    	Description:       pulumi.String("string"),
    	EncryptionKey:     pulumi.String("string"),
    	ExtendedConfig:    pulumi.String("string"),
    	ProjectName:       pulumi.String("string"),
    	RotationInterval:  pulumi.String("string"),
    })
    
    var secretResource = new Secret("secretResource", SecretArgs.builder()
        .secretName("string")
        .secretType("string")
        .secretValue("string")
        .automaticRotation(false)
        .description("string")
        .encryptionKey("string")
        .extendedConfig("string")
        .projectName("string")
        .rotationInterval("string")
        .build());
    
    secret_resource = volcengine.kms.Secret("secretResource",
        secret_name="string",
        secret_type="string",
        secret_value="string",
        automatic_rotation=False,
        description="string",
        encryption_key="string",
        extended_config="string",
        project_name="string",
        rotation_interval="string")
    
    const secretResource = new volcengine.kms.Secret("secretResource", {
        secretName: "string",
        secretType: "string",
        secretValue: "string",
        automaticRotation: false,
        description: "string",
        encryptionKey: "string",
        extendedConfig: "string",
        projectName: "string",
        rotationInterval: "string",
    });
    
    type: volcengine:kms:Secret
    properties:
        automaticRotation: false
        description: string
        encryptionKey: string
        extendedConfig: string
        projectName: string
        rotationInterval: string
        secretName: string
        secretType: string
        secretValue: string
    

    Secret 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 Secret resource accepts the following input properties:

    SecretName string
    The name of the secret.
    SecretType string
    The type of the secret.
    SecretValue string
    The value of the secret.
    AutomaticRotation bool
    The rotation state of the secret.
    Description string
    The description of the secret.
    EncryptionKey string
    The TRN of the KMS key used to encrypt the secret value.
    ExtendedConfig string
    The extended configurations of the secret.
    ProjectName string
    The project name of the secret.
    RotationInterval string
    The interval at which automatic rotation is performed.
    SecretName string
    The name of the secret.
    SecretType string
    The type of the secret.
    SecretValue string
    The value of the secret.
    AutomaticRotation bool
    The rotation state of the secret.
    Description string
    The description of the secret.
    EncryptionKey string
    The TRN of the KMS key used to encrypt the secret value.
    ExtendedConfig string
    The extended configurations of the secret.
    ProjectName string
    The project name of the secret.
    RotationInterval string
    The interval at which automatic rotation is performed.
    secretName String
    The name of the secret.
    secretType String
    The type of the secret.
    secretValue String
    The value of the secret.
    automaticRotation Boolean
    The rotation state of the secret.
    description String
    The description of the secret.
    encryptionKey String
    The TRN of the KMS key used to encrypt the secret value.
    extendedConfig String
    The extended configurations of the secret.
    projectName String
    The project name of the secret.
    rotationInterval String
    The interval at which automatic rotation is performed.
    secretName string
    The name of the secret.
    secretType string
    The type of the secret.
    secretValue string
    The value of the secret.
    automaticRotation boolean
    The rotation state of the secret.
    description string
    The description of the secret.
    encryptionKey string
    The TRN of the KMS key used to encrypt the secret value.
    extendedConfig string
    The extended configurations of the secret.
    projectName string
    The project name of the secret.
    rotationInterval string
    The interval at which automatic rotation is performed.
    secret_name str
    The name of the secret.
    secret_type str
    The type of the secret.
    secret_value str
    The value of the secret.
    automatic_rotation bool
    The rotation state of the secret.
    description str
    The description of the secret.
    encryption_key str
    The TRN of the KMS key used to encrypt the secret value.
    extended_config str
    The extended configurations of the secret.
    project_name str
    The project name of the secret.
    rotation_interval str
    The interval at which automatic rotation is performed.
    secretName String
    The name of the secret.
    secretType String
    The type of the secret.
    secretValue String
    The value of the secret.
    automaticRotation Boolean
    The rotation state of the secret.
    description String
    The description of the secret.
    encryptionKey String
    The TRN of the KMS key used to encrypt the secret value.
    extendedConfig String
    The extended configurations of the secret.
    projectName String
    The project name of the secret.
    rotationInterval String
    The interval at which automatic rotation is performed.

    Outputs

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

    CreationDate int
    The date when the secret was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastRotationTime string
    The last time the secret was rotated.
    Managed bool
    Indicates whether the secret is hosted.
    RotationIntervalSecond int
    Rotation interval second.
    RotationState string
    The rotation state of the secret.
    ScheduleDeleteTime string
    The time when the secret will be deleted.
    ScheduleRotationTime string
    The next time the secret will be rotated.
    State string
    The state of secret.
    Trn string
    The information about the tenant resource name (TRN).
    Uid string
    The tenant ID of the secret.
    UpdateDate int
    The date when the secret was updated.
    Uuid string
    The ID of secret.
    CreationDate int
    The date when the secret was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    LastRotationTime string
    The last time the secret was rotated.
    Managed bool
    Indicates whether the secret is hosted.
    RotationIntervalSecond int
    Rotation interval second.
    RotationState string
    The rotation state of the secret.
    ScheduleDeleteTime string
    The time when the secret will be deleted.
    ScheduleRotationTime string
    The next time the secret will be rotated.
    State string
    The state of secret.
    Trn string
    The information about the tenant resource name (TRN).
    Uid string
    The tenant ID of the secret.
    UpdateDate int
    The date when the secret was updated.
    Uuid string
    The ID of secret.
    creationDate Integer
    The date when the secret was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastRotationTime String
    The last time the secret was rotated.
    managed Boolean
    Indicates whether the secret is hosted.
    rotationIntervalSecond Integer
    Rotation interval second.
    rotationState String
    The rotation state of the secret.
    scheduleDeleteTime String
    The time when the secret will be deleted.
    scheduleRotationTime String
    The next time the secret will be rotated.
    state String
    The state of secret.
    trn String
    The information about the tenant resource name (TRN).
    uid String
    The tenant ID of the secret.
    updateDate Integer
    The date when the secret was updated.
    uuid String
    The ID of secret.
    creationDate number
    The date when the secret was created.
    id string
    The provider-assigned unique ID for this managed resource.
    lastRotationTime string
    The last time the secret was rotated.
    managed boolean
    Indicates whether the secret is hosted.
    rotationIntervalSecond number
    Rotation interval second.
    rotationState string
    The rotation state of the secret.
    scheduleDeleteTime string
    The time when the secret will be deleted.
    scheduleRotationTime string
    The next time the secret will be rotated.
    state string
    The state of secret.
    trn string
    The information about the tenant resource name (TRN).
    uid string
    The tenant ID of the secret.
    updateDate number
    The date when the secret was updated.
    uuid string
    The ID of secret.
    creation_date int
    The date when the secret was created.
    id str
    The provider-assigned unique ID for this managed resource.
    last_rotation_time str
    The last time the secret was rotated.
    managed bool
    Indicates whether the secret is hosted.
    rotation_interval_second int
    Rotation interval second.
    rotation_state str
    The rotation state of the secret.
    schedule_delete_time str
    The time when the secret will be deleted.
    schedule_rotation_time str
    The next time the secret will be rotated.
    state str
    The state of secret.
    trn str
    The information about the tenant resource name (TRN).
    uid str
    The tenant ID of the secret.
    update_date int
    The date when the secret was updated.
    uuid str
    The ID of secret.
    creationDate Number
    The date when the secret was created.
    id String
    The provider-assigned unique ID for this managed resource.
    lastRotationTime String
    The last time the secret was rotated.
    managed Boolean
    Indicates whether the secret is hosted.
    rotationIntervalSecond Number
    Rotation interval second.
    rotationState String
    The rotation state of the secret.
    scheduleDeleteTime String
    The time when the secret will be deleted.
    scheduleRotationTime String
    The next time the secret will be rotated.
    state String
    The state of secret.
    trn String
    The information about the tenant resource name (TRN).
    uid String
    The tenant ID of the secret.
    updateDate Number
    The date when the secret was updated.
    uuid String
    The ID of secret.

    Look up Existing Secret Resource

    Get an existing Secret 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?: SecretState, opts?: CustomResourceOptions): Secret
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            automatic_rotation: Optional[bool] = None,
            creation_date: Optional[int] = None,
            description: Optional[str] = None,
            encryption_key: Optional[str] = None,
            extended_config: Optional[str] = None,
            last_rotation_time: Optional[str] = None,
            managed: Optional[bool] = None,
            project_name: Optional[str] = None,
            rotation_interval: Optional[str] = None,
            rotation_interval_second: Optional[int] = None,
            rotation_state: Optional[str] = None,
            schedule_delete_time: Optional[str] = None,
            schedule_rotation_time: Optional[str] = None,
            secret_name: Optional[str] = None,
            secret_type: Optional[str] = None,
            secret_value: Optional[str] = None,
            state: Optional[str] = None,
            trn: Optional[str] = None,
            uid: Optional[str] = None,
            update_date: Optional[int] = None,
            uuid: Optional[str] = None) -> Secret
    func GetSecret(ctx *Context, name string, id IDInput, state *SecretState, opts ...ResourceOption) (*Secret, error)
    public static Secret Get(string name, Input<string> id, SecretState? state, CustomResourceOptions? opts = null)
    public static Secret get(String name, Output<String> id, SecretState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:kms:Secret    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AutomaticRotation bool
    The rotation state of the secret.
    CreationDate int
    The date when the secret was created.
    Description string
    The description of the secret.
    EncryptionKey string
    The TRN of the KMS key used to encrypt the secret value.
    ExtendedConfig string
    The extended configurations of the secret.
    LastRotationTime string
    The last time the secret was rotated.
    Managed bool
    Indicates whether the secret is hosted.
    ProjectName string
    The project name of the secret.
    RotationInterval string
    The interval at which automatic rotation is performed.
    RotationIntervalSecond int
    Rotation interval second.
    RotationState string
    The rotation state of the secret.
    ScheduleDeleteTime string
    The time when the secret will be deleted.
    ScheduleRotationTime string
    The next time the secret will be rotated.
    SecretName string
    The name of the secret.
    SecretType string
    The type of the secret.
    SecretValue string
    The value of the secret.
    State string
    The state of secret.
    Trn string
    The information about the tenant resource name (TRN).
    Uid string
    The tenant ID of the secret.
    UpdateDate int
    The date when the secret was updated.
    Uuid string
    The ID of secret.
    AutomaticRotation bool
    The rotation state of the secret.
    CreationDate int
    The date when the secret was created.
    Description string
    The description of the secret.
    EncryptionKey string
    The TRN of the KMS key used to encrypt the secret value.
    ExtendedConfig string
    The extended configurations of the secret.
    LastRotationTime string
    The last time the secret was rotated.
    Managed bool
    Indicates whether the secret is hosted.
    ProjectName string
    The project name of the secret.
    RotationInterval string
    The interval at which automatic rotation is performed.
    RotationIntervalSecond int
    Rotation interval second.
    RotationState string
    The rotation state of the secret.
    ScheduleDeleteTime string
    The time when the secret will be deleted.
    ScheduleRotationTime string
    The next time the secret will be rotated.
    SecretName string
    The name of the secret.
    SecretType string
    The type of the secret.
    SecretValue string
    The value of the secret.
    State string
    The state of secret.
    Trn string
    The information about the tenant resource name (TRN).
    Uid string
    The tenant ID of the secret.
    UpdateDate int
    The date when the secret was updated.
    Uuid string
    The ID of secret.
    automaticRotation Boolean
    The rotation state of the secret.
    creationDate Integer
    The date when the secret was created.
    description String
    The description of the secret.
    encryptionKey String
    The TRN of the KMS key used to encrypt the secret value.
    extendedConfig String
    The extended configurations of the secret.
    lastRotationTime String
    The last time the secret was rotated.
    managed Boolean
    Indicates whether the secret is hosted.
    projectName String
    The project name of the secret.
    rotationInterval String
    The interval at which automatic rotation is performed.
    rotationIntervalSecond Integer
    Rotation interval second.
    rotationState String
    The rotation state of the secret.
    scheduleDeleteTime String
    The time when the secret will be deleted.
    scheduleRotationTime String
    The next time the secret will be rotated.
    secretName String
    The name of the secret.
    secretType String
    The type of the secret.
    secretValue String
    The value of the secret.
    state String
    The state of secret.
    trn String
    The information about the tenant resource name (TRN).
    uid String
    The tenant ID of the secret.
    updateDate Integer
    The date when the secret was updated.
    uuid String
    The ID of secret.
    automaticRotation boolean
    The rotation state of the secret.
    creationDate number
    The date when the secret was created.
    description string
    The description of the secret.
    encryptionKey string
    The TRN of the KMS key used to encrypt the secret value.
    extendedConfig string
    The extended configurations of the secret.
    lastRotationTime string
    The last time the secret was rotated.
    managed boolean
    Indicates whether the secret is hosted.
    projectName string
    The project name of the secret.
    rotationInterval string
    The interval at which automatic rotation is performed.
    rotationIntervalSecond number
    Rotation interval second.
    rotationState string
    The rotation state of the secret.
    scheduleDeleteTime string
    The time when the secret will be deleted.
    scheduleRotationTime string
    The next time the secret will be rotated.
    secretName string
    The name of the secret.
    secretType string
    The type of the secret.
    secretValue string
    The value of the secret.
    state string
    The state of secret.
    trn string
    The information about the tenant resource name (TRN).
    uid string
    The tenant ID of the secret.
    updateDate number
    The date when the secret was updated.
    uuid string
    The ID of secret.
    automatic_rotation bool
    The rotation state of the secret.
    creation_date int
    The date when the secret was created.
    description str
    The description of the secret.
    encryption_key str
    The TRN of the KMS key used to encrypt the secret value.
    extended_config str
    The extended configurations of the secret.
    last_rotation_time str
    The last time the secret was rotated.
    managed bool
    Indicates whether the secret is hosted.
    project_name str
    The project name of the secret.
    rotation_interval str
    The interval at which automatic rotation is performed.
    rotation_interval_second int
    Rotation interval second.
    rotation_state str
    The rotation state of the secret.
    schedule_delete_time str
    The time when the secret will be deleted.
    schedule_rotation_time str
    The next time the secret will be rotated.
    secret_name str
    The name of the secret.
    secret_type str
    The type of the secret.
    secret_value str
    The value of the secret.
    state str
    The state of secret.
    trn str
    The information about the tenant resource name (TRN).
    uid str
    The tenant ID of the secret.
    update_date int
    The date when the secret was updated.
    uuid str
    The ID of secret.
    automaticRotation Boolean
    The rotation state of the secret.
    creationDate Number
    The date when the secret was created.
    description String
    The description of the secret.
    encryptionKey String
    The TRN of the KMS key used to encrypt the secret value.
    extendedConfig String
    The extended configurations of the secret.
    lastRotationTime String
    The last time the secret was rotated.
    managed Boolean
    Indicates whether the secret is hosted.
    projectName String
    The project name of the secret.
    rotationInterval String
    The interval at which automatic rotation is performed.
    rotationIntervalSecond Number
    Rotation interval second.
    rotationState String
    The rotation state of the secret.
    scheduleDeleteTime String
    The time when the secret will be deleted.
    scheduleRotationTime String
    The next time the secret will be rotated.
    secretName String
    The name of the secret.
    secretType String
    The type of the secret.
    secretValue String
    The value of the secret.
    state String
    The state of secret.
    trn String
    The information about the tenant resource name (TRN).
    uid String
    The tenant ID of the secret.
    updateDate Number
    The date when the secret was updated.
    uuid String
    The ID of secret.

    Import

    KmsSecret can be imported using the id, e.g.

    $ pulumi import volcengine:kms/secret:Secret default resource_id
    

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

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine