You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by dm...@apache.org on 2019/07/19 11:32:27 UTC
[incubator-dlab] branch develop updated: IAM Role creation fixed
This is an automated email from the ASF dual-hosted git repository.
dmysakovets pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git
The following commit(s) were added to refs/heads/develop by this push:
new 045cb51 IAM Role creation fixed
new 84d0115 Merge pull request #176 from bodnarmykola/DLAB-748
045cb51 is described below
commit 045cb51460cc9bd5a5f60eb32a1eab0cc61196f4
Author: Mykola_Bodnar1 <bo...@gmail.com>
AuthorDate: Fri Jul 19 13:52:57 2019 +0300
IAM Role creation fixed
---
infrastructure-provisioning/src/general/lib/aws/actions_lib.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
index 8caeff9..eb52205 100644
--- a/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
+++ b/infrastructure-provisioning/src/general/lib/aws/actions_lib.py
@@ -543,10 +543,10 @@ def create_iam_role(role_name, role_profile, region, service='ec2', tag=None):
if 'conf_billing_tag_key' in os.environ and 'conf_billing_tag_value' in os.environ:
conn.tag_role(RoleName=role_name, Tags=[{'Key': os.environ['conf_billing_tag_key'],
'Value': os.environ['conf_billing_tag_value']}])
- if os.environ['project_tag']:
+ if 'project_tag' in os.environ:
conn.tag_role(RoleName=role_name, Tags=[{'Key': "project_tag",
'Value': os.environ['project_tag']}])
- if os.environ['project_name']:
+ if 'project_name' in os.environ:
conn.tag_role(RoleName=role_name, Tags=[{'Key': "project_name",
'Value': os.environ['project_name']}])
except botocore.exceptions.ClientError as e_role:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org