-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Allow IAM role to be passed to the module (#37)
- Loading branch information
1 parent
a3bba83
commit 216ec0b
Showing
32 changed files
with
98 additions
and
827 deletions.
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
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 |
---|---|---|
|
@@ -52,3 +52,5 @@ test.auto.tfvars* | |
|
||
# Lambda deployment build | ||
.package | ||
.external_modules | ||
builds/ |
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
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
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 |
---|---|---|
@@ -1,26 +1,22 @@ | ||
resource "aws_iam_policy" "cost_explorer_access_policy" { | ||
path = "/" | ||
|
||
policy = jsonencode({ | ||
Version = "2012-10-17" | ||
Statement = concat([ | ||
{ | ||
Effect = "Allow" | ||
Action = [ | ||
"ce:GetCostAndUsage" | ||
], | ||
Resource = "*" | ||
}], | ||
[for aws_sns_topic in aws_sns_topic.cost_notifier : | ||
{ | ||
Effect = "Allow" | ||
Action = [ | ||
"sns:Publish" | ||
] | ||
Resource = aws_sns_topic.arn | ||
}] | ||
) | ||
}) | ||
|
||
tags = var.tags | ||
locals { | ||
policy_statements = merge({ | ||
ce_permissions = { | ||
effect = "Allow" | ||
actions = [ | ||
"ce:GetCostAndUsage", | ||
"iam:ListAccountAliases" | ||
] | ||
resources = ["*"] | ||
} | ||
}, | ||
local.no_of_emails != 0 ? { | ||
sns_permissions = { | ||
effect = "Allow" | ||
actions = [ | ||
"sns:Publish" | ||
] | ||
resources = [for aws_sns_topic in aws_sns_topic.cost_notifier : aws_sns_topic.arn] | ||
} | ||
} : {} | ||
) | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.