我正在尝试使用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文档中找不到与此问题相关的任何内容
答案 0 :(得分:0)
此错误代表密钥材料不再存储。使用其他密钥或更新此密钥 更多信息在这里: https://cloud.google.com/kms/docs/reference/rpc/google.cloud.kms.v1#google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState