diff --git a/cmd/provider/accessanalyzer/zz_main.go b/cmd/provider/accessanalyzer/zz_main.go index 3f23516721..f1bba41cba 100644 --- a/cmd/provider/accessanalyzer/zz_main.go +++ b/cmd/provider/accessanalyzer/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/account/zz_main.go b/cmd/provider/account/zz_main.go index 717ece2394..4694e4f7b7 100644 --- a/cmd/provider/account/zz_main.go +++ b/cmd/provider/account/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/acm/zz_main.go b/cmd/provider/acm/zz_main.go index 2dc5ba5b5c..30d4e484c1 100644 --- a/cmd/provider/acm/zz_main.go +++ b/cmd/provider/acm/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/acmpca/zz_main.go b/cmd/provider/acmpca/zz_main.go index 1b95fd8ded..11ed163c83 100644 --- a/cmd/provider/acmpca/zz_main.go +++ b/cmd/provider/acmpca/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/amp/zz_main.go b/cmd/provider/amp/zz_main.go index d3edab958c..8f1065df34 100644 --- a/cmd/provider/amp/zz_main.go +++ b/cmd/provider/amp/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/amplify/zz_main.go b/cmd/provider/amplify/zz_main.go index 159647f4f3..f1467ffff5 100644 --- a/cmd/provider/amplify/zz_main.go +++ b/cmd/provider/amplify/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/apigateway/zz_main.go b/cmd/provider/apigateway/zz_main.go index 137c8cec87..2b27215554 100644 --- a/cmd/provider/apigateway/zz_main.go +++ b/cmd/provider/apigateway/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/apigatewayv2/zz_main.go b/cmd/provider/apigatewayv2/zz_main.go index faeead650b..c33b84d929 100644 --- a/cmd/provider/apigatewayv2/zz_main.go +++ b/cmd/provider/apigatewayv2/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/appautoscaling/zz_main.go b/cmd/provider/appautoscaling/zz_main.go index 6188204ddf..ed0bfd941f 100644 --- a/cmd/provider/appautoscaling/zz_main.go +++ b/cmd/provider/appautoscaling/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/appconfig/zz_main.go b/cmd/provider/appconfig/zz_main.go index bea5f3255f..68bfd5f6ca 100644 --- a/cmd/provider/appconfig/zz_main.go +++ b/cmd/provider/appconfig/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/appflow/zz_main.go b/cmd/provider/appflow/zz_main.go index c8bb4223f8..eafa080c9d 100644 --- a/cmd/provider/appflow/zz_main.go +++ b/cmd/provider/appflow/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/appintegrations/zz_main.go b/cmd/provider/appintegrations/zz_main.go index 405ff3edcd..c268a2674c 100644 --- a/cmd/provider/appintegrations/zz_main.go +++ b/cmd/provider/appintegrations/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/applicationinsights/zz_main.go b/cmd/provider/applicationinsights/zz_main.go index 6cc9868841..7a98921be5 100644 --- a/cmd/provider/applicationinsights/zz_main.go +++ b/cmd/provider/applicationinsights/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/appmesh/zz_main.go b/cmd/provider/appmesh/zz_main.go index 688c46b2ae..32c3f34a2a 100644 --- a/cmd/provider/appmesh/zz_main.go +++ b/cmd/provider/appmesh/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/apprunner/zz_main.go b/cmd/provider/apprunner/zz_main.go index 7e69e9a18e..92577228b2 100644 --- a/cmd/provider/apprunner/zz_main.go +++ b/cmd/provider/apprunner/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/appstream/zz_main.go b/cmd/provider/appstream/zz_main.go index dbea23a566..e242a23767 100644 --- a/cmd/provider/appstream/zz_main.go +++ b/cmd/provider/appstream/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/appsync/zz_main.go b/cmd/provider/appsync/zz_main.go index 55eb13b8e8..e91c1e4311 100644 --- a/cmd/provider/appsync/zz_main.go +++ b/cmd/provider/appsync/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/athena/zz_main.go b/cmd/provider/athena/zz_main.go index 66c80d5877..47c2ff2066 100644 --- a/cmd/provider/athena/zz_main.go +++ b/cmd/provider/athena/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/autoscaling/zz_main.go b/cmd/provider/autoscaling/zz_main.go index 92f6d955bb..4a8d785d68 100644 --- a/cmd/provider/autoscaling/zz_main.go +++ b/cmd/provider/autoscaling/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/autoscalingplans/zz_main.go b/cmd/provider/autoscalingplans/zz_main.go index 979a39868d..b166dc6fb4 100644 --- a/cmd/provider/autoscalingplans/zz_main.go +++ b/cmd/provider/autoscalingplans/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/backup/zz_main.go b/cmd/provider/backup/zz_main.go index 0af3d6e6e3..c0b03c0bfe 100644 --- a/cmd/provider/backup/zz_main.go +++ b/cmd/provider/backup/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/batch/zz_main.go b/cmd/provider/batch/zz_main.go index fa58f725a6..3865c1afb8 100644 --- a/cmd/provider/batch/zz_main.go +++ b/cmd/provider/batch/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/budgets/zz_main.go b/cmd/provider/budgets/zz_main.go index a2411f401c..8e69afa9c9 100644 --- a/cmd/provider/budgets/zz_main.go +++ b/cmd/provider/budgets/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/ce/zz_main.go b/cmd/provider/ce/zz_main.go index 305bace531..4fb0760c8d 100644 --- a/cmd/provider/ce/zz_main.go +++ b/cmd/provider/ce/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/chime/zz_main.go b/cmd/provider/chime/zz_main.go index 68c0758c01..0e7f4385a9 100644 --- a/cmd/provider/chime/zz_main.go +++ b/cmd/provider/chime/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cloud9/zz_main.go b/cmd/provider/cloud9/zz_main.go index c0ce7f2fc1..a77c0c8197 100644 --- a/cmd/provider/cloud9/zz_main.go +++ b/cmd/provider/cloud9/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cloudcontrol/zz_main.go b/cmd/provider/cloudcontrol/zz_main.go index b046592d9a..b13d7072f6 100644 --- a/cmd/provider/cloudcontrol/zz_main.go +++ b/cmd/provider/cloudcontrol/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cloudformation/zz_main.go b/cmd/provider/cloudformation/zz_main.go index 1ea63ec9c3..e0e2da5e6f 100644 --- a/cmd/provider/cloudformation/zz_main.go +++ b/cmd/provider/cloudformation/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cloudfront/zz_main.go b/cmd/provider/cloudfront/zz_main.go index 9793eb10c0..6657e41884 100644 --- a/cmd/provider/cloudfront/zz_main.go +++ b/cmd/provider/cloudfront/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cloudsearch/zz_main.go b/cmd/provider/cloudsearch/zz_main.go index e5a650b52c..1bb1956e60 100644 --- a/cmd/provider/cloudsearch/zz_main.go +++ b/cmd/provider/cloudsearch/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cloudtrail/zz_main.go b/cmd/provider/cloudtrail/zz_main.go index 3ce27d9031..badf6b0a66 100644 --- a/cmd/provider/cloudtrail/zz_main.go +++ b/cmd/provider/cloudtrail/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cloudwatch/zz_main.go b/cmd/provider/cloudwatch/zz_main.go index 87aa59bf4c..16f6ab53b3 100644 --- a/cmd/provider/cloudwatch/zz_main.go +++ b/cmd/provider/cloudwatch/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cloudwatchevents/zz_main.go b/cmd/provider/cloudwatchevents/zz_main.go index bc0b3b6859..89e6d08f64 100644 --- a/cmd/provider/cloudwatchevents/zz_main.go +++ b/cmd/provider/cloudwatchevents/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cloudwatchlogs/zz_main.go b/cmd/provider/cloudwatchlogs/zz_main.go index 56323e1e9a..530807123d 100644 --- a/cmd/provider/cloudwatchlogs/zz_main.go +++ b/cmd/provider/cloudwatchlogs/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/codecommit/zz_main.go b/cmd/provider/codecommit/zz_main.go index 01c62c42fe..5a5c7a2b82 100644 --- a/cmd/provider/codecommit/zz_main.go +++ b/cmd/provider/codecommit/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/codepipeline/zz_main.go b/cmd/provider/codepipeline/zz_main.go index 40a83a0c1f..1b8b4967cd 100644 --- a/cmd/provider/codepipeline/zz_main.go +++ b/cmd/provider/codepipeline/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/codestarconnections/zz_main.go b/cmd/provider/codestarconnections/zz_main.go index ae7d83a344..be3e1fdc50 100644 --- a/cmd/provider/codestarconnections/zz_main.go +++ b/cmd/provider/codestarconnections/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/codestarnotifications/zz_main.go b/cmd/provider/codestarnotifications/zz_main.go index 2873f57ce8..236e41ffcf 100644 --- a/cmd/provider/codestarnotifications/zz_main.go +++ b/cmd/provider/codestarnotifications/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cognitoidentity/zz_main.go b/cmd/provider/cognitoidentity/zz_main.go index 1c51768977..c8f5fb685a 100644 --- a/cmd/provider/cognitoidentity/zz_main.go +++ b/cmd/provider/cognitoidentity/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cognitoidp/zz_main.go b/cmd/provider/cognitoidp/zz_main.go index 29739aaebb..049fcd9f24 100644 --- a/cmd/provider/cognitoidp/zz_main.go +++ b/cmd/provider/cognitoidp/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/config/zz_main.go b/cmd/provider/config/zz_main.go index 8dc6c81407..319a0300df 100644 --- a/cmd/provider/config/zz_main.go +++ b/cmd/provider/config/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/configservice/zz_main.go b/cmd/provider/configservice/zz_main.go index c1b50147f3..7e8582008f 100644 --- a/cmd/provider/configservice/zz_main.go +++ b/cmd/provider/configservice/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/connect/zz_main.go b/cmd/provider/connect/zz_main.go index 08551f1428..3432eaf8a7 100644 --- a/cmd/provider/connect/zz_main.go +++ b/cmd/provider/connect/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/cur/zz_main.go b/cmd/provider/cur/zz_main.go index 5c30cec46c..aad36edb52 100644 --- a/cmd/provider/cur/zz_main.go +++ b/cmd/provider/cur/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/dataexchange/zz_main.go b/cmd/provider/dataexchange/zz_main.go index 94267c61ce..0c008d10d0 100644 --- a/cmd/provider/dataexchange/zz_main.go +++ b/cmd/provider/dataexchange/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/datapipeline/zz_main.go b/cmd/provider/datapipeline/zz_main.go index 1e017fdb75..39c33a5bde 100644 --- a/cmd/provider/datapipeline/zz_main.go +++ b/cmd/provider/datapipeline/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/datasync/zz_main.go b/cmd/provider/datasync/zz_main.go index 20c7845d4d..abef5aa4b0 100644 --- a/cmd/provider/datasync/zz_main.go +++ b/cmd/provider/datasync/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/dax/zz_main.go b/cmd/provider/dax/zz_main.go index 3a8d2bb5bd..c25635b8c1 100644 --- a/cmd/provider/dax/zz_main.go +++ b/cmd/provider/dax/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/deploy/zz_main.go b/cmd/provider/deploy/zz_main.go index 1b66bd000f..ee263b8ab3 100644 --- a/cmd/provider/deploy/zz_main.go +++ b/cmd/provider/deploy/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/detective/zz_main.go b/cmd/provider/detective/zz_main.go index 2c2f9e874e..5d834b0b07 100644 --- a/cmd/provider/detective/zz_main.go +++ b/cmd/provider/detective/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/devicefarm/zz_main.go b/cmd/provider/devicefarm/zz_main.go index e16c7c2f83..7dd58bc8e2 100644 --- a/cmd/provider/devicefarm/zz_main.go +++ b/cmd/provider/devicefarm/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/directconnect/zz_main.go b/cmd/provider/directconnect/zz_main.go index cd80ef0f09..08d04748df 100644 --- a/cmd/provider/directconnect/zz_main.go +++ b/cmd/provider/directconnect/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/dlm/zz_main.go b/cmd/provider/dlm/zz_main.go index bf00431b06..e27013a5b5 100644 --- a/cmd/provider/dlm/zz_main.go +++ b/cmd/provider/dlm/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/dms/zz_main.go b/cmd/provider/dms/zz_main.go index 3f3dbe1633..6c8dc789a3 100644 --- a/cmd/provider/dms/zz_main.go +++ b/cmd/provider/dms/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/docdb/zz_main.go b/cmd/provider/docdb/zz_main.go index 947640ce89..32a9dd94a5 100644 --- a/cmd/provider/docdb/zz_main.go +++ b/cmd/provider/docdb/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/ds/zz_main.go b/cmd/provider/ds/zz_main.go index 0eea8def75..a4594d0374 100644 --- a/cmd/provider/ds/zz_main.go +++ b/cmd/provider/ds/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/dynamodb/zz_main.go b/cmd/provider/dynamodb/zz_main.go index f3e7383123..7b6f5039ed 100644 --- a/cmd/provider/dynamodb/zz_main.go +++ b/cmd/provider/dynamodb/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/ec2/zz_main.go b/cmd/provider/ec2/zz_main.go index 21c775899f..c6940651a2 100644 --- a/cmd/provider/ec2/zz_main.go +++ b/cmd/provider/ec2/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/ecr/zz_main.go b/cmd/provider/ecr/zz_main.go index 34ab5f5c31..1c819cec11 100644 --- a/cmd/provider/ecr/zz_main.go +++ b/cmd/provider/ecr/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/ecrpublic/zz_main.go b/cmd/provider/ecrpublic/zz_main.go index c89fc9945e..18bdf3208e 100644 --- a/cmd/provider/ecrpublic/zz_main.go +++ b/cmd/provider/ecrpublic/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/ecs/zz_main.go b/cmd/provider/ecs/zz_main.go index b03b73e19c..c5d10c6e0a 100644 --- a/cmd/provider/ecs/zz_main.go +++ b/cmd/provider/ecs/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/efs/zz_main.go b/cmd/provider/efs/zz_main.go index 0b1dc2743c..47dd63da91 100644 --- a/cmd/provider/efs/zz_main.go +++ b/cmd/provider/efs/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/eks/zz_main.go b/cmd/provider/eks/zz_main.go index 223f03b905..2cca2f9d42 100644 --- a/cmd/provider/eks/zz_main.go +++ b/cmd/provider/eks/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/elasticache/zz_main.go b/cmd/provider/elasticache/zz_main.go index b2957a700b..bf707b8214 100644 --- a/cmd/provider/elasticache/zz_main.go +++ b/cmd/provider/elasticache/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/elasticbeanstalk/zz_main.go b/cmd/provider/elasticbeanstalk/zz_main.go index cb50409fb6..42fb04984b 100644 --- a/cmd/provider/elasticbeanstalk/zz_main.go +++ b/cmd/provider/elasticbeanstalk/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/elasticsearch/zz_main.go b/cmd/provider/elasticsearch/zz_main.go index 166234662c..344020d282 100644 --- a/cmd/provider/elasticsearch/zz_main.go +++ b/cmd/provider/elasticsearch/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/elastictranscoder/zz_main.go b/cmd/provider/elastictranscoder/zz_main.go index 7f424d6e53..63510f4ff2 100644 --- a/cmd/provider/elastictranscoder/zz_main.go +++ b/cmd/provider/elastictranscoder/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/elb/zz_main.go b/cmd/provider/elb/zz_main.go index c5ca4395b5..8232dd5f6f 100644 --- a/cmd/provider/elb/zz_main.go +++ b/cmd/provider/elb/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/elbv2/zz_main.go b/cmd/provider/elbv2/zz_main.go index 53160b3efe..c43edd3521 100644 --- a/cmd/provider/elbv2/zz_main.go +++ b/cmd/provider/elbv2/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/emr/zz_main.go b/cmd/provider/emr/zz_main.go index c0fe57a85b..c7ec0a3e9d 100644 --- a/cmd/provider/emr/zz_main.go +++ b/cmd/provider/emr/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/emrserverless/zz_main.go b/cmd/provider/emrserverless/zz_main.go index ef8bf40330..b7d5f0756f 100644 --- a/cmd/provider/emrserverless/zz_main.go +++ b/cmd/provider/emrserverless/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/evidently/zz_main.go b/cmd/provider/evidently/zz_main.go index 690d332f3b..5228f5936a 100644 --- a/cmd/provider/evidently/zz_main.go +++ b/cmd/provider/evidently/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/firehose/zz_main.go b/cmd/provider/firehose/zz_main.go index 28260d0a08..86df585f63 100644 --- a/cmd/provider/firehose/zz_main.go +++ b/cmd/provider/firehose/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/fis/zz_main.go b/cmd/provider/fis/zz_main.go index 9702ad9897..5c84a29b97 100644 --- a/cmd/provider/fis/zz_main.go +++ b/cmd/provider/fis/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/fsx/zz_main.go b/cmd/provider/fsx/zz_main.go index 66bf1ec622..3019e54fac 100644 --- a/cmd/provider/fsx/zz_main.go +++ b/cmd/provider/fsx/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/gamelift/zz_main.go b/cmd/provider/gamelift/zz_main.go index 0f6d077c60..f935c586ec 100644 --- a/cmd/provider/gamelift/zz_main.go +++ b/cmd/provider/gamelift/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/glacier/zz_main.go b/cmd/provider/glacier/zz_main.go index 86769ac3b6..9968aad22e 100644 --- a/cmd/provider/glacier/zz_main.go +++ b/cmd/provider/glacier/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/globalaccelerator/zz_main.go b/cmd/provider/globalaccelerator/zz_main.go index 695d6fc3ad..36b87de218 100644 --- a/cmd/provider/globalaccelerator/zz_main.go +++ b/cmd/provider/globalaccelerator/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/glue/zz_main.go b/cmd/provider/glue/zz_main.go index e8e4dc8e34..3e5683fdc6 100644 --- a/cmd/provider/glue/zz_main.go +++ b/cmd/provider/glue/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/grafana/zz_main.go b/cmd/provider/grafana/zz_main.go index 25057293dc..7e1d0aa288 100644 --- a/cmd/provider/grafana/zz_main.go +++ b/cmd/provider/grafana/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/guardduty/zz_main.go b/cmd/provider/guardduty/zz_main.go index 2f8ff6da2a..70b83ef784 100644 --- a/cmd/provider/guardduty/zz_main.go +++ b/cmd/provider/guardduty/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/iam/zz_main.go b/cmd/provider/iam/zz_main.go index 7f502e43df..3af4a9e358 100644 --- a/cmd/provider/iam/zz_main.go +++ b/cmd/provider/iam/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/imagebuilder/zz_main.go b/cmd/provider/imagebuilder/zz_main.go index f9c4fc071f..c3449fb81a 100644 --- a/cmd/provider/imagebuilder/zz_main.go +++ b/cmd/provider/imagebuilder/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/inspector/zz_main.go b/cmd/provider/inspector/zz_main.go index 4e8e5e4a2f..30636c157f 100644 --- a/cmd/provider/inspector/zz_main.go +++ b/cmd/provider/inspector/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/inspector2/zz_main.go b/cmd/provider/inspector2/zz_main.go index 38bcf1b980..760aae2b10 100644 --- a/cmd/provider/inspector2/zz_main.go +++ b/cmd/provider/inspector2/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/iot/zz_main.go b/cmd/provider/iot/zz_main.go index 145d32db99..b8daae6aff 100644 --- a/cmd/provider/iot/zz_main.go +++ b/cmd/provider/iot/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/ivs/zz_main.go b/cmd/provider/ivs/zz_main.go index 89698813be..f47f78bc19 100644 --- a/cmd/provider/ivs/zz_main.go +++ b/cmd/provider/ivs/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/kafka/zz_main.go b/cmd/provider/kafka/zz_main.go index fc5776b59e..152d544e78 100644 --- a/cmd/provider/kafka/zz_main.go +++ b/cmd/provider/kafka/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/kendra/zz_main.go b/cmd/provider/kendra/zz_main.go index 8b573b3a26..fe408cebe7 100644 --- a/cmd/provider/kendra/zz_main.go +++ b/cmd/provider/kendra/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/keyspaces/zz_main.go b/cmd/provider/keyspaces/zz_main.go index aaa86fb3fa..0e952b52d6 100644 --- a/cmd/provider/keyspaces/zz_main.go +++ b/cmd/provider/keyspaces/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/kinesis/zz_main.go b/cmd/provider/kinesis/zz_main.go index 01149d0388..d5aab5a197 100644 --- a/cmd/provider/kinesis/zz_main.go +++ b/cmd/provider/kinesis/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/kinesisanalytics/zz_main.go b/cmd/provider/kinesisanalytics/zz_main.go index abc278fd89..d2e0caf97d 100644 --- a/cmd/provider/kinesisanalytics/zz_main.go +++ b/cmd/provider/kinesisanalytics/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/kinesisanalyticsv2/zz_main.go b/cmd/provider/kinesisanalyticsv2/zz_main.go index e9b3980d5c..4552752090 100644 --- a/cmd/provider/kinesisanalyticsv2/zz_main.go +++ b/cmd/provider/kinesisanalyticsv2/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/kinesisvideo/zz_main.go b/cmd/provider/kinesisvideo/zz_main.go index 2e3e89599e..3f08cd691b 100644 --- a/cmd/provider/kinesisvideo/zz_main.go +++ b/cmd/provider/kinesisvideo/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/kms/zz_main.go b/cmd/provider/kms/zz_main.go index e9cce9b463..079439b769 100644 --- a/cmd/provider/kms/zz_main.go +++ b/cmd/provider/kms/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/lakeformation/zz_main.go b/cmd/provider/lakeformation/zz_main.go index 8bd726f1e4..648232ec78 100644 --- a/cmd/provider/lakeformation/zz_main.go +++ b/cmd/provider/lakeformation/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/lambda/zz_main.go b/cmd/provider/lambda/zz_main.go index e2e3e1b97b..b09818ba46 100644 --- a/cmd/provider/lambda/zz_main.go +++ b/cmd/provider/lambda/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/lexmodels/zz_main.go b/cmd/provider/lexmodels/zz_main.go index 55331210fc..7c2b7f6b74 100644 --- a/cmd/provider/lexmodels/zz_main.go +++ b/cmd/provider/lexmodels/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/licensemanager/zz_main.go b/cmd/provider/licensemanager/zz_main.go index 745e2c8f72..c416d89edb 100644 --- a/cmd/provider/licensemanager/zz_main.go +++ b/cmd/provider/licensemanager/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/lightsail/zz_main.go b/cmd/provider/lightsail/zz_main.go index dbd493a7f2..cfcd18c533 100644 --- a/cmd/provider/lightsail/zz_main.go +++ b/cmd/provider/lightsail/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/location/zz_main.go b/cmd/provider/location/zz_main.go index 6e85a50971..e1cb91ee13 100644 --- a/cmd/provider/location/zz_main.go +++ b/cmd/provider/location/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/macie2/zz_main.go b/cmd/provider/macie2/zz_main.go index 548690d7f7..dd54e15671 100644 --- a/cmd/provider/macie2/zz_main.go +++ b/cmd/provider/macie2/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/mediaconvert/zz_main.go b/cmd/provider/mediaconvert/zz_main.go index a6e55c5dbe..2521f2e63c 100644 --- a/cmd/provider/mediaconvert/zz_main.go +++ b/cmd/provider/mediaconvert/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/medialive/zz_main.go b/cmd/provider/medialive/zz_main.go index 11b5dcbb85..9bf533d85a 100644 --- a/cmd/provider/medialive/zz_main.go +++ b/cmd/provider/medialive/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/mediapackage/zz_main.go b/cmd/provider/mediapackage/zz_main.go index 680d39ec78..71ea614568 100644 --- a/cmd/provider/mediapackage/zz_main.go +++ b/cmd/provider/mediapackage/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/mediastore/zz_main.go b/cmd/provider/mediastore/zz_main.go index 4cb62e07a2..41e55fa157 100644 --- a/cmd/provider/mediastore/zz_main.go +++ b/cmd/provider/mediastore/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/memorydb/zz_main.go b/cmd/provider/memorydb/zz_main.go index 6f97ee8198..fdd9684b48 100644 --- a/cmd/provider/memorydb/zz_main.go +++ b/cmd/provider/memorydb/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/monolith/zz_main.go b/cmd/provider/monolith/zz_main.go index 2294524f48..b39d907dd1 100644 --- a/cmd/provider/monolith/zz_main.go +++ b/cmd/provider/monolith/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/mq/zz_main.go b/cmd/provider/mq/zz_main.go index 4b61a86787..819ddc3b4f 100644 --- a/cmd/provider/mq/zz_main.go +++ b/cmd/provider/mq/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/neptune/zz_main.go b/cmd/provider/neptune/zz_main.go index 59841880ce..855da39974 100644 --- a/cmd/provider/neptune/zz_main.go +++ b/cmd/provider/neptune/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/networkfirewall/zz_main.go b/cmd/provider/networkfirewall/zz_main.go index 2cb1bdf83e..2f0ee57616 100644 --- a/cmd/provider/networkfirewall/zz_main.go +++ b/cmd/provider/networkfirewall/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/networkmanager/zz_main.go b/cmd/provider/networkmanager/zz_main.go index 1225fe7c23..db3738eae5 100644 --- a/cmd/provider/networkmanager/zz_main.go +++ b/cmd/provider/networkmanager/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/opensearch/zz_main.go b/cmd/provider/opensearch/zz_main.go index 9925b26ec4..ae54167b0f 100644 --- a/cmd/provider/opensearch/zz_main.go +++ b/cmd/provider/opensearch/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/opsworks/zz_main.go b/cmd/provider/opsworks/zz_main.go index fe32c5513b..53ca338b8f 100644 --- a/cmd/provider/opsworks/zz_main.go +++ b/cmd/provider/opsworks/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/organizations/zz_main.go b/cmd/provider/organizations/zz_main.go index e8fe8e7153..25724c1143 100644 --- a/cmd/provider/organizations/zz_main.go +++ b/cmd/provider/organizations/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/pinpoint/zz_main.go b/cmd/provider/pinpoint/zz_main.go index ae4247a826..9273835cab 100644 --- a/cmd/provider/pinpoint/zz_main.go +++ b/cmd/provider/pinpoint/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/qldb/zz_main.go b/cmd/provider/qldb/zz_main.go index 0c62cc74de..ff6b63b23b 100644 --- a/cmd/provider/qldb/zz_main.go +++ b/cmd/provider/qldb/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/quicksight/zz_main.go b/cmd/provider/quicksight/zz_main.go index f3be787a1e..7ede99a90f 100644 --- a/cmd/provider/quicksight/zz_main.go +++ b/cmd/provider/quicksight/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/ram/zz_main.go b/cmd/provider/ram/zz_main.go index fa0ebebe5c..a369f95200 100644 --- a/cmd/provider/ram/zz_main.go +++ b/cmd/provider/ram/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/rds/zz_main.go b/cmd/provider/rds/zz_main.go index e3b3543c61..d6cd31556b 100644 --- a/cmd/provider/rds/zz_main.go +++ b/cmd/provider/rds/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/redshift/zz_main.go b/cmd/provider/redshift/zz_main.go index a81476ebc3..14d7c72229 100644 --- a/cmd/provider/redshift/zz_main.go +++ b/cmd/provider/redshift/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/resourcegroups/zz_main.go b/cmd/provider/resourcegroups/zz_main.go index 73290e0740..9cb706bb76 100644 --- a/cmd/provider/resourcegroups/zz_main.go +++ b/cmd/provider/resourcegroups/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/rolesanywhere/zz_main.go b/cmd/provider/rolesanywhere/zz_main.go index a54dd33968..70dbf6152f 100644 --- a/cmd/provider/rolesanywhere/zz_main.go +++ b/cmd/provider/rolesanywhere/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/route53/zz_main.go b/cmd/provider/route53/zz_main.go index bd078063a1..425d236fff 100644 --- a/cmd/provider/route53/zz_main.go +++ b/cmd/provider/route53/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/route53recoverycontrolconfig/zz_main.go b/cmd/provider/route53recoverycontrolconfig/zz_main.go index 8a5464fef5..317588a469 100644 --- a/cmd/provider/route53recoverycontrolconfig/zz_main.go +++ b/cmd/provider/route53recoverycontrolconfig/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/route53recoveryreadiness/zz_main.go b/cmd/provider/route53recoveryreadiness/zz_main.go index 24ba27e469..d3f437af16 100644 --- a/cmd/provider/route53recoveryreadiness/zz_main.go +++ b/cmd/provider/route53recoveryreadiness/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/route53resolver/zz_main.go b/cmd/provider/route53resolver/zz_main.go index 2f2fe57d02..499e64d398 100644 --- a/cmd/provider/route53resolver/zz_main.go +++ b/cmd/provider/route53resolver/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/rum/zz_main.go b/cmd/provider/rum/zz_main.go index cfd8e44aa6..8d338ec12c 100644 --- a/cmd/provider/rum/zz_main.go +++ b/cmd/provider/rum/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/s3/zz_main.go b/cmd/provider/s3/zz_main.go index 221697698d..4e371c8372 100644 --- a/cmd/provider/s3/zz_main.go +++ b/cmd/provider/s3/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/s3control/zz_main.go b/cmd/provider/s3control/zz_main.go index 219a7fa14b..f907f6d2f9 100644 --- a/cmd/provider/s3control/zz_main.go +++ b/cmd/provider/s3control/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/sagemaker/zz_main.go b/cmd/provider/sagemaker/zz_main.go index aecf13798a..9595557707 100644 --- a/cmd/provider/sagemaker/zz_main.go +++ b/cmd/provider/sagemaker/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/scheduler/zz_main.go b/cmd/provider/scheduler/zz_main.go index b14c178ba2..75727dd573 100644 --- a/cmd/provider/scheduler/zz_main.go +++ b/cmd/provider/scheduler/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/schemas/zz_main.go b/cmd/provider/schemas/zz_main.go index 4f284fe45c..ba7a2bd352 100644 --- a/cmd/provider/schemas/zz_main.go +++ b/cmd/provider/schemas/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/secretsmanager/zz_main.go b/cmd/provider/secretsmanager/zz_main.go index 892933cd7d..89e3fa28d1 100644 --- a/cmd/provider/secretsmanager/zz_main.go +++ b/cmd/provider/secretsmanager/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/securityhub/zz_main.go b/cmd/provider/securityhub/zz_main.go index a6e29343ee..c37d0acb5c 100644 --- a/cmd/provider/securityhub/zz_main.go +++ b/cmd/provider/securityhub/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/serverlessrepo/zz_main.go b/cmd/provider/serverlessrepo/zz_main.go index 0298eb2a89..c0a2a83642 100644 --- a/cmd/provider/serverlessrepo/zz_main.go +++ b/cmd/provider/serverlessrepo/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/servicecatalog/zz_main.go b/cmd/provider/servicecatalog/zz_main.go index 088700fbc4..695cb907e8 100644 --- a/cmd/provider/servicecatalog/zz_main.go +++ b/cmd/provider/servicecatalog/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/servicediscovery/zz_main.go b/cmd/provider/servicediscovery/zz_main.go index 655733f6e2..d2fe61fad4 100644 --- a/cmd/provider/servicediscovery/zz_main.go +++ b/cmd/provider/servicediscovery/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/servicequotas/zz_main.go b/cmd/provider/servicequotas/zz_main.go index 34fc7faf88..fc70e1c9e0 100644 --- a/cmd/provider/servicequotas/zz_main.go +++ b/cmd/provider/servicequotas/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/ses/zz_main.go b/cmd/provider/ses/zz_main.go index cadce2d5c5..9fa83524d6 100644 --- a/cmd/provider/ses/zz_main.go +++ b/cmd/provider/ses/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/sesv2/zz_main.go b/cmd/provider/sesv2/zz_main.go index d9acfb5a0a..971508ae31 100644 --- a/cmd/provider/sesv2/zz_main.go +++ b/cmd/provider/sesv2/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/sfn/zz_main.go b/cmd/provider/sfn/zz_main.go index 2c0390237b..ff5d093365 100644 --- a/cmd/provider/sfn/zz_main.go +++ b/cmd/provider/sfn/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/signer/zz_main.go b/cmd/provider/signer/zz_main.go index 49e05b5c3a..1ebb14f804 100644 --- a/cmd/provider/signer/zz_main.go +++ b/cmd/provider/signer/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/simpledb/zz_main.go b/cmd/provider/simpledb/zz_main.go index fcd34d1480..ad301d22cd 100644 --- a/cmd/provider/simpledb/zz_main.go +++ b/cmd/provider/simpledb/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/sns/zz_main.go b/cmd/provider/sns/zz_main.go index bdc6991782..a03a206ede 100644 --- a/cmd/provider/sns/zz_main.go +++ b/cmd/provider/sns/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/sqs/zz_main.go b/cmd/provider/sqs/zz_main.go index 753169353a..688701d6bf 100644 --- a/cmd/provider/sqs/zz_main.go +++ b/cmd/provider/sqs/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/ssm/zz_main.go b/cmd/provider/ssm/zz_main.go index a97a98da78..d62a791d90 100644 --- a/cmd/provider/ssm/zz_main.go +++ b/cmd/provider/ssm/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/ssoadmin/zz_main.go b/cmd/provider/ssoadmin/zz_main.go index 8cfc737dd2..29a51caf61 100644 --- a/cmd/provider/ssoadmin/zz_main.go +++ b/cmd/provider/ssoadmin/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/swf/zz_main.go b/cmd/provider/swf/zz_main.go index 88d4c9b54c..ab43cb24ee 100644 --- a/cmd/provider/swf/zz_main.go +++ b/cmd/provider/swf/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/timestreamwrite/zz_main.go b/cmd/provider/timestreamwrite/zz_main.go index cf4cca937f..4b187546b7 100644 --- a/cmd/provider/timestreamwrite/zz_main.go +++ b/cmd/provider/timestreamwrite/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/transcribe/zz_main.go b/cmd/provider/transcribe/zz_main.go index 2ea3c32dcb..e0bbc9b1d2 100644 --- a/cmd/provider/transcribe/zz_main.go +++ b/cmd/provider/transcribe/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/transfer/zz_main.go b/cmd/provider/transfer/zz_main.go index 1402d4852c..2bd0b93133 100644 --- a/cmd/provider/transfer/zz_main.go +++ b/cmd/provider/transfer/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/vpc/zz_main.go b/cmd/provider/vpc/zz_main.go index 78221739dc..360d76759b 100644 --- a/cmd/provider/vpc/zz_main.go +++ b/cmd/provider/vpc/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/waf/zz_main.go b/cmd/provider/waf/zz_main.go index 00cd8a059e..e9abccc547 100644 --- a/cmd/provider/waf/zz_main.go +++ b/cmd/provider/waf/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/wafregional/zz_main.go b/cmd/provider/wafregional/zz_main.go index 06ccc4dfe4..d20553fbc1 100644 --- a/cmd/provider/wafregional/zz_main.go +++ b/cmd/provider/wafregional/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/wafv2/zz_main.go b/cmd/provider/wafv2/zz_main.go index 67644970a2..744880b3e2 100644 --- a/cmd/provider/wafv2/zz_main.go +++ b/cmd/provider/wafv2/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/workspaces/zz_main.go b/cmd/provider/workspaces/zz_main.go index 05308e0a48..17eb9c1629 100644 --- a/cmd/provider/workspaces/zz_main.go +++ b/cmd/provider/workspaces/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/cmd/provider/xray/zz_main.go b/cmd/provider/xray/zz_main.go index cc9cc9e65b..e599812a47 100644 --- a/cmd/provider/xray/zz_main.go +++ b/cmd/provider/xray/zz_main.go @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores { diff --git a/config/kendra/config.go b/config/kendra/config.go index 768d9e11f8..fd9f66ea0f 100644 --- a/config/kendra/config.go +++ b/config/kendra/config.go @@ -18,7 +18,7 @@ import ( "github.com/upbound/upjet/pkg/config" ) -// Configure adds configurations for kafka group. +// Configure adds configurations for kendra group. func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_kendra_thesaurus", func(r *config.Resource) { r.Path = "thesaurus" diff --git a/config/medialive/config.go b/config/medialive/config.go index 244dd5d263..4c666adf9f 100644 --- a/config/medialive/config.go +++ b/config/medialive/config.go @@ -18,7 +18,7 @@ import ( "github.com/upbound/upjet/pkg/config" ) -// Configure adds configurations for kafka group. +// Configure adds configurations for medialive group. func Configure(p *config.Provider) { p.AddResourceConfigurator("aws_medialive_multiplex", func(r *config.Resource) { r.Path = "multiplices" diff --git a/go.mod b/go.mod index a5760cb556..0c42ba7302 100644 --- a/go.mod +++ b/go.mod @@ -15,7 +15,7 @@ require ( github.com/google/go-cmp v0.5.9 github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 github.com/pkg/errors v0.9.1 - github.com/upbound/upjet v0.9.0-rc.0.0.20230502154751-645d7260d814 + github.com/upbound/upjet v0.9.0-rc.0.0.20230727122232-e4ffeb8a7525 gopkg.in/alecthomas/kingpin.v2 v2.2.6 k8s.io/api v0.27.3 k8s.io/apimachinery v0.27.3 @@ -147,5 +147,3 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) - -replace github.com/upbound/upjet => ../upjet diff --git a/go.sum b/go.sum index 6170bd1b76..cb796f12b5 100644 --- a/go.sum +++ b/go.sum @@ -434,6 +434,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ= github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w= +github.com/upbound/upjet v0.9.0-rc.0.0.20230727122232-e4ffeb8a7525 h1:2tcQ4rx245LSVKWg8DJOT5mSt/QKExNKPjrE7wfaZNY= +github.com/upbound/upjet v0.9.0-rc.0.0.20230727122232-e4ffeb8a7525/go.mod h1:xCHefrWUjGkIBwFCy1dK+n5TgLczTriASLrejL8vdgU= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= diff --git a/hack/main.go.tmpl b/hack/main.go.tmpl index 3f53ccf9ef..d67f0b9064 100644 --- a/hack/main.go.tmpl +++ b/hack/main.go.tmpl @@ -18,6 +18,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" tjcontroller "github.com/upbound/upjet/pkg/controller" + "github.com/upbound/upjet/pkg/controller/handler" "github.com/upbound/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" @@ -83,7 +84,7 @@ func main() { kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add AWS APIs to scheme") - eventHandler := tjcontroller.NewEventHandler() + eventHandler := handler.NewEventHandler() // if the native Terraform provider plugin's path is not configured via // the env. variable TERRAFORM_NATIVE_PROVIDER_PATH or // the `--terraform-native-provider-path` command-line option, @@ -106,7 +107,7 @@ func main() { Provider: config.GetProvider(), WorkspaceStore: terraform.NewWorkspaceStore(log, terraform.WithDisableInit(len(*setupConfig.NativeProviderPath) != 0), terraform.WithProcessReportInterval(*pollInterval)), SetupFn: clients.SelectTerraformSetup(log, setupConfig), - EventHandler: eventHandler, + EventHandler: eventHandler, } if *enableExternalSecretStores {