Skip to content

Commit

Permalink
Fix id validation for custom service and SLO to match what's actually…
Browse files Browse the repository at this point in the history
… usable (#8939) (#15841)

* Fix slo_id pattern in google_monitoring_slo

* Fix servie_id pattern in google_monitoring_custom_service

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Sep 14, 2023
1 parent d86f279 commit 78b36b5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .changelog/8939.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
monitoring: fixed validation of `service_id` on `google_monitoring_custom_service` and `slo_id` on `google_monitoring_slo`
```
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func ResourceMonitoringService() *schema.Resource {
Computed: true,
Optional: true,
ForceNew: true,
ValidateFunc: verify.ValidateRegexp(`^[a-z0-9\-]+$`),
ValidateFunc: verify.ValidateRegexp(`^[a-zA-Z0-9\-_:.]+$`),
Description: `An optional service ID to use. If not given, the server will generate a
service ID.`,
},
Expand Down
2 changes: 1 addition & 1 deletion google/services/monitoring/resource_monitoring_slo.go
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ integer fraction of a day and at least 60s.`,
Computed: true,
Optional: true,
ForceNew: true,
ValidateFunc: verify.ValidateRegexp(`^[a-z0-9\-]+$`),
ValidateFunc: verify.ValidateRegexp(`^[a-zA-Z0-9\-_:.]+$`),
Description: `The id to use for this ServiceLevelObjective. If omitted, an id will be generated instead.`,
},
"user_labels": {
Expand Down

0 comments on commit 78b36b5

Please sign in to comment.