@@ -30,7 +30,7 @@ import (
3030)
3131
3232type ResourceMetadata struct {
33- CaiAssetName string `json:"cai_asset_name "`
33+ CaiAssetNames [] string `json:"cai_asset_names "`
3434 ResourceType string `json:"resource_type"`
3535 ResourceAddress string `json:"resource_address"`
3636 ImportMetadata ImportMetadata `json:"import_metadata,omitempty"`
@@ -86,7 +86,7 @@ func CollectAllTgcMetadata(tgcPayload TgcMetadataPayload) resource.TestCheckFunc
8686 apiServiceName := GetAPIServiceNameForResource (metadata .ResourceType )
8787 if apiServiceName == "unknown" || apiServiceName == "failed_to_populate_metadata_cache" {
8888 log .Printf ("[DEBUG]TGC Terraform error: unknown resource type %s" , metadata .ResourceType )
89- metadata .CaiAssetName = apiServiceName
89+ metadata .CaiAssetNames = [] string { apiServiceName }
9090 } else {
9191 var rName string
9292 switch metadata .ResourceType {
@@ -95,7 +95,7 @@ func CollectAllTgcMetadata(tgcPayload TgcMetadataPayload) resource.TestCheckFunc
9595 default :
9696 rName = rState .Primary .ID
9797 }
98- metadata .CaiAssetName = fmt .Sprintf ("//%s/%s" , apiServiceName , rName )
98+ metadata .CaiAssetNames = [] string { fmt .Sprintf ("//%s/%s" , apiServiceName , rName )}
9999 }
100100
101101 // Resolve auto IDs in import metadata
@@ -238,7 +238,7 @@ func extendWithTGCData(t *testing.T, c resource.TestCase) resource.TestCase {
238238 ResourceAddress : res ,
239239 ImportMetadata : importMeta ,
240240 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
242242 }
243243 }
244244 }
0 commit comments