55 lines
1.3 KiB
Go
55 lines
1.3 KiB
Go
// Code generated by crd2pulumi DO NOT EDIT.
|
|
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
|
|
|
package v1alpha1
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"antoine-roux.tk/projects/go/pulumi-library/crds/kubernetes/internal"
|
|
"github.com/blang/semver"
|
|
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
|
)
|
|
|
|
type module struct {
|
|
version semver.Version
|
|
}
|
|
|
|
func (m *module) Version() semver.Version {
|
|
return m.version
|
|
}
|
|
|
|
func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
|
|
switch typ {
|
|
case "kubernetes:hub.traefik.io/v1alpha1:API":
|
|
r = &API{}
|
|
case "kubernetes:hub.traefik.io/v1alpha1:APIAccess":
|
|
r = &APIAccess{}
|
|
case "kubernetes:hub.traefik.io/v1alpha1:APIPortal":
|
|
r = &APIPortal{}
|
|
case "kubernetes:hub.traefik.io/v1alpha1:APIRateLimit":
|
|
r = &APIRateLimit{}
|
|
case "kubernetes:hub.traefik.io/v1alpha1:APIVersion":
|
|
r = &APIVersion{}
|
|
case "kubernetes:hub.traefik.io/v1alpha1:AccessControlPolicy":
|
|
r = &AccessControlPolicy{}
|
|
default:
|
|
return nil, fmt.Errorf("unknown resource type: %s", typ)
|
|
}
|
|
|
|
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
|
|
return
|
|
}
|
|
|
|
func init() {
|
|
version, err := internal.PkgVersion()
|
|
if err != nil {
|
|
version = semver.Version{Major: 1}
|
|
}
|
|
pulumi.RegisterResourceModule(
|
|
"crds",
|
|
"hub.traefik.io/v1alpha1",
|
|
&module{version},
|
|
)
|
|
}
|