Skip to content

Commit 92ec228

Browse files
author
Steven Nemetz
committed
Upgrade label module and define new tag variables
1 parent ade8f67 commit 92ec228

File tree

2 files changed

+63
-15
lines changed

2 files changed

+63
-15
lines changed

main.tf

+22-10
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,42 @@ module "enabled" {
3030

3131
module "label" {
3232
source = "devops-workflow/label/local"
33-
version = "0.1.3"
34-
organization = "${var.organization}"
33+
version = "0.2.0"
34+
attributes = "${var.attributes}"
35+
component = "${var.component}"
36+
delimiter = "${var.delimiter}"
37+
environment = "${var.environment}"
38+
monitor = "${var.monitor}"
3539
name = "${var.name}"
3640
namespace-env = "${var.namespace-env}"
3741
namespace-org = "${var.namespace-org}"
38-
environment = "${var.environment}"
39-
delimiter = "${var.delimiter}"
40-
attributes = "${var.attributes}"
42+
organization = "${var.organization}"
43+
owner = "${var.owner}"
44+
product = "${var.product}"
45+
service = "${var.service}"
4146
tags = "${var.tags}"
47+
team = "${var.team}"
4248
}
4349

4450
# TODO: need to support from var both basename and a complete name
4551
# may have 1 log bucket for many apps
4652
module "log_bucket" {
4753
source = "devops-workflow/label/local"
48-
version = "0.1.3"
49-
organization = "${var.organization}"
54+
version = "0.2.0"
55+
attributes = "${var.attributes}"
56+
component = "${var.component}"
57+
delimiter = "${var.delimiter}"
58+
environment = "${var.environment}"
59+
monitor = "${var.monitor}"
5060
name = "${var.log_bucket_name}"
5161
namespace-env = true
5262
namespace-org = true
53-
environment = "${var.environment}"
54-
delimiter = "${var.delimiter}"
55-
attributes = "${var.attributes}"
63+
organization = "${var.organization}"
64+
owner = "${var.owner}"
65+
product = "${var.product}"
66+
service = "${var.service}"
5667
tags = "${var.tags}"
68+
team = "${var.team}"
5769
}
5870

5971
/*

variables.tf

+41-5
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,80 @@ variable "attributes" {
77
default = []
88
}
99

10+
variable "component" {
11+
description = "TAG: Underlying, dedicated piece of service (Cache, DB, ...)"
12+
type = "string"
13+
default = "UNDEF-LB"
14+
}
15+
1016
variable "delimiter" {
1117
description = "Delimiter to be used between `name`, `namespaces`, `attributes`, etc."
1218
type = "string"
1319
default = "-"
1420
}
1521

1622
variable "environment" {
17-
description = "Environment (ex: dev, qa, stage, prod)"
23+
description = "Environment (ex: `dev`, `qa`, `stage`, `prod`). (Second or top level namespace. Depending on namespacing options)"
1824
type = "string"
1925
}
2026

27+
variable "monitor" {
28+
description = "TAG: Should resource be monitored"
29+
type = "string"
30+
default = "UNDEF-LB"
31+
}
32+
2133
variable "name" {
2234
description = "Base name for resource"
2335
type = "string"
2436
}
2537

2638
variable "namespace-env" {
27-
description = "Prefix name with the environment"
39+
description = "Prefix name with the environment. If true, format is: <env>-<name>"
2840
default = true
2941
}
3042

3143
variable "namespace-org" {
32-
description = "Prefix name with the organization. If both env and org namespaces are used, format will be <org>-<env>-<name>"
44+
description = "Prefix name with the organization. If true, format is: <org>-<env namespaced name>. If both env and org namespaces are used, format will be <org>-<env>-<name>"
3345
default = false
3446
}
3547

3648
variable "organization" {
37-
description = "Organization name"
49+
description = "Organization name (Top level namespace)"
3850
type = "string"
3951
default = ""
4052
}
4153

54+
variable "owner" {
55+
description = "TAG: Owner of the service"
56+
type = "string"
57+
default = "UNDEF-LB"
58+
}
59+
60+
variable "product" {
61+
description = "TAG: Company/business product"
62+
type = "string"
63+
default = "UNDEF-LB"
64+
}
65+
66+
variable "service" {
67+
description = "TAG: Application (microservice) name"
68+
type = "string"
69+
default = "UNDEF-LB"
70+
}
71+
4272
variable "tags" {
43-
description = "A map of additional tags to add"
73+
description = "A map of additional tags"
4474
type = "map"
4575
default = {}
4676
}
4777

78+
variable "team" {
79+
description = "TAG: Department/team of people responsible for service"
80+
type = "string"
81+
default = "UNDEF-LB"
82+
}
83+
4884
//
4985
// Module specific Variables
5086
//

0 commit comments

Comments
 (0)