1. Version sync: provider/main.go = profile.env = 5.0.60 2. docs-generator: removed detectVersion() — no more dependency on provider/ 3. docs-generator: removed detectRoot(), pickPath() — all paths via flags/env 4. docs-generator: require --version, --resources, --docs flags 5. Auto-rebuild: yaml-generator rebuilds if sources newer than binary 6. Three version vars → one VERSION in profile.env 7. Created TOOLS/lib/ — shared YAML contract types (not yet integrated)
33 lines
782 B
Go
33 lines
782 B
Go
// Terraform-провайдер Nubes Cloud.
|
|
//
|
|
// Регистрирует провайдер в hashicorp/terraform-plugin-framework.
|
|
// Все ресурсы подключаются через resources_gen.AllResources().
|
|
//
|
|
// Сборка: go build -o terraform-provider-nubes .
|
|
// Версия задаётся через ldflags: -ldflags "-X main.version=X.Y.Z"
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"log"
|
|
|
|
"terraform-provider-nubes/internal/provider"
|
|
|
|
"github.com/hashicorp/terraform-plugin-framework/providerserver"
|
|
)
|
|
|
|
var (
|
|
version string = "5.0.60"
|
|
)
|
|
|
|
func main() {
|
|
opts := providerserver.ServeOpts{
|
|
Address: "terra.k8c.ru/nubes-test/nubes",
|
|
}
|
|
|
|
err := providerserver.Serve(context.Background(), provider.New(version), opts)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|