main.go (22 lines of code) (raw):

package main import ( "context" "flag" "log" "github.com/aliyun/terraform-provider-alibabacloudstack/alibabacloudstack" "github.com/hashicorp/terraform-plugin-sdk/v2/plugin" ) func main() { var debugMode bool flag.BoolVar(&debugMode, "debug", false, "set to true to run the provider with support for debuggers like delve") flag.Parse() opts := &plugin.ServeOpts{ProviderFunc: alibabacloudstack.Provider} if debugMode { // TODO: update this string with the full name of your provider as used in your configs err := plugin.Debug(context.Background(), "registry.terraform.io/aliyun/alibabacloudstack", opts) if err != nil { log.Fatal(err.Error()) } return } plugin.Serve(opts) }