Skip to content

Commit

Permalink
Cleaning up user delegates.
Browse files Browse the repository at this point in the history
  • Loading branch information
gitwater committed Jun 16, 2021
1 parent 2b16aa6 commit 3e34f46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
22 changes: 2 additions & 20 deletions src/paco/cftemplates/iam_user_account_delegates.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,23 +142,6 @@ def init_deploymentpipelines_permission(self, permission_config, assume_role_res
}
)


# Some actions in the pipeline might be in different account so we must
# iterate the pipeline stages and actions and add them too.
# for action in pipeline_config.source:
# account_name = None
# if action.type == 'CodeDeploy.Deploy':
# asg_ref = Reference(action.auto_scaling_group)
# asg_config = asg_ref.resolve()
# account_name = self.paco_ctx.get_ref(asg_config.get_account().paco_ref + '.name')
# self.init_codedeploy_permission(pipeline_ref, assume_role_res)

#for action in pipeline_config.build:
# account_name = None
# if action.type == 'CodeBuild.Build':
# self.init_codebuild_permission(pipeline_ref, assume_role_res)


self.deployment_pipeline_codepipeline_permissions(pipeline_list, assume_role_res)
self.deployment_pipeline_codebuild_permissions(pipeline_list, assume_role_res)

Expand Down Expand Up @@ -224,6 +207,8 @@ def deployment_pipeline_codepipeline_permissions(self, pipeline_list, assume_rol
)
)



managed_policy_res = troposphere.iam.ManagedPolicy(
title=self.create_cfn_logical_id("CodePipelinePolicy"),
PolicyDocument=PolicyDocument(
Expand All @@ -237,9 +222,6 @@ def deployment_pipeline_codepipeline_permissions(self, pipeline_list, assume_rol
def deployment_pipeline_codebuild_permissions(self, pipeline_list, assume_role_res):
statement_list = []

list_pipelines_actions = [
Action('codepipeline', 'ListPipelines')
]
readonly_actions = [
Action('codebuild', 'BatchGet*'),
Action('codebuild', 'Get*'),
Expand Down
2 changes: 1 addition & 1 deletion src/paco/stack/stack_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def filtered_stack_action(self, stack, action_method):
if stack_ref == self.filter_config or stack_ref.startswith(self.filter_config + '.'):
action_method()
else:
stack.log_action(action_method.__func__.__name__.capitalize(), 'Filtered')
stack.log_action('Filtered', 'Filtered')

# methods specific to CloudFormation Stacks
def add_new_stack(
Expand Down

0 comments on commit 3e34f46

Please sign in to comment.