Skip to content

Commit

Permalink
feat(apis): adding nas apis
Browse files Browse the repository at this point in the history
  • Loading branch information
smileisak committed Jan 3, 2024
1 parent d76202a commit 5b000a0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/external_name.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ var ExternalNameConfigs = map[string]config.ExternalName{
"ovh_cloud_project_containerregistry": config.NameAsIdentifier,
"ovh_cloud_project_containerregistry_oidc": config.NameAsIdentifier,
"ovh_cloud_project_containerregistry_user": config.NameAsIdentifier,
"ovh_dedicated_nasha_partition": config.NameAsIdentifier,
"ovh_dedicated_nasha_partition_access": config.NameAsIdentifier,
"ovh_dedicated_nasha_partition_snapshot": config.NameAsIdentifier,
}

// ExternalNameConfigurations applies all external name configs listed in the
Expand Down
20 changes: 20 additions & 0 deletions config/nas/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package nas

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

const (
shortGroup = "nas"
)

// Configure configures individual resources by adding custom ResourceConfigurators.
func Configure(p *config.Provider) {
p.AddResourceConfigurator("ovh_dedicated_nasha_partition", func(r *config.Resource) {
r.ShortGroup = shortGroup
})
p.AddResourceConfigurator("ovh_dedicated_nasha_partition_access", func(r *config.Resource) {
r.ShortGroup = shortGroup
})
p.AddResourceConfigurator("ovh_dedicated_nasha_partition_snapshot", func(r *config.Resource) {
r.ShortGroup = shortGroup
})
}
2 changes: 2 additions & 0 deletions config/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package config
import (
// Note(turkenh): we are importing this to embed provider schema document
_ "embed"
"github.com/edixos/provider-ovh/config/nas"

"github.com/edixos/provider-ovh/config/registry"

Expand Down Expand Up @@ -68,6 +69,7 @@ func GetProvider() *ujconfig.Provider {
databases.Configure,
kube.Configure,
registry.Configure,
nas.Configure,
} {
configure(pc)
}
Expand Down

0 comments on commit 5b000a0

Please sign in to comment.