Skip to content

Commit

Permalink
Enable sample SCPs at root level
Browse files Browse the repository at this point in the history
  • Loading branch information
san99tiago committed Sep 22, 2023
1 parent fed7cf7 commit 2788595
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cdk/stacks/cdk_organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(
# Organization creation, services configuration and SCPs
self.create_root_organization()
self.configure_organization_services()
# self.configure_service_control_policies()
self.configure_service_control_policies()

# Create "sandbox" OU with inner OUs and accounts inside
self.create_ou_sandbox()
Expand Down Expand Up @@ -114,7 +114,6 @@ def configure_service_control_policies(self):
description="SCP to prevent accounts from leaving the organization",
)
self.organization.attach_policy(self.policy_deny_leave_org)
self.policy_deny_leave_org.node.add_dependency(self.organization)

# SCP for only allow access to specific regions in AWS (deny others)
self.policy_allow_specific_regions = Policy(
Expand All @@ -126,7 +125,6 @@ def configure_service_control_policies(self):
description="SCP to only allow access to specific AWS Regions",
)
self.organization.attach_policy(self.policy_allow_specific_regions)
self.policy_allow_specific_regions.node.add_dependency(self.organization)

def create_ou_sandbox(self):
"""
Expand Down

0 comments on commit 2788595

Please sign in to comment.