-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make the audit role template_url configurable #1
base: main
Are you sure you want to change the base?
Changes from 4 commits
87c4f49
cf7cff4
919c9e8
0807d40
d5444e3
f4723d7
8fdf4f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,15 +85,15 @@ organization = { | |
accounts = { | ||
dev = { | ||
account_name = "primeharbor-kickstart-dev" | ||
account_email = ""[email protected]" | ||
account_email = "[email protected]" | ||
} | ||
it = { | ||
account_name = "primeharbor-kickstart-it" | ||
account_email = ""[email protected]" | ||
account_email = "[email protected]" | ||
} | ||
sandbox = { | ||
account_name = "primeharbor-kickstart-sandbox" | ||
account_email = ""[email protected]" | ||
account_email = "[email protected]" | ||
parent_ou_id = "ou-yyyy-yyyyyyyy" | ||
} | ||
} | ||
|
@@ -112,8 +112,7 @@ organization = { | |
phone_number = "+14041234567" | ||
} | ||
|
||
organization_units = { | ||
|
||
organizational_units = { | ||
"bu1" = { | ||
name = "business_unit_1" | ||
is_child_of_root = true | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
# # Copyright 2024 Chris Farris <[email protected]> | ||
# # | ||
# # Licensed under the Apache License, Version 2.0 (the "License"); | ||
# # you may not use this file except in compliance with the License. | ||
# # You may obtain a copy of the License at | ||
# # | ||
# # http://www.apache.org/licenses/LICENSE-2.0 | ||
# # | ||
# # Unless required by applicable law or agreed to in writing, software | ||
# # distributed under the License is distributed on an "AS IS" BASIS, | ||
# # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# # See the License for the specific language governing permissions and | ||
# # limitations under the License. | ||
# Copyright 2024 Chris Farris <[email protected]> | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
resource "aws_sns_topic" "billing_alerts" { | ||
|
@@ -44,4 +44,4 @@ resource "aws_sns_topic_subscription" "billing_alerts" { | |
topic_arn = aws_sns_topic.billing_alerts[0].arn | ||
protocol = "email" | ||
endpoint = each.key | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ Overview | |
cat import-org.tf | ||
``` | ||
3. Review the import-org.tf file for accuracy. | ||
4. Run the teraform plan to create the security account (if one doesn't already exist) | ||
4. Run the terraform plan to create the security account (if one doesn't already exist) | ||
```bash | ||
terraform plan -out=${env}-terraform.tfplan -no-color -var-file="${env}.tfvars" -target module.organization.module.security_account | ||
``` | ||
|
@@ -57,8 +57,6 @@ Overview | |
make tf-plan | ||
``` | ||
|
||
|
||
|
||
If you see the following error: | ||
``` | ||
Error: listing Organizations Accounts for parent (r-117h) and descendants: AccessDeniedException: You don't have permissions to access this resource. | ||
|
@@ -85,7 +83,7 @@ git submodule add https://github.com/primeharbor/pht-account-configurator | |
git submodule init | ||
git submodule update | ||
|
||
EOF | ||
<!--EOF | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the below seemed to be a note to self, I figured not rendering it would make sense. Up to you |
||
--- | ||
|
||
|
||
|
@@ -164,7 +162,6 @@ make env=$env tf-init | |
./tf-import.sh module.organization.aws_organizations_organizational_unit.suspended_ou ou-rrrr-uuuuuuu | ||
|
||
|
||
|
||
# Import all the AWS accounts | ||
bash ./import_accounts.sh | ||
``` | ||
|
@@ -201,4 +198,5 @@ make tf-show | grep "will be updated" | |
... | ||
# module.organization.module.security_account.aws_organizations_account.account will be updated in-place | ||
|
||
``` | ||
``` | ||
--> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,11 +28,11 @@ organization = { | |
disable_sso_management = false | ||
deploy_audit_role = true | ||
audit_role_name = "security-audit" | ||
audit_role_template_url = "https://s3.amazonaws.com/pht-cloudformation/aws-account-automation/AuditRole-Template.yaml" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even though it's not required, I figured it would still be a good idea to highlight that it's configurable in the example here; I'd be good removing it and using the default if you prefer. |
||
vpc_flowlogs_bucket_name = "primeharbor-kickstart-flowlogs" | ||
macie_bucket_name = "primeharbor-kickstart-macie-findings" | ||
|
||
organization_units = { | ||
|
||
organizational_units = { | ||
"MemeFactories" = { | ||
name = "MemeFactories" | ||
is_child_of_root = true | ||
|
@@ -41,7 +41,6 @@ organization = { | |
name = "CoreIT" | ||
is_child_of_root = true | ||
} | ||
|
||
} | ||
|
||
accounts = { | ||
|
@@ -170,4 +169,4 @@ organization = { | |
] | ||
} | ||
|
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,6 @@ else | |
REPO=github.com/primeharbor/org-kickstart//modules/security_services?ref=$VERSION | ||
fi | ||
|
||
REPO=/Users/chris/AWS/org-kickstart/modules/security_services | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assume this was an unintentional leave-behind from troubleshooting or maybe bootstrapping the project |
||
|
||
REGIONS=`aws ec2 describe-regions | jq -r '.Regions[].RegionName'` | ||
|
||
# Over write the existing files because we can't have duplicates | ||
|
@@ -73,4 +71,4 @@ EOF | |
|
||
done | ||
|
||
echo "You may need to re-run terraform init" | ||
echo "You may need to re-run terraform init" |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,4 +49,3 @@ resource "aws_organizations_organization" "org" { | |
|
||
feature_set = "ALL" | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seemed to make sense to rename this