diff --git a/README.md b/README.md index 7a9d7f40..22761140 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ determining that location is as follows: | budget\_calendar\_period | Specifies the calendar period for the budget. Possible values are MONTH, QUARTER, YEAR, CALENDAR\_PERIOD\_UNSPECIFIED, CUSTOM. custom\_period\_start\_date and custom\_period\_end\_date must be set if CUSTOM | `string` | `null` | no | | budget\_custom\_period\_end\_date | Specifies the end date (DD-MM-YYYY) for the calendar\_period CUSTOM | `string` | `null` | no | | budget\_custom\_period\_start\_date | Specifies the start date (DD-MM-YYYY) for the calendar\_period CUSTOM | `string` | `null` | no | +| budget\_disable\_default\_iam\_recipients | Disables default notifications sent when a threshold is exceeded | `bool` | `null` | no | | budget\_display\_name | The display name of the budget. If not set defaults to `Budget For ` | `string` | `null` | no | | budget\_labels | A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. | `map(string)` | `{}` | no | | budget\_monitoring\_notification\_channels | A list of monitoring notification channels in the form `[projects/{project_id}/notificationChannels/{channel_id}]`. A maximum of 5 channels are allowed. | `list(string)` | `[]` | no | diff --git a/main.tf b/main.tf index b98e0f3f..4425ca19 100644 --- a/main.tf +++ b/main.tf @@ -105,6 +105,7 @@ module "budget" { calendar_period = var.budget_calendar_period custom_period_start_date = var.budget_custom_period_start_date custom_period_end_date = var.budget_custom_period_end_date + disable_default_iam_recipients = var.budget_disable_default_iam_recipients } /****************************************** diff --git a/modules/budget/README.md b/modules/budget/README.md index 0b96a947..460e0acf 100644 --- a/modules/budget/README.md +++ b/modules/budget/README.md @@ -30,6 +30,7 @@ module "project_myproject" { | credit\_types\_treatment | Specifies how credits should be treated when determining spend for threshold calculations | `string` | `"INCLUDE_ALL_CREDITS"` | no | | custom\_period\_end\_date | Specifies the end date (DD-MM-YYYY) for the calendar\_period CUSTOM | `string` | `null` | no | | custom\_period\_start\_date | Specifies the start date (DD-MM-YYYY) for the calendar\_period CUSTOM | `string` | `null` | no | +| disable\_default\_iam\_recipients | Disables default notifications sent when a threshold is exceeded | `bool` | `null` | no | | display\_name | The display name of the budget. If not set defaults to `Budget For ` | `string` | `null` | no | | labels | A single label and value pair specifying that usage from only this set of labeled resources should be included in the budget. | `map(string)` | `{}` | no | | monitoring\_notification\_channels | A list of monitoring notification channels in the form `[projects/{project_id}/notificationChannels/{channel_id}]`. A maximum of 5 channels are allowed. | `list(string)` | `[]` | no | diff --git a/modules/budget/main.tf b/modules/budget/main.tf index 13bde8d3..194082e9 100644 --- a/modules/budget/main.tf +++ b/modules/budget/main.tf @@ -87,6 +87,7 @@ resource "google_billing_budget" "budget" { content { pubsub_topic = var.alert_pubsub_topic monitoring_notification_channels = var.monitoring_notification_channels + disable_default_iam_recipients = var.disable_default_iam_recipients } } } diff --git a/modules/budget/variables.tf b/modules/budget/variables.tf index 75cb6fb3..06fa14e2 100644 --- a/modules/budget/variables.tf +++ b/modules/budget/variables.tf @@ -104,3 +104,9 @@ variable "labels" { error_message = "Only 0 or 1 labels may be supplied for the budget filter." } } + +variable "disable_default_iam_recipients" { + description = "Disables default notifications sent when a threshold is exceeded" + type = bool + default = null +} diff --git a/variables.tf b/variables.tf index 263720c0..d4552658 100644 --- a/variables.tf +++ b/variables.tf @@ -288,6 +288,12 @@ variable "budget_custom_period_end_date" { default = null } +variable "budget_disable_default_iam_recipients" { + description = "Disables default notifications sent when a threshold is exceeded" + type = bool + default = null +} + variable "vpc_service_control_attach_enabled" { description = "Whether the project will be attached to a VPC Service Control Perimeter" type = bool