Skip to content

Commit

Permalink
draft: init
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Oct 1, 2024
1 parent cc26484 commit 22daa96
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
12 changes: 12 additions & 0 deletions config/exoscale_block_storage_volume/config.go
Original file line number Diff line number Diff line change
@@ -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"
})
}
3 changes: 2 additions & 1 deletion config/external_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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)
}
Expand Down

0 comments on commit 22daa96

Please sign in to comment.