-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
79 lines (74 loc) · 2.5 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
AWSTemplateFormatVersion: '2010-09-09'
Description: DNS Domain Management
Metadata:
DnsRoot:
localTemplateFile: &dns_zone_template_body ./stacksets/dns-zone/stackset.yaml
DnsCfnCr:
localTemplateFile: &cfn_cr_template_body ./stacksets/cfn-cr/translated-stackset.json
Parameters:
TargetOuIds:
Type: CommaDelimitedList
Description: Target deployment OU IDs
TargetAccountIds:
Type: CommaDelimitedList
Description: Target Accounts
TargetRegions:
Type: CommaDelimitedList
Description: Target deployment region
RootDomainName:
Type: String
Description: Root domain name
Resources:
DnsRootDomain:
Type: AWS::CloudFormation::StackSet
Properties:
StackSetName: DnsRootDomain
Description: DNS Root Domain
Parameters:
- ParameterKey: RootDomainName
ParameterValue: !Ref RootDomainName
StackInstancesGroup:
- DeploymentTargets:
AccountFilterType: INTERSECTION
OrganizationalUnitIds: !Ref TargetOuIds
Accounts: !Ref TargetAccountIds
Regions: !Ref TargetRegions
AutoDeployment:
Enabled: true
RetainStacksOnAccountRemoval: false
ManagedExecution:
Active: true
OperationPreferences:
RegionConcurrencyType: PARALLEL
FailureToleranceCount: 1
MaxConcurrentCount: 5
PermissionModel: SERVICE_MANAGED
TemplateBody: *dns_zone_template_body
DnsCfnCr:
Type: AWS::CloudFormation::StackSet
DependsOn: DnsRootDomain # We need the root domain to be created firsy so this stack can
# get the DNS zone ID.
Properties:
StackSetName: DnsCfnCr
Description: DNS CloudFormation Custom Resources
#Parameters: # We don't need parameters for this stackset because it uses SSM params to
# find values. It's the only way we can get the Hosted Zone ID
StackInstancesGroup:
- DeploymentTargets:
AccountFilterType: INTERSECTION
OrganizationalUnitIds: !Ref TargetOuIds
Accounts: !Ref TargetAccountIds
Regions: !Ref TargetRegions
AutoDeployment:
Enabled: true
RetainStacksOnAccountRemoval: false
ManagedExecution:
Active: true
OperationPreferences:
RegionConcurrencyType: PARALLEL
FailureToleranceCount: 1
MaxConcurrentCount: 5
PermissionModel: SERVICE_MANAGED
Capabilities:
- CAPABILITY_IAM
TemplateBody: *cfn_cr_template_body