Skip to content

Commit

Permalink
Merge pull request #13 from stat-kwon/master
Browse files Browse the repository at this point in the history
Change creation roles method of service account
  • Loading branch information
stat-kwon authored May 3, 2024
2 parents 47080e1 + 0b2e209 commit ed3175f
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/cloudforet/plugin/manager/iam_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,17 @@ def create_cloud_service(self, options, secret_data, schema):
"projects_info", []
)

roles = self._create_roles(
self.project_role_binding_map[current_project_id].get(
roles = []
if current_project_roll_bindings := self.project_role_binding_map.get(
current_project_id
):
if role_binding_for_current_service_account := current_project_roll_bindings.get(
f"serviceAccount:{email}"
),
project_roles,
)
):
roles = self._create_roles(
role_binding_for_current_service_account,
project_roles,
)

service_account["display"] = {
"inheritInfo": org_and_folder_inheritance,
Expand Down

0 comments on commit ed3175f

Please sign in to comment.