-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon.hcl
74 lines (67 loc) · 2.95 KB
/
common.hcl
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# common variables to the project
locals { # inputs can't reference themselves, so we use locals first
resourcetier = get_env("TF_VAR_resourcetier", "")
# absolute project tags
vpcname_rendervpc = "${local.resourcetier}rendervpc"
projectname_rendervpc = "firehawk-render-cluster" # A tag to recognise resources created in this project
common_tags_rendervpc = {
"environment" : get_env("TF_VAR_environment", ""),
"resourcetier" : get_env("TF_VAR_resourcetier", ""),
"conflictkey" : get_env("TF_VAR_conflictkey", ""),
"pipelineid" : get_env("TF_VAR_pipelineid", ""),
"accountid" : get_env("TF_VAR_account_id", ""),
"owner" : get_env("TF_VAR_owner", ""),
"region" : get_env("AWS_DEFAULT_REGION", ""),
"vpcname" : local.vpcname_rendervpc,
"projectname" : local.projectname_rendervpc,
"terraform" : "true",
}
vpcname_vaultvpc = "${local.resourcetier}vaultvpc"
projectname_vaultvpc = "firehawk-main" # A tag to recognise resources created in this project
common_tags_vaultvpc = {
"environment" : get_env("TF_VAR_environment", ""),
"resourcetier" : get_env("TF_VAR_resourcetier", ""),
"conflictkey" : get_env("TF_VAR_conflictkey", ""),
"pipelineid" : get_env("TF_VAR_pipelineid", ""),
"accountid" : get_env("TF_VAR_account_id", ""),
"owner" : get_env("TF_VAR_owner", ""),
"region" : get_env("AWS_DEFAULT_REGION", ""),
"vpcname" : local.vpcname_vaultvpc,
"projectname" : local.projectname_vaultvpc,
"terraform" : "true",
}
vpcname_deployervpc = "${local.resourcetier}deployervpc"
projectname_deployervpc = "firehawk-main" # A tag to recognise resources created in this project
common_tags_deployervpc = {
"environment" : get_env("TF_VAR_environment", ""),
"resourcetier" : get_env("TF_VAR_resourcetier", ""),
"conflictkey" : get_env("TF_VAR_conflictkey", ""),
"pipelineid" : get_env("TF_VAR_pipelineid", ""),
"accountid" : get_env("TF_VAR_account_id", ""),
"owner" : get_env("TF_VAR_owner", ""),
"region" : get_env("AWS_DEFAULT_REGION", ""),
"vpcname" : local.vpcname_deployervpc,
"projectname" : local.projectname_deployervpc,
"terraform" : "true",
}
### tags for this project ###
vpcname = local.vpcname_rendervpc
projectname = local.projectname_rendervpc
common_tags = local.common_tags_rendervpc
}
inputs = {
resourcetier = local.resourcetier
vpcname_rendervpc = local.vpcname_rendervpc
projectname_rendervpc = local.projectname_rendervpc
common_tags_rendervpc = local.common_tags_rendervpc
vpcname_vaultvpc = local.vpcname_vaultvpc
projectname_vaultvpc = local.projectname_vaultvpc
common_tags_vaultvpc = local.common_tags_vaultvpc
vpcname_deployervpc = local.vpcname_deployervpc
projectname_deployervpc = local.projectname_deployervpc
common_tags_deployervpc = local.common_tags_deployervpc
# tags for this project
vpcname = local.vpcname
projectname = local.projectname
common_tags = local.common_tags
}