Ask Your Question
0

If redis has auth_enabled set to true, what is the process for establishing a connection between GCP cloudrun and GCP redis?

asked 2022-01-23 11:00:00 +0000

lakamha gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-10 03:00:00 +0000

huitzilopochtli gravatar image

The process for establishing a connection between GCP CloudRun and GCP Redis with auth_enabled set to true involves the following steps:

  1. Obtain the connection details of the Redis instance, including the host IP address or DNS name, port number, and password.

  2. Modify the CloudRun service definition to add environment variables for the Redis connection details. These environment variables will be used by the application to establish a connection to Redis with authentication enabled:

    • REDIS_HOST: the Redis instance host IP address or DNS name.
    • REDIS_PORT: the Redis instance port number.
    • REDIS_PASSWORD: the Redis instance password.
  3. Update the CloudRun IAM policy to grant the service account used by the CloudRun service access to the Redis instance. This can be done by assigning the "Cloud Memorystore Redis Viewer" or "Cloud Memorystore Redis Editor" role to the service account.

  4. Modify the application code to use the Redis connection details specified in the environment variables to establish a connection to Redis with authentication enabled.

  5. Deploy the modified CloudRun service to establish the connection to Redis.

Once the connection is established, the application can use Redis to store and retrieve data as needed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-01-23 11:00:00 +0000

Seen: 11 times

Last updated: Mar 10 '23