Skip to content

Commit 2406ce6

Browse files
authored
tgc-revival: Only print compute instance asset name in logs (#13739)
1 parent f2af0ac commit 2406ce6

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

mmv1/third_party/terraform/acctest/tgc_utils.go

+1-12
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ func GetTestMetadataForTgc(service, address, rawConfig string) resource.TestChec
4141
if apiServiceName, ok := ApiServiceNames[resourceType]; !ok {
4242
return fmt.Errorf("The Cai product backend name for resource %s doesn't exist.", resourceType)
4343
} else {
44-
var assetNames string
4544
var rName string
4645
switch resourceType {
4746
case "google_project":
@@ -50,17 +49,7 @@ func GetTestMetadataForTgc(service, address, rawConfig string) resource.TestChec
5049
rName = rState.Primary.ID
5150
}
5251
caiAssetName := fmt.Sprintf("//%s/%s", apiServiceName, rName)
53-
54-
switch resourceType {
55-
case "google_compute_instance":
56-
// The disk asset name is to get the boot disk details,
57-
// which are converted to boot_disk.initialize_params in google_compute_instance
58-
diskAssetName := strings.Replace(caiAssetName, "/instances/", "/disks/", 1)
59-
assetNames = fmt.Sprintf("%s\n%s", caiAssetName, diskAssetName)
60-
default:
61-
assetNames = caiAssetName
62-
}
63-
log.Printf("[DEBUG]TGC CAI asset names\n%s\nEnd of TGC CAI asset names", assetNames)
52+
log.Printf("[DEBUG]TGC CAI asset names start\n%s\nEnd of TGC CAI asset names", caiAssetName)
6453
}
6554

6655
// The acceptance tests names will be also used for the tgc tests.

0 commit comments

Comments
 (0)