Commit 911e1109 authored by Chris Merrett's avatar Chris Merrett

Updated README.md to include example for child accounts

parent a0d03932
Pipeline #821 passed with stage
in 6 seconds
...@@ -10,7 +10,6 @@ Input Variables ...@@ -10,7 +10,6 @@ Input Variables
- `environment` - The environment name that you're assigning. As this module is designed for "ops" accounts, "ops" is the default. - `environment` - The environment name that you're assigning. As this module is designed for "ops" accounts, "ops" is the default.
- `child_accounts` - A list of AWS account ID's that will also be writing Cloudtrail information to the ops bucket. - `child_accounts` - A list of AWS account ID's that will also be writing Cloudtrail information to the ops bucket.
Outputs Outputs
------- -------
...@@ -42,3 +41,16 @@ module "cloudtrail_ops" { ...@@ -42,3 +41,16 @@ module "cloudtrail_ops" {
child_accounts = "${var.aws_child_accounts}" child_accounts = "${var.aws_child_accounts}"
} }
``` ```
2.) Add the following snippet to any child accounts template, so "production" or "staging" for example. You **do not** need this for ops.
```
#############################################################################################################
# CloudTrail
#############################################################################################################
resource "aws_cloudtrail" "ops-cloudtrail" {
name = "${var.name}-ops-cloudtrail"
s3_bucket_name = "${var.name}-ops-cloudtrail"
include_global_service_events = true
}
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment