Use Cloud KMS To Encrypt Passphrase Part 3

Dev Thakkar
Nov 20, 2021

Continued from part 2

Scenario: User requiring application to encrypt “passphrase” before it is stored in database

Step 7: Deploy to Cloud Run

  • Install Cloud Code extension in VS Code
  • From VS Code Command Palette Select => Cloud Code : Deploy to Cloud Run
  • Complete as below
  • Click on Deploy to continue
  • Above step will (a) build application Docker image and store in google container register (b) Deploy container to Cloud Run server [kmstest]

Step 8: Test from Postman

  • Prior to test add role “Cloud KMS Cryptokey Encrypter/Decrypter” to compute service account. This service account was auto created in prior Deploy step

Step 9: Delete the project along with all resources (optional)

> gcloud projects delete kmstest

--

--