File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -599,7 +599,7 @@ func getSloFromResourceData(d *schema.ResourceData) (models.Slo, diag.Diagnostic
599599 idx := fmt .Sprint (n )
600600 goodMetrics = append (goodMetrics , slo.IndicatorPropertiesCustomMetricParamsGoodMetricsInner {
601601 Name : d .Get (indicatorType + ".0.good.0.metrics." + idx + ".name" ).(string ),
602- Field : d . Get (indicatorType + ".0.good.0.metrics." + idx + ".field" ).( string ),
602+ Field : getOrNilString (indicatorType + ".0.good.0.metrics." + idx + ".field" , d ),
603603 Aggregation : d .Get (indicatorType + ".0.good.0.metrics." + idx + ".aggregation" ).(string ),
604604 Filter : getOrNilString (indicatorType + ".0.good.0.metrics." + idx + ".filter" , d ),
605605 })
@@ -610,7 +610,7 @@ func getSloFromResourceData(d *schema.ResourceData) (models.Slo, diag.Diagnostic
610610 idx := fmt .Sprint (n )
611611 totalMetrics = append (totalMetrics , slo.IndicatorPropertiesCustomMetricParamsTotalMetricsInner {
612612 Name : d .Get (indicatorType + ".0.total.0.metrics." + idx + ".name" ).(string ),
613- Field : d . Get (indicatorType + ".0.total.0.metrics." + idx + ".field" ).( string ),
613+ Field : getOrNilString (indicatorType + ".0.total.0.metrics." + idx + ".field" , d ),
614614 Aggregation : d .Get (indicatorType + ".0.total.0.metrics." + idx + ".aggregation" ).(string ),
615615 Filter : getOrNilString (indicatorType + ".0.total.0.metrics." + idx + ".filter" , d ),
616616 })
You can’t perform that action at this time.
0 commit comments