published on Tuesday, Oct 27, 2026 by vk-cs
published on Tuesday, Oct 27, 2026 by vk-cs
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as vkcs from "@pulumi/vkcs";
const secret = new vkcs.KmsSecret("secret", {
path: "credentials",
deleteProtection: false,
dataJson: JSON.stringify({
username: "my-username",
password: "my-password",
}),
});
import pulumi
import json
import pulumi_vkcs as vkcs
secret = vkcs.KmsSecret("secret",
path="credentials",
delete_protection=False,
data_json=json.dumps({
"username": "my-username",
"password": "my-password",
}))
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"username": "my-username",
"password": "my-password",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = vkcs.NewKmsSecret(ctx, "secret", &vkcs.KmsSecretArgs{
Path: pulumi.String("credentials"),
DeleteProtection: pulumi.Bool(false),
DataJson: pulumi.String(json0),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Vkcs = Pulumi.Vkcs;
return await Deployment.RunAsync(() =>
{
var secret = new Vkcs.KmsSecret("secret", new()
{
Path = "credentials",
DeleteProtection = false,
DataJson = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["username"] = "my-username",
["password"] = "my-password",
}),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vkcs.KmsSecret;
import com.pulumi.vkcs.KmsSecretArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 secret = new KmsSecret("secret", KmsSecretArgs.builder()
.path("credentials")
.deleteProtection(false)
.dataJson(serializeJson(
jsonObject(
jsonProperty("username", "my-username"),
jsonProperty("password", "my-password")
)))
.build());
}
}
resources:
secret:
type: vkcs:KmsSecret
properties:
path: credentials
deleteProtection: false
dataJson:
fn::toJSON:
username: my-username
password: my-password
Example coming soon!
Create KmsSecret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new KmsSecret(name: string, args: KmsSecretArgs, opts?: CustomResourceOptions);@overload
def KmsSecret(resource_name: str,
args: KmsSecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def KmsSecret(resource_name: str,
opts: Optional[ResourceOptions] = None,
data_json: Optional[str] = None,
path: Optional[str] = None,
delete_protection: Optional[bool] = None)func NewKmsSecret(ctx *Context, name string, args KmsSecretArgs, opts ...ResourceOption) (*KmsSecret, error)public KmsSecret(string name, KmsSecretArgs args, CustomResourceOptions? opts = null)
public KmsSecret(String name, KmsSecretArgs args)
public KmsSecret(String name, KmsSecretArgs args, CustomResourceOptions options)
type: vkcs:KmsSecret
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "vkcs_kms_secret" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args KmsSecretArgs
- 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 KmsSecretArgs
- 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 KmsSecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args KmsSecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args KmsSecretArgs
- 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 kmsSecretResource = new Vkcs.KmsSecret("kmsSecretResource", new()
{
DataJson = "string",
Path = "string",
DeleteProtection = false,
});
example, err := vkcs.NewKmsSecret(ctx, "kmsSecretResource", &vkcs.KmsSecretArgs{
DataJson: pulumi.String("string"),
Path: pulumi.String("string"),
DeleteProtection: pulumi.Bool(false),
})
resource "vkcs_kms_secret" "kmsSecretResource" {
lifecycle {
create_before_destroy = true
}
data_json = "string"
path = "string"
delete_protection = false
}
var kmsSecretResource = new KmsSecret("kmsSecretResource", KmsSecretArgs.builder()
.dataJson("string")
.path("string")
.deleteProtection(false)
.build());
kms_secret_resource = vkcs.KmsSecret("kmsSecretResource",
data_json="string",
path="string",
delete_protection=False)
const kmsSecretResource = new vkcs.KmsSecret("kmsSecretResource", {
dataJson: "string",
path: "string",
deleteProtection: false,
});
type: vkcs:KmsSecret
properties:
dataJson: string
deleteProtection: false
path: string
KmsSecret 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 KmsSecret resource accepts the following input properties:
- Data
Json string - Path string
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- Delete
Protection bool - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret.
- Data
Json string - Path string
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- Delete
Protection bool - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret.
- data_
json string - path string
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- delete_
protection bool - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret.
- data
Json String - path String
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- delete
Protection Boolean - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret.
- data
Json string - path string
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- delete
Protection boolean - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret.
- data_
json str - path str
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- delete_
protection bool - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret.
- data
Json String - path String
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- delete
Protection Boolean - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret.
Outputs
All input properties are implicitly available as output properties. Additionally, the KmsSecret resource produces the following output properties:
- Created
Time string - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - Id string
- The provider-assigned unique ID for this managed resource.
- Version double
- number → Current version of the secret returned in its metadata.
- Created
Time string - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - Id string
- The provider-assigned unique ID for this managed resource.
- Version float64
- number → Current version of the secret returned in its metadata.
- created_
time string - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - id string
- The provider-assigned unique ID for this managed resource.
- version number
- number → Current version of the secret returned in its metadata.
- created
Time String - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - id String
- The provider-assigned unique ID for this managed resource.
- version Double
- number → Current version of the secret returned in its metadata.
- created
Time string - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - id string
- The provider-assigned unique ID for this managed resource.
- version number
- number → Current version of the secret returned in its metadata.
- created_
time str - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - id str
- The provider-assigned unique ID for this managed resource.
- version float
- number → Current version of the secret returned in its metadata.
- created
Time String - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - id String
- The provider-assigned unique ID for this managed resource.
- version Number
- number → Current version of the secret returned in its metadata.
Look up Existing KmsSecret Resource
Get an existing KmsSecret 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?: KmsSecretState, opts?: CustomResourceOptions): KmsSecret@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
created_time: Optional[str] = None,
data_json: Optional[str] = None,
delete_protection: Optional[bool] = None,
path: Optional[str] = None,
version: Optional[float] = None) -> KmsSecretfunc GetKmsSecret(ctx *Context, name string, id IDInput, state *KmsSecretState, opts ...ResourceOption) (*KmsSecret, error)public static KmsSecret Get(string name, Input<string> id, KmsSecretState? state, CustomResourceOptions? opts = null)public static KmsSecret get(String name, Output<String> id, KmsSecretState state, CustomResourceOptions options)resources: existingKmsSecret: type: vkcs:KmsSecret get: id: ${id}import {
to = vkcs_kms_secret.example
id = "${id}"
}
- name string
- The unique name of the resulting resource.
- id Input<ID>
- The unique provider ID of the resource to look up.
- state KmsSecretState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resulting resource.
- id str
- The unique provider ID of the resource to look up.
- 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 resulting resource.
- id IDInput
- The unique provider ID of the resource to look up.
- state KmsSecretState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resulting resource.
- id Input<string>
- The unique provider ID of the resource to look up.
- state KmsSecretState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resulting resource.
- id Output<String>
- The unique provider ID of the resource to look up.
- state KmsSecretState
- Known property values the provider needs, along with the ID, to find the resource. Usually not required.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
- Created
Time string - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - Data
Json string - Delete
Protection bool - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret. - Path string
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- Version double
- number → Current version of the secret returned in its metadata.
- Created
Time string - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - Data
Json string - Delete
Protection bool - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret. - Path string
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- Version float64
- number → Current version of the secret returned in its metadata.
- created_
time string - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - data_
json string - delete_
protection bool - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret. - path string
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- version number
- number → Current version of the secret returned in its metadata.
- created
Time String - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - data
Json String - delete
Protection Boolean - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret. - path String
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- version Double
- number → Current version of the secret returned in its metadata.
- created
Time string - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - data
Json string - delete
Protection boolean - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret. - path string
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- version number
- number → Current version of the secret returned in its metadata.
- created_
time str - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - data_
json str - delete_
protection bool - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret. - path str
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- version float
- number → Current version of the secret returned in its metadata.
- created
Time String - string → Creation time returned in the secret metadata, formatted as a Go time string, for example
2026-09-01 10:00:00 +0000 UTC. - data
Json String - delete
Protection Boolean - optional computed boolean → Whether the secret is protected from deletion. Defaults to
true. Set tofalseand apply before destroying the secret. - path String
- required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
- version Number
- number → Current version of the secret returned in its metadata.
Import
Import is not currently supported.
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- vkcs vk-cs/terraform-provider-vkcs
- License
- Notes
- This Pulumi package is based on the
vkcsTerraform Provider.
published on Tuesday, Oct 27, 2026 by vk-cs