Skip to content

Commit 8963cbf

Browse files
committed
initial commit
1 parent fd921b9 commit 8963cbf

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ terraform.tfstate
55
.idea
66
.external_momdules
77
*.zip
8+
*.DS_Store

main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ resource "aws_iam_role_policy_attachment" "additional" {
4141
}
4242

4343
# Add inline policies (provided as JSON documents)
44-
resource "aws_iam_role_policy" "inline" {
45-
count = var.role_arn == null ? length(var.inline_policies) : 0
44+
resource "aws_iam_role_policy" "additional_policy_docs" {
45+
count = var.role_arn == null ? length(var.additional_policy_docs) : 0
4646
name = "${var.function_name}-inline-${count.index}"
4747
role = aws_iam_role.default[0].id
48-
policy = var.inline_policies[count.index]
48+
policy = var.additional_policy_docs[count.index]
4949
}
5050
# =============================================================================
5151
# CLOUDWATCH LOG GROUP

variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ variable "additional_policy_arns" {
286286
type = list(string)
287287
default = []
288288
}
289-
variable "inline_policies" {
289+
variable "additional_policy_docs" {
290290
type = list(string)
291291
default = []
292292
description = "List of inline IAM policy JSON documents"

0 commit comments

Comments
 (0)