v0.0.4
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
|
||||
)
|
||||
|
||||
var _ = internal.GetEnvOrDefault
|
||||
|
||||
// The build daemon's address.
|
||||
func GetHost(ctx *pulumi.Context) string {
|
||||
v, err := config.Try(ctx, "docker-build:host")
|
||||
if err == nil {
|
||||
return v
|
||||
}
|
||||
var value string
|
||||
if d := internal.GetEnvOrDefault("", nil, "DOCKER_HOST"); d != nil {
|
||||
value = d.(string)
|
||||
}
|
||||
return value
|
||||
}
|
||||
func GetRegistries(ctx *pulumi.Context) string {
|
||||
return config.Get(ctx, "docker-build:registries")
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
// A Pulumi provider for building modern Docker images with buildx and BuildKit.
|
||||
package dockerbuild
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,307 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package dockerbuild
|
||||
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
|
||||
"errors"
|
||||
"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
|
||||
)
|
||||
|
||||
// A wrapper around `docker buildx imagetools create` to create an index
|
||||
// (or manifest list) referencing one or more existing images.
|
||||
//
|
||||
// In most cases you do not need an `Index` to build a multi-platform
|
||||
// image -- specifying multiple platforms on the `Image` will handle this
|
||||
// for you automatically.
|
||||
//
|
||||
// However, as of April 2024, building multi-platform images _with
|
||||
// caching_ will only export a cache for one platform at a time (see [this
|
||||
// discussion](https://github.com/docker/buildx/discussions/1382) for more
|
||||
// details).
|
||||
//
|
||||
// Therefore this resource can be helpful if you are building
|
||||
// multi-platform images with caching: each platform can be built and
|
||||
// cached separately, and an `Index` can join them all together. An
|
||||
// example of this is shown below.
|
||||
//
|
||||
// This resource creates an OCI image index or a Docker manifest list
|
||||
// depending on the media types of the source images.
|
||||
//
|
||||
// ## Example Usage
|
||||
// ### Multi-platform registry caching
|
||||
// ```go
|
||||
// package main
|
||||
//
|
||||
// import (
|
||||
//
|
||||
// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
|
||||
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
//
|
||||
// )
|
||||
//
|
||||
// func main() {
|
||||
// pulumi.Run(func(ctx *pulumi.Context) error {
|
||||
// amd64, err := dockerbuild.NewImage(ctx, "amd64", &dockerbuild.ImageArgs{
|
||||
// CacheFrom: dockerbuild.CacheFromArray{
|
||||
// &dockerbuild.CacheFromArgs{
|
||||
// Registry: &dockerbuild.CacheFromRegistryArgs{
|
||||
// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-amd64"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// CacheTo: dockerbuild.CacheToArray{
|
||||
// &dockerbuild.CacheToArgs{
|
||||
// Registry: &dockerbuild.CacheToRegistryArgs{
|
||||
// Mode: dockerbuild.CacheModeMax,
|
||||
// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-amd64"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// Context: &dockerbuild.BuildContextArgs{
|
||||
// Location: pulumi.String("app"),
|
||||
// },
|
||||
// Platforms: docker - build.PlatformArray{
|
||||
// dockerbuild.Platform_Linux_amd64,
|
||||
// },
|
||||
// Tags: pulumi.StringArray{
|
||||
// pulumi.String("docker.io/pulumi/pulumi:3.107.0-amd64"),
|
||||
// },
|
||||
// })
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// arm64, err := dockerbuild.NewImage(ctx, "arm64", &dockerbuild.ImageArgs{
|
||||
// CacheFrom: dockerbuild.CacheFromArray{
|
||||
// &dockerbuild.CacheFromArgs{
|
||||
// Registry: &dockerbuild.CacheFromRegistryArgs{
|
||||
// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-arm64"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// CacheTo: dockerbuild.CacheToArray{
|
||||
// &dockerbuild.CacheToArgs{
|
||||
// Registry: &dockerbuild.CacheToRegistryArgs{
|
||||
// Mode: dockerbuild.CacheModeMax,
|
||||
// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-arm64"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// Context: &dockerbuild.BuildContextArgs{
|
||||
// Location: pulumi.String("app"),
|
||||
// },
|
||||
// Platforms: docker - build.PlatformArray{
|
||||
// dockerbuild.Platform_Linux_arm64,
|
||||
// },
|
||||
// Tags: pulumi.StringArray{
|
||||
// pulumi.String("docker.io/pulumi/pulumi:3.107.0-arm64"),
|
||||
// },
|
||||
// })
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// index, err := dockerbuild.NewIndex(ctx, "index", &dockerbuild.IndexArgs{
|
||||
// Sources: pulumi.StringArray{
|
||||
// amd64.Ref,
|
||||
// arm64.Ref,
|
||||
// },
|
||||
// Tag: pulumi.String("docker.io/pulumi/pulumi:3.107.0"),
|
||||
// })
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// ctx.Export("ref", index.Ref)
|
||||
// return nil
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// ```
|
||||
type Index struct {
|
||||
pulumi.CustomResourceState
|
||||
|
||||
// If true, push the index to the target registry.
|
||||
//
|
||||
// Defaults to `true`.
|
||||
Push pulumi.BoolPtrOutput `pulumi:"push"`
|
||||
// The pushed tag with digest.
|
||||
//
|
||||
// Identical to the tag if the index was not pushed.
|
||||
Ref pulumi.StringOutput `pulumi:"ref"`
|
||||
// Authentication for the registry where the tagged index will be pushed.
|
||||
//
|
||||
// Credentials can also be included with the provider's configuration.
|
||||
Registry RegistryPtrOutput `pulumi:"registry"`
|
||||
// Existing images to include in the index.
|
||||
Sources pulumi.StringArrayOutput `pulumi:"sources"`
|
||||
// The tag to apply to the index.
|
||||
Tag pulumi.StringOutput `pulumi:"tag"`
|
||||
}
|
||||
|
||||
// NewIndex registers a new resource with the given unique name, arguments, and options.
|
||||
func NewIndex(ctx *pulumi.Context,
|
||||
name string, args *IndexArgs, opts ...pulumi.ResourceOption) (*Index, error) {
|
||||
if args == nil {
|
||||
return nil, errors.New("missing one or more required arguments")
|
||||
}
|
||||
|
||||
if args.Sources == nil {
|
||||
return nil, errors.New("invalid value for required argument 'Sources'")
|
||||
}
|
||||
if args.Tag == nil {
|
||||
return nil, errors.New("invalid value for required argument 'Tag'")
|
||||
}
|
||||
if args.Push == nil {
|
||||
args.Push = pulumi.BoolPtr(true)
|
||||
}
|
||||
opts = internal.PkgResourceDefaultOpts(opts)
|
||||
var resource Index
|
||||
err := ctx.RegisterResource("docker-build:index:Index", name, args, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
// GetIndex gets an existing Index resource's state with the given name, ID, and optional
|
||||
// state properties that are used to uniquely qualify the lookup (nil if not required).
|
||||
func GetIndex(ctx *pulumi.Context,
|
||||
name string, id pulumi.IDInput, state *IndexState, opts ...pulumi.ResourceOption) (*Index, error) {
|
||||
var resource Index
|
||||
err := ctx.ReadResource("docker-build:index:Index", name, id, state, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
// Input properties used for looking up and filtering Index resources.
|
||||
type indexState struct {
|
||||
}
|
||||
|
||||
type IndexState struct {
|
||||
}
|
||||
|
||||
func (IndexState) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*indexState)(nil)).Elem()
|
||||
}
|
||||
|
||||
type indexArgs struct {
|
||||
// If true, push the index to the target registry.
|
||||
//
|
||||
// Defaults to `true`.
|
||||
Push *bool `pulumi:"push"`
|
||||
// Authentication for the registry where the tagged index will be pushed.
|
||||
//
|
||||
// Credentials can also be included with the provider's configuration.
|
||||
Registry *Registry `pulumi:"registry"`
|
||||
// Existing images to include in the index.
|
||||
Sources []string `pulumi:"sources"`
|
||||
// The tag to apply to the index.
|
||||
Tag string `pulumi:"tag"`
|
||||
}
|
||||
|
||||
// The set of arguments for constructing a Index resource.
|
||||
type IndexArgs struct {
|
||||
// If true, push the index to the target registry.
|
||||
//
|
||||
// Defaults to `true`.
|
||||
Push pulumi.BoolPtrInput
|
||||
// Authentication for the registry where the tagged index will be pushed.
|
||||
//
|
||||
// Credentials can also be included with the provider's configuration.
|
||||
Registry RegistryPtrInput
|
||||
// Existing images to include in the index.
|
||||
Sources pulumi.StringArrayInput
|
||||
// The tag to apply to the index.
|
||||
Tag pulumi.StringInput
|
||||
}
|
||||
|
||||
func (IndexArgs) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*indexArgs)(nil)).Elem()
|
||||
}
|
||||
|
||||
type IndexInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToIndexOutput() IndexOutput
|
||||
ToIndexOutputWithContext(ctx context.Context) IndexOutput
|
||||
}
|
||||
|
||||
func (*Index) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**Index)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i *Index) ToIndexOutput() IndexOutput {
|
||||
return i.ToIndexOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i *Index) ToIndexOutputWithContext(ctx context.Context) IndexOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(IndexOutput)
|
||||
}
|
||||
|
||||
func (i *Index) ToOutput(ctx context.Context) pulumix.Output[*Index] {
|
||||
return pulumix.Output[*Index]{
|
||||
OutputState: i.ToIndexOutputWithContext(ctx).OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
type IndexOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (IndexOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**Index)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o IndexOutput) ToIndexOutput() IndexOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o IndexOutput) ToIndexOutputWithContext(ctx context.Context) IndexOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o IndexOutput) ToOutput(ctx context.Context) pulumix.Output[*Index] {
|
||||
return pulumix.Output[*Index]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
// If true, push the index to the target registry.
|
||||
//
|
||||
// Defaults to `true`.
|
||||
func (o IndexOutput) Push() pulumi.BoolPtrOutput {
|
||||
return o.ApplyT(func(v *Index) pulumi.BoolPtrOutput { return v.Push }).(pulumi.BoolPtrOutput)
|
||||
}
|
||||
|
||||
// The pushed tag with digest.
|
||||
//
|
||||
// Identical to the tag if the index was not pushed.
|
||||
func (o IndexOutput) Ref() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Index) pulumi.StringOutput { return v.Ref }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
// Authentication for the registry where the tagged index will be pushed.
|
||||
//
|
||||
// Credentials can also be included with the provider's configuration.
|
||||
func (o IndexOutput) Registry() RegistryPtrOutput {
|
||||
return o.ApplyT(func(v *Index) RegistryPtrOutput { return v.Registry }).(RegistryPtrOutput)
|
||||
}
|
||||
|
||||
// Existing images to include in the index.
|
||||
func (o IndexOutput) Sources() pulumi.StringArrayOutput {
|
||||
return o.ApplyT(func(v *Index) pulumi.StringArrayOutput { return v.Sources }).(pulumi.StringArrayOutput)
|
||||
}
|
||||
|
||||
// The tag to apply to the index.
|
||||
func (o IndexOutput) Tag() pulumi.StringOutput {
|
||||
return o.ApplyT(func(v *Index) pulumi.StringOutput { return v.Tag }).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func init() {
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*IndexInput)(nil)).Elem(), &Index{})
|
||||
pulumi.RegisterOutputType(IndexOutput{})
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package dockerbuild
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/blang/semver"
|
||||
"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal"
|
||||
"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 "docker-build:index:Image":
|
||||
r = &Image{}
|
||||
case "docker-build:index:Index":
|
||||
r = &Index{}
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown resource type: %s", typ)
|
||||
}
|
||||
|
||||
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
|
||||
return
|
||||
}
|
||||
|
||||
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:docker-build" {
|
||||
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.RegisterResourceModule(
|
||||
"docker-build",
|
||||
"index",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourcePackage(
|
||||
"docker-build",
|
||||
&pkg{version},
|
||||
)
|
||||
}
|
||||
@@ -1,184 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/blang/semver"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
)
|
||||
|
||||
import (
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/internals"
|
||||
)
|
||||
|
||||
type envParser func(v string) interface{}
|
||||
|
||||
func ParseEnvBool(v string) interface{} {
|
||||
b, err := strconv.ParseBool(v)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
func ParseEnvInt(v string) interface{} {
|
||||
i, err := strconv.ParseInt(v, 0, 0)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
return int(i)
|
||||
}
|
||||
|
||||
func ParseEnvFloat(v string) interface{} {
|
||||
f, err := strconv.ParseFloat(v, 64)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
return f
|
||||
}
|
||||
|
||||
func ParseEnvStringArray(v string) interface{} {
|
||||
var result pulumi.StringArray
|
||||
for _, item := range strings.Split(v, ";") {
|
||||
result = append(result, pulumi.String(item))
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
func GetEnvOrDefault(def interface{}, parser envParser, vars ...string) interface{} {
|
||||
for _, v := range vars {
|
||||
if value, ok := os.LookupEnv(v); ok {
|
||||
if parser != nil {
|
||||
return parser(value)
|
||||
}
|
||||
return value
|
||||
}
|
||||
}
|
||||
return def
|
||||
}
|
||||
|
||||
// PkgVersion uses reflection to determine the version of the current package.
|
||||
// If a version cannot be determined, v1 will be assumed. The second return
|
||||
// value is always nil.
|
||||
func PkgVersion() (semver.Version, error) {
|
||||
// emptyVersion defaults to v0.0.0
|
||||
if !SdkVersion.Equals(semver.Version{}) {
|
||||
return SdkVersion, nil
|
||||
}
|
||||
type sentinal struct{}
|
||||
pkgPath := reflect.TypeOf(sentinal{}).PkgPath()
|
||||
re := regexp.MustCompile("^.*/pulumi-docker-build/sdk(/v\\d+)?")
|
||||
if match := re.FindStringSubmatch(pkgPath); match != nil {
|
||||
vStr := match[1]
|
||||
if len(vStr) == 0 { // If the version capture group was empty, default to v1.
|
||||
return semver.Version{Major: 1}, nil
|
||||
}
|
||||
return semver.MustParse(fmt.Sprintf("%s.0.0", vStr[2:])), nil
|
||||
}
|
||||
return semver.Version{Major: 1}, nil
|
||||
}
|
||||
|
||||
// isZero is a null safe check for if a value is it's types zero value.
|
||||
func IsZero(v interface{}) bool {
|
||||
if v == nil {
|
||||
return true
|
||||
}
|
||||
return reflect.ValueOf(v).IsZero()
|
||||
}
|
||||
|
||||
func CallPlain(
|
||||
ctx *pulumi.Context,
|
||||
tok string,
|
||||
args pulumi.Input,
|
||||
output pulumi.Output,
|
||||
self pulumi.Resource,
|
||||
property string,
|
||||
resultPtr reflect.Value,
|
||||
errorPtr *error,
|
||||
opts ...pulumi.InvokeOption,
|
||||
) {
|
||||
res, err := callPlainInner(ctx, tok, args, output, self, opts...)
|
||||
if err != nil {
|
||||
*errorPtr = err
|
||||
return
|
||||
}
|
||||
|
||||
v := reflect.ValueOf(res)
|
||||
|
||||
// extract res.property field if asked to do so
|
||||
if property != "" {
|
||||
v = v.FieldByName("Res")
|
||||
}
|
||||
|
||||
// return by setting the result pointer; this style of returns shortens the generated code without generics
|
||||
resultPtr.Elem().Set(v)
|
||||
}
|
||||
|
||||
func callPlainInner(
|
||||
ctx *pulumi.Context,
|
||||
tok string,
|
||||
args pulumi.Input,
|
||||
output pulumi.Output,
|
||||
self pulumi.Resource,
|
||||
opts ...pulumi.InvokeOption,
|
||||
) (any, error) {
|
||||
o, err := ctx.Call(tok, args, output, self, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
outputData, err := internals.UnsafeAwaitOutput(ctx.Context(), o)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
|
||||
known := outputData.Known
|
||||
value := outputData.Value
|
||||
secret := outputData.Secret
|
||||
|
||||
problem := ""
|
||||
if !known {
|
||||
problem = "an unknown value"
|
||||
} else if secret {
|
||||
problem = "a secret value"
|
||||
}
|
||||
|
||||
if problem != "" {
|
||||
return nil, fmt.Errorf("Plain resource method %q incorrectly returned %s. "+
|
||||
"This is an error in the provider, please report this to the provider developer.",
|
||||
tok, problem)
|
||||
}
|
||||
|
||||
return value, nil
|
||||
}
|
||||
|
||||
// PkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource.
|
||||
func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption {
|
||||
defaults := []pulumi.ResourceOption{}
|
||||
|
||||
version := semver.MustParse("0.1.0-alpha.0+dev")
|
||||
if !version.Equals(semver.Version{}) {
|
||||
defaults = append(defaults, pulumi.Version(version.String()))
|
||||
}
|
||||
return append(defaults, opts...)
|
||||
}
|
||||
|
||||
// PkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke.
|
||||
func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption {
|
||||
defaults := []pulumi.InvokeOption{}
|
||||
|
||||
version := semver.MustParse("0.1.0-alpha.0+dev")
|
||||
if !version.Equals(semver.Version{}) {
|
||||
defaults = append(defaults, pulumi.Version(version.String()))
|
||||
}
|
||||
return append(defaults, opts...)
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"github.com/blang/semver"
|
||||
)
|
||||
|
||||
var SdkVersion semver.Version = semver.Version{}
|
||||
var pluginDownloadURL string = ""
|
||||
@@ -1,113 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package dockerbuild
|
||||
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
|
||||
"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
|
||||
)
|
||||
|
||||
type Provider struct {
|
||||
pulumi.ProviderResourceState
|
||||
|
||||
// The build daemon's address.
|
||||
Host pulumi.StringPtrOutput `pulumi:"host"`
|
||||
}
|
||||
|
||||
// NewProvider registers a new resource with the given unique name, arguments, and options.
|
||||
func NewProvider(ctx *pulumi.Context,
|
||||
name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) {
|
||||
if args == nil {
|
||||
args = &ProviderArgs{}
|
||||
}
|
||||
|
||||
if args.Host == nil {
|
||||
if d := internal.GetEnvOrDefault("", nil, "DOCKER_HOST"); d != nil {
|
||||
args.Host = pulumi.StringPtr(d.(string))
|
||||
}
|
||||
}
|
||||
opts = internal.PkgResourceDefaultOpts(opts)
|
||||
var resource Provider
|
||||
err := ctx.RegisterResource("pulumi:providers:docker-build", name, args, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
type providerArgs struct {
|
||||
// The build daemon's address.
|
||||
Host *string `pulumi:"host"`
|
||||
Registries []Registry `pulumi:"registries"`
|
||||
}
|
||||
|
||||
// The set of arguments for constructing a Provider resource.
|
||||
type ProviderArgs struct {
|
||||
// The build daemon's address.
|
||||
Host pulumi.StringPtrInput
|
||||
Registries RegistryArrayInput
|
||||
}
|
||||
|
||||
func (ProviderArgs) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*providerArgs)(nil)).Elem()
|
||||
}
|
||||
|
||||
type ProviderInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToProviderOutput() ProviderOutput
|
||||
ToProviderOutputWithContext(ctx context.Context) ProviderOutput
|
||||
}
|
||||
|
||||
func (*Provider) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**Provider)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i *Provider) ToProviderOutput() ProviderOutput {
|
||||
return i.ToProviderOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(ProviderOutput)
|
||||
}
|
||||
|
||||
func (i *Provider) ToOutput(ctx context.Context) pulumix.Output[*Provider] {
|
||||
return pulumix.Output[*Provider]{
|
||||
OutputState: i.ToProviderOutputWithContext(ctx).OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
type ProviderOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (ProviderOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**Provider)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o ProviderOutput) ToProviderOutput() ProviderOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o ProviderOutput) ToOutput(ctx context.Context) pulumix.Output[*Provider] {
|
||||
return pulumix.Output[*Provider]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
// The build daemon's address.
|
||||
func (o ProviderOutput) Host() pulumi.StringPtrOutput {
|
||||
return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Host }).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
func init() {
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*ProviderInput)(nil)).Elem(), &Provider{})
|
||||
pulumi.RegisterOutputType(ProviderOutput{})
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"resource": true,
|
||||
"name": "docker-build",
|
||||
"version": "0.1.0-alpha.0+dev"
|
||||
}
|
||||
@@ -1,886 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package dockerbuild
|
||||
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
|
||||
)
|
||||
|
||||
type CacheMode string
|
||||
|
||||
const (
|
||||
// Only layers that are exported into the resulting image are cached.
|
||||
CacheModeMin = CacheMode("min")
|
||||
// All layers are cached, even those of intermediate steps.
|
||||
CacheModeMax = CacheMode("max")
|
||||
)
|
||||
|
||||
func (CacheMode) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*CacheMode)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (e CacheMode) ToCacheModeOutput() CacheModeOutput {
|
||||
return pulumi.ToOutput(e).(CacheModeOutput)
|
||||
}
|
||||
|
||||
func (e CacheMode) ToCacheModeOutputWithContext(ctx context.Context) CacheModeOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, e).(CacheModeOutput)
|
||||
}
|
||||
|
||||
func (e CacheMode) ToCacheModePtrOutput() CacheModePtrOutput {
|
||||
return e.ToCacheModePtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (e CacheMode) ToCacheModePtrOutputWithContext(ctx context.Context) CacheModePtrOutput {
|
||||
return CacheMode(e).ToCacheModeOutputWithContext(ctx).ToCacheModePtrOutputWithContext(ctx)
|
||||
}
|
||||
|
||||
func (e CacheMode) ToStringOutput() pulumi.StringOutput {
|
||||
return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (e CacheMode) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (e CacheMode) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return pulumi.String(e).ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (e CacheMode) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx)
|
||||
}
|
||||
|
||||
type CacheModeOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (CacheModeOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*CacheMode)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o CacheModeOutput) ToCacheModeOutput() CacheModeOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o CacheModeOutput) ToCacheModeOutputWithContext(ctx context.Context) CacheModeOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o CacheModeOutput) ToCacheModePtrOutput() CacheModePtrOutput {
|
||||
return o.ToCacheModePtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o CacheModeOutput) ToCacheModePtrOutputWithContext(ctx context.Context) CacheModePtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheMode) *CacheMode {
|
||||
return &v
|
||||
}).(CacheModePtrOutput)
|
||||
}
|
||||
|
||||
func (o CacheModeOutput) ToOutput(ctx context.Context) pulumix.Output[CacheMode] {
|
||||
return pulumix.Output[CacheMode]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
func (o CacheModeOutput) ToStringOutput() pulumi.StringOutput {
|
||||
return o.ToStringOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o CacheModeOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e CacheMode) string {
|
||||
return string(e)
|
||||
}).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (o CacheModeOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return o.ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o CacheModeOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e CacheMode) *string {
|
||||
v := string(e)
|
||||
return &v
|
||||
}).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
type CacheModePtrOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (CacheModePtrOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**CacheMode)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o CacheModePtrOutput) ToCacheModePtrOutput() CacheModePtrOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o CacheModePtrOutput) ToCacheModePtrOutputWithContext(ctx context.Context) CacheModePtrOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o CacheModePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheMode] {
|
||||
return pulumix.Output[*CacheMode]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
func (o CacheModePtrOutput) Elem() CacheModeOutput {
|
||||
return o.ApplyT(func(v *CacheMode) CacheMode {
|
||||
if v != nil {
|
||||
return *v
|
||||
}
|
||||
var ret CacheMode
|
||||
return ret
|
||||
}).(CacheModeOutput)
|
||||
}
|
||||
|
||||
func (o CacheModePtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return o.ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o CacheModePtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e *CacheMode) *string {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
v := string(*e)
|
||||
return &v
|
||||
}).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// CacheModeInput is an input type that accepts values of the CacheMode enum
|
||||
// A concrete instance of `CacheModeInput` can be one of the following:
|
||||
//
|
||||
// CacheModeMin
|
||||
// CacheModeMax
|
||||
type CacheModeInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToCacheModeOutput() CacheModeOutput
|
||||
ToCacheModeOutputWithContext(context.Context) CacheModeOutput
|
||||
}
|
||||
|
||||
var cacheModePtrType = reflect.TypeOf((**CacheMode)(nil)).Elem()
|
||||
|
||||
type CacheModePtrInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToCacheModePtrOutput() CacheModePtrOutput
|
||||
ToCacheModePtrOutputWithContext(context.Context) CacheModePtrOutput
|
||||
}
|
||||
|
||||
type cacheModePtr string
|
||||
|
||||
func CacheModePtr(v string) CacheModePtrInput {
|
||||
return (*cacheModePtr)(&v)
|
||||
}
|
||||
|
||||
func (*cacheModePtr) ElementType() reflect.Type {
|
||||
return cacheModePtrType
|
||||
}
|
||||
|
||||
func (in *cacheModePtr) ToCacheModePtrOutput() CacheModePtrOutput {
|
||||
return pulumi.ToOutput(in).(CacheModePtrOutput)
|
||||
}
|
||||
|
||||
func (in *cacheModePtr) ToCacheModePtrOutputWithContext(ctx context.Context) CacheModePtrOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, in).(CacheModePtrOutput)
|
||||
}
|
||||
|
||||
func (in *cacheModePtr) ToOutput(ctx context.Context) pulumix.Output[*CacheMode] {
|
||||
return pulumix.Output[*CacheMode]{
|
||||
OutputState: in.ToCacheModePtrOutputWithContext(ctx).OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
type CompressionType string
|
||||
|
||||
const (
|
||||
// Use `gzip` for compression.
|
||||
CompressionTypeGzip = CompressionType("gzip")
|
||||
// Use `estargz` for compression.
|
||||
CompressionTypeEstargz = CompressionType("estargz")
|
||||
// Use `zstd` for compression.
|
||||
CompressionTypeZstd = CompressionType("zstd")
|
||||
)
|
||||
|
||||
func (CompressionType) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*CompressionType)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (e CompressionType) ToCompressionTypeOutput() CompressionTypeOutput {
|
||||
return pulumi.ToOutput(e).(CompressionTypeOutput)
|
||||
}
|
||||
|
||||
func (e CompressionType) ToCompressionTypeOutputWithContext(ctx context.Context) CompressionTypeOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, e).(CompressionTypeOutput)
|
||||
}
|
||||
|
||||
func (e CompressionType) ToCompressionTypePtrOutput() CompressionTypePtrOutput {
|
||||
return e.ToCompressionTypePtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (e CompressionType) ToCompressionTypePtrOutputWithContext(ctx context.Context) CompressionTypePtrOutput {
|
||||
return CompressionType(e).ToCompressionTypeOutputWithContext(ctx).ToCompressionTypePtrOutputWithContext(ctx)
|
||||
}
|
||||
|
||||
func (e CompressionType) ToStringOutput() pulumi.StringOutput {
|
||||
return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (e CompressionType) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (e CompressionType) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return pulumi.String(e).ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (e CompressionType) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx)
|
||||
}
|
||||
|
||||
type CompressionTypeOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (CompressionTypeOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*CompressionType)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o CompressionTypeOutput) ToCompressionTypeOutput() CompressionTypeOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o CompressionTypeOutput) ToCompressionTypeOutputWithContext(ctx context.Context) CompressionTypeOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o CompressionTypeOutput) ToCompressionTypePtrOutput() CompressionTypePtrOutput {
|
||||
return o.ToCompressionTypePtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o CompressionTypeOutput) ToCompressionTypePtrOutputWithContext(ctx context.Context) CompressionTypePtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, v CompressionType) *CompressionType {
|
||||
return &v
|
||||
}).(CompressionTypePtrOutput)
|
||||
}
|
||||
|
||||
func (o CompressionTypeOutput) ToOutput(ctx context.Context) pulumix.Output[CompressionType] {
|
||||
return pulumix.Output[CompressionType]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
func (o CompressionTypeOutput) ToStringOutput() pulumi.StringOutput {
|
||||
return o.ToStringOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o CompressionTypeOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e CompressionType) string {
|
||||
return string(e)
|
||||
}).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (o CompressionTypeOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return o.ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o CompressionTypeOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e CompressionType) *string {
|
||||
v := string(e)
|
||||
return &v
|
||||
}).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
type CompressionTypePtrOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (CompressionTypePtrOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**CompressionType)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o CompressionTypePtrOutput) ToCompressionTypePtrOutput() CompressionTypePtrOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o CompressionTypePtrOutput) ToCompressionTypePtrOutputWithContext(ctx context.Context) CompressionTypePtrOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o CompressionTypePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CompressionType] {
|
||||
return pulumix.Output[*CompressionType]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
func (o CompressionTypePtrOutput) Elem() CompressionTypeOutput {
|
||||
return o.ApplyT(func(v *CompressionType) CompressionType {
|
||||
if v != nil {
|
||||
return *v
|
||||
}
|
||||
var ret CompressionType
|
||||
return ret
|
||||
}).(CompressionTypeOutput)
|
||||
}
|
||||
|
||||
func (o CompressionTypePtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return o.ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o CompressionTypePtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e *CompressionType) *string {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
v := string(*e)
|
||||
return &v
|
||||
}).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// CompressionTypeInput is an input type that accepts values of the CompressionType enum
|
||||
// A concrete instance of `CompressionTypeInput` can be one of the following:
|
||||
//
|
||||
// CompressionTypeGzip
|
||||
// CompressionTypeEstargz
|
||||
// CompressionTypeZstd
|
||||
type CompressionTypeInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToCompressionTypeOutput() CompressionTypeOutput
|
||||
ToCompressionTypeOutputWithContext(context.Context) CompressionTypeOutput
|
||||
}
|
||||
|
||||
var compressionTypePtrType = reflect.TypeOf((**CompressionType)(nil)).Elem()
|
||||
|
||||
type CompressionTypePtrInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToCompressionTypePtrOutput() CompressionTypePtrOutput
|
||||
ToCompressionTypePtrOutputWithContext(context.Context) CompressionTypePtrOutput
|
||||
}
|
||||
|
||||
type compressionTypePtr string
|
||||
|
||||
func CompressionTypePtr(v string) CompressionTypePtrInput {
|
||||
return (*compressionTypePtr)(&v)
|
||||
}
|
||||
|
||||
func (*compressionTypePtr) ElementType() reflect.Type {
|
||||
return compressionTypePtrType
|
||||
}
|
||||
|
||||
func (in *compressionTypePtr) ToCompressionTypePtrOutput() CompressionTypePtrOutput {
|
||||
return pulumi.ToOutput(in).(CompressionTypePtrOutput)
|
||||
}
|
||||
|
||||
func (in *compressionTypePtr) ToCompressionTypePtrOutputWithContext(ctx context.Context) CompressionTypePtrOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, in).(CompressionTypePtrOutput)
|
||||
}
|
||||
|
||||
func (in *compressionTypePtr) ToOutput(ctx context.Context) pulumix.Output[*CompressionType] {
|
||||
return pulumix.Output[*CompressionType]{
|
||||
OutputState: in.ToCompressionTypePtrOutputWithContext(ctx).OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
type NetworkMode string
|
||||
|
||||
const (
|
||||
// The default sandbox network mode.
|
||||
NetworkModeDefault = NetworkMode("default")
|
||||
// Host network mode.
|
||||
NetworkModeHost = NetworkMode("host")
|
||||
// Disable network access.
|
||||
NetworkModeNone = NetworkMode("none")
|
||||
)
|
||||
|
||||
func (NetworkMode) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*NetworkMode)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (e NetworkMode) ToNetworkModeOutput() NetworkModeOutput {
|
||||
return pulumi.ToOutput(e).(NetworkModeOutput)
|
||||
}
|
||||
|
||||
func (e NetworkMode) ToNetworkModeOutputWithContext(ctx context.Context) NetworkModeOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, e).(NetworkModeOutput)
|
||||
}
|
||||
|
||||
func (e NetworkMode) ToNetworkModePtrOutput() NetworkModePtrOutput {
|
||||
return e.ToNetworkModePtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (e NetworkMode) ToNetworkModePtrOutputWithContext(ctx context.Context) NetworkModePtrOutput {
|
||||
return NetworkMode(e).ToNetworkModeOutputWithContext(ctx).ToNetworkModePtrOutputWithContext(ctx)
|
||||
}
|
||||
|
||||
func (e NetworkMode) ToStringOutput() pulumi.StringOutput {
|
||||
return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (e NetworkMode) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (e NetworkMode) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return pulumi.String(e).ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (e NetworkMode) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx)
|
||||
}
|
||||
|
||||
type NetworkModeOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (NetworkModeOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*NetworkMode)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o NetworkModeOutput) ToNetworkModeOutput() NetworkModeOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o NetworkModeOutput) ToNetworkModeOutputWithContext(ctx context.Context) NetworkModeOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o NetworkModeOutput) ToNetworkModePtrOutput() NetworkModePtrOutput {
|
||||
return o.ToNetworkModePtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o NetworkModeOutput) ToNetworkModePtrOutputWithContext(ctx context.Context) NetworkModePtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, v NetworkMode) *NetworkMode {
|
||||
return &v
|
||||
}).(NetworkModePtrOutput)
|
||||
}
|
||||
|
||||
func (o NetworkModeOutput) ToOutput(ctx context.Context) pulumix.Output[NetworkMode] {
|
||||
return pulumix.Output[NetworkMode]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
func (o NetworkModeOutput) ToStringOutput() pulumi.StringOutput {
|
||||
return o.ToStringOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o NetworkModeOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e NetworkMode) string {
|
||||
return string(e)
|
||||
}).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (o NetworkModeOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return o.ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o NetworkModeOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e NetworkMode) *string {
|
||||
v := string(e)
|
||||
return &v
|
||||
}).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
type NetworkModePtrOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (NetworkModePtrOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**NetworkMode)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o NetworkModePtrOutput) ToNetworkModePtrOutput() NetworkModePtrOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o NetworkModePtrOutput) ToNetworkModePtrOutputWithContext(ctx context.Context) NetworkModePtrOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o NetworkModePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*NetworkMode] {
|
||||
return pulumix.Output[*NetworkMode]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
func (o NetworkModePtrOutput) Elem() NetworkModeOutput {
|
||||
return o.ApplyT(func(v *NetworkMode) NetworkMode {
|
||||
if v != nil {
|
||||
return *v
|
||||
}
|
||||
var ret NetworkMode
|
||||
return ret
|
||||
}).(NetworkModeOutput)
|
||||
}
|
||||
|
||||
func (o NetworkModePtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return o.ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o NetworkModePtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e *NetworkMode) *string {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
v := string(*e)
|
||||
return &v
|
||||
}).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// NetworkModeInput is an input type that accepts values of the NetworkMode enum
|
||||
// A concrete instance of `NetworkModeInput` can be one of the following:
|
||||
//
|
||||
// NetworkModeDefault
|
||||
// NetworkModeHost
|
||||
// NetworkModeNone
|
||||
type NetworkModeInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToNetworkModeOutput() NetworkModeOutput
|
||||
ToNetworkModeOutputWithContext(context.Context) NetworkModeOutput
|
||||
}
|
||||
|
||||
var networkModePtrType = reflect.TypeOf((**NetworkMode)(nil)).Elem()
|
||||
|
||||
type NetworkModePtrInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToNetworkModePtrOutput() NetworkModePtrOutput
|
||||
ToNetworkModePtrOutputWithContext(context.Context) NetworkModePtrOutput
|
||||
}
|
||||
|
||||
type networkModePtr string
|
||||
|
||||
func NetworkModePtr(v string) NetworkModePtrInput {
|
||||
return (*networkModePtr)(&v)
|
||||
}
|
||||
|
||||
func (*networkModePtr) ElementType() reflect.Type {
|
||||
return networkModePtrType
|
||||
}
|
||||
|
||||
func (in *networkModePtr) ToNetworkModePtrOutput() NetworkModePtrOutput {
|
||||
return pulumi.ToOutput(in).(NetworkModePtrOutput)
|
||||
}
|
||||
|
||||
func (in *networkModePtr) ToNetworkModePtrOutputWithContext(ctx context.Context) NetworkModePtrOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, in).(NetworkModePtrOutput)
|
||||
}
|
||||
|
||||
func (in *networkModePtr) ToOutput(ctx context.Context) pulumix.Output[*NetworkMode] {
|
||||
return pulumix.Output[*NetworkMode]{
|
||||
OutputState: in.ToNetworkModePtrOutputWithContext(ctx).OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
type Platform string
|
||||
|
||||
const (
|
||||
Platform_Darwin_386 = Platform("darwin/386")
|
||||
Platform_Darwin_amd64 = Platform("darwin/amd64")
|
||||
Platform_Darwin_arm = Platform("darwin/arm")
|
||||
Platform_Darwin_arm64 = Platform("darwin/arm64")
|
||||
Platform_Dragonfly_amd64 = Platform("dragonfly/amd64")
|
||||
Platform_Freebsd_386 = Platform("freebsd/386")
|
||||
Platform_Freebsd_amd64 = Platform("freebsd/amd64")
|
||||
Platform_Freebsd_arm = Platform("freebsd/arm")
|
||||
Platform_Linux_386 = Platform("linux/386")
|
||||
Platform_Linux_amd64 = Platform("linux/amd64")
|
||||
Platform_Linux_arm = Platform("linux/arm")
|
||||
Platform_Linux_arm64 = Platform("linux/arm64")
|
||||
Platform_Linux_mips64 = Platform("linux/mips64")
|
||||
Platform_Linux_mips64le = Platform("linux/mips64le")
|
||||
Platform_Linux_ppc64le = Platform("linux/ppc64le")
|
||||
Platform_Linux_riscv64 = Platform("linux/riscv64")
|
||||
Platform_Linux_s390x = Platform("linux/s390x")
|
||||
Platform_Netbsd_386 = Platform("netbsd/386")
|
||||
Platform_Netbsd_amd64 = Platform("netbsd/amd64")
|
||||
Platform_Netbsd_arm = Platform("netbsd/arm")
|
||||
Platform_Openbsd_386 = Platform("openbsd/386")
|
||||
Platform_Openbsd_amd64 = Platform("openbsd/amd64")
|
||||
Platform_Openbsd_arm = Platform("openbsd/arm")
|
||||
Platform_Plan9_386 = Platform("plan9/386")
|
||||
Platform_Plan9_amd64 = Platform("plan9/amd64")
|
||||
Platform_Solaris_amd64 = Platform("solaris/amd64")
|
||||
Platform_Windows_386 = Platform("windows/386")
|
||||
Platform_Windows_amd64 = Platform("windows/amd64")
|
||||
)
|
||||
|
||||
func (Platform) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*Platform)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (e Platform) ToPlatformOutput() PlatformOutput {
|
||||
return pulumi.ToOutput(e).(PlatformOutput)
|
||||
}
|
||||
|
||||
func (e Platform) ToPlatformOutputWithContext(ctx context.Context) PlatformOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, e).(PlatformOutput)
|
||||
}
|
||||
|
||||
func (e Platform) ToPlatformPtrOutput() PlatformPtrOutput {
|
||||
return e.ToPlatformPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (e Platform) ToPlatformPtrOutputWithContext(ctx context.Context) PlatformPtrOutput {
|
||||
return Platform(e).ToPlatformOutputWithContext(ctx).ToPlatformPtrOutputWithContext(ctx)
|
||||
}
|
||||
|
||||
func (e Platform) ToStringOutput() pulumi.StringOutput {
|
||||
return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (e Platform) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (e Platform) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return pulumi.String(e).ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (e Platform) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx)
|
||||
}
|
||||
|
||||
type PlatformOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (PlatformOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*Platform)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o PlatformOutput) ToPlatformOutput() PlatformOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o PlatformOutput) ToPlatformOutputWithContext(ctx context.Context) PlatformOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o PlatformOutput) ToPlatformPtrOutput() PlatformPtrOutput {
|
||||
return o.ToPlatformPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o PlatformOutput) ToPlatformPtrOutputWithContext(ctx context.Context) PlatformPtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, v Platform) *Platform {
|
||||
return &v
|
||||
}).(PlatformPtrOutput)
|
||||
}
|
||||
|
||||
func (o PlatformOutput) ToOutput(ctx context.Context) pulumix.Output[Platform] {
|
||||
return pulumix.Output[Platform]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
func (o PlatformOutput) ToStringOutput() pulumi.StringOutput {
|
||||
return o.ToStringOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o PlatformOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e Platform) string {
|
||||
return string(e)
|
||||
}).(pulumi.StringOutput)
|
||||
}
|
||||
|
||||
func (o PlatformOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return o.ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o PlatformOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e Platform) *string {
|
||||
v := string(e)
|
||||
return &v
|
||||
}).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
type PlatformPtrOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (PlatformPtrOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((**Platform)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o PlatformPtrOutput) ToPlatformPtrOutput() PlatformPtrOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o PlatformPtrOutput) ToPlatformPtrOutputWithContext(ctx context.Context) PlatformPtrOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o PlatformPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*Platform] {
|
||||
return pulumix.Output[*Platform]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
func (o PlatformPtrOutput) Elem() PlatformOutput {
|
||||
return o.ApplyT(func(v *Platform) Platform {
|
||||
if v != nil {
|
||||
return *v
|
||||
}
|
||||
var ret Platform
|
||||
return ret
|
||||
}).(PlatformOutput)
|
||||
}
|
||||
|
||||
func (o PlatformPtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput {
|
||||
return o.ToStringPtrOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (o PlatformPtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput {
|
||||
return o.ApplyTWithContext(ctx, func(_ context.Context, e *Platform) *string {
|
||||
if e == nil {
|
||||
return nil
|
||||
}
|
||||
v := string(*e)
|
||||
return &v
|
||||
}).(pulumi.StringPtrOutput)
|
||||
}
|
||||
|
||||
// PlatformInput is an input type that accepts values of the Platform enum
|
||||
// A concrete instance of `PlatformInput` can be one of the following:
|
||||
//
|
||||
// Platform_Darwin_386
|
||||
// Platform_Darwin_amd64
|
||||
// Platform_Darwin_arm
|
||||
// Platform_Darwin_arm64
|
||||
// Platform_Dragonfly_amd64
|
||||
// Platform_Freebsd_386
|
||||
// Platform_Freebsd_amd64
|
||||
// Platform_Freebsd_arm
|
||||
// Platform_Linux_386
|
||||
// Platform_Linux_amd64
|
||||
// Platform_Linux_arm
|
||||
// Platform_Linux_arm64
|
||||
// Platform_Linux_mips64
|
||||
// Platform_Linux_mips64le
|
||||
// Platform_Linux_ppc64le
|
||||
// Platform_Linux_riscv64
|
||||
// Platform_Linux_s390x
|
||||
// Platform_Netbsd_386
|
||||
// Platform_Netbsd_amd64
|
||||
// Platform_Netbsd_arm
|
||||
// Platform_Openbsd_386
|
||||
// Platform_Openbsd_amd64
|
||||
// Platform_Openbsd_arm
|
||||
// Platform_Plan9_386
|
||||
// Platform_Plan9_amd64
|
||||
// Platform_Solaris_amd64
|
||||
// Platform_Windows_386
|
||||
// Platform_Windows_amd64
|
||||
type PlatformInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToPlatformOutput() PlatformOutput
|
||||
ToPlatformOutputWithContext(context.Context) PlatformOutput
|
||||
}
|
||||
|
||||
var platformPtrType = reflect.TypeOf((**Platform)(nil)).Elem()
|
||||
|
||||
type PlatformPtrInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToPlatformPtrOutput() PlatformPtrOutput
|
||||
ToPlatformPtrOutputWithContext(context.Context) PlatformPtrOutput
|
||||
}
|
||||
|
||||
type platformPtr string
|
||||
|
||||
func PlatformPtr(v string) PlatformPtrInput {
|
||||
return (*platformPtr)(&v)
|
||||
}
|
||||
|
||||
func (*platformPtr) ElementType() reflect.Type {
|
||||
return platformPtrType
|
||||
}
|
||||
|
||||
func (in *platformPtr) ToPlatformPtrOutput() PlatformPtrOutput {
|
||||
return pulumi.ToOutput(in).(PlatformPtrOutput)
|
||||
}
|
||||
|
||||
func (in *platformPtr) ToPlatformPtrOutputWithContext(ctx context.Context) PlatformPtrOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, in).(PlatformPtrOutput)
|
||||
}
|
||||
|
||||
func (in *platformPtr) ToOutput(ctx context.Context) pulumix.Output[*Platform] {
|
||||
return pulumix.Output[*Platform]{
|
||||
OutputState: in.ToPlatformPtrOutputWithContext(ctx).OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
// PlatformArrayInput is an input type that accepts PlatformArray and PlatformArrayOutput values.
|
||||
// You can construct a concrete instance of `PlatformArrayInput` via:
|
||||
//
|
||||
// PlatformArray{ PlatformArgs{...} }
|
||||
type PlatformArrayInput interface {
|
||||
pulumi.Input
|
||||
|
||||
ToPlatformArrayOutput() PlatformArrayOutput
|
||||
ToPlatformArrayOutputWithContext(context.Context) PlatformArrayOutput
|
||||
}
|
||||
|
||||
type PlatformArray []Platform
|
||||
|
||||
func (PlatformArray) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*[]Platform)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (i PlatformArray) ToPlatformArrayOutput() PlatformArrayOutput {
|
||||
return i.ToPlatformArrayOutputWithContext(context.Background())
|
||||
}
|
||||
|
||||
func (i PlatformArray) ToPlatformArrayOutputWithContext(ctx context.Context) PlatformArrayOutput {
|
||||
return pulumi.ToOutputWithContext(ctx, i).(PlatformArrayOutput)
|
||||
}
|
||||
|
||||
func (i PlatformArray) ToOutput(ctx context.Context) pulumix.Output[[]Platform] {
|
||||
return pulumix.Output[[]Platform]{
|
||||
OutputState: i.ToPlatformArrayOutputWithContext(ctx).OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
type PlatformArrayOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (PlatformArrayOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*[]Platform)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o PlatformArrayOutput) ToPlatformArrayOutput() PlatformArrayOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o PlatformArrayOutput) ToPlatformArrayOutputWithContext(ctx context.Context) PlatformArrayOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o PlatformArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]Platform] {
|
||||
return pulumix.Output[[]Platform]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
func (o PlatformArrayOutput) Index(i pulumi.IntInput) PlatformOutput {
|
||||
return pulumi.All(o, i).ApplyT(func(vs []interface{}) Platform {
|
||||
return vs[0].([]Platform)[vs[1].(int)]
|
||||
}).(PlatformOutput)
|
||||
}
|
||||
|
||||
func init() {
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*CacheModeInput)(nil)).Elem(), CacheMode("min"))
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*CacheModePtrInput)(nil)).Elem(), CacheMode("min"))
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*CompressionTypeInput)(nil)).Elem(), CompressionType("gzip"))
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*CompressionTypePtrInput)(nil)).Elem(), CompressionType("gzip"))
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*NetworkModeInput)(nil)).Elem(), NetworkMode("default"))
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*NetworkModePtrInput)(nil)).Elem(), NetworkMode("default"))
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*PlatformInput)(nil)).Elem(), Platform("darwin/386"))
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*PlatformPtrInput)(nil)).Elem(), Platform("darwin/386"))
|
||||
pulumi.RegisterInputType(reflect.TypeOf((*PlatformArrayInput)(nil)).Elem(), PlatformArray{})
|
||||
pulumi.RegisterOutputType(CacheModeOutput{})
|
||||
pulumi.RegisterOutputType(CacheModePtrOutput{})
|
||||
pulumi.RegisterOutputType(CompressionTypeOutput{})
|
||||
pulumi.RegisterOutputType(CompressionTypePtrOutput{})
|
||||
pulumi.RegisterOutputType(NetworkModeOutput{})
|
||||
pulumi.RegisterOutputType(NetworkModePtrOutput{})
|
||||
pulumi.RegisterOutputType(PlatformOutput{})
|
||||
pulumi.RegisterOutputType(PlatformPtrOutput{})
|
||||
pulumi.RegisterOutputType(PlatformArrayOutput{})
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,28 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
|
||||
)
|
||||
|
||||
var _ = internal.GetEnvOrDefault
|
||||
|
||||
// The build daemon's address.
|
||||
func GetHost(ctx *pulumi.Context) string {
|
||||
v, err := config.Try(ctx, "docker-build:host")
|
||||
if err == nil {
|
||||
return v
|
||||
}
|
||||
var value string
|
||||
if d := internal.GetEnvOrDefault("", nil, "DOCKER_HOST"); d != nil {
|
||||
value = d.(string)
|
||||
}
|
||||
return value
|
||||
}
|
||||
func GetRegistries(ctx *pulumi.Context) string {
|
||||
return config.Get(ctx, "docker-build:registries")
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
// A Pulumi provider for building modern Docker images with buildx and BuildKit.
|
||||
package dockerbuild
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,288 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package dockerbuild
|
||||
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
|
||||
"errors"
|
||||
"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
|
||||
)
|
||||
|
||||
// A wrapper around `docker buildx imagetools create` to create an index
|
||||
// (or manifest list) referencing one or more existing images.
|
||||
//
|
||||
// In most cases you do not need an `Index` to build a multi-platform
|
||||
// image -- specifying multiple platforms on the `Image` will handle this
|
||||
// for you automatically.
|
||||
//
|
||||
// However, as of April 2024, building multi-platform images _with
|
||||
// caching_ will only export a cache for one platform at a time (see [this
|
||||
// discussion](https://github.com/docker/buildx/discussions/1382) for more
|
||||
// details).
|
||||
//
|
||||
// Therefore this resource can be helpful if you are building
|
||||
// multi-platform images with caching: each platform can be built and
|
||||
// cached separately, and an `Index` can join them all together. An
|
||||
// example of this is shown below.
|
||||
//
|
||||
// This resource creates an OCI image index or a Docker manifest list
|
||||
// depending on the media types of the source images.
|
||||
//
|
||||
// ## Example Usage
|
||||
// ### Multi-platform registry caching
|
||||
// ```go
|
||||
// package main
|
||||
//
|
||||
// import (
|
||||
//
|
||||
// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
|
||||
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
//
|
||||
// )
|
||||
//
|
||||
// func main() {
|
||||
// pulumi.Run(func(ctx *pulumi.Context) error {
|
||||
// amd64, err := dockerbuild.NewImage(ctx, "amd64", &dockerbuild.ImageArgs{
|
||||
// CacheFrom: dockerbuild.CacheFromArray{
|
||||
// &dockerbuild.CacheFromArgs{
|
||||
// Registry: &dockerbuild.CacheFromRegistryArgs{
|
||||
// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-amd64"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// CacheTo: dockerbuild.CacheToArray{
|
||||
// &dockerbuild.CacheToArgs{
|
||||
// Registry: &dockerbuild.CacheToRegistryArgs{
|
||||
// Mode: dockerbuild.CacheModeMax,
|
||||
// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-amd64"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// Context: &dockerbuild.BuildContextArgs{
|
||||
// Location: pulumi.String("app"),
|
||||
// },
|
||||
// Platforms: docker - build.PlatformArray{
|
||||
// dockerbuild.Platform_Linux_amd64,
|
||||
// },
|
||||
// Tags: pulumi.StringArray{
|
||||
// pulumi.String("docker.io/pulumi/pulumi:3.107.0-amd64"),
|
||||
// },
|
||||
// })
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// arm64, err := dockerbuild.NewImage(ctx, "arm64", &dockerbuild.ImageArgs{
|
||||
// CacheFrom: dockerbuild.CacheFromArray{
|
||||
// &dockerbuild.CacheFromArgs{
|
||||
// Registry: &dockerbuild.CacheFromRegistryArgs{
|
||||
// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-arm64"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// CacheTo: dockerbuild.CacheToArray{
|
||||
// &dockerbuild.CacheToArgs{
|
||||
// Registry: &dockerbuild.CacheToRegistryArgs{
|
||||
// Mode: dockerbuild.CacheModeMax,
|
||||
// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-arm64"),
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// Context: &dockerbuild.BuildContextArgs{
|
||||
// Location: pulumi.String("app"),
|
||||
// },
|
||||
// Platforms: docker - build.PlatformArray{
|
||||
// dockerbuild.Platform_Linux_arm64,
|
||||
// },
|
||||
// Tags: pulumi.StringArray{
|
||||
// pulumi.String("docker.io/pulumi/pulumi:3.107.0-arm64"),
|
||||
// },
|
||||
// })
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// index, err := dockerbuild.NewIndex(ctx, "index", &dockerbuild.IndexArgs{
|
||||
// Sources: pulumi.StringArray{
|
||||
// amd64.Ref,
|
||||
// arm64.Ref,
|
||||
// },
|
||||
// Tag: pulumi.String("docker.io/pulumi/pulumi:3.107.0"),
|
||||
// })
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
// ctx.Export("ref", index.Ref)
|
||||
// return nil
|
||||
// })
|
||||
// }
|
||||
//
|
||||
// ```
|
||||
type Index struct {
|
||||
pulumi.CustomResourceState
|
||||
|
||||
// If true, push the index to the target registry.
|
||||
//
|
||||
// Defaults to `true`.
|
||||
Push pulumix.Output[*bool] `pulumi:"push"`
|
||||
// The pushed tag with digest.
|
||||
//
|
||||
// Identical to the tag if the index was not pushed.
|
||||
Ref pulumix.Output[string] `pulumi:"ref"`
|
||||
// Authentication for the registry where the tagged index will be pushed.
|
||||
//
|
||||
// Credentials can also be included with the provider's configuration.
|
||||
Registry pulumix.GPtrOutput[Registry, RegistryOutput] `pulumi:"registry"`
|
||||
// Existing images to include in the index.
|
||||
Sources pulumix.ArrayOutput[string] `pulumi:"sources"`
|
||||
// The tag to apply to the index.
|
||||
Tag pulumix.Output[string] `pulumi:"tag"`
|
||||
}
|
||||
|
||||
// NewIndex registers a new resource with the given unique name, arguments, and options.
|
||||
func NewIndex(ctx *pulumi.Context,
|
||||
name string, args *IndexArgs, opts ...pulumi.ResourceOption) (*Index, error) {
|
||||
if args == nil {
|
||||
return nil, errors.New("missing one or more required arguments")
|
||||
}
|
||||
|
||||
if args.Sources == nil {
|
||||
return nil, errors.New("invalid value for required argument 'Sources'")
|
||||
}
|
||||
if args.Tag == nil {
|
||||
return nil, errors.New("invalid value for required argument 'Tag'")
|
||||
}
|
||||
if args.Push == nil {
|
||||
args.Push = pulumix.Ptr(true)
|
||||
}
|
||||
opts = internal.PkgResourceDefaultOpts(opts)
|
||||
var resource Index
|
||||
err := ctx.RegisterResource("docker-build:index:Index", name, args, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
// GetIndex gets an existing Index resource's state with the given name, ID, and optional
|
||||
// state properties that are used to uniquely qualify the lookup (nil if not required).
|
||||
func GetIndex(ctx *pulumi.Context,
|
||||
name string, id pulumi.IDInput, state *IndexState, opts ...pulumi.ResourceOption) (*Index, error) {
|
||||
var resource Index
|
||||
err := ctx.ReadResource("docker-build:index:Index", name, id, state, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
// Input properties used for looking up and filtering Index resources.
|
||||
type indexState struct {
|
||||
}
|
||||
|
||||
type IndexState struct {
|
||||
}
|
||||
|
||||
func (IndexState) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*indexState)(nil)).Elem()
|
||||
}
|
||||
|
||||
type indexArgs struct {
|
||||
// If true, push the index to the target registry.
|
||||
//
|
||||
// Defaults to `true`.
|
||||
Push *bool `pulumi:"push"`
|
||||
// Authentication for the registry where the tagged index will be pushed.
|
||||
//
|
||||
// Credentials can also be included with the provider's configuration.
|
||||
Registry *Registry `pulumi:"registry"`
|
||||
// Existing images to include in the index.
|
||||
Sources []string `pulumi:"sources"`
|
||||
// The tag to apply to the index.
|
||||
Tag string `pulumi:"tag"`
|
||||
}
|
||||
|
||||
// The set of arguments for constructing a Index resource.
|
||||
type IndexArgs struct {
|
||||
// If true, push the index to the target registry.
|
||||
//
|
||||
// Defaults to `true`.
|
||||
Push pulumix.Input[*bool]
|
||||
// Authentication for the registry where the tagged index will be pushed.
|
||||
//
|
||||
// Credentials can also be included with the provider's configuration.
|
||||
Registry pulumix.Input[*RegistryArgs]
|
||||
// Existing images to include in the index.
|
||||
Sources pulumix.Input[[]string]
|
||||
// The tag to apply to the index.
|
||||
Tag pulumix.Input[string]
|
||||
}
|
||||
|
||||
func (IndexArgs) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*indexArgs)(nil)).Elem()
|
||||
}
|
||||
|
||||
type IndexOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (IndexOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*Index)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o IndexOutput) ToIndexOutput() IndexOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o IndexOutput) ToIndexOutputWithContext(ctx context.Context) IndexOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o IndexOutput) ToOutput(ctx context.Context) pulumix.Output[Index] {
|
||||
return pulumix.Output[Index]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
// If true, push the index to the target registry.
|
||||
//
|
||||
// Defaults to `true`.
|
||||
func (o IndexOutput) Push() pulumix.Output[*bool] {
|
||||
value := pulumix.Apply[Index](o, func(v Index) pulumix.Output[*bool] { return v.Push })
|
||||
return pulumix.Flatten[*bool, pulumix.Output[*bool]](value)
|
||||
}
|
||||
|
||||
// The pushed tag with digest.
|
||||
//
|
||||
// Identical to the tag if the index was not pushed.
|
||||
func (o IndexOutput) Ref() pulumix.Output[string] {
|
||||
value := pulumix.Apply[Index](o, func(v Index) pulumix.Output[string] { return v.Ref })
|
||||
return pulumix.Flatten[string, pulumix.Output[string]](value)
|
||||
}
|
||||
|
||||
// Authentication for the registry where the tagged index will be pushed.
|
||||
//
|
||||
// Credentials can also be included with the provider's configuration.
|
||||
func (o IndexOutput) Registry() pulumix.GPtrOutput[Registry, RegistryOutput] {
|
||||
value := pulumix.Apply[Index](o, func(v Index) pulumix.GPtrOutput[Registry, RegistryOutput] { return v.Registry })
|
||||
unwrapped := pulumix.Flatten[*Registry, pulumix.GPtrOutput[Registry, RegistryOutput]](value)
|
||||
return pulumix.GPtrOutput[Registry, RegistryOutput]{OutputState: unwrapped.OutputState}
|
||||
}
|
||||
|
||||
// Existing images to include in the index.
|
||||
func (o IndexOutput) Sources() pulumix.ArrayOutput[string] {
|
||||
value := pulumix.Apply[Index](o, func(v Index) pulumix.ArrayOutput[string] { return v.Sources })
|
||||
unwrapped := pulumix.Flatten[[]string, pulumix.ArrayOutput[string]](value)
|
||||
return pulumix.ArrayOutput[string]{OutputState: unwrapped.OutputState}
|
||||
}
|
||||
|
||||
// The tag to apply to the index.
|
||||
func (o IndexOutput) Tag() pulumix.Output[string] {
|
||||
value := pulumix.Apply[Index](o, func(v Index) pulumix.Output[string] { return v.Tag })
|
||||
return pulumix.Flatten[string, pulumix.Output[string]](value)
|
||||
}
|
||||
|
||||
func init() {
|
||||
pulumi.RegisterOutputType(IndexOutput{})
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package dockerbuild
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/blang/semver"
|
||||
"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal"
|
||||
"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 "docker-build:index:Image":
|
||||
r = &Image{}
|
||||
case "docker-build:index:Index":
|
||||
r = &Index{}
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown resource type: %s", typ)
|
||||
}
|
||||
|
||||
err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn))
|
||||
return
|
||||
}
|
||||
|
||||
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:docker-build" {
|
||||
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.RegisterResourceModule(
|
||||
"docker-build",
|
||||
"index",
|
||||
&module{version},
|
||||
)
|
||||
pulumi.RegisterResourcePackage(
|
||||
"docker-build",
|
||||
&pkg{version},
|
||||
)
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package dockerbuild
|
||||
|
||||
import (
|
||||
"context"
|
||||
"reflect"
|
||||
|
||||
"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
|
||||
"github.com/pulumi/pulumi/sdk/v3/go/pulumix"
|
||||
)
|
||||
|
||||
type Provider struct {
|
||||
pulumi.ProviderResourceState
|
||||
|
||||
// The build daemon's address.
|
||||
Host pulumix.Output[*string] `pulumi:"host"`
|
||||
}
|
||||
|
||||
// NewProvider registers a new resource with the given unique name, arguments, and options.
|
||||
func NewProvider(ctx *pulumi.Context,
|
||||
name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) {
|
||||
if args == nil {
|
||||
args = &ProviderArgs{}
|
||||
}
|
||||
|
||||
if args.Host == nil {
|
||||
if d := internal.GetEnvOrDefault("", nil, "DOCKER_HOST"); d != nil {
|
||||
args.Host = pulumix.Ptr(d.(string))
|
||||
}
|
||||
}
|
||||
opts = internal.PkgResourceDefaultOpts(opts)
|
||||
var resource Provider
|
||||
err := ctx.RegisterResource("pulumi:providers:docker-build", name, args, &resource, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &resource, nil
|
||||
}
|
||||
|
||||
type providerArgs struct {
|
||||
// The build daemon's address.
|
||||
Host *string `pulumi:"host"`
|
||||
Registries []Registry `pulumi:"registries"`
|
||||
}
|
||||
|
||||
// The set of arguments for constructing a Provider resource.
|
||||
type ProviderArgs struct {
|
||||
// The build daemon's address.
|
||||
Host pulumix.Input[*string]
|
||||
Registries pulumix.Input[[]*RegistryArgs]
|
||||
}
|
||||
|
||||
func (ProviderArgs) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*providerArgs)(nil)).Elem()
|
||||
}
|
||||
|
||||
type ProviderOutput struct{ *pulumi.OutputState }
|
||||
|
||||
func (ProviderOutput) ElementType() reflect.Type {
|
||||
return reflect.TypeOf((*Provider)(nil)).Elem()
|
||||
}
|
||||
|
||||
func (o ProviderOutput) ToProviderOutput() ProviderOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput {
|
||||
return o
|
||||
}
|
||||
|
||||
func (o ProviderOutput) ToOutput(ctx context.Context) pulumix.Output[Provider] {
|
||||
return pulumix.Output[Provider]{
|
||||
OutputState: o.OutputState,
|
||||
}
|
||||
}
|
||||
|
||||
// The build daemon's address.
|
||||
func (o ProviderOutput) Host() pulumix.Output[*string] {
|
||||
value := pulumix.Apply[Provider](o, func(v Provider) pulumix.Output[*string] { return v.Host })
|
||||
return pulumix.Flatten[*string, pulumix.Output[*string]](value)
|
||||
}
|
||||
|
||||
func init() {
|
||||
pulumi.RegisterOutputType(ProviderOutput{})
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
// Code generated by pulumi-language-go DO NOT EDIT.
|
||||
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
|
||||
|
||||
package dockerbuild
|
||||
|
||||
type CacheMode string
|
||||
|
||||
const (
|
||||
// Only layers that are exported into the resulting image are cached.
|
||||
CacheModeCacheModeMin = CacheMode("min")
|
||||
// All layers are cached, even those of intermediate steps.
|
||||
CacheModeCacheModeMax = CacheMode("max")
|
||||
)
|
||||
|
||||
type CompressionType string
|
||||
|
||||
const (
|
||||
// Use `gzip` for compression.
|
||||
CompressionTypeCompressionTypeGzip = CompressionType("gzip")
|
||||
// Use `estargz` for compression.
|
||||
CompressionTypeCompressionTypeEstargz = CompressionType("estargz")
|
||||
// Use `zstd` for compression.
|
||||
CompressionTypeCompressionTypeZstd = CompressionType("zstd")
|
||||
)
|
||||
|
||||
type NetworkMode string
|
||||
|
||||
const (
|
||||
// The default sandbox network mode.
|
||||
NetworkModeNetworkModeDefault = NetworkMode("default")
|
||||
// Host network mode.
|
||||
NetworkModeNetworkModeHost = NetworkMode("host")
|
||||
// Disable network access.
|
||||
NetworkModeNetworkModeNone = NetworkMode("none")
|
||||
)
|
||||
|
||||
type Platform string
|
||||
|
||||
const (
|
||||
Platform_Platform_Darwin_386 = Platform("darwin/386")
|
||||
Platform_Platform_Darwin_amd64 = Platform("darwin/amd64")
|
||||
Platform_Platform_Darwin_arm = Platform("darwin/arm")
|
||||
Platform_Platform_Darwin_arm64 = Platform("darwin/arm64")
|
||||
Platform_Platform_Dragonfly_amd64 = Platform("dragonfly/amd64")
|
||||
Platform_Platform_Freebsd_386 = Platform("freebsd/386")
|
||||
Platform_Platform_Freebsd_amd64 = Platform("freebsd/amd64")
|
||||
Platform_Platform_Freebsd_arm = Platform("freebsd/arm")
|
||||
Platform_Platform_Linux_386 = Platform("linux/386")
|
||||
Platform_Platform_Linux_amd64 = Platform("linux/amd64")
|
||||
Platform_Platform_Linux_arm = Platform("linux/arm")
|
||||
Platform_Platform_Linux_arm64 = Platform("linux/arm64")
|
||||
Platform_Platform_Linux_mips64 = Platform("linux/mips64")
|
||||
Platform_Platform_Linux_mips64le = Platform("linux/mips64le")
|
||||
Platform_Platform_Linux_ppc64le = Platform("linux/ppc64le")
|
||||
Platform_Platform_Linux_riscv64 = Platform("linux/riscv64")
|
||||
Platform_Platform_Linux_s390x = Platform("linux/s390x")
|
||||
Platform_Platform_Netbsd_386 = Platform("netbsd/386")
|
||||
Platform_Platform_Netbsd_amd64 = Platform("netbsd/amd64")
|
||||
Platform_Platform_Netbsd_arm = Platform("netbsd/arm")
|
||||
Platform_Platform_Openbsd_386 = Platform("openbsd/386")
|
||||
Platform_Platform_Openbsd_amd64 = Platform("openbsd/amd64")
|
||||
Platform_Platform_Openbsd_arm = Platform("openbsd/arm")
|
||||
Platform_Platform_Plan9_386 = Platform("plan9/386")
|
||||
Platform_Platform_Plan9_amd64 = Platform("plan9/amd64")
|
||||
Platform_Platform_Solaris_amd64 = Platform("solaris/amd64")
|
||||
Platform_Platform_Windows_386 = Platform("windows/386")
|
||||
Platform_Platform_Windows_amd64 = Platform("windows/amd64")
|
||||
)
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user