Skip to content

Commit

Permalink
feat: add project configure (step 2.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
yordis committed Mar 29, 2024
1 parent 03d39ec commit 9e7d42e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 10 additions & 0 deletions config/project/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package project

import "github.com/crossplane/upjet/pkg/config"

// Configure configures individual resources by adding custom ResourceConfigurators.
func Configure(p *config.Provider) {
p.AddResourceConfigurator("digitalocean_project", func(r *config.Resource) {
r.ShortGroup = "project"
})
}
6 changes: 2 additions & 4 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ package config
import (
// Note(turkenh): we are importing this to embed provider schema document
_ "embed"
"github.com/crossplane-contrib/provider-digitalocean/config/project"

ujconfig "github.com/crossplane/upjet/pkg/config"

"github.com/crossplane-contrib/provider-digitalocean/config/null"
)

const (
Expand All @@ -35,8 +34,7 @@ func GetProvider() *ujconfig.Provider {
))

for _, configure := range []func(provider *ujconfig.Provider){
// add custom config functions
null.Configure,
project.Configure,
} {
configure(pc)
}
Expand Down

0 comments on commit 9e7d42e

Please sign in to comment.