File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
modules/integrations/cloud-logs Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -171,20 +171,20 @@ data "aws_iam_policy_document" "cloudlogs_s3_access" {
171171# SNS Topic and Subscription for CloudTrail notifications
172172# -----------------------------------------------------------------------------------------------------------------------
173173provider aws {
174- alias = " sns "
174+ alias = " sns_default "
175175 region = local. topic_region
176176}
177177
178178resource "aws_sns_topic" "cloudtrail_notifications" {
179179 count = var. create_topic ? 1 : 0
180- provider = aws. sns
180+ provider = try ( aws. sns , aws . sns_default )
181181 name = local. topic_name
182182 tags = var. tags
183183}
184184
185185resource "aws_sns_topic_policy" "cloudtrail_notifications" {
186186 count = var. create_topic ? 1 : 0
187- provider = aws. sns
187+ provider = try ( aws. sns , aws . sns_default )
188188 arn = aws_sns_topic. cloudtrail_notifications [0 ]. arn
189189 policy = jsonencode ({
190190 Version = " 2012-10-17"
@@ -205,7 +205,7 @@ resource "aws_sns_topic_policy" "cloudtrail_notifications" {
205205resource "aws_sns_topic_subscription" "cloudtrail_notifications" {
206206 count = ! local. is_cross_account_topic ? 1 : 0
207207 topic_arn = var. topic_arn
208- provider = aws. sns
208+ provider = try ( aws. sns , aws . sns_default )
209209 protocol = " https"
210210 endpoint = local. ingestion_url
211211
You can’t perform that action at this time.
0 commit comments