Skip to content

Commit

Permalink
Disambiguate logs (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
osterman authored Sep 28, 2017
1 parent 7bd0871 commit b469077
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
17 changes: 9 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module "origin_label" {
stage = "${var.stage}"
name = "${var.name}"
delimiter = "${var.delimiter}"
attributes = ["origin"]
attributes = ["${compact(concat(var.attributes, list("origin")))}"]
tags = "${var.tags}"
}

Expand All @@ -18,7 +18,7 @@ module "logs" {
stage = "${var.stage}"
name = "${var.name}"
delimiter = "${var.delimiter}"
attributes = ["logs"]
attributes = ["${compact(concat(var.attributes, list("origin", "logs")))}"]
tags = "${var.tags}"
prefix = "${var.log_prefix}"
standard_transition_days = "${var.log_standard_transition_days}"
Expand All @@ -27,12 +27,13 @@ module "logs" {
}

module "distribution_label" {
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
delimiter = "${var.delimiter}"
tags = "${var.tags}"
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.2.1"
namespace = "${var.namespace}"
stage = "${var.stage}"
name = "${var.name}"
attributes = "${var.attributes}"
delimiter = "${var.delimiter}"
tags = "${var.tags}"
}

resource "aws_cloudfront_distribution" "default" {
Expand Down
5 changes: 5 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ variable "namespace" {}

variable "stage" {}

variable "attributes" {
type = "list"
default = []
}

variable "tags" {
default = {}
}
Expand Down

0 comments on commit b469077

Please sign in to comment.