From 22daa9629dc0077a4c94f8546cd3124479eef721 Mon Sep 17 00:00:00 2001 From: "lukasz.widera@vshn.ch" Date: Tue, 1 Oct 2024 12:34:26 +0200 Subject: [PATCH] draft: init --- config/exoscale_block_storage_volume/config.go | 12 ++++++++++++ config/external_name.go | 3 ++- config/provider.go | 5 +++-- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 config/exoscale_block_storage_volume/config.go diff --git a/config/exoscale_block_storage_volume/config.go b/config/exoscale_block_storage_volume/config.go new file mode 100644 index 0000000..6ad985f --- /dev/null +++ b/config/exoscale_block_storage_volume/config.go @@ -0,0 +1,12 @@ +package exoscale_block_storage_volume + +import "github.com/crossplane/upjet/pkg/config" + +// Configure configures individual resources by adding custom ResourceConfigurators. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("exoscale_block_storage_volume", func(r *config.Resource) { + // We need to override the default group that upjet generated for + // this resource, which would be "github" + r.ShortGroup = "exoscale_block_storage_volume" + }) +} diff --git a/config/external_name.go b/config/external_name.go index 1fcc559..4038823 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -10,7 +10,8 @@ import "github.com/crossplane/upjet/pkg/config" // provider. var ExternalNameConfigs = map[string]config.ExternalName{ // Import requires using a randomly generated ID from provider: nl-2e21sda - "null_resource": config.IdentifierFromProvider, + //"null_resource": config.IdentifierFromProvider, + "exoscale_block_storage_volume": config.NameAsIdentifier, } // ExternalNameConfigurations applies all external name configs listed in the diff --git a/config/provider.go b/config/provider.go index 7f53564..3fbc5b1 100644 --- a/config/provider.go +++ b/config/provider.go @@ -10,7 +10,7 @@ import ( ujconfig "github.com/crossplane/upjet/pkg/config" - "github.com/upbound/upjet-provider-template/config/null" + "github.com/upbound/upjet-provider-template/config/exoscale_block_storage_volume" ) const ( @@ -36,7 +36,8 @@ func GetProvider() *ujconfig.Provider { for _, configure := range []func(provider *ujconfig.Provider){ // add custom config functions - null.Configure, + //null.Configure, + exoscale_block_storage_volume.Configure, } { configure(pc) }