@hiiretail/gcp-infra-cli 0.97.0 → 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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiiretail/gcp-infra-cli",
3
- "version": "0.97.0",
3
+ "version": "0.98.0",
4
4
  "description": "Infrastructure as code generator for GCP.",
5
5
  "main": "src/cli.js",
6
6
  "bin": {