Gcloud kms错误:crypto_key_version.state:已销毁,但必须启用

时间:2018-11-09 05:11:04

标签: gcloud secret-key

我正在尝试使用google kms加密一个秘密,如下所示:

gcloud kms encrypt --ciphertext-file=encrypted_secret --plaintext-file=secret --key very_secret_key --keyring=very_secret_ring --location=very secret_location 

并出现以下错误:

ERROR: (gcloud.kms.encrypt) FAILED_PRECONDITION: The request cannot be fulfilled. Resource projects/amazing_project/locations/very_secret_location/keyRings/very_secret_keyring/cryptoKeys/very_secret_key/cryptoKeyVersions/1 has crypto_key_version.state: DESTROYED, but ENABLED is required.

感谢任何输入,因为我在GCP文档中找不到与此问题相关的任何内容

1 个答案:

答案 0 :(得分:0)

此错误代表密钥材料不再存储。使用其他密钥或更新此密钥 更多信息在这里: https://cloud.google.com/kms/docs/reference/rpc/google.cloud.kms.v1#google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState