Documentation
¶
Overview ¶
Package internal contains our clients, validation, and provider implementation for interacting with Docker's buildx APIs.
The provider has two primary modes of operation when building an image. The default behavior is to use an embedded Docker CLI, which does not require to actually be installed on a host in order to perform builds (a build daemon must still be accessible locally or remotely). The second mode execs a "docker-buildx" binary on the host to perform builds. This second mode was added primarily for compatibility with Docker Build Cloud, which requires a custom docker-buildx binary.
CLIs ¶
In both execution modes we have several CLI clients. The first client is scoped to the host and initialized as part of the provider's Configure call. We use this CLI for host-level operations, in particular when we potentially initialize a new buildx builder and when we fetch existing credentials on the host.
Each operation then has a CLI instance scoped to the life of the operation. This allows us to layer resource-scoped credentials on top of the host's existing credentials, and in practice Docker seems to handle these connections more reliably than a single CLI for all operations.
Credentials ¶
When using the embedded Docker client, secrets are communicated to the build daemon natively via gRPC callbacks. When running in exec mode, credentials must be communicated to the buildx binary via a configuration file. In order to not pollute the host's existing credentials with e.g. short-lived ECR tokens, we copy a small subset of the host's Docker config to a temporary directory and use that for the lifetime of the exec operation.
Preview mode ¶
The pulumi-go-provider primarily operates on simple Go structs and doesn't currently have a way to distinguish whether a value is unknown or empty. We ignore anything that is a zero value during previews before we apply validation or perform builds.
Diffs ¶
Another limitation of pulumi-go-provider is that it doesn't currently allow us to override the default Diff behavior. We intentionally apply "ignoreChanges" semantics to registry passwords, in order to reduce noise and unnecessary updates, but as a result we have to re-implement Diff from the ground up. This implementation is not nearly as rich as the default experience and should be replaced when an alternative is available.
Index ¶
- func NewBuildxProvider() provider.Provider
- func Schema(ctx context.Context, version string) schema.PackageSpec
- type Build
- type BuildContext
- type BuilderConfig
- type CacheFrom
- type CacheFromAzureBlob
- type CacheFromGitHubActions
- type CacheFromLocal
- type CacheFromRegistry
- type CacheFromS3
- type CacheMode
- type CacheTo
- type CacheToAzureBlob
- type CacheToGitHubActions
- type CacheToInline
- type CacheToLocal
- type CacheToRegistry
- type CacheToS3
- type CacheWithCompression
- type CacheWithIgnoreError
- type CacheWithMode
- type CacheWithOCI
- type Cli
- type Client
- type CompressionType
- type Config
- type Context
- type Dockerfile
- type Export
- type ExportCacheOnly
- type ExportDocker
- type ExportImage
- type ExportLocal
- type ExportOCI
- type ExportRegistry
- type ExportTar
- type ExportWithAnnotations
- type ExportWithCompression
- type ExportWithNames
- type ExportWithOCI
- type Image
- func (i *Image) Annotate(a infer.Annotator)
- func (i *Image) Check(ctx context.Context, _ string, _ resource.PropertyMap, ...) (ImageArgs, []provider.CheckFailure, error)
- func (i *Image) Create(ctx context.Context, name string, input ImageArgs, preview bool) (string, ImageState, error)
- func (i *Image) Delete(ctx context.Context, _ string, state ImageState) error
- func (*Image) Diff(_ context.Context, _ string, olds ImageState, news ImageArgs) (provider.DiffResponse, error)
- func (i *Image) Read(ctx context.Context, name string, input ImageArgs, state ImageState) (string, ImageArgs, ImageState, error)
- func (i *Image) Update(ctx context.Context, name string, _ ImageState, input ImageArgs, preview bool) (ImageState, error)
- type ImageArgs
- type ImageState
- type Index
- func (i *Index) Annotate(a infer.Annotator)
- func (i *Index) Check(ctx context.Context, _ string, _ resource.PropertyMap, ...) (IndexArgs, []provider.CheckFailure, error)
- func (i *Index) Create(ctx context.Context, name string, input IndexArgs, preview bool) (string, IndexState, error)
- func (i *Index) Delete(ctx context.Context, _ string, state IndexState) error
- func (i *Index) Diff(_ context.Context, _ string, olds IndexState, news IndexArgs) (provider.DiffResponse, error)
- func (i *Index) Read(ctx context.Context, name string, input IndexArgs, state IndexState) (string, IndexArgs, IndexState, error)
- func (i *Index) Update(ctx context.Context, name string, state IndexState, input IndexArgs, ...) (IndexState, error)
- type IndexArgs
- type IndexState
- type NamedContexts
- type NetworkMode
- type Platform
- type Raw
- type Registry
- type SSH
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBuildxProvider ¶
NewBuildxProvider returns a new buildx provider.
Types ¶
type Build ¶
type Build interface { BuildOptions() controllerapi.BuildOptions Inline() string ShouldExec() bool Secrets() session.Attachable }
Build encapsulates all of the user-provider build parameters and options.
type BuildContext ¶
type BuildContext struct { Context Named NamedContexts `pulumi:"named,optional"` }
BuildContext represents Docker's named and unamed contexts.
func (*BuildContext) Annotate ¶
func (bc *BuildContext) Annotate(a infer.Annotator)
Annotate sets docstrings on BuildContext.
type BuilderConfig ¶
type BuilderConfig struct {
Name string `pulumi:"name,optional"`
}
BuilderConfig configures the builder to use for an image build.
func (*BuilderConfig) Annotate ¶
func (b *BuilderConfig) Annotate(a infer.Annotator)
Annotate sets docstrings on BuilderConfig.
type CacheFrom ¶
type CacheFrom struct { Local *CacheFromLocal `pulumi:"local,optional"` Registry *CacheFromRegistry `pulumi:"registry,optional"` GHA *CacheFromGitHubActions `pulumi:"gha,optional"` AZBlob *CacheFromAzureBlob `pulumi:"azblob,optional"` S3 *CacheFromS3 `pulumi:"s3,optional"` Raw Raw `pulumi:"raw,optional"` Disabled bool `pulumi:"disabled,optional"` }
CacheFrom is a "union" type for all of our available `--cache-from` options.
type CacheFromAzureBlob ¶
type CacheFromAzureBlob struct { Name string `pulumi:"name"` AccountURL string `pulumi:"accountUrl,optional"` SecretAccessKey string `pulumi:"secretAccessKey,optional" provider:"secret"` }
CacheFromAzureBlob pulls cache manifests from Azure blob storage.
func (*CacheFromAzureBlob) Annotate ¶
func (c *CacheFromAzureBlob) Annotate(a infer.Annotator)
Annotate sets docstrings on CacheFromAzureBlob.
func (*CacheFromAzureBlob) String ¶
func (c *CacheFromAzureBlob) String() string
String returns the CLI-encoded value of these cache options, or an empty string if the receiver is nil.
type CacheFromGitHubActions ¶
type CacheFromGitHubActions struct { URL string `pulumi:"url,optional"` Token string `pulumi:"token,optional" provider:"secret"` Scope string `pulumi:"scope,optional"` }
CacheFromGitHubActions pulls cache manifests from the GitHub actions cache.
func (*CacheFromGitHubActions) Annotate ¶
func (c *CacheFromGitHubActions) Annotate(a infer.Annotator)
Annotate sets docstrings on CacheFromGitHubActions.
func (*CacheFromGitHubActions) String ¶
func (c *CacheFromGitHubActions) String() string
type CacheFromLocal ¶
CacheFromLocal pulls cache manifests from a local directory.
func (*CacheFromLocal) Annotate ¶
func (c *CacheFromLocal) Annotate(a infer.Annotator)
Annotate sets docstrings on CacheFromLocal.
func (*CacheFromLocal) String ¶
func (c *CacheFromLocal) String() string
String returns the CLI-encoded value of these cache options, or an empty string if the receiver is nil.
type CacheFromRegistry ¶
type CacheFromRegistry struct {
Ref string `pulumi:"ref"`
}
CacheFromRegistry pulls cache manifests from a registry ref.
func (*CacheFromRegistry) Annotate ¶
func (c *CacheFromRegistry) Annotate(a infer.Annotator)
Annotate sets docstrings on CacheFromRegistry.
func (*CacheFromRegistry) String ¶
func (c *CacheFromRegistry) String() string
String returns the CLI-encoded value of these cache options, or an empty string if the receiver is nil.
type CacheFromS3 ¶
type CacheFromS3 struct { Region string `pulumi:"region"` Bucket string `pulumi:"bucket"` Name string `pulumi:"name,optional"` EndpointURL string `pulumi:"endpointUrl,optional"` BlobsPrefix string `pulumi:"blobsPrefix,optional"` ManifestsPrefix string `pulumi:"manifestsPrefix,optional"` UsePathStyle *bool `pulumi:"usePathStyle,optional"` AccessKeyID string `pulumi:"accessKeyId,optional"` SecretAccessKey string `pulumi:"secretAccessKey,optional" provider:"secret"` SessionToken string `pulumi:"sessionToken,optional" provider:"secret"` }
CacheFromS3 pulls cache manifests from S3-compatible APIs.
func (*CacheFromS3) Annotate ¶
func (c *CacheFromS3) Annotate(a infer.Annotator)
Annotate sets docstrings and defaults on CacheFromS3.
func (*CacheFromS3) String ¶
func (c *CacheFromS3) String() string
String returns the CLI-encoded value of these cache options, or an empty string if the receiver is nil.
type CacheMode ¶
type CacheMode string
CacheMode controls the complexity of exported cache manifests.
type CacheTo ¶
type CacheTo struct { Inline *CacheToInline `pulumi:"inline,optional"` Local *CacheToLocal `pulumi:"local,optional"` Registry *CacheToRegistry `pulumi:"registry,optional"` GHA *CacheToGitHubActions `pulumi:"gha,optional"` AZBlob *CacheToAzureBlob `pulumi:"azblob,optional"` S3 *CacheToS3 `pulumi:"s3,optional"` Raw Raw `pulumi:"raw,optional"` Disabled bool `pulumi:"disabled,optional"` }
CacheTo is a "union" type for all of our available `--cache-to` options.
type CacheToAzureBlob ¶
type CacheToAzureBlob struct { CacheWithMode CacheWithIgnoreError CacheFromAzureBlob }
CacheToAzureBlob pushes cache manifests to Azure blob storage.
func (*CacheToAzureBlob) String ¶
func (c *CacheToAzureBlob) String() string
type CacheToGitHubActions ¶
type CacheToGitHubActions struct { CacheWithMode CacheWithIgnoreError CacheFromGitHubActions }
CacheToGitHubActions pushes cache manifests to the GitHub Actions cache backend.
func (*CacheToGitHubActions) String ¶
func (c *CacheToGitHubActions) String() string
String returns the CLI-encoded value of these cache options, or an empty string if the receiver is nil.
type CacheToInline ¶
type CacheToInline struct{}
CacheToInline embeds cache information directly into an image.
func (*CacheToInline) Annotate ¶
func (c *CacheToInline) Annotate(a infer.Annotator)
Annotate sets docstrings on CacheToInline.
func (*CacheToInline) String ¶
func (c *CacheToInline) String() string
String returns the CLI-encoded value of these cache options, or an empty string if unknown.
type CacheToLocal ¶
type CacheToLocal struct { CacheWithCompression CacheWithIgnoreError CacheWithMode Dest string `pulumi:"dest"` }
CacheToLocal writes cache manifests to a local directory.
func (*CacheToLocal) Annotate ¶
func (c *CacheToLocal) Annotate(a infer.Annotator)
Annotate sets docstrings on CacheToLocal.
func (*CacheToLocal) String ¶
func (c *CacheToLocal) String() string
String returns the CLI-encoded value of these cache options, or an empty string if the receiver is nil.
type CacheToRegistry ¶
type CacheToRegistry struct { CacheWithMode CacheWithIgnoreError CacheWithOCI CacheWithCompression CacheFromRegistry }
CacheToRegistry pushes cache manifests to a remote registry.
func (*CacheToRegistry) String ¶
func (c *CacheToRegistry) String() string
String returns the CLI-encoded value of these cache options, or an empty string if the receiver is nil.
type CacheToS3 ¶
type CacheToS3 struct { CacheWithMode CacheWithIgnoreError CacheFromS3 }
CacheToS3 pushes cache manifests to an S3-compatible API.
type CacheWithCompression ¶
type CacheWithCompression struct { Compression *CompressionType `pulumi:"compression,optional"` CompressionLevel int `pulumi:"compressionLevel,optional"` ForceCompression *bool `pulumi:"forceCompression,optional"` }
CacheWithCompression is a cache with options to configure compression settings.
func (*CacheWithCompression) Annotate ¶
func (c *CacheWithCompression) Annotate(a infer.Annotator)
Annotate sets docstrings and defaults on CacheWithCompression.
func (CacheWithCompression) String ¶
func (c CacheWithCompression) String() string
String returns the CLI-encoded value of these cache options, or an empty string if the receiver is nil.
type CacheWithIgnoreError ¶
type CacheWithIgnoreError struct {
IgnoreError *bool `pulumi:"ignoreError,optional"`
}
CacheWithIgnoreError exposes an option to ignore errors during caching.
func (*CacheWithIgnoreError) Annotate ¶
func (c *CacheWithIgnoreError) Annotate(a infer.Annotator)
Annotate sets docstrings and defaults on CacheWithIgnoreError.
func (CacheWithIgnoreError) String ¶
func (c CacheWithIgnoreError) String() string
type CacheWithMode ¶
type CacheWithMode struct {
Mode *CacheMode `pulumi:"mode,optional"`
}
CacheWithMode is a cache that can configure its mode.
func (*CacheWithMode) Annotate ¶
func (c *CacheWithMode) Annotate(a infer.Annotator)
Annotate sets docstrings and defaults on CacheWithMode.
func (CacheWithMode) String ¶
func (c CacheWithMode) String() string
type CacheWithOCI ¶
type CacheWithOCI struct { OCI *bool `pulumi:"ociMediaTypes,optional"` ImageManifest *bool `pulumi:"imageManifest,optional"` }
CacheWithOCI exposes OCI media type options.
func (*CacheWithOCI) Annotate ¶
func (c *CacheWithOCI) Annotate(a infer.Annotator)
Annotate sets docstrings on CacheWithOCI.
func (CacheWithOCI) String ¶
func (c CacheWithOCI) String() string
String returns the CLI-encoded value of these cache options, or an empty string if unknown.
type Client ¶
type Client interface { Build(ctx context.Context, b Build) (*client.SolveResponse, error) BuildKitEnabled() (bool, error) Inspect(ctx context.Context, id string) ([]descriptor.Descriptor, error) Delete(ctx context.Context, id string) error ManifestCreate(ctx context.Context, push bool, target string, refs ...string) error ManifestInspect(ctx context.Context, target string) (string, error) ManifestDelete(ctx context.Context, target string) error SupportsMultipleExports() bool }
Client handles all our Docker API calls.
type CompressionType ¶
type CompressionType string
CompressionType is the algorithm used for compressing blobs.
const ( // Gzip compression. Gzip CompressionType = "gzip" // Estargz compression. Estargz CompressionType = "estargz" // Zstd compression. Zstd CompressionType = "zstd" )
func (CompressionType) Values ¶
func (CompressionType) Values() []infer.EnumValue[CompressionType]
Values returns all valid CompressionType values for SDK generation.
type Config ¶
type Config struct { Host string `pulumi:"host,optional"` Registries []Registry `pulumi:"registries,optional"` // contains filtered or unexported fields }
Config configures the buildx provider.
type Context ¶
type Context struct {
Location string `pulumi:"location"` // Location is a local directory or URL.
}
Context represents Docker's `PATH | URL | -` context argument. Inline context isn't supported yet.
type Dockerfile ¶
type Dockerfile struct { Location string `pulumi:"location,optional"` Inline string `pulumi:"inline,optional"` }
Dockerfile references a local, remote, or inline Dockerfile.
func (*Dockerfile) Annotate ¶
func (d *Dockerfile) Annotate(a infer.Annotator)
Annotate sets docstrings on Dockerfile.
type Export ¶
type Export struct { Tar *ExportTar `pulumi:"tar,optional"` Local *ExportLocal `pulumi:"local,optional"` Registry *ExportRegistry `pulumi:"registry,optional"` Image *ExportImage `pulumi:"image,optional"` OCI *ExportOCI `pulumi:"oci,optional"` Docker *ExportDocker `pulumi:"docker,optional"` CacheOnly *ExportCacheOnly `pulumi:"cacheonly,optional"` Raw Raw `pulumi:"raw,optional"` Disabled bool `pulumi:"disabled,optional"` }
Export is a "union" type for all of our available `--output` options.
type ExportCacheOnly ¶
type ExportCacheOnly struct{}
ExportCacheOnly is a dummy/no-op --cache-to entry. It exists only to help silence the "no exports configured" warning. By using this the user signals that they intentionally do not want exports, and only caches will be populated as a result.
func (*ExportCacheOnly) String ¶
func (e *ExportCacheOnly) String() string
String returns the CLI-encoded value of these export options, or an empty string if the receiver is nil.
type ExportDocker ¶
type ExportDocker struct { ExportWithOCI ExportWithCompression ExportWithAnnotations ExportWithNames Dest string `pulumi:"dest,optional"` Tar *bool `pulumi:"tar,optional"` }
ExportDocker pushes the final image to the local build daemon.
func (*ExportDocker) Annotate ¶
func (e *ExportDocker) Annotate(a infer.Annotator)
Annotate sets docstrings and defaults on ExportDocker.
func (*ExportDocker) String ¶
func (e *ExportDocker) String() string
String returns the CLI-encoded value of these export options, or an empty string if the receiver is nil.
type ExportImage ¶
type ExportImage struct { ExportWithOCI ExportWithCompression ExportWithNames ExportWithAnnotations Push *bool `pulumi:"push,optional"` PushByDigest *bool `pulumi:"pushByDigest,optional"` Insecure *bool `pulumi:"insecure,optional"` DanglingNamePrefix string `pulumi:"danglingNamePrefix,optional"` NameCanonical *bool `pulumi:"nameCanonical,optional"` Unpack *bool `pulumi:"unpack,optional"` Store *bool `pulumi:"store,optional"` }
ExportImage can push the final image to remote registries.
func (*ExportImage) Annotate ¶
func (e *ExportImage) Annotate(a infer.Annotator)
Annotate sets docstrings and defaults on ExportImage.
func (*ExportImage) String ¶
func (e *ExportImage) String() string
String returns the CLI-encoded value of these export options, or an empty string if the receiver is nil.
type ExportLocal ¶
type ExportLocal struct {
Dest string `pulumi:"dest"`
}
ExportLocal writes the final image to disk.
func (*ExportLocal) Annotate ¶
func (e *ExportLocal) Annotate(a infer.Annotator)
Annotate sets docstrings on ExportLocal.
func (*ExportLocal) Exists ¶ added in v0.0.6
func (e *ExportLocal) Exists() bool
Exists returns true if the exported directory exists and is populated with some files.
func (*ExportLocal) String ¶
func (e *ExportLocal) String() string
String returns the CLI-encoded value of these export options, or an empty string if the receiver is nil.
type ExportOCI ¶
type ExportOCI struct {
ExportDocker
}
ExportOCI is a cache that defaults to using OCI media types.
type ExportRegistry ¶
type ExportRegistry struct {
ExportImage
}
ExportRegistry is equivalent to ExportImage but defaults to push=true.
func (*ExportRegistry) Annotate ¶
func (e *ExportRegistry) Annotate(a infer.Annotator)
Annotate sets docstrings and defaults on ExportRegistry.
func (*ExportRegistry) String ¶
func (e *ExportRegistry) String() string
String returns the CLI-encoded value of these export options, or an empty string if the receiver is nil.
type ExportTar ¶
type ExportTar struct {
ExportLocal
}
ExportTar is an export that uses the tar format for exporting.
type ExportWithAnnotations ¶
ExportWithAnnotations is an export with configurable annotations.
func (*ExportWithAnnotations) Annotate ¶
func (e *ExportWithAnnotations) Annotate(a infer.Annotator)
Annotate sets docstrings on ExportWithAnnotations.
func (ExportWithAnnotations) String ¶
func (e ExportWithAnnotations) String() string
type ExportWithCompression ¶
type ExportWithCompression struct { Compression *CompressionType `pulumi:"compression,optional"` CompressionLevel int `pulumi:"compressionLevel,optional"` ForceCompression *bool `pulumi:"forceCompression,optional"` }
ExportWithCompression is an export with options to configure compression settings.
func (*ExportWithCompression) Annotate ¶
func (e *ExportWithCompression) Annotate(a infer.Annotator)
Annotate sets docstrings and defaults on ExportWithCompression.
func (ExportWithCompression) String ¶
func (e ExportWithCompression) String() string
type ExportWithNames ¶
type ExportWithNames struct {
Names []string `pulumi:"names,optional"`
}
ExportWithNames is an export with configurable names (tags).
func (*ExportWithNames) Annotate ¶
func (e *ExportWithNames) Annotate(a infer.Annotator)
Annotate sets docstrings on ExportWithNames.
func (ExportWithNames) String ¶
func (e ExportWithNames) String() string
type ExportWithOCI ¶
type ExportWithOCI struct {
OCI *bool `pulumi:"ociMediaTypes,optional"`
}
ExportWithOCI is an export that support OCI media types.
func (*ExportWithOCI) Annotate ¶
func (c *ExportWithOCI) Annotate(a infer.Annotator)
Annotate sets defaults on ExportWithOCI.
func (ExportWithOCI) String ¶
func (c ExportWithOCI) String() string
type Image ¶
type Image struct{}
Image is a Docker image build using buildkit.
func (*Image) Check ¶
func (i *Image) Check( ctx context.Context, _ string, _ resource.PropertyMap, news resource.PropertyMap, ) (ImageArgs, []provider.CheckFailure, error)
Check validates ImageArgs, sets defaults, and ensures our client is authenticated.
func (*Image) Create ¶
func (i *Image) Create( ctx context.Context, name string, input ImageArgs, preview bool, ) (string, ImageState, error)
Create builds an image using buildkit.
func (*Image) Delete ¶
Delete deletes an Image. If the Image was already deleted out-of-band it is treated as a success.
func (*Image) Diff ¶
func (*Image) Diff( _ context.Context, _ string, olds ImageState, news ImageArgs, ) (provider.DiffResponse, error)
Diff re-implements most of the default diff behavior, with the exception of ignoring "password" changes on registry inputs.
func (*Image) Read ¶
func (i *Image) Read( ctx context.Context, name string, input ImageArgs, state ImageState, ) ( string, ImageArgs, ImageState, error, )
Read attempts to read manifests from an image's exports. An image without exports will have no manifests.
func (*Image) Update ¶
func (i *Image) Update( ctx context.Context, name string, _ ImageState, input ImageArgs, preview bool, ) (ImageState, error)
Update builds a new image. Normally we create-replace resources, but for images built locally there is nothing to delete. We treat those cases as updates and simply re-build the image without deleting anything.
type ImageArgs ¶
type ImageArgs struct { AddHosts []string `pulumi:"addHosts,optional"` BuildArgs map[string]string `pulumi:"buildArgs,optional"` BuildOnPreview *bool `pulumi:"buildOnPreview,optional"` Builder *BuilderConfig `pulumi:"builder,optional"` CacheFrom []CacheFrom `pulumi:"cacheFrom,optional"` CacheTo []CacheTo `pulumi:"cacheTo,optional"` Context *BuildContext `pulumi:"context,optional"` Dockerfile *Dockerfile `pulumi:"dockerfile,optional"` Exports []Export `pulumi:"exports,optional"` Labels map[string]string `pulumi:"labels,optional"` Load bool `pulumi:"load,optional"` Network *NetworkMode `pulumi:"network,optional"` NoCache bool `pulumi:"noCache,optional"` Platforms []Platform `pulumi:"platforms,optional"` Pull bool `pulumi:"pull,optional"` Push bool `pulumi:"push"` Registries []Registry `pulumi:"registries,optional"` Secrets map[string]string `pulumi:"secrets,optional"` SSH []SSH `pulumi:"ssh,optional"` Tags []string `pulumi:"tags,optional"` Target string `pulumi:"target,optional"` Exec bool `pulumi:"exec,optional"` }
ImageArgs instantiates a new Image.
type ImageState ¶
type ImageState struct { ImageArgs Digest string `pulumi:"digest" provider:"output"` ContextHash string `pulumi:"contextHash" provider:"output"` Ref string `pulumi:"ref" provider:"output"` }
ImageState is serialized to the program's state file.
func (*ImageState) Annotate ¶
func (is *ImageState) Annotate(a infer.Annotator)
Annotate describes outputs of the Image resource.
type Index ¶
type Index struct{}
Index is an OCI index or manifest list on a remote registry.
func (*Index) Check ¶
func (i *Index) Check( ctx context.Context, _ string, _ resource.PropertyMap, news resource.PropertyMap, ) (IndexArgs, []provider.CheckFailure, error)
Check confirms the Index's tag and source refs are all valid. This doesn't fully capture input requirements -- for example buildx requires refs to all exist on the same registry. This is sufficient to handle the most common cases for now.
func (*Index) Create ¶
func (i *Index) Create( ctx context.Context, name string, input IndexArgs, preview bool, ) (string, IndexState, error)
Create is a passthrough to Update.
func (*Index) Diff ¶
func (i *Index) Diff( _ context.Context, _ string, olds IndexState, news IndexArgs, ) (provider.DiffResponse, error)
Diff returns a diff of proposed changes against current state. Ideally we wouldn't need to implement all of this, but we currently have to in order to force `ignoreChanges`-style behavior on our registry password (which can change all the time due to short-lived AWS credentials).
type IndexArgs ¶
type IndexArgs struct { Tag string `pulumi:"tag"` Sources []string `pulumi:"sources"` Push *bool `pulumi:"push,optional"` Registry *Registry `pulumi:"registry,optional"` }
IndexArgs instantiate an Index.
type IndexState ¶
IndexState captures the state of an Index.
func (*IndexState) Annotate ¶
func (i *IndexState) Annotate(a infer.Annotator)
Annotate sets docstrings on IndexState.
type NamedContexts ¶
NamedContexts correspond to Docker's `--build-context name=path` options. The path can be local or a remote URL.
func (NamedContexts) Map ¶
func (nc NamedContexts) Map() map[string]string
Map returns NamedContexts as a simple map.
type NetworkMode ¶
type NetworkMode string
NetworkMode is the --network parameter for a build.
const ( // Default network mode. Default NetworkMode = "default" // Host network mode. Host NetworkMode = "host" // None or no network mode. None NetworkMode = "none" )
func (*NetworkMode) String ¶
func (n *NetworkMode) String() string
func (NetworkMode) Values ¶
func (NetworkMode) Values() []infer.EnumValue[NetworkMode]
Values returns all valid NetworkMode values for SDK generation.
type Platform ¶
type Platform string
Platform is an enum capturing all available OS/architecture targets.
type Raw ¶
type Raw string
Raw is a CLI-encoded cache entry appropriate for passing directly to the CLI. Useful if the Docker backend supports cache types not captured by our API, or if the user just prefers "type=..." inputs.
type Registry ¶
type Registry struct { Address string `pulumi:"address"` Password string `pulumi:"password,optional" provider:"secret"` Username string `pulumi:"username,optional"` }
Registry contains credentials for authenticating with a remote registry.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package deprecated vendors config parsing from pulumi-terraform-bridge.
|
Package deprecated vendors config parsing from pulumi-terraform-bridge. |