func CommonInstancePoolID() string {
	if commonInstancePool != nil {
		return commonInstancePool.InstancePoolID
	}
	client := common.CommonEnvironmentClient()
	oncePool.Do(func() {  
		log.Printf("[INFO] Initializing common instance pool")
		ctx := context.Background()
		instancePools := NewInstancePoolsAPI(ctx, client)
		clusters := NewClustersAPI(ctx, client)
		currentUserPool := fmt.Sprintf("Terraform Integration Test by %s", os.Getenv("USER"))
		pools, err := instancePools.List()
		if err != nil {
			log.Printf("[ERROR] Cannot list instance pools: %v", err)
			panic(err)
		}
		for _, existingPool := range pools.InstancePools {
			if existingPool.InstancePoolName == currentUserPool {
				log.Printf(
					"[INFO] Using existing instance pool: %s/#setting/clusters/instance-pools/view/%s",
					client.Host, existingPool.InstancePoolID)
				commonInstancePool = &existingPool
				return
			}
		}
		instancePool := InstancePool{
			PreloadedSparkVersions: []string{
				clusters.LatestSparkVersionOrDefault(SparkVersionRequest{Latest: true, LongTermSupport: true})},
			NodeTypeID: clusters.GetSmallestNodeType(NodeTypeRequest{
				LocalDisk: true,
			}),
			InstancePoolName: currentUserPool,
			MaxCapacity:      10,
			IdleInstanceAutoTerminationMinutes: 15,
		}
		if client.IsAws() {
			instancePool.AwsAttributes = &InstancePoolAwsAttributes{
				Availability: AwsAvailabilitySpot,
			}
		}
		newPool, err := instancePools.Create(instancePool)
		if err != nil {
			log.Printf("[ERROR] Cannot create instance pool: %v", err)
			panic(err)
		}
		log.Printf("[INFO] Created common instance pool: %s/#setting/clusters/instance-pools/view/%s",
			client.Host, newPool.InstancePoolID)
		commonInstancePool = &newPool
	})
	return commonInstancePool.InstancePoolID
}
CommonInstancePoolID returns common instance pool that is supposed to be used for internal testing purposes
package compute
import (
	"context"
	"fmt"
	"log"
	"os"
	"sync"
	"github.com/databrickslabs/terraform-provider-databricks/common"
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
)
var (
	oncePool           sync.Once
	commonInstancePool *InstancePoolAndStats
)