File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ def decrypt_kms_api_key(kms_client, ciphertext):
5050def get_api_key () -> str :
5151 """
5252 Gets the Datadog API key from the environment variables or secrets manager.
53- Extracts the result to a global value to avoid repeated calls to the secrets manager from different products.
53+ Extracts the result to a global value to avoid repeated calls to the
54+ secrets manager from different products.
5455 """
5556 global api_key
5657 if api_key :
@@ -61,9 +62,7 @@ def get_api_key() -> str:
6162 DD_API_KEY_SECRET_ARN = os .environ .get ("DD_API_KEY_SECRET_ARN" , "" )
6263 DD_API_KEY_SSM_NAME = os .environ .get ("DD_API_KEY_SSM_NAME" , "" )
6364 DD_KMS_API_KEY = os .environ .get ("DD_KMS_API_KEY" , "" )
64- DD_API_KEY = os .environ .get (
65- "DD_API_KEY" , os .environ .get ("DATADOG_API_KEY" , "" )
66- )
65+ DD_API_KEY = os .environ .get ("DD_API_KEY" , os .environ .get ("DATADOG_API_KEY" , "" ))
6766
6867 if DD_API_KEY_SECRET_ARN :
6968 api_key = boto3 .client ("secretsmanager" ).get_secret_value (
You can’t perform that action at this time.
0 commit comments