Skip to content

Commit

Permalink
adding developer iam role
Browse files Browse the repository at this point in the history
  • Loading branch information
lonnix committed Aug 17, 2021
1 parent 5f0e050 commit 3e293a9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion setup_sso/setup_sso.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def __init__(
self.saml_provider_arn = f"arn:{self.aws_partition}:iam::{self.account_id}:saml-provider/{self.saml_provider_name}"
self.roles_arn = {
'SSOAdministratorAccess': f"arn:{self.aws_partition}:iam::{self.account_id}:role/SSOAdministratorAccess",
'SSOViewOnlyAccess': f"arn:{self.aws_partition}:iam::{self.account_id}:role/SSOViewOnlyAccess"
'SSOViewOnlyAccess': f"arn:{self.aws_partition}:iam::{self.account_id}:role/SSOViewOnlyAccess",
'SSODeveloperAccess': f"arn:{self.aws_partition}:iam::{self.account_id}:role/SSODeveloperAccess"
}
self.client = self.session.client('iam', endpoint_url=self.endpoint_url)

Expand Down Expand Up @@ -190,6 +191,13 @@ def create_default_roles(self) -> None:
policy_arn=read_policy_arn,
policy_document=policy_document
)
read_role_name = 'SSODeveloperAccess'
read_policy_arn = f"arn:{aws_partition}:iam::aws:policy/SystemAdministrator"
self.create_role(
role_name=read_role_name,
policy_arn=read_policy_arn,
policy_document=policy_document
)
except Exception as e:
self.log.exception("Creation of default roles failed with error %s", e)

Expand Down

0 comments on commit 3e293a9

Please sign in to comment.