1. Registry
  2. Packages
  3. Vkcs Provider
  4. API Docs
  5. KmsSecret
Viewing docs for vkcs 0.19.0
published on Tuesday, Oct 27, 2026 by vk-cs
vkcs
Viewing docs for vkcs 0.19.0
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:

    DataJson string
    Path string
    required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
    DeleteProtection bool
    optional computed boolean → Whether the secret is protected from deletion. Defaults to true. Set to false and apply before destroying the secret.
    DataJson string
    Path string
    required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
    DeleteProtection bool
    optional computed boolean → Whether the secret is protected from deletion. Defaults to true. Set to false and 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 to false and apply before destroying the secret.
    dataJson String
    path String
    required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
    deleteProtection Boolean
    optional computed boolean → Whether the secret is protected from deletion. Defaults to true. Set to false and apply before destroying the secret.
    dataJson string
    path string
    required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
    deleteProtection boolean
    optional computed boolean → Whether the secret is protected from deletion. Defaults to true. Set to false and 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 to false and apply before destroying the secret.
    dataJson String
    path String
    required string → Identifier (path) of the secret within the KMS secret store. Changing this forces a new resource.
    deleteProtection Boolean
    optional computed boolean → Whether the secret is protected from deletion. Defaults to true. Set to false and apply before destroying the secret.

    Outputs

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

    CreatedTime 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.
    CreatedTime 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.
    createdTime 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.
    createdTime 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.
    createdTime 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) -> KmsSecret
    func 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.
    The following state arguments are supported:
    CreatedTime 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.
    DataJson string
    DeleteProtection bool
    optional computed boolean → Whether the secret is protected from deletion. Defaults to true. Set to false and 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.
    CreatedTime 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.
    DataJson string
    DeleteProtection bool
    optional computed boolean → Whether the secret is protected from deletion. Defaults to true. Set to false and 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 to false and 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.
    createdTime 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.
    dataJson String
    deleteProtection Boolean
    optional computed boolean → Whether the secret is protected from deletion. Defaults to true. Set to false and 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.
    createdTime 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.
    dataJson string
    deleteProtection boolean
    optional computed boolean → Whether the secret is protected from deletion. Defaults to true. Set to false and 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 to false and 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.
    createdTime 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.
    dataJson String
    deleteProtection Boolean
    optional computed boolean → Whether the secret is protected from deletion. Defaults to true. Set to false and 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 vkcs Terraform Provider.
    vkcs
    Viewing docs for vkcs 0.19.0
    published on Tuesday, Oct 27, 2026 by vk-cs

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial