diff --git a/docs/conf.py b/docs/conf.py index 3f9e6066..be2475db 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -82,7 +82,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. diff --git a/kingpin/actors/aws/iam/entities.py b/kingpin/actors/aws/iam/entities.py index c3b26fea..638ac7da 100644 --- a/kingpin/actors/aws/iam/entities.py +++ b/kingpin/actors/aws/iam/entities.py @@ -886,7 +886,7 @@ class Role(EntityBaseActor): ), "assume_role_policy_document": ( str, - '{"Version": "2012-10-17", "Statement": [{"Effect": "Allow", "Principal": {"Service": "ec2.amazonaws.com"}, "Action": "sts:AssumeRole" }]}', + None, ("The policy that grants an entity" "permission to assume the role"), ), } @@ -909,9 +909,20 @@ def __init__(self, *args, **kwargs): self._parse_inline_policies(self.option("inline_policies")) # Pre-parse the Assume Role Policy Document if it was supplied - self.assume_role_policy_doc = self._parse_policy_json( - self.option("assume_role_policy_document") - ) + self.assume_role_policy_doc = { + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": {"Service": "ec2.amazonaws.com"}, + "Action": "sts:AssumeRole", + } + ], + } + if self.option("assume_role_policy_document") is not None: + self.assume_role_policy_doc = self._parse_policy_json( + self.option("assume_role_policy_document") + ) @gen.coroutine def _ensure_assume_role_doc(self, name): diff --git a/kingpin/version.py b/kingpin/version.py index 49b9b59d..72342752 100644 --- a/kingpin/version.py +++ b/kingpin/version.py @@ -13,4 +13,4 @@ # Copyright 2018 Nextdoor.com, Inc -__version__ = "2.0.2" +__version__ = "2.0.3"