-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
attempt to get CW OAM links deployed
- Loading branch information
Showing
4 changed files
with
91 additions
and
1 deletion.
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,43 @@ | ||
Metadata: | ||
OamSink: | ||
localTemplateFile: &template_body ./template.yaml | ||
|
||
AWSTemplateFormatVersion: '2010-09-09' | ||
Transform: AWS::Serverless-2016-10-31 | ||
Description: AWS account infrastructure stackset (CW OAM Link) | ||
|
||
Parameters: | ||
AwsOrgRootId: | ||
Type: CommaDelimitedList | ||
Description: Root ID of the AWS Organization | ||
TargetRegions: | ||
Type: CommaDelimitedList | ||
Description: Regions to deploy to | ||
AwsOamSinkArn: | ||
Type: String | ||
Description: ARN of CW OAM Sink | ||
|
||
Resources: | ||
CloudWatchOamLinkStackSet: | ||
Type: AWS::CloudFormation::StackSet | ||
Properties: | ||
StackSetName: CloudWatchOamLink | ||
Description: CloudWatch OAM Link | ||
Parameters: | ||
- ParameterKey: AwsOamSinkArn | ||
ParameterValue: !Ref AwsOamSinkArn | ||
StackInstancesGroup: | ||
- DeploymentTargets: | ||
OrganizationalUnitIds: !Ref AwsOrgRootId | ||
Regions: !Ref TargetRegions | ||
AutoDeployment: | ||
Enabled: true | ||
RetainStacksOnAccountRemoval: false | ||
ManagedExecution: | ||
Active: true | ||
OperationPreferences: | ||
RegionConcurrencyType: PARALLEL | ||
FailureToleranceCount: 1 | ||
MaxConcurrentCount: 5 | ||
PermissionModel: SERVICE_MANAGED | ||
TemplateBody: *template_body |
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,32 @@ | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Description: AWS CloudWatch OAM Sink | ||
|
||
Parameters: | ||
AwsOamSinkArn: | ||
Type: String | ||
Description: ARN of CW OAM Sink | ||
|
||
Conditions: | ||
SkipSinkAccount: !Not [ | ||
!Equals [ | ||
!Ref AWS::AccountId, !Select [ | ||
"4", !Split [ | ||
":", !Ref AwsOamSinkArn] | ||
] | ||
] | ||
] | ||
|
||
|
||
Resources: | ||
OamSink: | ||
Type: AWS::Oam::Link | ||
Condition: SkipSinkAccount | ||
Properties: | ||
LabelTemplate: "$AccountName" | ||
ResourceTypes: | ||
- AWS::CloudWatch::Metric | ||
- AWS::Logs::LogGroup | ||
- AWS::XRay::Trace | ||
- AWS::ApplicationInsights::Application | ||
- AWS::InternetMonitor::Monitor | ||
SinkIdentifier: !Ref AwsOamSinkArn |
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