Skip to content

Commit

Permalink
custom_policy resource added
Browse files Browse the repository at this point in the history
  • Loading branch information
aktashasan committed Oct 16, 2023
1 parent 1312705 commit 858cdf2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package control_credential
package credential

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_credential", func(r *config.Resource) {
r.ShortGroup = "tmc"
r.Kind = "Control_Credential"
r.Kind = "Credential"
r.Version = "v1alpha1"
})
}
12 changes: 12 additions & 0 deletions config/custom_policy/config.go
Original file line number Diff line number Diff line change
@@ -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"
})
}
1 change: 1 addition & 0 deletions config/external_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"


)
Expand Down Expand Up @@ -46,7 +46,7 @@ func GetProvider() *ujconfig.Provider {
cluster.Configure,
cluster_group.Configure,
cluster_node_pool.Configure,
control_credential.Configure,
credential.Configure,

} {
configure(pc)
Expand Down

0 comments on commit 858cdf2

Please sign in to comment.