-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joeri Malmberg
committed
Jan 12, 2024
1 parent
d04683c
commit 419d577
Showing
51 changed files
with
1,666 additions
and
285 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.54.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
include { | ||
path = find_in_parent_folders() | ||
} | ||
|
||
include "remote_state" { | ||
path = find_in_parent_folders("remote_state.hcl") | ||
} | ||
|
||
terraform { | ||
source = "tfr:///blackbird-cloud/account-info/aws//?version=1.0.2" | ||
} | ||
|
||
inputs = { | ||
aws_sso_permission_sets = ["AdministratorAccess"] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
include { | ||
path = find_in_parent_folders() | ||
} | ||
|
||
include "remote_state" { | ||
path = find_in_parent_folders("remote_state.hcl") | ||
} | ||
|
||
dependency "account" { | ||
config_path = "../..//01-account" | ||
} | ||
|
||
locals { | ||
policies = read_terragrunt_config(find_in_parent_folders("policies.hcl")).locals | ||
global = read_terragrunt_config(find_in_parent_folders("global.hcl")).locals | ||
} | ||
|
||
terraform { | ||
source = "tfr:///blackbird-cloud/kms-key/aws//?version=1.0.0" | ||
} | ||
|
||
inputs = { | ||
name = "terraform-state" | ||
|
||
policy = <<EOF | ||
{ | ||
"Version": "2012-10-17", | ||
"Id": "mykey-policy", | ||
"Statement": [ | ||
${local.policies.statements.keys_account_root}, | ||
{ | ||
"Sid": "Allow keys account Administrators to manage the KMS key.", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"AWS": [ | ||
"${dependency.account.outputs.sso_roles.AdministratorAccess.arn}", | ||
"arn:aws:iam::${dependency.account.outputs.account_id}:role/${local.global.github_role_name}" | ||
] | ||
}, | ||
"Action": ${local.policies.actions.key_admin}, | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Sid": "Allow management account to assign usage of the KMS key.", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"AWS": "arn:aws:iam::${local.global.management_account_id}:root" | ||
}, | ||
"Action":${local.policies.actions.key_usage}, | ||
"Resource": "*" | ||
}, | ||
{ | ||
"Sid": "Allow GitHub bootstrap usage of the KMS key.", | ||
"Effect": "Allow", | ||
"Principal": { | ||
"AWS": "${local.global.github_actions_state_role_arn}" | ||
}, | ||
"Action": ${local.policies.actions.key_usage}, | ||
"Resource": "*" | ||
} | ||
] | ||
} | ||
EOF | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.