Hi,
What exactly is the block for fetching the key, and using it for decryption and encryption?
What error you get?
Do you have role 'roles/cloudkms.cryptoKeyEncrypterDecrypter', as per
this guide? More permissions listed
here.
Is the key you are trying to use primary, or secondary? Secondary keys are only used for decryption, as
stated in here.
Is the key in the enabled state?
Please note that this group is for a general type of questions, and according to its
description "
To get the quickest solution, we recommend you ask specific technical questions like "how do I…" or "what does this error mean?" on StackOverflow or ServerFault"