@hiiretail/gcp-infra-cli 0.96.2 → 0.98.0

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.
@@ -4,6 +4,14 @@ terraform {
4
4
  source = "git::https://github.com/extenda/terraform-google-project-factory//modules/budget?ref=feat/CNP-25"
5
5
  }
6
6
 
7
+ # Dependency on the email notification channel(s)
8
+ dependency "notification_channel" {
9
+ config_path = "../monitoring/notification-channels/"
10
+ mock_outputs = {
11
+ notification_channels_email_ids = "notification-channel-dummy-ids"
12
+ }
13
+ }
14
+
7
15
  # Include all settings from the root terragrunt.hcl file
8
16
  include {
9
17
  path = find_in_parent_folders("terragrunt_root.hcl")
@@ -20,13 +28,17 @@ locals {
20
28
  # - Clan makes use of more than 10 services
21
29
  # - Clan makes use of service to service communication (internal traffic)
22
30
  # where combinations make steps of 3%, 4% or 5% or 1% if none applies
31
+ # If there is no dependency from the notification channels either create it by updating the notification
32
+ # module to atleast 1.0.2 and add atleast one email notification channel.
33
+ # Or if you already know the ID of an email notification channel use that, format would be
34
+ # ["projects/{projectID}/notificationChannels/{ID}"]
23
35
  inputs = merge(
24
36
  {
25
37
  projects = [local.project_vars.locals.project_id]
26
38
  display_name = "${local.project_vars.locals.project_name}-budget"
27
39
  billing_account = "01580F-3DD16A-C066A5"
28
- amount = (local.project_vars.locals.amount + (local.project_vars.locals.amount * <%- overheadPercentage %>))
29
- monitoring_notification_channels = <%-JSON.stringify(monitoringNotificationChannels)%>
40
+ amount = floor(local.project_vars.locals.amount + (local.project_vars.locals.amount * <%- overheadPercentage %>))
41
+ monitoring_notification_channels = dependency.notification_channel.outputs.notification_channels_email_ids
30
42
  disable_default_iam_recipients = true
31
43
  alert_spent_percents = [0.8, 1.0, 1.2]
32
44
  }
@@ -20,7 +20,7 @@ module.exports = class extends BaseGenerator {
20
20
  store: true,
21
21
  default: (response) => {
22
22
  const defaultTypes = {
23
- 'postgres-clan': 'POSTGRES_15',
23
+ 'postgres-clan': 'POSTGRES_16',
24
24
  mysql: 'MYSQL_5_7',
25
25
  mssql: 'SQLSERVER_2017_STANDARD',
26
26
  };
@@ -28,7 +28,7 @@ module.exports = class extends BaseGenerator {
28
28
  },
29
29
  choices: (response) => {
30
30
  const tierTypes = {
31
- 'postgres-clan': ['POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15'],
31
+ 'postgres-clan': ['POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15', 'POSTGRES_16'],
32
32
  mysql: ['MYSQL_5_6', 'MYSQL_5_7'],
33
33
  mssql: ['SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB'],
34
34
  };
@@ -13,10 +13,17 @@ locals {
13
13
 
14
14
  region = "europe-west1"
15
15
 
16
+ #When selecting the number of CPUs and amount of memory, there are some restrictions on the configuration you choose:
17
+ #vCPUs must be either 1 or an even number between 2 and 96.
18
+ #Memory must be:
19
+ #0.9 to 6.5 GB per vCPU
20
+ #A multiple of 256 MB
21
+ #At least 3.75 GB (3840 MB)
22
+ #Example of custom tiers covered by SLA: db-custom-1-3840, db-custom-2-7680
16
23
  #Memory size, in GiB | Maximum concurrent connections
17
24
  #--------------------+-------------------------------
18
- #0.6 (db-f1-micro) | 25
19
- #1.7 (db-g1-small) | 50
25
+ #0.6 (db-f1-micro) | 25 (shared tier, not covered by SLA)
26
+ #1.7 (db-g1-small) | 50 (shared tier, not covered by SLA)
20
27
  #3.75 up to 6 | 100
21
28
  #6 up to 7.5 | 150
22
29
  #7.5 up to 15 | 200
@@ -36,6 +43,22 @@ locals {
36
43
  #Default: "ZONAL"
37
44
  # availability_type = "REGIONAL"
38
45
 
46
+ #Description: The day of week (1-7) for the Cloud SQL instance maintenance.
47
+ #Type: Integer
48
+ #Default: 1
49
+ # maintenance_window_day = 2
50
+
51
+ #Description: The hour of day (0-23) maintenance window for the Cloud SQL instance maintenance.
52
+ #Type: Integer
53
+ #Default: 23
54
+ # maintenance_window_hour = 1
55
+
56
+ #Description: The update track of maintenance window for the Cloud SQL instance maintenance.Can be either `canary` or `stable`.
57
+ #Canary will get the maintenance update Week 1 and stable Week 2
58
+ #Type: String
59
+ #Default: "canary"
60
+ maintenance_window_update_track = "stable"
61
+
39
62
  #Description: Enables protection of an Cloud SQL instance from accidental deletion across all surfaces (API, gcloud, Cloud Console and Terraform).
40
63
  #Type: bool
41
64
  #Default: false
@@ -75,4 +98,5 @@ locals {
75
98
  location = "europe-west1"
76
99
  point_in_time_recovery_enabled = true
77
100
  }
101
+
78
102
  }
@@ -29,7 +29,7 @@ inputs = merge(
29
29
  "authorized_networks" : [],
30
30
  "ipv4_enabled" : true,
31
31
  "private_network" : "https://www.googleapis.com/compute/v1/projects/${local.project_vars.locals.project_id}/global/networks/${local.project_vars.locals.clan_network}",
32
- "require_ssl" : false
32
+ "ssl_mode" : "ALLOW_UNENCRYPTED_AND_ENCRYPTED"
33
33
  }
34
34
  user_labels = local.labels,
35
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiiretail/gcp-infra-cli",
3
- "version": "0.96.2",
3
+ "version": "0.98.0",
4
4
  "description": "Infrastructure as code generator for GCP.",
5
5
  "main": "src/cli.js",
6
6
  "bin": {