upload.go:
- Update → Patch (MergeFrom) to avoid resourceVersion conflict when operator
modifies Function between Get() and Update()
terraform provider v0.1.1:
- trigger_resource.go: trToModel returns StringNull() for empty schedule
(fixes 'provider produced inconsistent result' for http triggers)
- main.go: bump version to 0.1.1
examples/pg-query:
- handler.py: fix column name started_at → created_at (matches migrations/001)
- main.tf: pin provider to ~> 0.1.1
.gitignore: add terraform state, lock, .terraform/, handler.zip
doc/errors/log.md: documented all 5 errors from this session:
- resourceVersion conflict → use Patch
- terraform inconsistent result for schedule → StringNull
- terraform import not implemented → delete+recreate workaround
- wrong column name → check migrations before writing handlers
- Deployment not restarting after image rebuild → rollout restart / TODO: restartedAt annotation
doc/progress.md: terraform apply e2e ✅
26 lines
659 B
Go
26 lines
659 B
Go
// 2026-03-07
|
|
// main.go — точка входа Terraform провайдера sless.
|
|
// Address: terra.k8c.ru/naeel/sless — путь в реестре terra.k8c.ru.
|
|
package main
|
|
|
|
import (
|
|
"context"
|
|
"log"
|
|
|
|
"terraform-provider-sless/internal/provider"
|
|
|
|
"github.com/hashicorp/terraform-plugin-framework/providerserver"
|
|
)
|
|
|
|
// version задаётся ldflags при сборке: -ldflags "-X main.version=0.1.1"
|
|
var version string = "0.1.1"
|
|
|
|
func main() {
|
|
opts := providerserver.ServeOpts{
|
|
Address: "terra.k8c.ru/naeel/sless",
|
|
}
|
|
if err := providerserver.Serve(context.Background(), provider.New(version), opts); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|