Skip to content

Commit

Permalink
Changing the regional policy name. (#28)
Browse files Browse the repository at this point in the history
Moving this to being a variable as currently
it blocks Autospotting being deployed more
than once.
  • Loading branch information
lazzurs authored Jul 13, 2020
1 parent 56090de commit 27d2378
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/regional/main.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@

variable "autospotting_lambda_arn" {}
module "label" {
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=0.13.0"
context = var.label_context
}

resource "aws_iam_role" "iam_for_lambda" {
name = "iam_for_lambda"
name = "${module.label.id}-iam_for_lambda"

assume_role_policy = <<EOF
{
Expand Down
32 changes: 32 additions & 0 deletions modules/regional/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
variable "autospotting_lambda_arn" {}

# Label configuration
variable "label_context" {
description = "Used to pass in label module context"
type = object({
namespace = string
environment = string
stage = string
name = string
enabled = bool
delimiter = string
attributes = list(string)
label_order = list(string)
tags = map(string)
additional_tag_map = map(string)
regex_replace_chars = string
})
default = {
namespace = ""
environment = ""
stage = ""
name = ""
enabled = true
delimiter = ""
attributes = []
label_order = []
tags = {}
additional_tag_map = {}
regex_replace_chars = ""
}
}

0 comments on commit 27d2378

Please sign in to comment.