diff --git a/.changelog/12882.txt b/.changelog/12882.txt new file mode 100644 index 00000000000..f4981fa8cfd --- /dev/null +++ b/.changelog/12882.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +monitoring: added more description to make it clear that label starting with "__" are reserved for internal use case only in metrics labels, and cannot be overwritten. +``` \ No newline at end of file diff --git a/google/services/monitoring/resource_monitoring_alert_policy.go b/google/services/monitoring/resource_monitoring_alert_policy.go index 73e0b4f7a75..356cdc6ebed 100644 --- a/google/services/monitoring/resource_monitoring_alert_policy.go +++ b/google/services/monitoring/resource_monitoring_alert_policy.go @@ -432,9 +432,10 @@ rule group.`, must be valid. Label values can be templatized by using variables. The only available -variable names are the names of the labels in the PromQL result, including -"__name__" and "value". "labels" may be empty. This field is intended to be -used for organizing and identifying the AlertPolicy`, +variable names are the names of the labels in the PromQL result, +although label names beginning with \_\_ (two "\_") are reserved for +internal use. "labels" may be empty. This field is intended to be used +for organizing and identifying the AlertPolicy.`, Elem: &schema.Schema{Type: schema.TypeString}, }, "rule_group": { diff --git a/website/docs/r/monitoring_alert_policy.html.markdown b/website/docs/r/monitoring_alert_policy.html.markdown index c39aac4a103..9202e01e994 100644 --- a/website/docs/r/monitoring_alert_policy.html.markdown +++ b/website/docs/r/monitoring_alert_policy.html.markdown @@ -807,9 +807,10 @@ The following arguments are supported: Labels to add to or overwrite in the PromQL query result. Label names must be valid. Label values can be templatized by using variables. The only available - variable names are the names of the labels in the PromQL result, including - "__name__" and "value". "labels" may be empty. This field is intended to be - used for organizing and identifying the AlertPolicy + variable names are the names of the labels in the PromQL result, + although label names beginning with \_\_ (two "\_") are reserved for + internal use. "labels" may be empty. This field is intended to be used + for organizing and identifying the AlertPolicy. * `rule_group` - (Optional)