Skip to content

Commit

Permalink
Enable tags to be added from outside the module (#95)
Browse files Browse the repository at this point in the history
* Add tags from outside the module

* Update README
  • Loading branch information
skskjourney authored Nov 11, 2024
1 parent e68c01e commit b92bdea
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions aws/iam-service-role/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions aws/iam-service-role/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ resource "aws_iam_role" "this" {
path = var.role_path
description = var.role_description
assume_role_policy = data.aws_iam_policy_document.assume_role.json

tags = var.role_tags
}

resource "aws_iam_role_policy_attachment" "this" {
Expand Down
6 changes: 6 additions & 0 deletions aws/iam-service-role/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,9 @@ variable "role_sts_externalid" {
type = list(string)
default = []
}

variable "role_tags" {
description = "Tags for IAM Role"
type = map(string)
default = {}
}

0 comments on commit b92bdea

Please sign in to comment.