File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ package main
88
99import (
1010 "context"
11+ "log"
1112 "os"
1213 "path/filepath"
1314 "time"
@@ -36,10 +37,18 @@ import (
3637
3738 "github.com/upbound/provider-opentofu/apis"
3839 "github.com/upbound/provider-opentofu/apis/v1beta1"
40+ "github.com/upbound/provider-opentofu/internal/bootcheck"
3941 workspace "github.com/upbound/provider-opentofu/internal/controller"
4042 "github.com/upbound/provider-opentofu/internal/controller/features"
4143)
4244
45+ func init () {
46+ err := bootcheck .CheckEnv ()
47+ if err != nil {
48+ log .Fatalf ("bootcheck failed. provider will not be started: %v" , err )
49+ }
50+ }
51+
4352func main () {
4453 var (
4554 app = kingpin .New (filepath .Base (os .Args [0 ]), "Terraform HCL support for Crossplane via OpenTofu." ).DefaultEnvars ()
Original file line number Diff line number Diff line change 1+ //go:build !custombootcheck
2+ // +build !custombootcheck
3+
4+ package bootcheck
5+
6+ func CheckEnv () error {
7+ // No-op by default. Use build tags for build-time isolation of custom preflight checks.
8+ // Ensure to update the build tags on L1-L2 so that they are mutually exclusive across implementations.
9+ return nil
10+ }
You can’t perform that action at this time.
0 commit comments