Provides a resource to manage kms secret restore
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as volcengine from "@volcengine/pulumi";
const example = new volcengine.kms.SecretBackup("example", {secretName: "Test-1"});
const _default = new volcengine.kms.SecretRestore("default", {
secretDataKey: example.secretDataKey,
backupData: example.backupData,
signature: example.signature,
});
import pulumi
import pulumi_volcengine as volcengine
example = volcengine.kms.SecretBackup("example", secret_name="Test-1")
default = volcengine.kms.SecretRestore("default",
secret_data_key=example.secret_data_key,
backup_data=example.backup_data,
signature=example.signature)
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 {
example, err := kms.NewSecretBackup(ctx, "example", &kms.SecretBackupArgs{
SecretName: pulumi.String("Test-1"),
})
if err != nil {
return err
}
_, err = kms.NewSecretRestore(ctx, "default", &kms.SecretRestoreArgs{
SecretDataKey: example.SecretDataKey,
BackupData: example.BackupData,
Signature: example.Signature,
})
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 example = new Volcengine.Kms.SecretBackup("example", new()
{
SecretName = "Test-1",
});
var @default = new Volcengine.Kms.SecretRestore("default", new()
{
SecretDataKey = example.SecretDataKey,
BackupData = example.BackupData,
Signature = example.Signature,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.volcengine.kms.SecretBackup;
import com.pulumi.volcengine.kms.SecretBackupArgs;
import com.pulumi.volcengine.kms.SecretRestore;
import com.pulumi.volcengine.kms.SecretRestoreArgs;
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 example = new SecretBackup("example", SecretBackupArgs.builder()
.secretName("Test-1")
.build());
var default_ = new SecretRestore("default", SecretRestoreArgs.builder()
.secretDataKey(example.secretDataKey())
.backupData(example.backupData())
.signature(example.signature())
.build());
}
}
resources:
example:
type: volcengine:kms:SecretBackup
properties:
secretName: Test-1
default:
type: volcengine:kms:SecretRestore
properties:
secretDataKey: ${example.secretDataKey}
backupData: ${example.backupData}
signature: ${example.signature}
Create SecretRestore Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SecretRestore(name: string, args: SecretRestoreArgs, opts?: CustomResourceOptions);@overload
def SecretRestore(resource_name: str,
args: SecretRestoreArgs,
opts: Optional[ResourceOptions] = None)
@overload
def SecretRestore(resource_name: str,
opts: Optional[ResourceOptions] = None,
backup_data: Optional[str] = None,
secret_data_key: Optional[str] = None,
signature: Optional[str] = None)func NewSecretRestore(ctx *Context, name string, args SecretRestoreArgs, opts ...ResourceOption) (*SecretRestore, error)public SecretRestore(string name, SecretRestoreArgs args, CustomResourceOptions? opts = null)
public SecretRestore(String name, SecretRestoreArgs args)
public SecretRestore(String name, SecretRestoreArgs args, CustomResourceOptions options)
type: volcengine:kms:SecretRestore
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 SecretRestoreArgs
- 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 SecretRestoreArgs
- 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 SecretRestoreArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SecretRestoreArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SecretRestoreArgs
- 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 secretRestoreResource = new Volcengine.Kms.SecretRestore("secretRestoreResource", new()
{
BackupData = "string",
SecretDataKey = "string",
Signature = "string",
});
example, err := kms.NewSecretRestore(ctx, "secretRestoreResource", &kms.SecretRestoreArgs{
BackupData: pulumi.String("string"),
SecretDataKey: pulumi.String("string"),
Signature: pulumi.String("string"),
})
var secretRestoreResource = new SecretRestore("secretRestoreResource", SecretRestoreArgs.builder()
.backupData("string")
.secretDataKey("string")
.signature("string")
.build());
secret_restore_resource = volcengine.kms.SecretRestore("secretRestoreResource",
backup_data="string",
secret_data_key="string",
signature="string")
const secretRestoreResource = new volcengine.kms.SecretRestore("secretRestoreResource", {
backupData: "string",
secretDataKey: "string",
signature: "string",
});
type: volcengine:kms:SecretRestore
properties:
backupData: string
secretDataKey: string
signature: string
SecretRestore 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 SecretRestore resource accepts the following input properties:
- Backup
Data string - The full secret data returned during backup. JSON format.
- Secret
Data stringKey - The data key ciphertext returned during backup. Base64 encoded.
- Signature string
- The signature of the backup data returned during backup. Base64 encoded.
- Backup
Data string - The full secret data returned during backup. JSON format.
- Secret
Data stringKey - The data key ciphertext returned during backup. Base64 encoded.
- Signature string
- The signature of the backup data returned during backup. Base64 encoded.
- backup
Data String - The full secret data returned during backup. JSON format.
- secret
Data StringKey - The data key ciphertext returned during backup. Base64 encoded.
- signature String
- The signature of the backup data returned during backup. Base64 encoded.
- backup
Data string - The full secret data returned during backup. JSON format.
- secret
Data stringKey - The data key ciphertext returned during backup. Base64 encoded.
- signature string
- The signature of the backup data returned during backup. Base64 encoded.
- backup_
data str - The full secret data returned during backup. JSON format.
- secret_
data_ strkey - The data key ciphertext returned during backup. Base64 encoded.
- signature str
- The signature of the backup data returned during backup. Base64 encoded.
- backup
Data String - The full secret data returned during backup. JSON format.
- secret
Data StringKey - The data key ciphertext returned during backup. Base64 encoded.
- signature String
- The signature of the backup data returned during backup. Base64 encoded.
Outputs
All input properties are implicitly available as output properties. Additionally, the SecretRestore resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing SecretRestore Resource
Get an existing SecretRestore 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?: SecretRestoreState, opts?: CustomResourceOptions): SecretRestore@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_data: Optional[str] = None,
secret_data_key: Optional[str] = None,
signature: Optional[str] = None) -> SecretRestorefunc GetSecretRestore(ctx *Context, name string, id IDInput, state *SecretRestoreState, opts ...ResourceOption) (*SecretRestore, error)public static SecretRestore Get(string name, Input<string> id, SecretRestoreState? state, CustomResourceOptions? opts = null)public static SecretRestore get(String name, Output<String> id, SecretRestoreState state, CustomResourceOptions options)resources: _: type: volcengine:kms:SecretRestore 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.
- Backup
Data string - The full secret data returned during backup. JSON format.
- Secret
Data stringKey - The data key ciphertext returned during backup. Base64 encoded.
- Signature string
- The signature of the backup data returned during backup. Base64 encoded.
- Backup
Data string - The full secret data returned during backup. JSON format.
- Secret
Data stringKey - The data key ciphertext returned during backup. Base64 encoded.
- Signature string
- The signature of the backup data returned during backup. Base64 encoded.
- backup
Data String - The full secret data returned during backup. JSON format.
- secret
Data StringKey - The data key ciphertext returned during backup. Base64 encoded.
- signature String
- The signature of the backup data returned during backup. Base64 encoded.
- backup
Data string - The full secret data returned during backup. JSON format.
- secret
Data stringKey - The data key ciphertext returned during backup. Base64 encoded.
- signature string
- The signature of the backup data returned during backup. Base64 encoded.
- backup_
data str - The full secret data returned during backup. JSON format.
- secret_
data_ strkey - The data key ciphertext returned during backup. Base64 encoded.
- signature str
- The signature of the backup data returned during backup. Base64 encoded.
- backup
Data String - The full secret data returned during backup. JSON format.
- secret
Data StringKey - The data key ciphertext returned during backup. Base64 encoded.
- signature String
- The signature of the backup data returned during backup. Base64 encoded.
Import
The KmsSecretRestore is not support import.
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
volcengineTerraform Provider.
