package main

import (
	"context"

	"github.com/hashicorp/terraform-plugin-framework/providerserver"
	"github.com/hashicorp/terraform-plugin-log/tflog"
	"repository.basistech.ru/BASIS/terraform-provider-dynamix/internal/provider"
)

func main() {
	opts := providerserver.ServeOpts{
		Address: "basistech.ru/tf/dynamix",
		//Debug:   true,
	}

	// TODO version from env
	ctx := context.Background()
	err := providerserver.Serve(ctx, provider.New("dev"), opts)
	if err != nil {
		tflog.Error(ctx, "Error start provider server", map[string]any{"error": err.Error()})
	}

}
