volcengine.kms.Secret
Explore with Pulumi AI
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:
- Secret
Name string - The name of the secret.
- Secret
Type string - The type of the secret.
- Secret
Value string - The value of the secret.
- Automatic
Rotation bool - The rotation state of the secret.
- Description string
- The description of the secret.
- Encryption
Key string - The TRN of the KMS key used to encrypt the secret value.
- Extended
Config string - The extended configurations of the secret.
- Project
Name string - The project name of the secret.
- Rotation
Interval string - The interval at which automatic rotation is performed.
- Secret
Name string - The name of the secret.
- Secret
Type string - The type of the secret.
- Secret
Value string - The value of the secret.
- Automatic
Rotation bool - The rotation state of the secret.
- Description string
- The description of the secret.
- Encryption
Key string - The TRN of the KMS key used to encrypt the secret value.
- Extended
Config string - The extended configurations of the secret.
- Project
Name string - The project name of the secret.
- Rotation
Interval string - The interval at which automatic rotation is performed.
- secret
Name String - The name of the secret.
- secret
Type String - The type of the secret.
- secret
Value String - The value of the secret.
- automatic
Rotation Boolean - The rotation state of the secret.
- description String
- The description of the secret.
- encryption
Key String - The TRN of the KMS key used to encrypt the secret value.
- extended
Config String - The extended configurations of the secret.
- project
Name String - The project name of the secret.
- rotation
Interval String - The interval at which automatic rotation is performed.
- secret
Name string - The name of the secret.
- secret
Type string - The type of the secret.
- secret
Value string - The value of the secret.
- automatic
Rotation boolean - The rotation state of the secret.
- description string
- The description of the secret.
- encryption
Key string - The TRN of the KMS key used to encrypt the secret value.
- extended
Config string - The extended configurations of the secret.
- project
Name string - The project name of the secret.
- rotation
Interval 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.
- secret
Name String - The name of the secret.
- secret
Type String - The type of the secret.
- secret
Value String - The value of the secret.
- automatic
Rotation Boolean - The rotation state of the secret.
- description String
- The description of the secret.
- encryption
Key String - The TRN of the KMS key used to encrypt the secret value.
- extended
Config String - The extended configurations of the secret.
- project
Name String - The project name of the secret.
- rotation
Interval 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:
- Creation
Date int - The date when the secret was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Rotation stringTime - The last time the secret was rotated.
- Managed bool
- Indicates whether the secret is hosted.
- Rotation
Interval intSecond - Rotation interval second.
- Rotation
State string - The rotation state of the secret.
- Schedule
Delete stringTime - The time when the secret will be deleted.
- Schedule
Rotation stringTime - 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.
- Update
Date int - The date when the secret was updated.
- Uuid string
- The ID of secret.
- Creation
Date int - The date when the secret was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Last
Rotation stringTime - The last time the secret was rotated.
- Managed bool
- Indicates whether the secret is hosted.
- Rotation
Interval intSecond - Rotation interval second.
- Rotation
State string - The rotation state of the secret.
- Schedule
Delete stringTime - The time when the secret will be deleted.
- Schedule
Rotation stringTime - 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.
- Update
Date int - The date when the secret was updated.
- Uuid string
- The ID of secret.
- creation
Date Integer - The date when the secret was created.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Rotation StringTime - The last time the secret was rotated.
- managed Boolean
- Indicates whether the secret is hosted.
- rotation
Interval IntegerSecond - Rotation interval second.
- rotation
State String - The rotation state of the secret.
- schedule
Delete StringTime - The time when the secret will be deleted.
- schedule
Rotation StringTime - 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.
- update
Date Integer - The date when the secret was updated.
- uuid String
- The ID of secret.
- creation
Date number - The date when the secret was created.
- id string
- The provider-assigned unique ID for this managed resource.
- last
Rotation stringTime - The last time the secret was rotated.
- managed boolean
- Indicates whether the secret is hosted.
- rotation
Interval numberSecond - Rotation interval second.
- rotation
State string - The rotation state of the secret.
- schedule
Delete stringTime - The time when the secret will be deleted.
- schedule
Rotation stringTime - 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.
- update
Date 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_ strtime - The last time the secret was rotated.
- managed bool
- Indicates whether the secret is hosted.
- rotation_
interval_ intsecond - Rotation interval second.
- rotation_
state str - The rotation state of the secret.
- schedule_
delete_ strtime - The time when the secret will be deleted.
- schedule_
rotation_ strtime - 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.
- creation
Date Number - The date when the secret was created.
- id String
- The provider-assigned unique ID for this managed resource.
- last
Rotation StringTime - The last time the secret was rotated.
- managed Boolean
- Indicates whether the secret is hosted.
- rotation
Interval NumberSecond - Rotation interval second.
- rotation
State String - The rotation state of the secret.
- schedule
Delete StringTime - The time when the secret will be deleted.
- schedule
Rotation StringTime - 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.
- update
Date 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.
- Automatic
Rotation bool - The rotation state of the secret.
- Creation
Date int - The date when the secret was created.
- Description string
- The description of the secret.
- Encryption
Key string - The TRN of the KMS key used to encrypt the secret value.
- Extended
Config string - The extended configurations of the secret.
- Last
Rotation stringTime - The last time the secret was rotated.
- Managed bool
- Indicates whether the secret is hosted.
- Project
Name string - The project name of the secret.
- Rotation
Interval string - The interval at which automatic rotation is performed.
- Rotation
Interval intSecond - Rotation interval second.
- Rotation
State string - The rotation state of the secret.
- Schedule
Delete stringTime - The time when the secret will be deleted.
- Schedule
Rotation stringTime - The next time the secret will be rotated.
- Secret
Name string - The name of the secret.
- Secret
Type string - The type of the secret.
- Secret
Value 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.
- Update
Date int - 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 string
- The description of the secret.
- Encryption
Key string - The TRN of the KMS key used to encrypt the secret value.
- Extended
Config string - The extended configurations of the secret.
- Last
Rotation stringTime - The last time the secret was rotated.
- Managed bool
- Indicates whether the secret is hosted.
- Project
Name string - The project name of the secret.
- Rotation
Interval string - The interval at which automatic rotation is performed.
- Rotation
Interval intSecond - Rotation interval second.
- Rotation
State string - The rotation state of the secret.
- Schedule
Delete stringTime - The time when the secret will be deleted.
- Schedule
Rotation stringTime - The next time the secret will be rotated.
- Secret
Name string - The name of the secret.
- Secret
Type string - The type of the secret.
- Secret
Value 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.
- Update
Date int - The date when the secret was updated.
- Uuid string
- The ID of secret.
- automatic
Rotation Boolean - The rotation state of the secret.
- creation
Date Integer - The date when the secret was created.
- description String
- The description of the secret.
- encryption
Key String - The TRN of the KMS key used to encrypt the secret value.
- extended
Config String - The extended configurations of the secret.
- last
Rotation StringTime - The last time the secret was rotated.
- managed Boolean
- Indicates whether the secret is hosted.
- project
Name String - The project name of the secret.
- rotation
Interval String - The interval at which automatic rotation is performed.
- rotation
Interval IntegerSecond - Rotation interval second.
- rotation
State String - The rotation state of the secret.
- schedule
Delete StringTime - The time when the secret will be deleted.
- schedule
Rotation StringTime - The next time the secret will be rotated.
- secret
Name String - The name of the secret.
- secret
Type String - The type of the secret.
- secret
Value 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.
- update
Date Integer - The date when the secret was updated.
- uuid String
- The ID of secret.
- automatic
Rotation boolean - The rotation state of the secret.
- creation
Date number - The date when the secret was created.
- description string
- The description of the secret.
- encryption
Key string - The TRN of the KMS key used to encrypt the secret value.
- extended
Config string - The extended configurations of the secret.
- last
Rotation stringTime - The last time the secret was rotated.
- managed boolean
- Indicates whether the secret is hosted.
- project
Name string - The project name of the secret.
- rotation
Interval string - The interval at which automatic rotation is performed.
- rotation
Interval numberSecond - Rotation interval second.
- rotation
State string - The rotation state of the secret.
- schedule
Delete stringTime - The time when the secret will be deleted.
- schedule
Rotation stringTime - The next time the secret will be rotated.
- secret
Name string - The name of the secret.
- secret
Type string - The type of the secret.
- secret
Value 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.
- update
Date 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_ strtime - 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_ intsecond - Rotation interval second.
- rotation_
state str - The rotation state of the secret.
- schedule_
delete_ strtime - The time when the secret will be deleted.
- schedule_
rotation_ strtime - 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.
- automatic
Rotation Boolean - The rotation state of the secret.
- creation
Date Number - The date when the secret was created.
- description String
- The description of the secret.
- encryption
Key String - The TRN of the KMS key used to encrypt the secret value.
- extended
Config String - The extended configurations of the secret.
- last
Rotation StringTime - The last time the secret was rotated.
- managed Boolean
- Indicates whether the secret is hosted.
- project
Name String - The project name of the secret.
- rotation
Interval String - The interval at which automatic rotation is performed.
- rotation
Interval NumberSecond - Rotation interval second.
- rotation
State String - The rotation state of the secret.
- schedule
Delete StringTime - The time when the secret will be deleted.
- schedule
Rotation StringTime - The next time the secret will be rotated.
- secret
Name String - The name of the secret.
- secret
Type String - The type of the secret.
- secret
Value 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.
- update
Date 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.