Skip to content

Commit

Permalink
feat: allow budget display name customization (#599)
Browse files Browse the repository at this point in the history
Co-authored-by: Damien Gustave <damien.gustave@iwd.io>
  • Loading branch information
DeLoWaN and Damien Gustave committed Jun 23, 2021
1 parent 9fc6ecd commit f54adbf
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -123,6 +123,7 @@ determining that location is as follows:
| budget\_alert\_pubsub\_topic | The name of the Cloud Pub/Sub topic where budget related messages will be published, in the form of `projects/{project_id}/topics/{topic_id}` | `string` | `null` | no |
| budget\_alert\_spent\_percents | A list of percentages of the budget to alert on when threshold is exceeded | `list(number)` | <pre>[<br> 0.5,<br> 0.7,<br> 1<br>]</pre> | no |
| budget\_amount | The amount to use for a budget alert | `number` | `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\_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 |
| consumer\_quotas | The quotas configuration you want to override for the project. | <pre>list(object({<br> service = string,<br> metric = string,<br> limit = string,<br> value = string,<br> }))</pre> | `[]` | no |
| create\_project\_sa | Whether the default service account for the project shall be created | `bool` | `true` | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Expand Up @@ -93,6 +93,7 @@ module "budget" {
alert_spent_percents = var.budget_alert_spent_percents
alert_pubsub_topic = var.budget_alert_pubsub_topic
monitoring_notification_channels = var.budget_monitoring_notification_channels
display_name = var.budget_display_name != null ? var.budget_display_name : null
}

/******************************************
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Expand Up @@ -217,6 +217,12 @@ variable "budget_amount" {
default = null
}

variable "budget_display_name" {
description = "The display name of the budget. If not set defaults to `Budget For <projects[0]|All Projects>` "
type = string
default = null
}

variable "budget_alert_pubsub_topic" {
description = "The name of the Cloud Pub/Sub topic where budget related messages will be published, in the form of `projects/{project_id}/topics/{topic_id}`"
type = string
Expand Down

0 comments on commit f54adbf

Please sign in to comment.