CryptoKeyVersionArgs

data class CryptoKeyVersionArgs(val cryptoKey: Output<String>? = null, val state: Output<String>? = null) : ConvertibleToJava<CryptoKeyVersionArgs>

A CryptoKeyVersion represents an individual cryptographic key, and the associated key material. Destroying a cryptoKeyVersion will not delete the resource from the project. To get more information about CryptoKeyVersion, see:

Example Usage

Kms Crypto Key Version Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.kms.KeyRing;
import com.pulumi.gcp.kms.KeyRingArgs;
import com.pulumi.gcp.kms.CryptoKey;
import com.pulumi.gcp.kms.CryptoKeyArgs;
import com.pulumi.gcp.kms.CryptoKeyVersion;
import com.pulumi.gcp.kms.CryptoKeyVersionArgs;
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 keyring = new KeyRing("keyring", KeyRingArgs.builder()
.location("global")
.build());
var cryptokey = new CryptoKey("cryptokey", CryptoKeyArgs.builder()
.keyRing(keyring.id())
.rotationPeriod("100000s")
.build());
var example_key = new CryptoKeyVersion("example-key", CryptoKeyVersionArgs.builder()
.cryptoKey(cryptokey.id())
.build());
}
}

Import

CryptoKeyVersion can be imported using any of these accepted formats:

$ pulumi import gcp:kms/cryptoKeyVersion:CryptoKeyVersion default {{name}}

Constructors

Link copied to clipboard
constructor(cryptoKey: Output<String>? = null, state: Output<String>? = null)

Properties

Link copied to clipboard
val cryptoKey: Output<String>? = null

The name of the cryptoKey associated with the CryptoKeyVersions. Format: 'projects/{{project}}/locations/{{location}}/keyRings/{{keyring}}/cryptoKeys/{{cryptoKey}}'

Link copied to clipboard
val state: Output<String>? = null

The current state of the CryptoKeyVersion. Possible values are: PENDING_GENERATION, ENABLED, DISABLED, DESTROYED, DESTROY_SCHEDULED, PENDING_IMPORT, IMPORT_FAILED.

Functions

Link copied to clipboard
open override fun toJava(): CryptoKeyVersionArgs