Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking change: Rename var.tags to var.default_tags #44

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ module "alb-athena-example" {
name = "alb-logs-example-production"
workgroup_bucket = "athena-workgroup-alb-logs-example-production"

tags = {
app = "example"
env = "production"
}

resource_specific_tags = {
s3_bucket = {
owner = "athena"
Expand Down
2 changes: 1 addition & 1 deletion _test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module "athena" {
name = "alb-logs-example-production"
workgroup_bucket = "athena-workgroup-alb-logs-example-production"

tags = {
default_tags = {
app = "some-service"
env = "production"
}
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ resource "aws_s3_bucket" "athena-workspace" {
force_destroy = var.force_destroy

tags = merge(
var.tags,
var.default_tags,
lookup(var.resource_specific_tags, "s3_bucket", {})
)
}
Expand Down Expand Up @@ -68,7 +68,7 @@ resource "aws_athena_workgroup" "this" {
}

tags = merge(
var.tags,
var.default_tags,
lookup(var.resource_specific_tags, "athena_workgroup", {})
)
}
18 changes: 9 additions & 9 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
variable "default_tags" {
type = map(string)
default = {}

description = <<EOS
Map of tags assigned to all AWS resources created by this module.
EOS
}

variable "force_destroy" {
type = bool
default = false
Expand Down Expand Up @@ -33,15 +42,6 @@ The workgroup's engine version.
EOS
}

variable "tags" {
type = map(string)
default = {}

description = <<EOS
Map of tags assigned to all AWS resources created by this module.
EOS
}

variable "workgroup_bucket" {
type = string

Expand Down