def get_secret()

in chaostoolkit-examples/cloudsql-cloudrun-pbr-fault-injection/app/cloudruncode/main.py [0:0]


def get_secret(name):
    print("1------------------")
     # Create the Secret Manager client.
    client = secretmanager.SecretManagerServiceClient()


    print("3------------------")
    # Access the secret version.
    response = client.access_secret_version(request={"name": name})

    # Print the secret payload.
    #
    # WARNING: Do not print the secret in a production environment - this
    # snippet is showing how to access the secret material.
    return response.payload.data.decode("UTF-8")