Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add posibility to disable iam notyfications #820

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <projects[0]|All Projects>` | `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 |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/******************************************
Expand Down
1 change: 1 addition & 0 deletions modules/budget/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <projects[0]|All Projects>` | `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 |
Expand Down
1 change: 1 addition & 0 deletions modules/budget/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
6 changes: 6 additions & 0 deletions modules/budget/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down