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

Fix id validation for custom service and SLO to match what's actually usable #15841

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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