@hiiretail/gcp-infra-cli 0.83.1 → 0.83.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators/docs/rca/templates/docs/rca.md +20 -17
- package/generators/init/clan-infra/index.js +5 -11
- package/generators/init/clan-infra/templates/env/project.hcl +4 -1
- package/generators/init/clan-infra/templates/env/secrets/terragrunt.hcl +10 -8
- package/generators/init/clan-infra/templates/infra/common.hcl +20 -15
- package/generators/init/clan-infra/templates/notification-channels/notification-channels.yaml +7 -0
- package/generators/init/clan-infra/templates/notification-channels/terragrunt.hcl +13 -6
- package/generators/resources/cloud-storage/templates/cloud-storage/terragrunt.hcl +7 -8
- package/generators/resources/cloudsql/index.js +0 -8
- package/generators/resources/cloudsql/templates/mssql/instance/terragrunt.hcl +11 -12
- package/generators/resources/cloudsql/templates/mssql/instance-secrets/terragrunt.hcl +12 -16
- package/generators/resources/cloudsql/templates/mysql/instance/terragrunt.hcl +10 -10
- package/generators/resources/cloudsql/templates/mysql/instance-secrets/terragrunt.hcl +13 -16
- package/generators/resources/cloudsql/templates/postgres/instance/terragrunt.hcl +6 -7
- package/generators/resources/cloudsql/templates/postgres/instance-secrets/terragrunt.hcl +7 -8
- package/generators/resources/cloudsql-database/templates/mysql/secrets/terragrunt.hcl +11 -10
- package/generators/resources/cloudsql-database/templates/postgres/secrets/terragrunt.hcl +11 -10
- package/generators/resources/firestore/index.js +0 -7
- package/generators/resources/kms/templates/kms/terragrunt.hcl +10 -10
- package/generators/resources/memorystore/index.js +0 -7
- package/generators/resources/memorystore/templates/redis-instance/terragrunt.hcl +7 -9
- package/generators/resources/memorystore/templates/secrets/terragrunt.hcl +11 -15
- package/generators/resources/monitoring/handle-yaml.js +21 -3
- package/generators/resources/monitoring/index.js +12 -30
- package/generators/resources/monitoring/templates/alerts/{alerts.yaml → generic-infra.yaml} +0 -18
- package/generators/resources/monitoring/templates/alerts/service.yaml +16 -0
- package/generators/resources/monitoring/templates/alerts/terragrunt.hcl +13 -14
- package/generators/resources/monitoring/templates/slos/slos.yaml +3 -3
- package/generators/resources/monitoring/templates/slos/terragrunt.hcl +19 -18
- package/generators/resources/monitoring/templates/uptime-checks/terragrunt.hcl +15 -18
- package/generators/resources/pubsub/index.js +0 -7
- package/generators/resources/pubsub/templates/pubsub/terragrunt.hcl +7 -14
- package/generators/resources/pubsub/templates/pubsub-dlq/terragrunt.hcl +25 -32
- package/generators/resources/spanner/templates/spanner/terragrunt.hcl +16 -17
- package/package.json +1 -1
- package/generators/resources/cloudsql/templates/monitoring/cloud-sql/terragrunt.hcl +0 -34
- package/generators/resources/cloudsql/templates/monitoring/notification-channels/terragrunt.hcl +0 -22
- package/generators/resources/firestore/templates/monitoring/firestore/terragrunt.hcl +0 -34
- package/generators/resources/firestore/templates/monitoring/notification-channels/terragrunt.hcl +0 -22
- package/generators/resources/memorystore/templates/monitoring/memorystore/terragrunt.hcl +0 -34
- package/generators/resources/memorystore/templates/monitoring/notification-channels/terragrunt.hcl +0 -22
- package/generators/resources/monitoring/templates/notification-channels/terragrunt.hcl +0 -22
- package/generators/resources/pubsub/templates/monitoring/notification-channels/terragrunt.hcl +0 -22
- package/generators/resources/pubsub/templates/monitoring/pubsub/terragrunt.hcl +0 -34
|
@@ -6,27 +6,27 @@
|
|
|
6
6
|
|
|
7
7
|
**Incident end**: <!-- The date and time when the incident was resolved, for example: 2022-06-14 14.53 CET -->
|
|
8
8
|
|
|
9
|
-
**Problem statement**: <!-- Describe
|
|
9
|
+
**Problem statement**: <!-- Describe what the problem was. It is important to keep this short, one or two sentances are enough. Example: An Out of Memory error was thrown -->
|
|
10
10
|
|
|
11
11
|
**Impacted customer(s)**: <!-- What customer(s) that were affected -->
|
|
12
12
|
|
|
13
|
-
**Impact to customer**: <!-- Describe how the customer, and end customers, was affected by the incident -->
|
|
13
|
+
**Impact to customer**: <!-- Describe how the customer, and end customers, was affected by the incident. Where they completely unable to use the system? Or was there some feature that wasn't working? -->
|
|
14
14
|
|
|
15
15
|
**Ticket information**: <!-- Add link(s) to any Jira issues -->
|
|
16
16
|
|
|
17
|
-
**Services involved**: <!-- List the
|
|
17
|
+
**Services involved**: <!-- List the Hii Retail-service(s) that were involved in the incident, for example checkout-poslog -->
|
|
18
18
|
|
|
19
19
|
## Sequence of Events
|
|
20
20
|
|
|
21
21
|
<!--
|
|
22
|
-
Describe the events that caused the incident, starting from
|
|
22
|
+
Describe the events that caused the incident, starting from when the issues started up until the incident was resolved. If no alert was triggered, the first event would be when the issues first started.
|
|
23
23
|
|
|
24
24
|
Example:
|
|
25
25
|
|
|
26
|
-
2022-06-14 14.36 - Alert X was triggered
|
|
27
|
-
2022-06-14 14.36 - Team started working on the incident
|
|
28
|
-
2022-06-14 14.49 - A fix was pushed and deployed
|
|
29
|
-
2022-06-14 14.53 - Incident was resolved
|
|
26
|
+
- 2022-06-14 14.36 - Alert X was triggered
|
|
27
|
+
- 2022-06-14 14.36 - Team started working on the incident
|
|
28
|
+
- 2022-06-14 14.49 - A fix was pushed and deployed
|
|
29
|
+
- 2022-06-14 14.53 - Incident was resolved
|
|
30
30
|
-->
|
|
31
31
|
|
|
32
32
|
## Five Whys
|
|
@@ -54,22 +54,25 @@ Problem: The vehicle won't start
|
|
|
54
54
|
## Summary
|
|
55
55
|
|
|
56
56
|
<!--
|
|
57
|
-
|
|
57
|
+
This section should be written last, when all of the other bullets in the RCA has been written. The summary should include:
|
|
58
|
+
|
|
59
|
+
* What the problem statement was, what the root cause of it was and a short summary of the highest prioritized action points.
|
|
58
60
|
-->
|
|
59
61
|
|
|
60
62
|
## Action items
|
|
61
63
|
|
|
62
64
|
<!--
|
|
63
|
-
A table that describes the different actions that was the outcome of the analysis
|
|
64
|
-
|
|
65
|
+
A table that describes the different actions that was the outcome of the analysis and who is the owner of the task. The table should be in order of priority.
|
|
66
|
+
|
|
67
|
+
When creating Jira issues, add the label "RCA" to them.
|
|
65
68
|
|
|
66
69
|
Example:
|
|
67
|
-
| Description | Owner |
|
|
70
|
+
| Description | Owner | Jira issue |
|
|
68
71
|
|-------------|-------|------|--------|
|
|
69
|
-
| Create alert for high CPU Usage | Bob the Builder |
|
|
70
|
-
| | | |
|
|
72
|
+
| Create alert for high CPU Usage | Bob the Builder | HII-1234 |
|
|
73
|
+
| | | |
|
|
71
74
|
-->
|
|
72
75
|
|
|
73
|
-
| Description | Owner |
|
|
74
|
-
|
|
75
|
-
| | |
|
|
76
|
+
| Description | Owner | Jira issue |
|
|
77
|
+
|-------------|-------|------------|
|
|
78
|
+
| | | |
|
|
@@ -58,7 +58,7 @@ module.exports = class extends BaseGenerator {
|
|
|
58
58
|
{
|
|
59
59
|
type: 'input',
|
|
60
60
|
name: 'jiraProjectKey',
|
|
61
|
-
message: 'Provide the "jira project key" for your clan
|
|
61
|
+
message: 'Provide the "jira project key" for your clan, which is the prefix of your task names (e.g. srt, hii, hcc)',
|
|
62
62
|
validate: required && validate.jiraProjectKey,
|
|
63
63
|
},
|
|
64
64
|
{
|
|
@@ -135,16 +135,10 @@ module.exports = class extends BaseGenerator {
|
|
|
135
135
|
createEnv('staging', tribeStaging, clanStaging);
|
|
136
136
|
|
|
137
137
|
// Init notification channels for clan
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
{
|
|
143
|
-
...this.answers,
|
|
144
|
-
env,
|
|
145
|
-
},
|
|
146
|
-
);
|
|
147
|
-
});
|
|
138
|
+
this.copyDir('notification-channels',
|
|
139
|
+
path.join('infra', 'prod', 'monitoring', 'notification-channels'),
|
|
140
|
+
this.answers);
|
|
141
|
+
|
|
148
142
|
this.copyDir('github',
|
|
149
143
|
this.destinationPath(path.join('.github')),
|
|
150
144
|
{
|
|
@@ -8,5 +8,8 @@ locals {
|
|
|
8
8
|
project = local.project_id
|
|
9
9
|
network = "tribe-network"
|
|
10
10
|
tribe_project_id = "<%-tribeProject%>"
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
default_user_labels = {
|
|
13
|
+
environment = local.project_env,
|
|
14
|
+
}
|
|
12
15
|
}
|
|
@@ -7,6 +7,12 @@ terraform {
|
|
|
7
7
|
locals {
|
|
8
8
|
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
9
9
|
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
10
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
11
|
+
component = local.common_vars.locals.component
|
|
12
|
+
product = local.common_vars.locals.product
|
|
13
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
14
|
+
terraform = ""
|
|
15
|
+
})
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
# Include all settings from the root terragrunt.hcl file
|
|
@@ -14,16 +20,12 @@ include {
|
|
|
14
20
|
path = find_in_parent_folders("terragrunt_root.hcl")
|
|
15
21
|
}
|
|
16
22
|
|
|
17
|
-
|
|
18
23
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
19
24
|
inputs = merge(
|
|
20
25
|
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
terraform = ""
|
|
26
|
-
cc = local.common_vars.locals.cost_center
|
|
27
|
-
}
|
|
26
|
+
secrets = merge(yamldecode(file("${get_terragrunt_dir()}/secrets.yaml")).secrets,
|
|
27
|
+
{ "clan_slack_channel" = local.common_vars.locals.clan_slack_channels[0].name })
|
|
28
|
+
project_id = local.project_vars.locals.project_id
|
|
29
|
+
labels = local.labels
|
|
28
30
|
}
|
|
29
31
|
)
|
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
# Set clan-wide variables here. These are automatically pulled in at the root terragrunt.hcl configuration to
|
|
2
2
|
# set the remote state configuration and to feed variables forward to the child modules.
|
|
3
3
|
locals {
|
|
4
|
-
tribe_name
|
|
5
|
-
clan_name
|
|
6
|
-
region
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
project_id_slack_token
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
4
|
+
tribe_name = "<%-tribe%>"
|
|
5
|
+
clan_name = "<%-clan%>"
|
|
6
|
+
region = "europe-west1"
|
|
7
|
+
cost_center = "<%-costCenter%>"
|
|
8
|
+
jira_project_key = "<%-jiraProjectKey%>"
|
|
9
|
+
component = "<%-component%>"
|
|
10
|
+
product = "<%-product%>"
|
|
11
|
+
tenant_alias = "<%-tenantAlias%>"
|
|
12
|
+
|
|
13
|
+
project_id_slack_token = "tf-admin-90301274"
|
|
14
|
+
slack_token_secret_name = "monitoring-slack-token"
|
|
15
|
+
|
|
16
|
+
clan_group_email = "tribe-<%-tribe%>-<%-clan%>@extendaretail.com"
|
|
17
|
+
clan_slack_channels = [{ name = "#<%-tribe%>-<%-clan%>-monitor" }]
|
|
18
|
+
|
|
19
|
+
default_user_labels = {
|
|
20
|
+
clan = local.clan_name
|
|
21
|
+
cc = local.cost_center
|
|
22
|
+
jira_project_key = local.jira_project_key
|
|
23
|
+
}
|
|
19
24
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Terragrunt will copy the Terraform configurations specified by the source parameter, along with any files in the
|
|
2
2
|
# working directory, into a temporary folder, and execute your Terraform commands in that folder.
|
|
3
3
|
terraform {
|
|
4
|
-
source = "git::https://github.com/extenda/tf-module-gcp-notification-channels//?ref=
|
|
4
|
+
source = "git::https://github.com/extenda/tf-module-gcp-notification-channels//?ref=v1.0.1"
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
# Include all settings from the root terragrunt.hcl file
|
|
@@ -12,11 +12,18 @@ include {
|
|
|
12
12
|
locals {
|
|
13
13
|
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
14
14
|
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
15
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
16
|
+
component = local.common_vars.locals.component
|
|
17
|
+
product = local.common_vars.locals.product
|
|
18
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
19
|
+
})
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
18
|
-
inputs =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
inputs = {
|
|
24
|
+
project = local.project_vars.locals.tribe_project_id,
|
|
25
|
+
notification_channels = yamldecode(file("${get_terragrunt_dir()}/notification-channels.yaml"))
|
|
26
|
+
slack_token_secret_project_id = local.common_vars.locals.project_id_slack_token,
|
|
27
|
+
slack_token_secret_name = local.common_vars.locals.slack_token_secret_name,
|
|
28
|
+
default_user_labels = local.labels,
|
|
29
|
+
}
|
|
@@ -12,6 +12,11 @@ include {
|
|
|
12
12
|
locals {
|
|
13
13
|
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
14
14
|
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
15
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
16
|
+
component = local.common_vars.locals.component
|
|
17
|
+
product = local.common_vars.locals.product
|
|
18
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
19
|
+
})
|
|
15
20
|
}
|
|
16
21
|
|
|
17
22
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
@@ -21,13 +26,7 @@ inputs = merge(
|
|
|
21
26
|
{
|
|
22
27
|
project_id = local.project_vars.locals.project_id
|
|
23
28
|
# IAM-style members who will be granted roles/storage.objectViewer on all buckets.
|
|
24
|
-
viewers
|
|
25
|
-
labels
|
|
26
|
-
cc = local.common_vars.locals.cost_center
|
|
27
|
-
component = local.common_vars.locals.component
|
|
28
|
-
product = local.common_vars.locals.product
|
|
29
|
-
tenant-alias = local.common_vars.locals.tenant_alias
|
|
30
|
-
environment = local.project_vars.locals.project_env
|
|
31
|
-
}
|
|
29
|
+
viewers = ["group:${local.common_vars.locals.clan_group_email}"]
|
|
30
|
+
labels = local.labels,
|
|
32
31
|
}
|
|
33
32
|
)
|
|
@@ -73,14 +73,6 @@ module.exports = class extends BaseGenerator {
|
|
|
73
73
|
);
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
// CloudSQL Monitoring
|
|
77
|
-
['prod', 'staging'].forEach((env) => {
|
|
78
|
-
this.copyDir(
|
|
79
|
-
path.join('monitoring'),
|
|
80
|
-
path.join('infra', env, 'monitoring'),
|
|
81
|
-
);
|
|
82
|
-
});
|
|
83
|
-
|
|
84
76
|
// CloudSQL Instance secrets
|
|
85
77
|
['prod', 'staging'].forEach((env) => {
|
|
86
78
|
this.copyDir(
|
|
@@ -13,6 +13,11 @@ locals {
|
|
|
13
13
|
spec_vars = read_terragrunt_config("${get_terragrunt_dir()}/spec.hcl")
|
|
14
14
|
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
15
15
|
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
16
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
17
|
+
component = local.common_vars.locals.component
|
|
18
|
+
product = local.common_vars.locals.product
|
|
19
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
20
|
+
})
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
@@ -20,20 +25,14 @@ inputs = merge(
|
|
|
20
25
|
local.spec_vars.locals,
|
|
21
26
|
{
|
|
22
27
|
name = "mssql-${local.project_vars.locals.project_name}"
|
|
23
|
-
ip_configuration
|
|
24
|
-
"authorized_networks": [],
|
|
25
|
-
"ipv4_enabled": true,
|
|
26
|
-
"private_network": "https://www.googleapis.com/compute/v1/projects/${local.project_vars.locals.tribe_project_id}/global/networks/${local.project_vars.locals.network}",
|
|
27
|
-
"require_ssl": false
|
|
28
|
+
ip_configuration = {
|
|
29
|
+
"authorized_networks" : [],
|
|
30
|
+
"ipv4_enabled" : true,
|
|
31
|
+
"private_network" : "https://www.googleapis.com/compute/v1/projects/${local.project_vars.locals.tribe_project_id}/global/networks/${local.project_vars.locals.network}",
|
|
32
|
+
"require_ssl" : false
|
|
28
33
|
}
|
|
29
34
|
## Uncomment and apply it before destroy in case of necessary to delete the instance
|
|
30
35
|
# deletion_protection = false
|
|
31
|
-
user_labels =
|
|
32
|
-
cc = local.common_vars.locals.cost_center
|
|
33
|
-
component = local.common_vars.locals.component
|
|
34
|
-
product = local.common_vars.locals.product
|
|
35
|
-
tenant-alias = local.common_vars.locals.tenant_alias
|
|
36
|
-
environment = local.project_vars.locals.project_env
|
|
37
|
-
}
|
|
36
|
+
user_labels = local.labels,
|
|
38
37
|
}
|
|
39
38
|
)
|
|
@@ -7,6 +7,12 @@ terraform {
|
|
|
7
7
|
locals {
|
|
8
8
|
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
9
9
|
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
10
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
11
|
+
component = local.common_vars.locals.component
|
|
12
|
+
product = local.common_vars.locals.product
|
|
13
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
14
|
+
terraform = ""
|
|
15
|
+
})
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
# Include all settings from the root terragrunt.hcl file
|
|
@@ -22,20 +28,10 @@ dependency "mssql_address" {
|
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
25
|
-
inputs =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
secrets = {
|
|
30
|
-
mssql-common-address = dependency.mssql_address.outputs.private_address
|
|
31
|
-
}
|
|
32
|
-
labels = {
|
|
33
|
-
terraform = ""
|
|
34
|
-
cc = local.common_vars.locals.cost_center
|
|
35
|
-
component = local.common_vars.locals.component
|
|
36
|
-
product = local.common_vars.locals.product
|
|
37
|
-
tenant-alias = local.common_vars.locals.tenant_alias
|
|
38
|
-
environment = local.project_vars.locals.project_env
|
|
39
|
-
}
|
|
31
|
+
inputs = {
|
|
32
|
+
project_id = local.project_vars.locals.project_id
|
|
33
|
+
secrets = {
|
|
34
|
+
mssql-common-address = dependency.mssql_address.outputs.private_address
|
|
40
35
|
}
|
|
41
|
-
|
|
36
|
+
labels = local.labels,
|
|
37
|
+
}
|
|
@@ -10,9 +10,15 @@ include {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
locals {
|
|
13
|
-
spec_vars
|
|
14
|
-
project_vars
|
|
15
|
-
common_vars
|
|
13
|
+
spec_vars = read_terragrunt_config("${get_terragrunt_dir()}/spec.hcl")
|
|
14
|
+
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
15
|
+
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
16
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
17
|
+
component = local.common_vars.locals.component
|
|
18
|
+
product = local.common_vars.locals.product
|
|
19
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
20
|
+
terraform = ""
|
|
21
|
+
})
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
@@ -29,12 +35,6 @@ inputs = merge(
|
|
|
29
35
|
}
|
|
30
36
|
## Uncomment and apply it before destroy in case of necessary to delete the instance
|
|
31
37
|
# deletion_protection = false
|
|
32
|
-
user_labels =
|
|
33
|
-
cc = local.common_vars.locals.cost_center
|
|
34
|
-
component = local.common_vars.locals.component
|
|
35
|
-
product = local.common_vars.locals.product
|
|
36
|
-
tenant-alias = local.common_vars.locals.tenant_alias
|
|
37
|
-
environment = local.project_vars.locals.project_env
|
|
38
|
-
}
|
|
38
|
+
user_labels = local.labels,
|
|
39
39
|
}
|
|
40
40
|
)
|
|
@@ -11,6 +11,12 @@ include {
|
|
|
11
11
|
locals {
|
|
12
12
|
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
13
13
|
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
14
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
15
|
+
component = local.common_vars.locals.component
|
|
16
|
+
product = local.common_vars.locals.product
|
|
17
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
18
|
+
terraform = ""
|
|
19
|
+
})
|
|
14
20
|
}
|
|
15
21
|
|
|
16
22
|
dependency "instance" {
|
|
@@ -22,20 +28,11 @@ dependency "instance" {
|
|
|
22
28
|
}
|
|
23
29
|
|
|
24
30
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
25
|
-
inputs =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
mysql_private_address = dependency.instance.outputs.private_ip_address
|
|
31
|
-
}
|
|
32
|
-
labels = {
|
|
33
|
-
terraform = ""
|
|
34
|
-
cc = local.common_vars.locals.cost_center
|
|
35
|
-
component = local.common_vars.locals.component
|
|
36
|
-
product = local.common_vars.locals.product
|
|
37
|
-
tenant-alias = local.common_vars.locals.tenant_alias
|
|
38
|
-
environment = local.project_vars.locals.project_env
|
|
39
|
-
}
|
|
31
|
+
inputs = {
|
|
32
|
+
project_id = local.project_vars.locals.project_id
|
|
33
|
+
secrets = {
|
|
34
|
+
mysql_master_password = dependency.instance.outputs.generated_user_password
|
|
35
|
+
mysql_private_address = dependency.instance.outputs.private_ip_address
|
|
40
36
|
}
|
|
41
|
-
|
|
37
|
+
labels = local.labels,
|
|
38
|
+
}
|
|
@@ -13,6 +13,11 @@ locals {
|
|
|
13
13
|
spec_vars = read_terragrunt_config("${get_terragrunt_dir()}/spec.hcl")
|
|
14
14
|
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
15
15
|
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
16
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
17
|
+
component = local.common_vars.locals.component
|
|
18
|
+
product = local.common_vars.locals.product
|
|
19
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
20
|
+
})
|
|
16
21
|
}
|
|
17
22
|
|
|
18
23
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
@@ -28,12 +33,6 @@ inputs = merge(
|
|
|
28
33
|
}
|
|
29
34
|
## Uncomment and apply it before destroy in case of necessary to delete the instance
|
|
30
35
|
# deletion_protection = false
|
|
31
|
-
user_labels =
|
|
32
|
-
cc = local.common_vars.locals.cost_center
|
|
33
|
-
component = local.common_vars.locals.component
|
|
34
|
-
product = local.common_vars.locals.product
|
|
35
|
-
tenant-alias = local.common_vars.locals.tenant_alias
|
|
36
|
-
environment = local.project_vars.locals.project_env
|
|
37
|
-
}
|
|
36
|
+
user_labels = local.labels,
|
|
38
37
|
}
|
|
39
38
|
)
|
|
@@ -11,6 +11,12 @@ include {
|
|
|
11
11
|
locals {
|
|
12
12
|
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
13
13
|
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
14
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
15
|
+
component = local.common_vars.locals.component
|
|
16
|
+
product = local.common_vars.locals.product
|
|
17
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
18
|
+
terraform = ""
|
|
19
|
+
})
|
|
14
20
|
}
|
|
15
21
|
|
|
16
22
|
dependency "instance" {
|
|
@@ -29,13 +35,6 @@ inputs = merge(
|
|
|
29
35
|
postgresql_master_password = dependency.instance.outputs.generated_user_password
|
|
30
36
|
postgresql_private_address = dependency.instance.outputs.private_ip_address
|
|
31
37
|
}
|
|
32
|
-
labels =
|
|
33
|
-
terraform = ""
|
|
34
|
-
cc = local.common_vars.locals.cost_center
|
|
35
|
-
component = local.common_vars.locals.component
|
|
36
|
-
product = local.common_vars.locals.product
|
|
37
|
-
tenant-alias = local.common_vars.locals.tenant_alias
|
|
38
|
-
environment = local.project_vars.locals.project_env
|
|
39
|
-
}
|
|
38
|
+
labels = local.labels,
|
|
40
39
|
}
|
|
41
40
|
)
|
|
@@ -11,19 +11,20 @@ include {
|
|
|
11
11
|
locals {
|
|
12
12
|
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
13
13
|
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
14
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
15
|
+
component = local.common_vars.locals.component
|
|
16
|
+
product = local.common_vars.locals.product
|
|
17
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
18
|
+
terraform = ""
|
|
19
|
+
})
|
|
14
20
|
}
|
|
15
21
|
|
|
16
22
|
<%-dependencies%>
|
|
17
23
|
|
|
18
24
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
19
|
-
inputs =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
secrets = {<%-secrets%>
|
|
25
|
+
inputs = {
|
|
26
|
+
project_id = local.project_vars.locals.project_id
|
|
27
|
+
secrets = {<%-secrets%>
|
|
23
28
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
cc = local.common_vars.locals.cost_center
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
)
|
|
29
|
+
labels = local.labels
|
|
30
|
+
}
|
|
@@ -11,19 +11,20 @@ include {
|
|
|
11
11
|
locals {
|
|
12
12
|
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
13
13
|
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
14
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
15
|
+
component = local.common_vars.locals.component
|
|
16
|
+
product = local.common_vars.locals.product
|
|
17
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
18
|
+
terraform = ""
|
|
19
|
+
})
|
|
14
20
|
}
|
|
15
21
|
|
|
16
22
|
<%-dependencies%>
|
|
17
23
|
|
|
18
24
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
19
|
-
inputs =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
secrets = {<%-secrets%>
|
|
25
|
+
inputs = {
|
|
26
|
+
project_id = local.project_vars.locals.project_id
|
|
27
|
+
secrets = {<%-secrets%>
|
|
23
28
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
cc = local.common_vars.locals.cost_center
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
)
|
|
29
|
+
labels = local.labels,
|
|
30
|
+
}
|
|
@@ -10,9 +10,15 @@ include {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
locals {
|
|
13
|
-
spec_vars
|
|
14
|
-
project_vars
|
|
15
|
-
common_vars
|
|
13
|
+
spec_vars = read_terragrunt_config("${get_terragrunt_dir()}/spec.hcl")
|
|
14
|
+
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
15
|
+
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
16
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
17
|
+
component = local.common_vars.locals.component
|
|
18
|
+
product = local.common_vars.locals.product
|
|
19
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
20
|
+
terraform = ""
|
|
21
|
+
})
|
|
16
22
|
}
|
|
17
23
|
|
|
18
24
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
@@ -20,13 +26,7 @@ inputs = merge(
|
|
|
20
26
|
local.spec_vars.locals,
|
|
21
27
|
local.project_vars.locals,
|
|
22
28
|
{
|
|
23
|
-
labels
|
|
24
|
-
cc = local.common_vars.locals.cost_center
|
|
25
|
-
component = local.common_vars.locals.component
|
|
26
|
-
product = local.common_vars.locals.product
|
|
27
|
-
tenant-alias = local.common_vars.locals.tenant_alias
|
|
28
|
-
environment = local.project_vars.locals.project_env
|
|
29
|
-
}
|
|
29
|
+
labels = local.labels
|
|
30
30
|
project_id = local.project_vars.locals.project_id
|
|
31
31
|
prevent_destroy = false
|
|
32
32
|
}
|
|
@@ -64,13 +64,6 @@ module.exports = class extends SecretsGenerator {
|
|
|
64
64
|
selectTier('prod', prodTier);
|
|
65
65
|
selectTier('staging', stagingTier);
|
|
66
66
|
|
|
67
|
-
['prod', 'staging'].forEach((env) => {
|
|
68
|
-
this.copyDir(
|
|
69
|
-
path.join('monitoring'),
|
|
70
|
-
path.join('infra', env, 'monitoring'),
|
|
71
|
-
);
|
|
72
|
-
});
|
|
73
|
-
|
|
74
67
|
this.writeSecrets('memorystore', '', '', name === '' ? 'redis-instance' : name);
|
|
75
68
|
}
|
|
76
69
|
};
|
|
@@ -14,6 +14,12 @@ locals {
|
|
|
14
14
|
project_vars = read_terragrunt_config(find_in_parent_folders("project.hcl"))
|
|
15
15
|
common_vars = read_terragrunt_config(find_in_parent_folders("common.hcl"))
|
|
16
16
|
service_name = basename(get_terragrunt_dir())
|
|
17
|
+
labels = merge(local.common_vars.locals.default_user_labels, local.project_vars.locals.default_user_labels, {
|
|
18
|
+
component = local.common_vars.locals.component
|
|
19
|
+
product = local.common_vars.locals.product
|
|
20
|
+
project = local.project_vars.locals.project_name
|
|
21
|
+
tenant-alias = local.common_vars.locals.tenant_alias
|
|
22
|
+
})
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
|
|
@@ -24,14 +30,6 @@ inputs = merge(
|
|
|
24
30
|
project = local.project_vars.locals.project_id
|
|
25
31
|
authorized_network = "projects/${local.project_vars.locals.tribe_project_id}/global/networks/${local.project_vars.locals.network}"
|
|
26
32
|
enable_apis = false
|
|
27
|
-
|
|
28
|
-
labels = {
|
|
29
|
-
project = local.project_vars.locals.project_name
|
|
30
|
-
cc = local.common_vars.locals.cost_center
|
|
31
|
-
component = local.common_vars.locals.component
|
|
32
|
-
product = local.common_vars.locals.product
|
|
33
|
-
tenant-alias = local.common_vars.locals.tenant_alias
|
|
34
|
-
environment = local.project_vars.locals.project_env
|
|
35
|
-
}
|
|
33
|
+
labels = local.labels
|
|
36
34
|
}
|
|
37
35
|
)
|