Created
October 25, 2020 18:15
-
-
Save mesmacosta/5267710d13e961b39a96f1a800bf7670 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def _get_secrets_manager_property(property_name): | |
| client = secretmanager.SecretManagerServiceClient() | |
| project_id = os.environ.get('DATACATALOG_PROJECT_ID') | |
| secret_path = client.secret_version_path(project_id, property_name, 'latest') | |
| response = client.access_secret_version(secret_path) | |
| return response.payload.data.decode('UTF-8') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment