-
Notifications
You must be signed in to change notification settings - Fork 0
/
defaults.tf
50 lines (45 loc) · 1.7 KB
/
defaults.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/* DEFAULT VARIABLES */
locals {
tags = {
Project = local.workspace["project_name"]
Environ = local.workspace["environ"]
Product = "ui-lambda-edge-tf"
Contact = "vivek.kumar@happay.in"
Requester = "vivek.kumar@happay.in"
Creator = "vivek.kumar@happay.in"
ManagedBy = "tf" # tf, cf, man
Encryption = "yes" # yes, no
Department = "tech" # tech, marketing, accounts etc
Compliance = "non-pci" # pci, non-pci, hipaa etc
ProductVersion = "v1" # v1,v2
ApplicationId = "ui-happay-dot-com-lambda-edge-tf" # Must be same a bitbucket repo name
Stack = "Infra" # frontend #backend, storage-db, storage-file, jobs-cron
AlertGroupEmail = "vivek.kumar@happay.in"
}
}
locals {
meta = {
name_prefix = "hpy-${local.workspace["environ"]}-${local.workspace["project_name"]}"
ssm_ps_np = "/happay/${var.environ}/${var.project}"
region_name = local.workspace["region_name"]
}
}
################ DEFAULT LOCALS - DEFINE ENV VARIABLES FOR APP #################
locals {
env = {
default = {
project_name = var.project
region_name = var.region
environ = var.environ
kms_key_arn = data.aws_ssm_parameter.kms_key_arn.value
}
default_list = {
}
################ EXPORTING ENV/WORKSPACE VARIABLES FOR APP #################
}
workspace = merge(local.env["default"])
workspace_lists = merge(local.env["default_list"])
}
data "aws_ssm_parameter" "kms_key_arn" {
name = "/happay/${var.environ}/regional-shared/kms_key_arn"
}