diff --git a/config/control_credential/config.go b/config/credential/config.go similarity index 81% rename from config/control_credential/config.go rename to config/credential/config.go index 68e6239..cc4bb97 100644 --- a/config/control_credential/config.go +++ b/config/credential/config.go @@ -1,4 +1,4 @@ -package control_credential +package credential import "github.com/upbound/upjet/pkg/config" @@ -6,7 +6,7 @@ import "github.com/upbound/upjet/pkg/config" func Configure(p *config.Provider) { p.AddResourceConfigurator("tanzu-mission-control_credential", func(r *config.Resource) { r.ShortGroup = "tmc" - r.Kind = "Control_Credential" + r.Kind = "Credential" r.Version = "v1alpha1" }) } \ No newline at end of file diff --git a/config/custom_policy/config.go b/config/custom_policy/config.go new file mode 100644 index 0000000..b6ce2f2 --- /dev/null +++ b/config/custom_policy/config.go @@ -0,0 +1,12 @@ +package custom_policy + +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_custom_policy", func(r *config.Resource) { + r.ShortGroup = "tmc" + r.Kind = "Custom_Policy" + r.Version = "v1alpha1" + }) +} \ No newline at end of file diff --git a/config/external_name.go b/config/external_name.go index e8b8475..4c610a8 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -15,6 +15,7 @@ var ExternalNameConfigs = map[string]config.ExternalName{ "tanzu-mission-control_cluster_group": config.IdentifierFromProvider, "tanzu-mission-control_cluster_node_pool": config.IdentifierFromProvider, "tanzu-mission-control_credential": config.IdentifierFromProvider, + "tanzu-mission-control_custom_policy": config.IdentifierFromProvider, } // ExternalNameConfigurations applies all external name configs listed in the diff --git a/config/provider.go b/config/provider.go index 28a07aa..eebf408 100644 --- a/config/provider.go +++ b/config/provider.go @@ -14,7 +14,7 @@ import ( cluster "github.com/ankasoftco/provider-tmc/config/cluster" cluster_group "github.com/ankasoftco/provider-tmc/config/cluster_group" cluster_node_pool "github.com/ankasoftco/provider-tmc/config/cluster_node_pool" - control_credential "github.com/ankasoftco/provider-tmc/config/control_credential" + credential "github.com/ankasoftco/provider-tmc/config/credential" ) @@ -46,7 +46,7 @@ func GetProvider() *ujconfig.Provider { cluster.Configure, cluster_group.Configure, cluster_node_pool.Configure, - control_credential.Configure, + credential.Configure, } { configure(pc)