42 lines
915 B
Go
42 lines
915 B
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 kubernetes
|
|
|
|
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 pkg struct {
|
|
version semver.Version
|
|
}
|
|
|
|
func (p *pkg) Version() semver.Version {
|
|
return p.version
|
|
}
|
|
|
|
func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) {
|
|
if typ != "pulumi:providers:crds" {
|
|
return nil, fmt.Errorf("unknown provider type: %s", typ)
|
|
}
|
|
|
|
r := &Provider{}
|
|
err := ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
|
|
return r, err
|
|
}
|
|
|
|
func init() {
|
|
version, err := internal.PkgVersion()
|
|
if err != nil {
|
|
version = semver.Version{Major: 1}
|
|
}
|
|
pulumi.RegisterResourcePackage(
|
|
"crds",
|
|
&pkg{version},
|
|
)
|
|
}
|