diff --git a/config/cluster/config.go b/config/cluster/config.go new file mode 100644 index 0000000..15b9a65 --- /dev/null +++ b/config/cluster/config.go @@ -0,0 +1,12 @@ +package cluster + +import "github.com/upbound/upjet/pkg/config" + +// Configure configures individual resources by adding custom ResourceConfigurators. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("tanzu-mission-control_cluster", func(r *config.Resource) { + r.ShortGroup = "tmc" + r.Kind = "Cluster" + r.Version = "v1alpha1" + }) +} \ No newline at end of file diff --git a/config/external_name.go b/config/external_name.go index eb925a0..95e0e29 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -11,6 +11,7 @@ import "github.com/upbound/upjet/pkg/config" var ExternalNameConfigs = map[string]config.ExternalName{ // Import requires using a randomly generated ID from provider: nl-2e21sda "tanzu-mission-control_akscluster": config.IdentifierFromProvider, + "tanzu-mission-control_cluster": config.IdentifierFromProvider, } // ExternalNameConfigurations applies all external name configs listed in the diff --git a/config/provider.go b/config/provider.go index ae8e0d4..3b151d2 100644 --- a/config/provider.go +++ b/config/provider.go @@ -39,6 +39,7 @@ func GetProvider() *ujconfig.Provider { for _, configure := range []func(provider *ujconfig.Provider){ // add custom config functions akscluster.Configure, + cluster.Configure, } { configure(pc)