This is an automated email from the ASF dual-hosted git repository.

lfrolov pushed a commit to branch DATALAB-2410
in repository https://gitbox.apache.org/repos/asf/incubator-datalab.git


The following commit(s) were added to refs/heads/DATALAB-2410 by this push:
     new ac4c95e  [DATALAB-2410]: added sensitive values hiding
ac4c95e is described below

commit ac4c95e359312e5b723c81c0255bd59396203725
Author: leonidfrolov <[email protected]>
AuthorDate: Thu Jun 10 16:00:05 2021 +0300

    [DATALAB-2410]: added sensitive values hiding
---
 infrastructure-provisioning/terraform/bin/datalab.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/infrastructure-provisioning/terraform/bin/datalab.py 
b/infrastructure-provisioning/terraform/bin/datalab.py
index 6eb2f3c..a253a7f 100644
--- a/infrastructure-provisioning/terraform/bin/datalab.py
+++ b/infrastructure-provisioning/terraform/bin/datalab.py
@@ -106,6 +106,11 @@ def get_var_args_string(cli_args):
     """
     args = extract_args(cli_args)
     args = ["-var '{0}={1}'".format(key, value) for key, value in args]
+    for key, value in args:
+        if key in ["secret_access_key", "access_key_id", "ldap_host", 
"ldap_user", "ldap_bind_creds", "mongo_password"]:
+            value = '*****'
+        args_hidden = ["-var '{0}={1}'".format(key, value)]
+    logging.info(' '.join(args_hidden))
     return ' '.join(args)
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to