77 "fmt"
88 "strings"
99
10+ "github.com/hashicorp/go-azure-helpers/lang/pointer"
1011 "github.com/hashicorp/go-azure-sdk/resource-manager/cosmosdb/2025-04-15/cosmosdb"
1112 "github.com/hashicorp/terraform-provider-azurerm/internal/tf/pluginsdk"
12- "github.com/hashicorp/terraform-provider-azurerm/utils"
1313)
1414
1515func expandAzureRmCosmosDBIndexingPolicyIncludedPaths (input []interface {}) * []cosmosdb.IncludedPath {
@@ -21,7 +21,7 @@ func expandAzureRmCosmosDBIndexingPolicyIncludedPaths(input []interface{}) *[]co
2121 for _ , v := range input {
2222 includedPath := v .(map [string ]interface {})
2323 path := cosmosdb.IncludedPath {
24- Path : utils . String (includedPath ["path" ].(string )),
24+ Path : pointer . To (includedPath ["path" ].(string )),
2525 }
2626
2727 includedPaths = append (includedPaths , path )
@@ -39,7 +39,7 @@ func expandAzureRmCosmosDBIndexingPolicyExcludedPaths(input []interface{}) *[]co
3939 for _ , v := range input {
4040 block := v .(map [string ]interface {})
4141 paths = append (paths , cosmosdb.ExcludedPath {
42- Path : utils . String (block ["path" ].(string )),
42+ Path : pointer . To (block ["path" ].(string )),
4343 })
4444 }
4545
@@ -57,7 +57,7 @@ func ExpandAzureRmCosmosDBIndexingPolicyCompositeIndexes(input []interface{}) *[
5757
5858 order := cosmosdb .CompositePathSortOrder (strings .ToLower (data ["order" ].(string )))
5959 index := cosmosdb.CompositePath {
60- Path : utils . String (data ["path" ].(string )),
60+ Path : pointer . To (data ["path" ].(string )),
6161 Order : & order ,
6262 }
6363 indexPairs = append (indexPairs , index )
@@ -85,7 +85,7 @@ func ExpandAzureRmCosmosDBIndexingPolicySpatialIndexes(input []interface{}) *[]c
8585 indexPair := i .(map [string ]interface {})
8686 indexes = append (indexes , cosmosdb.SpatialSpec {
8787 Types : & spatialTypes ,
88- Path : utils . String (indexPair ["path" ].(string )),
88+ Path : pointer . To (indexPair ["path" ].(string )),
8989 })
9090 }
9191
0 commit comments