Skip to content

Commit 801c91c

Browse files
author
Ray
authored
Clarifying Documentation around StackSets
I don't think we are setup to send messages across accounts so a Main Stack needs to exist for each account.
1 parent cea4136 commit 801c91c

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

README.md

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,35 @@ We suggest that you deploy your main stack to one of these regions, however, if
4949

5050
### Option 1: Deploy through the AWS CLI
5151

52-
__Main Stack__
52+
Deploy this stack set first in all desired accounts in a single "master" region. This stack is responsible for consuming events from each account it is deployed to, in all regions.
53+
54+
__Main StackSet__
5355

5456
```bash
5557
export REGION=ap-southeast-2 # set this to the region you plan to deploy to
56-
aws cloudformation create-stack \
58+
aws cloudformation create-stack-set \
5759
--template-url https://gorillastack-autotag-releases.s3-ap-southeast-2.amazonaws.com/templates/autotag_event_main-template.json \
58-
--stack-name AutoTag \
60+
--stack-set-name AutoTag \
5961
--region $REGION \
6062
--capabilities CAPABILITY_NAMED_IAM \
6163
--parameters ParameterKey=CodeS3Bucket,ParameterValue=gorillastack-autotag-releases-$REGION \
6264
ParameterKey=CodeS3Path,ParameterValue=autotag-0.5.0.zip \
6365
ParameterKey=AutoTagDebugLogging,ParameterValue=Disabled \
6466
ParameterKey=AutoTagTagsCreateTime,ParameterValue=Enabled \
6567
ParameterKey=AutoTagTagsInvokedBy,ParameterValue=Enabled
68+
# optionally list your stack sets
69+
aws cloudformation list-stack-sets --region $REGION
70+
# deploy the stack set across all accounts and regions you want
71+
aws cloudformation create-stack-instances \
72+
--stack-set-name AutoTag \
73+
--region $REGION \
74+
--accounts '["account_ID_1","account_ID_2"]' \
75+
--regions '["$REGION"]' \
76+
--operation-preferences FailureToleranceCount=0,MaxConcurrentCount=20
6677
```
6778

79+
After the main stack status is CREATE_COMPLETE deploy the collector stack to each region where AWS resources should be tagged. This stack deploys the CloudWatch Event Rule and the SNS Topic.
80+
6881
__Collector StackSet__
6982

7083
```bash
@@ -84,18 +97,21 @@ aws cloudformation create-stack-instances \
8497
--region $REGION \
8598
--accounts '["account_ID_1","account_ID_2"]' \
8699
--regions '["ap-southeast-2", "ap-south-1", "eu-west-3", "eu-west-2", "eu-west-1", "ap-northeast-2", "ap-northeast-1", "sa-east-1", "ca-central-1", "ap-southeast-1", "eu-central-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2"]' \
87-
--operation-preferences FailureToleranceCount=0,MaxConcurrentCount=1
100+
--operation-preferences FailureToleranceCount=0,MaxConcurrentCount=20
88101
```
89102

90103
### Option 2: Deploy through the AWS Console
91104

92-
__Main Stack__
105+
__Main StackSet__
93106

94-
Deploy this stack first in a single "master" region. This stack is responsible for consuming events from all accounts, in all regions.
107+
Deploy this stack set first in all desired accounts in a single "master" region. This stack is responsible for consuming events from each account it is deployed to, in all regions.
95108

109+
1. Read about the [CloudFormation StackSet Concepts](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html)
110+
1. Follow the instructions in the [CloudFormation StackSet Prerequisites](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html). To quickly deploy the requisite roles through the AWS CLI, [see the prerequisites section above](#prerequisites).
96111
1. Go to the [CloudFormation console](https://console.aws.amazon.com/cloudformation/home)
97-
1. Click the CloudFormation drop-down button and select "Stack"
98-
1. Click the blue "Create Stack" button
112+
tion drop-down button and select "Stack"
113+
1. Click the blue "Create StackSet" button
114+
1. Provide the local account number and the regions to deploy to, then click the blue "Next" button
99115
1. Select "Amazon S3 URL" and enter `https://gorillastack-autotag-releases.s3-ap-southeast-2.amazonaws.com/templates/autotag_event_main-template.json`
100116
1. Name the stack "AutoTag" - this cannot be changed
101117
1. In the parameter section:
@@ -105,13 +121,12 @@ Deploy this stack first in a single "master" region. This stack is responsible f
105121
* AutoTagDebugLoggingOnFailure: Enable/Disable Debug Logging when the Lambda Function has a failure
106122
* AutoTagTagsCreateTime: Enable/Disable the "CreateTime" tagging for all resources
107123
* AutoTagTagsInvokedBy: Enable/Disable the "InvokedBy" tagging for all resources (when it is provided)
108-
124+
1. Select a single master region, and enter the accountIds that you want to deploy the StackSet to.
125+
109126
__Collector StackSet__
110127

111128
After the main stack status is CREATE_COMPLETE deploy the collector stack to each region where AWS resources should be tagged. This stack deploys the CloudWatch Event Rule and the SNS Topic.
112129

113-
1. Read about the [CloudFormation StackSet Concepts](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-concepts.html)
114-
1. Follow the instructions in the [CloudFormation StackSet Prerequisites](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html). To quickly deploy the requisite roles through the AWS CLI, [see the prerequisites section above](#prerequisites).
115130
1. Go to the [CloudFormation console](https://console.aws.amazon.com/cloudformation/home)
116131
1. Click the blue "Create StackSet" button
117132
1. Provide the local account number and the regions to deploy to, then click the blue "Next" button

0 commit comments

Comments
 (0)