Skip to content

Commit f54adbf

Browse files
DeLoWaNDamien Gustave
andauthored
feat: allow budget display name customization (#599)
Co-authored-by: Damien Gustave <[email protected]>
1 parent 9fc6ecd commit f54adbf

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ determining that location is as follows:
123123
| 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 |
124124
| 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 |
125125
| budget\_amount | The amount to use for a budget alert | `number` | `null` | no |
126+
| budget\_display\_name | The display name of the budget. If not set defaults to `Budget For <projects[0]|All Projects>` | `string` | `null` | no |
126127
| 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 |
127128
| 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 |
128129
| create\_project\_sa | Whether the default service account for the project shall be created | `bool` | `true` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ module "budget" {
9393
alert_spent_percents = var.budget_alert_spent_percents
9494
alert_pubsub_topic = var.budget_alert_pubsub_topic
9595
monitoring_notification_channels = var.budget_monitoring_notification_channels
96+
display_name = var.budget_display_name != null ? var.budget_display_name : null
9697
}
9798

9899
/******************************************

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,12 @@ variable "budget_amount" {
217217
default = null
218218
}
219219

220+
variable "budget_display_name" {
221+
description = "The display name of the budget. If not set defaults to `Budget For <projects[0]|All Projects>` "
222+
type = string
223+
default = null
224+
}
225+
220226
variable "budget_alert_pubsub_topic" {
221227
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}`"
222228
type = string

0 commit comments

Comments
 (0)