Skip to content

Commit

Permalink
Remove trusted advisor
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Robinson <patrick.robinson@bertelsmann.de>
  • Loading branch information
autarchprinceps committed Sep 12, 2023
1 parent df90dc5 commit 8cab62f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 32 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ package-lock.json
# CDK asset staging directory
.cdk.staging
cdk.out

.DS_Store
.vscode
32 changes: 0 additions & 32 deletions lib/cdk-opswatch-metric-stream-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,37 +142,5 @@ export class CdkOpswatchMetricStreamStack extends Stack {
namespace: 'TrustedAdvisor'
}]
});
const topic = new sns.CfnTopic(this, 'TrustedAdvisorTopic', {
topicName: 'trusted_advisor'
});
const topic_policy = new sns.CfnTopicPolicy(this, 'TrustedAdvisorTopicPolicy', {
topics: [Fn.join('', [
'arn:aws:sns:',
Stack.of(this).region,
':',
Stack.of(this).account,
':',
topic.attrTopicName
])],
policyDocument: new iam.PolicyDocument({
statements: [new iam.PolicyStatement({
actions: ['SNS:Publish'],
principals: [new iam.ServicePrincipal('events.amazonaws.com')],
resources: ['*']
})]
})
});
const subscription = new sns.CfnSubscription(this, 'TrsutedAdvisorSubscription', {
topicArn: Fn.join('', [
'arn:aws:sns:',
Stack.of(this).region,
':',
Stack.of(this).account,
':',
topic.attrTopicName
]),
endpoint: param_file_content.url + '/trusted_advisor',
protocol: sns.SubscriptionProtocol.HTTPS
});
}
}

0 comments on commit 8cab62f

Please sign in to comment.