diff --git a/public/app/plugins/datasource/cloud-monitoring/datasource.ts b/public/app/plugins/datasource/cloud-monitoring/datasource.ts index 17699efbab6..e0baaa151c7 100644 --- a/public/app/plugins/datasource/cloud-monitoring/datasource.ts +++ b/public/app/plugins/datasource/cloud-monitoring/datasource.ts @@ -62,7 +62,7 @@ export default class CloudMonitoringDatasource extends DataSourceWithBackend< metricType: this.templateSrv.replace(annotation.target.metricType, options.scopedVars || {}), title: this.templateSrv.replace(annotation.target.title, options.scopedVars || {}), text: this.templateSrv.replace(annotation.target.text, options.scopedVars || {}), - tags: this.templateSrv.replace(annotation.target.tags, options.scopedVars || {}), + tags: (annotation.target.tags || []).map((t: string) => this.templateSrv.replace(t, options.scopedVars || {})), projectName: this.templateSrv.replace( annotation.target.projectName ? annotation.target.projectName : this.getDefaultProject(), options.scopedVars || {}