Skip to content

Commit 78b36b5

Browse files
Fix id validation for custom service and SLO to match what's actually 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]>
1 parent d86f279 commit 78b36b5

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.changelog/8939.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:bug
2+
monitoring: fixed validation of `service_id` on `google_monitoring_custom_service` and `slo_id` on `google_monitoring_slo`
3+
```

google/services/monitoring/resource_monitoring_custom_service.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func ResourceMonitoringService() *schema.Resource {
5959
Computed: true,
6060
Optional: true,
6161
ForceNew: true,
62-
ValidateFunc: verify.ValidateRegexp(`^[a-z0-9\-]+$`),
62+
ValidateFunc: verify.ValidateRegexp(`^[a-zA-Z0-9\-_:.]+$`),
6363
Description: `An optional service ID to use. If not given, the server will generate a
6464
service ID.`,
6565
},

google/services/monitoring/resource_monitoring_slo.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,7 @@ integer fraction of a day and at least 60s.`,
715715
Computed: true,
716716
Optional: true,
717717
ForceNew: true,
718-
ValidateFunc: verify.ValidateRegexp(`^[a-z0-9\-]+$`),
718+
ValidateFunc: verify.ValidateRegexp(`^[a-zA-Z0-9\-_:.]+$`),
719719
Description: `The id to use for this ServiceLevelObjective. If omitted, an id will be generated instead.`,
720720
},
721721
"user_labels": {

0 commit comments

Comments
 (0)