Skip to content

Commit

Permalink
Feat/enable aws nuke scp for nuke role (#301)
Browse files Browse the repository at this point in the history
* feat: update name and description

* feat: enable aws nuke protection on scratch OU

* fix: fmt
  • Loading branch information
gcharest authored Jul 24, 2024
1 parent 87dc4c5 commit b863f5d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions terragrunt/org_account/organization/organizations.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ resource "aws_organizations_policy_attachment" "Sandbox-cds_snc_universal_guardr
target_id = aws_organizations_organizational_unit.Sandbox.id
}

resource "aws_organizations_policy_attachment" "Sandbox-aws_nuke_guardrails" {
policy_id = aws_organizations_policy.aws_nuke_guardrails.id
target_id = aws_organizations_organizational_unit.Sandbox.id
}


resource "aws_organizations_organizational_unit" "Security" {
name = "Security"
Expand Down
7 changes: 4 additions & 3 deletions terragrunt/org_account/organization/scp.tf
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ data "aws_iam_policy_document" "aws_nuke_guardrails" {
}

resource "aws_organizations_policy" "aws_nuke_guardrails" {
name = "Control Tower Guardrails"
type = "SERVICE_CONTROL_POLICY"
content = data.aws_iam_policy_document.aws_nuke_guardrails.json
name = "AWS Nuke Guardrails"
description = "Guardrails to protect AWS Control Tower and AWS SSO resources"
type = "SERVICE_CONTROL_POLICY"
content = data.aws_iam_policy_document.aws_nuke_guardrails.json
}

0 comments on commit b863f5d

Please sign in to comment.