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

volcengine.kms.Secrets

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.34 published on Wednesday, Jul 2, 2025 by Volcengine
    Deprecated: volcengine.kms.Secrets has been deprecated in favor of volcengine.kms.getSecrets

    Use this data source to query detailed information of kms secrets

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    
    const default = volcengine.kms.getSecrets({
        descriptions: [
            "tf-1",
            "tf-2",
        ],
        secretNames: [
            "5r3",
            "5r",
            "tf",
        ],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    default = volcengine.kms.get_secrets(descriptions=[
            "tf-1",
            "tf-2",
        ],
        secret_names=[
            "5r3",
            "5r",
            "tf",
        ])
    
    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.GetSecrets(ctx, &kms.GetSecretsArgs{
    			Descriptions: []string{
    				"tf-1",
    				"tf-2",
    			},
    			SecretNames: []string{
    				"5r3",
    				"5r",
    				"tf",
    			},
    		}, nil)
    		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 @default = Volcengine.Kms.GetSecrets.Invoke(new()
        {
            Descriptions = new[]
            {
                "tf-1",
                "tf-2",
            },
            SecretNames = new[]
            {
                "5r3",
                "5r",
                "tf",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.kms.KmsFunctions;
    import com.pulumi.volcengine.kms.inputs.GetSecretsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var default = KmsFunctions.getSecrets(GetSecretsArgs.builder()
                .descriptions(            
                    "tf-1",
                    "tf-2")
                .secretNames(            
                    "5r3",
                    "5r",
                    "tf")
                .build());
    
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: volcengine:kms:getSecrets
          Arguments:
            descriptions:
              - tf-1
              - tf-2
            secretNames:
              - 5r3
              - 5r
              - tf
    

    Using Secrets

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function secrets(args: SecretsArgs, opts?: InvokeOptions): Promise<SecretsResult>
    function secretsOutput(args: SecretsOutputArgs, opts?: InvokeOptions): Output<SecretsResult>
    def secrets(creation_date_ranges: Optional[Sequence[str]] = None,
                descriptions: Optional[Sequence[str]] = None,
                managed_states: Optional[Sequence[str]] = None,
                name_regex: Optional[str] = None,
                output_file: Optional[str] = None,
                project_name: Optional[str] = None,
                rotation_states: Optional[Sequence[str]] = None,
                secret_names: Optional[Sequence[str]] = None,
                secret_states: Optional[Sequence[str]] = None,
                secret_types: Optional[Sequence[str]] = None,
                trns: Optional[Sequence[str]] = None,
                update_date_ranges: Optional[Sequence[str]] = None,
                opts: Optional[InvokeOptions] = None) -> SecretsResult
    def secrets_output(creation_date_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                descriptions: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                managed_states: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                name_regex: Optional[pulumi.Input[str]] = None,
                output_file: Optional[pulumi.Input[str]] = None,
                project_name: Optional[pulumi.Input[str]] = None,
                rotation_states: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                secret_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                secret_states: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                secret_types: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                trns: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                update_date_ranges: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[SecretsResult]
    func Secrets(ctx *Context, args *SecretsArgs, opts ...InvokeOption) (*SecretsResult, error)
    func SecretsOutput(ctx *Context, args *SecretsOutputArgs, opts ...InvokeOption) SecretsResultOutput
    public static class Secrets 
    {
        public static Task<SecretsResult> InvokeAsync(SecretsArgs args, InvokeOptions? opts = null)
        public static Output<SecretsResult> Invoke(SecretsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<SecretsResult> secrets(SecretsArgs args, InvokeOptions options)
    public static Output<SecretsResult> secrets(SecretsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: volcengine:kms:Secrets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CreationDateRanges List<string>
    The creation date of the secret.
    Descriptions List<string>
    The description of the secret.
    ManagedStates List<string>
    The state of the managed.
    NameRegex string
    A Name Regex of Resource.
    OutputFile string
    File name where to save data source results.
    ProjectName string
    The name of the project to which the secret belongs.
    RotationStates List<string>
    The state of the rotation.
    SecretNames List<string>
    The name of the secret.
    SecretStates List<string>
    The state of the secret.
    SecretTypes List<string>
    The type of the secret.
    Trns List<string>
    The trn of the secret.
    UpdateDateRanges List<string>
    The update date of the secret.
    CreationDateRanges []string
    The creation date of the secret.
    Descriptions []string
    The description of the secret.
    ManagedStates []string
    The state of the managed.
    NameRegex string
    A Name Regex of Resource.
    OutputFile string
    File name where to save data source results.
    ProjectName string
    The name of the project to which the secret belongs.
    RotationStates []string
    The state of the rotation.
    SecretNames []string
    The name of the secret.
    SecretStates []string
    The state of the secret.
    SecretTypes []string
    The type of the secret.
    Trns []string
    The trn of the secret.
    UpdateDateRanges []string
    The update date of the secret.
    creationDateRanges List<String>
    The creation date of the secret.
    descriptions List<String>
    The description of the secret.
    managedStates List<String>
    The state of the managed.
    nameRegex String
    A Name Regex of Resource.
    outputFile String
    File name where to save data source results.
    projectName String
    The name of the project to which the secret belongs.
    rotationStates List<String>
    The state of the rotation.
    secretNames List<String>
    The name of the secret.
    secretStates List<String>
    The state of the secret.
    secretTypes List<String>
    The type of the secret.
    trns List<String>
    The trn of the secret.
    updateDateRanges List<String>
    The update date of the secret.
    creationDateRanges string[]
    The creation date of the secret.
    descriptions string[]
    The description of the secret.
    managedStates string[]
    The state of the managed.
    nameRegex string
    A Name Regex of Resource.
    outputFile string
    File name where to save data source results.
    projectName string
    The name of the project to which the secret belongs.
    rotationStates string[]
    The state of the rotation.
    secretNames string[]
    The name of the secret.
    secretStates string[]
    The state of the secret.
    secretTypes string[]
    The type of the secret.
    trns string[]
    The trn of the secret.
    updateDateRanges string[]
    The update date of the secret.
    creation_date_ranges Sequence[str]
    The creation date of the secret.
    descriptions Sequence[str]
    The description of the secret.
    managed_states Sequence[str]
    The state of the managed.
    name_regex str
    A Name Regex of Resource.
    output_file str
    File name where to save data source results.
    project_name str
    The name of the project to which the secret belongs.
    rotation_states Sequence[str]
    The state of the rotation.
    secret_names Sequence[str]
    The name of the secret.
    secret_states Sequence[str]
    The state of the secret.
    secret_types Sequence[str]
    The type of the secret.
    trns Sequence[str]
    The trn of the secret.
    update_date_ranges Sequence[str]
    The update date of the secret.
    creationDateRanges List<String>
    The creation date of the secret.
    descriptions List<String>
    The description of the secret.
    managedStates List<String>
    The state of the managed.
    nameRegex String
    A Name Regex of Resource.
    outputFile String
    File name where to save data source results.
    projectName String
    The name of the project to which the secret belongs.
    rotationStates List<String>
    The state of the rotation.
    secretNames List<String>
    The name of the secret.
    secretStates List<String>
    The state of the secret.
    secretTypes List<String>
    The type of the secret.
    trns List<String>
    The trn of the secret.
    updateDateRanges List<String>
    The update date of the secret.

    Secrets Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Secrets List<SecretsSecret>
    The information about the secret.
    TotalCount int
    The total count of query.
    CreationDateRanges List<string>
    Descriptions List<string>
    The description of the secret.
    ManagedStates List<string>
    NameRegex string
    OutputFile string
    ProjectName string
    The project name of the secret.
    RotationStates List<string>
    The rotation state of the secret.
    SecretNames List<string>
    The name of the secret.
    SecretStates List<string>
    The state of secret.
    SecretTypes List<string>
    The type of the secret.
    Trns List<string>
    The information about the tenant resource name (TRN).
    UpdateDateRanges List<string>
    Id string
    The provider-assigned unique ID for this managed resource.
    Secrets []SecretsSecret
    The information about the secret.
    TotalCount int
    The total count of query.
    CreationDateRanges []string
    Descriptions []string
    The description of the secret.
    ManagedStates []string
    NameRegex string
    OutputFile string
    ProjectName string
    The project name of the secret.
    RotationStates []string
    The rotation state of the secret.
    SecretNames []string
    The name of the secret.
    SecretStates []string
    The state of secret.
    SecretTypes []string
    The type of the secret.
    Trns []string
    The information about the tenant resource name (TRN).
    UpdateDateRanges []string
    id String
    The provider-assigned unique ID for this managed resource.
    secrets List<SecretsSecret>
    The information about the secret.
    totalCount Integer
    The total count of query.
    creationDateRanges List<String>
    descriptions List<String>
    The description of the secret.
    managedStates List<String>
    nameRegex String
    outputFile String
    projectName String
    The project name of the secret.
    rotationStates List<String>
    The rotation state of the secret.
    secretNames List<String>
    The name of the secret.
    secretStates List<String>
    The state of secret.
    secretTypes List<String>
    The type of the secret.
    trns List<String>
    The information about the tenant resource name (TRN).
    updateDateRanges List<String>
    id string
    The provider-assigned unique ID for this managed resource.
    secrets SecretsSecret[]
    The information about the secret.
    totalCount number
    The total count of query.
    creationDateRanges string[]
    descriptions string[]
    The description of the secret.
    managedStates string[]
    nameRegex string
    outputFile string
    projectName string
    The project name of the secret.
    rotationStates string[]
    The rotation state of the secret.
    secretNames string[]
    The name of the secret.
    secretStates string[]
    The state of secret.
    secretTypes string[]
    The type of the secret.
    trns string[]
    The information about the tenant resource name (TRN).
    updateDateRanges string[]
    id str
    The provider-assigned unique ID for this managed resource.
    secrets Sequence[SecretsSecret]
    The information about the secret.
    total_count int
    The total count of query.
    creation_date_ranges Sequence[str]
    descriptions Sequence[str]
    The description of the secret.
    managed_states Sequence[str]
    name_regex str
    output_file str
    project_name str
    The project name of the secret.
    rotation_states Sequence[str]
    The rotation state of the secret.
    secret_names Sequence[str]
    The name of the secret.
    secret_states Sequence[str]
    The state of secret.
    secret_types Sequence[str]
    The type of the secret.
    trns Sequence[str]
    The information about the tenant resource name (TRN).
    update_date_ranges Sequence[str]
    id String
    The provider-assigned unique ID for this managed resource.
    secrets List<Property Map>
    The information about the secret.
    totalCount Number
    The total count of query.
    creationDateRanges List<String>
    descriptions List<String>
    The description of the secret.
    managedStates List<String>
    nameRegex String
    outputFile String
    projectName String
    The project name of the secret.
    rotationStates List<String>
    The rotation state of the secret.
    secretNames List<String>
    The name of the secret.
    secretStates List<String>
    The state of secret.
    secretTypes List<String>
    The type of the secret.
    trns List<String>
    The information about the tenant resource name (TRN).
    updateDateRanges List<String>

    Supporting Types

    SecretsSecret

    CreationDate int
    The date when the keyring 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.
    Id string
    The unique ID of the secret. The value is in the UUID format.
    LastRotationTime string
    The last time the secret was rotated.
    Managed bool
    Indicates whether the secret is hosted.
    ProjectName string
    The name of the project to which the secret belongs.
    RotationInterval int
    The interval at which automatic rotation is performed.
    RotationState string
    The state of the rotation.
    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.
    SecretState string
    The state of the secret.
    SecretType string
    The type of the secret.
    Trn string
    The trn of the secret.
    Uid string
    The tenant ID of the secret.
    UpdateDate int
    The date when the keyring was updated.
    CreationDate int
    The date when the keyring 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.
    Id string
    The unique ID of the secret. The value is in the UUID format.
    LastRotationTime string
    The last time the secret was rotated.
    Managed bool
    Indicates whether the secret is hosted.
    ProjectName string
    The name of the project to which the secret belongs.
    RotationInterval int
    The interval at which automatic rotation is performed.
    RotationState string
    The state of the rotation.
    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.
    SecretState string
    The state of the secret.
    SecretType string
    The type of the secret.
    Trn string
    The trn of the secret.
    Uid string
    The tenant ID of the secret.
    UpdateDate int
    The date when the keyring was updated.
    creationDate Integer
    The date when the keyring 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.
    id String
    The unique ID of the secret. The value is in the UUID format.
    lastRotationTime String
    The last time the secret was rotated.
    managed Boolean
    Indicates whether the secret is hosted.
    projectName String
    The name of the project to which the secret belongs.
    rotationInterval Integer
    The interval at which automatic rotation is performed.
    rotationState String
    The state of the rotation.
    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.
    secretState String
    The state of the secret.
    secretType String
    The type of the secret.
    trn String
    The trn of the secret.
    uid String
    The tenant ID of the secret.
    updateDate Integer
    The date when the keyring was updated.
    creationDate number
    The date when the keyring 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.
    id string
    The unique ID of the secret. The value is in the UUID format.
    lastRotationTime string
    The last time the secret was rotated.
    managed boolean
    Indicates whether the secret is hosted.
    projectName string
    The name of the project to which the secret belongs.
    rotationInterval number
    The interval at which automatic rotation is performed.
    rotationState string
    The state of the rotation.
    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.
    secretState string
    The state of the secret.
    secretType string
    The type of the secret.
    trn string
    The trn of the secret.
    uid string
    The tenant ID of the secret.
    updateDate number
    The date when the keyring was updated.
    creation_date int
    The date when the keyring 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.
    id str
    The unique ID of the secret. The value is in the UUID format.
    last_rotation_time str
    The last time the secret was rotated.
    managed bool
    Indicates whether the secret is hosted.
    project_name str
    The name of the project to which the secret belongs.
    rotation_interval int
    The interval at which automatic rotation is performed.
    rotation_state str
    The state of the rotation.
    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_state str
    The state of the secret.
    secret_type str
    The type of the secret.
    trn str
    The trn of the secret.
    uid str
    The tenant ID of the secret.
    update_date int
    The date when the keyring was updated.
    creationDate Number
    The date when the keyring 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.
    id String
    The unique ID of the secret. The value is in the UUID format.
    lastRotationTime String
    The last time the secret was rotated.
    managed Boolean
    Indicates whether the secret is hosted.
    projectName String
    The name of the project to which the secret belongs.
    rotationInterval Number
    The interval at which automatic rotation is performed.
    rotationState String
    The state of the rotation.
    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.
    secretState String
    The state of the secret.
    secretType String
    The type of the secret.
    trn String
    The trn of the secret.
    uid String
    The tenant ID of the secret.
    updateDate Number
    The date when the keyring was updated.

    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