@@ -30,7 +30,7 @@ import (
30
30
)
31
31
32
32
type ResourceMetadata struct {
33
- CaiAssetName string `json:"cai_asset_name "`
33
+ CaiAssetNames [] string `json:"cai_asset_names "`
34
34
ResourceType string `json:"resource_type"`
35
35
ResourceAddress string `json:"resource_address"`
36
36
ImportMetadata ImportMetadata `json:"import_metadata,omitempty"`
@@ -86,7 +86,7 @@ func CollectAllTgcMetadata(tgcPayload TgcMetadataPayload) resource.TestCheckFunc
86
86
apiServiceName := GetAPIServiceNameForResource (metadata .ResourceType )
87
87
if apiServiceName == "unknown" || apiServiceName == "failed_to_populate_metadata_cache" {
88
88
log .Printf ("[DEBUG]TGC Terraform error: unknown resource type %s" , metadata .ResourceType )
89
- metadata .CaiAssetName = apiServiceName
89
+ metadata .CaiAssetNames = [] string { apiServiceName }
90
90
} else {
91
91
var rName string
92
92
switch metadata .ResourceType {
@@ -95,7 +95,7 @@ func CollectAllTgcMetadata(tgcPayload TgcMetadataPayload) resource.TestCheckFunc
95
95
default :
96
96
rName = rState .Primary .ID
97
97
}
98
- metadata .CaiAssetName = fmt .Sprintf ("//%s/%s" , apiServiceName , rName )
98
+ metadata .CaiAssetNames = [] string { fmt .Sprintf ("//%s/%s" , apiServiceName , rName )}
99
99
}
100
100
101
101
// Resolve auto IDs in import metadata
@@ -238,7 +238,7 @@ func extendWithTGCData(t *testing.T, c resource.TestCase) resource.TestCase {
238
238
ResourceAddress : res ,
239
239
ImportMetadata : importMeta ,
240
240
Service : GetServicePackageForResourceType (resourceType ),
241
- // CaiAssetName will be populated at runtime in the check function
241
+ // CaiAssetNames will be populated at runtime in the check function
242
242
}
243
243
}
244
244
}
0 commit comments