@volcengine/pulumi
Version:
A Pulumi package for creating and managing volcengine cloud resources.
323 lines (322 loc) • 10.6 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a resource to manage kms secret
* ## Example Usage
*
* ```typescript
* 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\"}",
* versionName: "v1.0",
* });
* const fooEcs = new volcengine.kms.Secret("fooEcs", {
* automaticRotation: false,
* description: "tf-test ecs",
* encryptionKey: "trn:kms:cn-beijing:21000******:keyrings/Tf-test/keys/Test-key1",
* extendedConfig: "{\"InstanceId\":\"i-yeehzz2tc0ygp2******\",\"SecretSubType\":\"Password\",\"CustomData\":{\"desc\":\"test\"}}",
* forceDelete: false,
* pendingWindowInDays: 7,
* projectName: "default",
* secretName: "tf-test2",
* secretType: "ECS",
* secretValue: "{\"UserName\":\"root\",\"Password\":\"********\"}",
* versionName: "v2.0",
* });
* ```
*
* ## Import
*
* KmsSecret can be imported using the id, e.g.
*
* ```sh
* $ pulumi import volcengine:kms/secret:Secret default resource_id
* ```
*/
export declare class Secret extends pulumi.CustomResource {
/**
* Get an existing Secret resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: SecretState, opts?: pulumi.CustomResourceOptions): Secret;
/**
* Returns true if the given object is an instance of Secret. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Secret;
/**
* The rotation state of the secret. Only valid for IAM, RDS, Redis, ECS secrets.
*/
readonly automaticRotation: pulumi.Output<boolean | undefined>;
/**
* The date when the secret was created.
*/
readonly creationDate: pulumi.Output<number>;
/**
* The description of the secret.
*/
readonly description: pulumi.Output<string>;
/**
* The TRN of the KMS key used to encrypt the secret value.
*/
readonly encryptionKey: pulumi.Output<string>;
/**
* The extended configurations of the secret.
*/
readonly extendedConfig: pulumi.Output<string>;
/**
* Whether to delete the secret immediately. If false, the secret enters pending deletion state. Only effective when destroying resources.
*/
readonly forceDelete: pulumi.Output<boolean | undefined>;
/**
* The last time the secret was rotated.
*/
readonly lastRotationTime: pulumi.Output<string>;
/**
* Indicates whether the secret is hosted.
*/
readonly managed: pulumi.Output<boolean>;
/**
* The cloud service that owns the secret.
*/
readonly owningService: pulumi.Output<string>;
/**
* The waiting period before deletion when forceDelete is false. Valid values: 7~30. Only effective when destroying resources.
*/
readonly pendingWindowInDays: pulumi.Output<number | undefined>;
/**
* The project name of the secret.
*/
readonly projectName: pulumi.Output<string>;
/**
* The interval at which automatic rotation is performed. This parameter must be specified when automaticRotation is true.
*/
readonly rotationInterval: pulumi.Output<string>;
/**
* Rotation interval second.
*/
readonly rotationIntervalSecond: pulumi.Output<number>;
/**
* The rotation state of the secret.
*/
readonly rotationState: pulumi.Output<string>;
/**
* The time when the secret will be deleted.
*/
readonly scheduleDeleteTime: pulumi.Output<string>;
/**
* The next time the secret will be rotated.
*/
readonly scheduleRotationTime: pulumi.Output<string>;
/**
* The name of the secret.
*/
readonly secretName: pulumi.Output<string>;
/**
* The type of the secret. Valid values: Generic, IAM, RDS, Redis, ECS.
*/
readonly secretType: pulumi.Output<string>;
/**
* The value of the secret. Only Generic type secret support modifying secret_value.
*/
readonly secretValue: pulumi.Output<string>;
/**
* The state of secret.
*/
readonly state: pulumi.Output<string>;
/**
* The information about the tenant resource name (TRN).
*/
readonly trn: pulumi.Output<string>;
/**
* The tenant ID of the secret.
*/
readonly uid: pulumi.Output<string>;
/**
* The date when the secret was updated.
*/
readonly updateDate: pulumi.Output<number>;
/**
* The ID of secret.
*/
readonly uuid: pulumi.Output<string>;
/**
* The version alias of the secret. Only Generic type secret support modifying version_name.
*/
readonly versionName: pulumi.Output<string | undefined>;
/**
* Create a Secret resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: SecretArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Secret resources.
*/
export interface SecretState {
/**
* The rotation state of the secret. Only valid for IAM, RDS, Redis, ECS secrets.
*/
automaticRotation?: pulumi.Input<boolean>;
/**
* The date when the secret was created.
*/
creationDate?: pulumi.Input<number>;
/**
* The description of the secret.
*/
description?: pulumi.Input<string>;
/**
* The TRN of the KMS key used to encrypt the secret value.
*/
encryptionKey?: pulumi.Input<string>;
/**
* The extended configurations of the secret.
*/
extendedConfig?: pulumi.Input<string>;
/**
* Whether to delete the secret immediately. If false, the secret enters pending deletion state. Only effective when destroying resources.
*/
forceDelete?: pulumi.Input<boolean>;
/**
* The last time the secret was rotated.
*/
lastRotationTime?: pulumi.Input<string>;
/**
* Indicates whether the secret is hosted.
*/
managed?: pulumi.Input<boolean>;
/**
* The cloud service that owns the secret.
*/
owningService?: pulumi.Input<string>;
/**
* The waiting period before deletion when forceDelete is false. Valid values: 7~30. Only effective when destroying resources.
*/
pendingWindowInDays?: pulumi.Input<number>;
/**
* The project name of the secret.
*/
projectName?: pulumi.Input<string>;
/**
* The interval at which automatic rotation is performed. This parameter must be specified when automaticRotation is true.
*/
rotationInterval?: pulumi.Input<string>;
/**
* Rotation interval second.
*/
rotationIntervalSecond?: pulumi.Input<number>;
/**
* The rotation state of the secret.
*/
rotationState?: pulumi.Input<string>;
/**
* The time when the secret will be deleted.
*/
scheduleDeleteTime?: pulumi.Input<string>;
/**
* The next time the secret will be rotated.
*/
scheduleRotationTime?: pulumi.Input<string>;
/**
* The name of the secret.
*/
secretName?: pulumi.Input<string>;
/**
* The type of the secret. Valid values: Generic, IAM, RDS, Redis, ECS.
*/
secretType?: pulumi.Input<string>;
/**
* The value of the secret. Only Generic type secret support modifying secret_value.
*/
secretValue?: pulumi.Input<string>;
/**
* The state of secret.
*/
state?: pulumi.Input<string>;
/**
* The information about the tenant resource name (TRN).
*/
trn?: pulumi.Input<string>;
/**
* The tenant ID of the secret.
*/
uid?: pulumi.Input<string>;
/**
* The date when the secret was updated.
*/
updateDate?: pulumi.Input<number>;
/**
* The ID of secret.
*/
uuid?: pulumi.Input<string>;
/**
* The version alias of the secret. Only Generic type secret support modifying version_name.
*/
versionName?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Secret resource.
*/
export interface SecretArgs {
/**
* The rotation state of the secret. Only valid for IAM, RDS, Redis, ECS secrets.
*/
automaticRotation?: pulumi.Input<boolean>;
/**
* The description of the secret.
*/
description?: pulumi.Input<string>;
/**
* The TRN of the KMS key used to encrypt the secret value.
*/
encryptionKey?: pulumi.Input<string>;
/**
* The extended configurations of the secret.
*/
extendedConfig?: pulumi.Input<string>;
/**
* Whether to delete the secret immediately. If false, the secret enters pending deletion state. Only effective when destroying resources.
*/
forceDelete?: pulumi.Input<boolean>;
/**
* The waiting period before deletion when forceDelete is false. Valid values: 7~30. Only effective when destroying resources.
*/
pendingWindowInDays?: pulumi.Input<number>;
/**
* The project name of the secret.
*/
projectName?: pulumi.Input<string>;
/**
* The interval at which automatic rotation is performed. This parameter must be specified when automaticRotation is true.
*/
rotationInterval?: pulumi.Input<string>;
/**
* The name of the secret.
*/
secretName: pulumi.Input<string>;
/**
* The type of the secret. Valid values: Generic, IAM, RDS, Redis, ECS.
*/
secretType: pulumi.Input<string>;
/**
* The value of the secret. Only Generic type secret support modifying secret_value.
*/
secretValue: pulumi.Input<string>;
/**
* The version alias of the secret. Only Generic type secret support modifying version_name.
*/
versionName?: pulumi.Input<string>;
}