diff --git a/Makefile b/Makefile index d1dfce6..98b6b3d 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ PROJECT_NAME := Pulumi Docker Build Resource Provider -PACK := dockerbuild +PACK := docker-build PACKDIR := sdk -PROJECT := github.com/pulumi/pulumi-dockerbuild -NODE_MODULE_NAME := @pulumi/dockerbuild -NUGET_PKG_NAME := Pulumi.Dockerbuild +PROJECT := github.com/pulumi/pulumi-docker-build +NODE_MODULE_NAME := @pulumi/docker-build +NUGET_PKG_NAME := Pulumi.DockerBuild PROVIDER := pulumi-resource-${PACK} VERSION ?= $(shell pulumictl get version) @@ -65,7 +65,7 @@ examples/python: ${PULUMI} bin/${PROVIDER} ${WORKING_DIR}/examples/yaml/Pulumi.y examples/dotnet: ${PULUMI} bin/${PROVIDER} ${WORKING_DIR}/examples/yaml/Pulumi.yaml $(call example,dotnet) - @git checkout examples/dotnet/provider-dockerbuild.csproj + @git checkout examples/dotnet/provider-docker-build.csproj examples/java: ${PULUMI} bin/${PROVIDER} ${WORKING_DIR}/examples/yaml/Pulumi.yaml $(call example,java) @@ -219,9 +219,9 @@ sdk/go: TMPDIR := $(shell mktemp -d) sdk/go: $(PULUMI) bin/${PROVIDER} rm -rf sdk/go $(PULUMI) package gen-sdk bin/$(PROVIDER) --language go -o ${TMPDIR} - cp go.mod ${TMPDIR}/go/${PACK}/go.mod - cd ${TMPDIR}/go/${PACK} && \ - go mod edit -module=github.com/pulumi/pulumi-${PACK}/${PACKDIR}/go/${PACK} && \ + cp go.mod ${TMPDIR}/go/dockerbuild/go.mod + cd ${TMPDIR}/go/dockerbuild && \ + go mod edit -module=github.com/pulumi/pulumi-${PACK}/${PACKDIR}/go/dockerbuild && \ go mod tidy mv -f ${TMPDIR}/go ${WORKING_DIR}/sdk/. diff --git a/docs/yaml/index-examples.yaml b/docs/yaml/index-examples.yaml index 9a8eaa1..079ea91 100644 --- a/docs/yaml/index-examples.yaml +++ b/docs/yaml/index-examples.yaml @@ -3,7 +3,7 @@ description: Multi-platform registry caching runtime: yaml resources: arm64: - type: dockerbuild:Image + type: docker-build:Image properties: context: location: "app" @@ -20,7 +20,7 @@ resources: ref: "docker.io/pulumi/pulumi:cache-arm64" amd64: - type: dockerbuild:Image + type: docker-build:Image properties: context: location: "app" @@ -37,7 +37,7 @@ resources: ref: "docker.io/pulumi/pulumi:cache-amd64" index: - type: dockerbuild:Index + type: docker-build:Index properties: tag: "docker.io/pulumi/pulumi:3.107.0" sources: diff --git a/examples/dotnet/Program.cs b/examples/dotnet/Program.cs index fcf313d..a8efada 100644 --- a/examples/dotnet/Program.cs +++ b/examples/dotnet/Program.cs @@ -1,32 +1,32 @@ using System.Collections.Generic; using System.Linq; using Pulumi; -using Dockerbuild = Pulumi.Dockerbuild; +using DockerBuild = Pulumi.DockerBuild; return await Deployment.RunAsync(() => { var config = new Config(); var dockerHubPassword = config.Require("dockerHubPassword"); - var multiPlatform = new Dockerbuild.Image("multiPlatform", new() + var multiPlatform = new DockerBuild.Image("multiPlatform", new() { - Dockerfile = new Dockerbuild.Inputs.DockerfileArgs + Dockerfile = new DockerBuild.Inputs.DockerfileArgs { Location = "./app/Dockerfile.multiPlatform", }, - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", }, Platforms = new[] { - Dockerbuild.Platform.Plan9_amd64, - Dockerbuild.Platform.Plan9_386, + DockerBuild.Platform.Plan9_amd64, + DockerBuild.Platform.Plan9_386, }, }); - var registryPush = new Dockerbuild.Image("registryPush", new() + var registryPush = new DockerBuild.Image("registryPush", new() { - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", }, @@ -36,9 +36,9 @@ return await Deployment.RunAsync(() => }, Exports = new[] { - new Dockerbuild.Inputs.ExportArgs + new DockerBuild.Inputs.ExportArgs { - Registry = new Dockerbuild.Inputs.ExportRegistryArgs + Registry = new DockerBuild.Inputs.ExportRegistryArgs { OciMediaTypes = true, Push = false, @@ -47,7 +47,7 @@ return await Deployment.RunAsync(() => }, Registries = new[] { - new Dockerbuild.Inputs.RegistryArgs + new DockerBuild.Inputs.RegistryArgs { Address = "docker.io", Username = "pulumibot", @@ -56,28 +56,28 @@ return await Deployment.RunAsync(() => }, }); - var cached = new Dockerbuild.Image("cached", new() + var cached = new DockerBuild.Image("cached", new() { - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", }, CacheTo = new[] { - new Dockerbuild.Inputs.CacheToArgs + new DockerBuild.Inputs.CacheToArgs { - Local = new Dockerbuild.Inputs.CacheToLocalArgs + Local = new DockerBuild.Inputs.CacheToLocalArgs { Dest = "tmp/cache", - Mode = Dockerbuild.CacheMode.Max, + Mode = DockerBuild.CacheMode.Max, }, }, }, CacheFrom = new[] { - new Dockerbuild.Inputs.CacheFromArgs + new DockerBuild.Inputs.CacheFromArgs { - Local = new Dockerbuild.Inputs.CacheFromLocalArgs + Local = new DockerBuild.Inputs.CacheFromLocalArgs { Src = "tmp/cache", }, @@ -85,13 +85,13 @@ return await Deployment.RunAsync(() => }, }); - var buildArgs = new Dockerbuild.Image("buildArgs", new() + var buildArgs = new DockerBuild.Image("buildArgs", new() { - Dockerfile = new Dockerbuild.Inputs.DockerfileArgs + Dockerfile = new DockerBuild.Inputs.DockerfileArgs { Location = "./app/Dockerfile.buildArgs", }, - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", }, @@ -101,13 +101,13 @@ return await Deployment.RunAsync(() => }, }); - var extraHosts = new Dockerbuild.Image("extraHosts", new() + var extraHosts = new DockerBuild.Image("extraHosts", new() { - Dockerfile = new Dockerbuild.Inputs.DockerfileArgs + Dockerfile = new DockerBuild.Inputs.DockerfileArgs { Location = "./app/Dockerfile.extraHosts", }, - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", }, @@ -117,32 +117,32 @@ return await Deployment.RunAsync(() => }, }); - var sshMount = new Dockerbuild.Image("sshMount", new() + var sshMount = new DockerBuild.Image("sshMount", new() { - Dockerfile = new Dockerbuild.Inputs.DockerfileArgs + Dockerfile = new DockerBuild.Inputs.DockerfileArgs { Location = "./app/Dockerfile.sshMount", }, - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", }, Ssh = new[] { - new Dockerbuild.Inputs.SSHArgs + new DockerBuild.Inputs.SSHArgs { Id = "default", }, }, }); - var secrets = new Dockerbuild.Image("secrets", new() + var secrets = new DockerBuild.Image("secrets", new() { - Dockerfile = new Dockerbuild.Inputs.DockerfileArgs + Dockerfile = new DockerBuild.Inputs.DockerfileArgs { Location = "./app/Dockerfile.secrets", }, - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", }, @@ -152,9 +152,9 @@ return await Deployment.RunAsync(() => }, }); - var labels = new Dockerbuild.Image("labels", new() + var labels = new DockerBuild.Image("labels", new() { - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", }, @@ -164,31 +164,31 @@ return await Deployment.RunAsync(() => }, }); - var target = new Dockerbuild.Image("target", new() + var target = new DockerBuild.Image("target", new() { - Dockerfile = new Dockerbuild.Inputs.DockerfileArgs + Dockerfile = new DockerBuild.Inputs.DockerfileArgs { Location = "./app/Dockerfile.target", }, - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", }, Target = "build-me", }); - var namedContexts = new Dockerbuild.Image("namedContexts", new() + var namedContexts = new DockerBuild.Image("namedContexts", new() { - Dockerfile = new Dockerbuild.Inputs.DockerfileArgs + Dockerfile = new DockerBuild.Inputs.DockerfileArgs { Location = "./app/Dockerfile.namedContexts", }, - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", Named = { - { "golang:latest", new Dockerbuild.Inputs.ContextArgs + { "golang:latest", new DockerBuild.Inputs.ContextArgs { Location = "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", } }, @@ -196,53 +196,53 @@ return await Deployment.RunAsync(() => }, }); - var remoteContext = new Dockerbuild.Image("remoteContext", new() + var remoteContext = new DockerBuild.Image("remoteContext", new() { - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", }, }); - var remoteContextWithInline = new Dockerbuild.Image("remoteContextWithInline", new() + var remoteContextWithInline = new DockerBuild.Image("remoteContextWithInline", new() { - Dockerfile = new Dockerbuild.Inputs.DockerfileArgs + Dockerfile = new DockerBuild.Inputs.DockerfileArgs { Inline = @"FROM busybox COPY hello.c ./ ", }, - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "https://github.com/docker-library/hello-world.git", }, }); - var inline = new Dockerbuild.Image("inline", new() + var inline = new DockerBuild.Image("inline", new() { - Dockerfile = new Dockerbuild.Inputs.DockerfileArgs + Dockerfile = new DockerBuild.Inputs.DockerfileArgs { Inline = @"FROM alpine RUN echo ""This uses an inline Dockerfile! 👍"" ", }, - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", }, }); - var dockerLoad = new Dockerbuild.Image("dockerLoad", new() + var dockerLoad = new DockerBuild.Image("dockerLoad", new() { - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "./app", }, Exports = new[] { - new Dockerbuild.Inputs.ExportArgs + new DockerBuild.Inputs.ExportArgs { - Docker = new Dockerbuild.Inputs.ExportDockerArgs + Docker = new DockerBuild.Inputs.ExportDockerArgs { Tar = true, }, diff --git a/examples/dotnet/Pulumi.yaml b/examples/dotnet/Pulumi.yaml index 01e755e..96724a2 100644 --- a/examples/dotnet/Pulumi.yaml +++ b/examples/dotnet/Pulumi.yaml @@ -1,4 +1,4 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: dotnet config: dockerHubPassword: @@ -6,5 +6,5 @@ config: secret: true plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin diff --git a/examples/dotnet/provider-dockerbuild.csproj b/examples/dotnet/provider-docker-build.csproj similarity index 70% rename from examples/dotnet/provider-dockerbuild.csproj rename to examples/dotnet/provider-docker-build.csproj index 8741e01..3bf11fd 100644 --- a/examples/dotnet/provider-dockerbuild.csproj +++ b/examples/dotnet/provider-docker-build.csproj @@ -8,7 +8,7 @@ - + - + \ No newline at end of file diff --git a/examples/dotnet_test.go b/examples/dotnet_test.go index 1d4730d..130ba24 100644 --- a/examples/dotnet_test.go +++ b/examples/dotnet_test.go @@ -27,7 +27,7 @@ func TestDotNetExample(t *testing.T) { test := integration.ProgramTestOptions{ Dir: path.Join(cwd, "dotnet"), Dependencies: []string{ - "Pulumi.Dockerbuild", + "Pulumi.DockerBuild", }, Secrets: map[string]string{ "dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"), diff --git a/examples/go/Pulumi.yaml b/examples/go/Pulumi.yaml index 7812c10..cdca90a 100644 --- a/examples/go/Pulumi.yaml +++ b/examples/go/Pulumi.yaml @@ -1,4 +1,4 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: go config: dockerHubPassword: @@ -6,5 +6,5 @@ config: secret: true plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin diff --git a/examples/go/go.mod b/examples/go/go.mod index 4387f35..dde4b24 100644 --- a/examples/go/go.mod +++ b/examples/go/go.mod @@ -1,4 +1,4 @@ -module provider-dockerbuild +module provider-docker-build go 1.20 diff --git a/examples/go/main.go b/examples/go/main.go index e9f4c07..6d918bd 100644 --- a/examples/go/main.go +++ b/examples/go/main.go @@ -1,7 +1,7 @@ package main import ( - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) diff --git a/examples/go_test.go b/examples/go_test.go index be53b92..95588b5 100644 --- a/examples/go_test.go +++ b/examples/go_test.go @@ -19,7 +19,7 @@ func TestGoExample(t *testing.T) { test := integration.ProgramTestOptions{ Dir: path.Join(cwd, "go"), Dependencies: []string{ - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild=../sdk/go/dockerbuild", + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild=../sdk/go/dockerbuild", }, Secrets: map[string]string{ "dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"), diff --git a/examples/java/Pulumi.yaml b/examples/java/Pulumi.yaml index 85780a3..50cac76 100644 --- a/examples/java/Pulumi.yaml +++ b/examples/java/Pulumi.yaml @@ -1,4 +1,4 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: java config: dockerHubPassword: @@ -6,5 +6,5 @@ config: secret: true plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin diff --git a/examples/java/pom.xml b/examples/java/pom.xml index 5bf38a5..b32d9ca 100644 --- a/examples/java/pom.xml +++ b/examples/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - provider-dockerbuild + provider-docker-build 1.0-SNAPSHOT @@ -25,7 +25,7 @@ com.pulumi - dockerbuild + docker-build [0.0.0,) diff --git a/examples/nodejs/Pulumi.yaml b/examples/nodejs/Pulumi.yaml index e841588..8317291 100644 --- a/examples/nodejs/Pulumi.yaml +++ b/examples/nodejs/Pulumi.yaml @@ -1,4 +1,4 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: nodejs config: dockerHubPassword: @@ -6,5 +6,5 @@ config: secret: true plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin diff --git a/examples/nodejs/index.ts b/examples/nodejs/index.ts index c14cef1..677d800 100644 --- a/examples/nodejs/index.ts +++ b/examples/nodejs/index.ts @@ -1,9 +1,9 @@ import * as pulumi from "@pulumi/pulumi"; -import * as dockerbuild from "@pulumi/dockerbuild"; +import * as docker_build from "@pulumi/docker-build"; const config = new pulumi.Config(); const dockerHubPassword = config.require("dockerHubPassword"); -const multiPlatform = new dockerbuild.Image("multiPlatform", { +const multiPlatform = new docker_build.Image("multiPlatform", { dockerfile: { location: "./app/Dockerfile.multiPlatform", }, @@ -11,11 +11,11 @@ const multiPlatform = new dockerbuild.Image("multiPlatform", { location: "./app", }, platforms: [ - dockerbuild.Platform.Plan9_amd64, - dockerbuild.Platform.Plan9_386, + docker_build.Platform.Plan9_amd64, + docker_build.Platform.Plan9_386, ], }); -const registryPush = new dockerbuild.Image("registryPush", { +const registryPush = new docker_build.Image("registryPush", { context: { location: "./app", }, @@ -32,14 +32,14 @@ const registryPush = new dockerbuild.Image("registryPush", { password: dockerHubPassword, }], }); -const cached = new dockerbuild.Image("cached", { +const cached = new docker_build.Image("cached", { context: { location: "./app", }, cacheTo: [{ local: { dest: "tmp/cache", - mode: dockerbuild.CacheMode.Max, + mode: docker_build.CacheMode.Max, }, }], cacheFrom: [{ @@ -48,7 +48,7 @@ const cached = new dockerbuild.Image("cached", { }, }], }); -const buildArgs = new dockerbuild.Image("buildArgs", { +const buildArgs = new docker_build.Image("buildArgs", { dockerfile: { location: "./app/Dockerfile.buildArgs", }, @@ -59,7 +59,7 @@ const buildArgs = new dockerbuild.Image("buildArgs", { SET_ME_TO_TRUE: "true", }, }); -const extraHosts = new dockerbuild.Image("extraHosts", { +const extraHosts = new docker_build.Image("extraHosts", { dockerfile: { location: "./app/Dockerfile.extraHosts", }, @@ -68,7 +68,7 @@ const extraHosts = new dockerbuild.Image("extraHosts", { }, addHosts: ["metadata.google.internal:169.254.169.254"], }); -const sshMount = new dockerbuild.Image("sshMount", { +const sshMount = new docker_build.Image("sshMount", { dockerfile: { location: "./app/Dockerfile.sshMount", }, @@ -79,7 +79,7 @@ const sshMount = new dockerbuild.Image("sshMount", { id: "default", }], }); -const secrets = new dockerbuild.Image("secrets", { +const secrets = new docker_build.Image("secrets", { dockerfile: { location: "./app/Dockerfile.secrets", }, @@ -90,7 +90,7 @@ const secrets = new dockerbuild.Image("secrets", { password: "hunter2", }, }); -const labels = new dockerbuild.Image("labels", { +const labels = new docker_build.Image("labels", { context: { location: "./app", }, @@ -98,7 +98,7 @@ const labels = new dockerbuild.Image("labels", { description: "This image will get a descriptive label 👍", }, }); -const target = new dockerbuild.Image("target", { +const target = new docker_build.Image("target", { dockerfile: { location: "./app/Dockerfile.target", }, @@ -107,7 +107,7 @@ const target = new dockerbuild.Image("target", { }, target: "build-me", }); -const namedContexts = new dockerbuild.Image("namedContexts", { +const namedContexts = new docker_build.Image("namedContexts", { dockerfile: { location: "./app/Dockerfile.namedContexts", }, @@ -120,10 +120,10 @@ const namedContexts = new dockerbuild.Image("namedContexts", { }, }, }); -const remoteContext = new dockerbuild.Image("remoteContext", {context: { +const remoteContext = new docker_build.Image("remoteContext", {context: { location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", }}); -const remoteContextWithInline = new dockerbuild.Image("remoteContextWithInline", { +const remoteContextWithInline = new docker_build.Image("remoteContextWithInline", { dockerfile: { inline: `FROM busybox COPY hello.c ./ @@ -133,7 +133,7 @@ COPY hello.c ./ location: "https://github.com/docker-library/hello-world.git", }, }); -const inline = new dockerbuild.Image("inline", { +const inline = new docker_build.Image("inline", { dockerfile: { inline: `FROM alpine RUN echo "This uses an inline Dockerfile! 👍" @@ -143,7 +143,7 @@ RUN echo "This uses an inline Dockerfile! 👍" location: "./app", }, }); -const dockerLoad = new dockerbuild.Image("dockerLoad", { +const dockerLoad = new docker_build.Image("dockerLoad", { context: { location: "./app", }, diff --git a/examples/nodejs/package.json b/examples/nodejs/package.json index a03ec7e..32f47f1 100644 --- a/examples/nodejs/package.json +++ b/examples/nodejs/package.json @@ -1,5 +1,5 @@ { - "name": "provider-dockerbuild", + "name": "provider-docker-build", "devDependencies": { "@types/node": "^18" }, @@ -8,4 +8,3 @@ "@pulumi/pulumi": "^3.0.0" } } - diff --git a/examples/nodejs_test.go b/examples/nodejs_test.go index e06d117..32baa4e 100644 --- a/examples/nodejs_test.go +++ b/examples/nodejs_test.go @@ -18,7 +18,7 @@ func TestNodeExample(t *testing.T) { test := integration.ProgramTestOptions{ Dir: path.Join(cwd, "nodejs"), - Dependencies: []string{"@pulumi/dockerbuild"}, + Dependencies: []string{"@pulumi/docker-build"}, Secrets: map[string]string{ "dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"), }, diff --git a/examples/python/Pulumi.yaml b/examples/python/Pulumi.yaml index 6680643..44da823 100644 --- a/examples/python/Pulumi.yaml +++ b/examples/python/Pulumi.yaml @@ -1,4 +1,4 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: python config: dockerHubPassword: @@ -6,5 +6,5 @@ config: secret: true plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin diff --git a/examples/python/__main__.py b/examples/python/__main__.py index 1d2b7a3..51f1f6d 100644 --- a/examples/python/__main__.py +++ b/examples/python/__main__.py @@ -1,142 +1,142 @@ import pulumi -import pulumi_dockerbuild as dockerbuild +import pulumi_docker_build as docker_build config = pulumi.Config() docker_hub_password = config.require("dockerHubPassword") -multi_platform = dockerbuild.Image("multiPlatform", - dockerfile=dockerbuild.DockerfileArgs( +multi_platform = docker_build.Image("multiPlatform", + dockerfile=docker_build.DockerfileArgs( location="./app/Dockerfile.multiPlatform", ), - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="./app", ), platforms=[ - dockerbuild.Platform.PLAN9_AMD64, - dockerbuild.Platform.PLAN9_386, + docker_build.Platform.PLAN9_AMD64, + docker_build.Platform.PLAN9_386, ]) -registry_push = dockerbuild.Image("registryPush", - context=dockerbuild.BuildContextArgs( +registry_push = docker_build.Image("registryPush", + context=docker_build.BuildContextArgs( location="./app", ), tags=["docker.io/pulumibot/buildkit-e2e:example"], - exports=[dockerbuild.ExportArgs( - registry=dockerbuild.ExportRegistryArgs( + exports=[docker_build.ExportArgs( + registry=docker_build.ExportRegistryArgs( oci_media_types=True, push=False, ), )], - registries=[dockerbuild.RegistryArgs( + registries=[docker_build.RegistryArgs( address="docker.io", username="pulumibot", password=docker_hub_password, )]) -cached = dockerbuild.Image("cached", - context=dockerbuild.BuildContextArgs( +cached = docker_build.Image("cached", + context=docker_build.BuildContextArgs( location="./app", ), - cache_to=[dockerbuild.CacheToArgs( - local=dockerbuild.CacheToLocalArgs( + cache_to=[docker_build.CacheToArgs( + local=docker_build.CacheToLocalArgs( dest="tmp/cache", - mode=dockerbuild.CacheMode.MAX, + mode=docker_build.CacheMode.MAX, ), )], - cache_from=[dockerbuild.CacheFromArgs( - local=dockerbuild.CacheFromLocalArgs( + cache_from=[docker_build.CacheFromArgs( + local=docker_build.CacheFromLocalArgs( src="tmp/cache", ), )]) -build_args = dockerbuild.Image("buildArgs", - dockerfile=dockerbuild.DockerfileArgs( +build_args = docker_build.Image("buildArgs", + dockerfile=docker_build.DockerfileArgs( location="./app/Dockerfile.buildArgs", ), - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="./app", ), build_args={ "SET_ME_TO_TRUE": "true", }) -extra_hosts = dockerbuild.Image("extraHosts", - dockerfile=dockerbuild.DockerfileArgs( +extra_hosts = docker_build.Image("extraHosts", + dockerfile=docker_build.DockerfileArgs( location="./app/Dockerfile.extraHosts", ), - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="./app", ), add_hosts=["metadata.google.internal:169.254.169.254"]) -ssh_mount = dockerbuild.Image("sshMount", - dockerfile=dockerbuild.DockerfileArgs( +ssh_mount = docker_build.Image("sshMount", + dockerfile=docker_build.DockerfileArgs( location="./app/Dockerfile.sshMount", ), - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="./app", ), - ssh=[dockerbuild.SSHArgs( + ssh=[docker_build.SSHArgs( id="default", )]) -secrets = dockerbuild.Image("secrets", - dockerfile=dockerbuild.DockerfileArgs( +secrets = docker_build.Image("secrets", + dockerfile=docker_build.DockerfileArgs( location="./app/Dockerfile.secrets", ), - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="./app", ), secrets={ "password": "hunter2", }) -labels = dockerbuild.Image("labels", - context=dockerbuild.BuildContextArgs( +labels = docker_build.Image("labels", + context=docker_build.BuildContextArgs( location="./app", ), labels={ "description": "This image will get a descriptive label 👍", }) -target = dockerbuild.Image("target", - dockerfile=dockerbuild.DockerfileArgs( +target = docker_build.Image("target", + dockerfile=docker_build.DockerfileArgs( location="./app/Dockerfile.target", ), - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="./app", ), target="build-me") -named_contexts = dockerbuild.Image("namedContexts", - dockerfile=dockerbuild.DockerfileArgs( +named_contexts = docker_build.Image("namedContexts", + dockerfile=docker_build.DockerfileArgs( location="./app/Dockerfile.namedContexts", ), - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="./app", named={ - "golang:latest": dockerbuild.ContextArgs( + "golang:latest": docker_build.ContextArgs( location="docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", ), }, )) -remote_context = dockerbuild.Image("remoteContext", context=dockerbuild.BuildContextArgs( +remote_context = docker_build.Image("remoteContext", context=docker_build.BuildContextArgs( location="https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", )) -remote_context_with_inline = dockerbuild.Image("remoteContextWithInline", - dockerfile=dockerbuild.DockerfileArgs( +remote_context_with_inline = docker_build.Image("remoteContextWithInline", + dockerfile=docker_build.DockerfileArgs( inline="""FROM busybox COPY hello.c ./ """, ), - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="https://github.com/docker-library/hello-world.git", )) -inline = dockerbuild.Image("inline", - dockerfile=dockerbuild.DockerfileArgs( +inline = docker_build.Image("inline", + dockerfile=docker_build.DockerfileArgs( inline="""FROM alpine RUN echo "This uses an inline Dockerfile! 👍" """, ), - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="./app", )) -docker_load = dockerbuild.Image("dockerLoad", - context=dockerbuild.BuildContextArgs( +docker_load = docker_build.Image("dockerLoad", + context=docker_build.BuildContextArgs( location="./app", ), - exports=[dockerbuild.ExportArgs( - docker=dockerbuild.ExportDockerArgs( + exports=[docker_build.ExportArgs( + docker=docker_build.ExportDockerArgs( tar=True, ), )]) diff --git a/examples/yaml/Pulumi.yaml b/examples/yaml/Pulumi.yaml index b3ee60d..fdeee2c 100644 --- a/examples/yaml/Pulumi.yaml +++ b/examples/yaml/Pulumi.yaml @@ -1,14 +1,14 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: yaml plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin resources: # docker buildx build -f app/Dockerfile.multiPlatform --platform plan9/amd64,plan9/386 app multiPlatform: - type: dockerbuild:Image + type: docker-build:Image properties: dockerfile: location: "./app/Dockerfile.multiPlatform" @@ -20,7 +20,7 @@ resources: # docker buildx build --output=type=registry app registryPush: - type: dockerbuild:Image + type: docker-build:Image properties: context: location: "./app" @@ -36,7 +36,7 @@ resources: # docker buildx build --cache-to=type=local,dest=tmp/cache,mode=max --cache-from=type=local,src=tmp/cache app cached: - type: dockerbuild:Image + type: docker-build:Image properties: context: location: "./app" @@ -50,7 +50,7 @@ resources: # docker buildx build -f app/Dockerfile.buildArgs --build-arg SET_ME_TO_TRUE=true app buildArgs: - type: dockerbuild:Image + type: docker-build:Image properties: dockerfile: location: "./app/Dockerfile.buildArgs" @@ -61,7 +61,7 @@ resources: # docker buildx build -f app/Dockerfile.extraHosts --add-host metadata.google.internal:169.254.169.254 app extraHosts: - type: dockerbuild:Image + type: docker-build:Image properties: dockerfile: location: "./app/Dockerfile.extraHosts" @@ -72,7 +72,7 @@ resources: # docker buildx build -f app/Dockerfile.sshMount --ssh default app sshMount: - type: dockerbuild:Image + type: docker-build:Image properties: dockerfile: location: "./app/Dockerfile.sshMount" @@ -83,7 +83,7 @@ resources: # PASSWORD=hunter2 docker buildx build -f app/Dockerfile.secrets --secret id=password,env=PASSWORD app secrets: - type: dockerbuild:Image + type: docker-build:Image properties: dockerfile: location: "./app/Dockerfile.secrets" @@ -94,7 +94,7 @@ resources: # docker buildx build --label "description=This image will get a descriptive label 👍" app labels: - type: dockerbuild:Image + type: docker-build:Image properties: context: location: "./app" @@ -103,7 +103,7 @@ resources: # docker buildx build -f app/Dockerfile.target --target build-me app target: - type: dockerbuild:Image + type: docker-build:Image properties: dockerfile: location: "./app/Dockerfile.target" @@ -114,7 +114,7 @@ resources: # docker buildx build -f app/Dockerfile.namedContexts \ # --build-context golang:latest=docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984 app namedContexts: - type: dockerbuild:Image + type: docker-build:Image properties: dockerfile: location: "./app/Dockerfile.namedContexts" @@ -126,7 +126,7 @@ resources: # docker buildx build https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile remoteContext: - type: dockerbuild:Image + type: docker-build:Image properties: context: location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile" @@ -136,7 +136,7 @@ resources: # COPY hello.c ./ # EOF remoteContextWithInline: - type: dockerbuild:Image + type: docker-build:Image properties: dockerfile: inline: | @@ -147,7 +147,7 @@ resources: # echo "FROM alpine" | docker buildx build -f - . inline: - type: dockerbuild:Image + type: docker-build:Image properties: dockerfile: inline: | @@ -158,7 +158,7 @@ resources: # docker buildx build --load . dockerLoad: - type: dockerbuild:Image + type: docker-build:Image properties: context: location: "./app" @@ -168,7 +168,7 @@ resources: # docker buildx build - < app/Dockerfile.emptyContext #emptyContext: - # type: dockerbuild:Image + # type: docker-build:Image # properties: # file: "app/Dockerfile.emptyContext" # context: "-" diff --git a/go.mod b/go.mod index ac69966..9aaede6 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/pulumi/pulumi-dockerbuild +module github.com/pulumi/pulumi-docker-build go 1.21.7 diff --git a/go.sum b/go.sum index 37d567b..cb11117 100644 --- a/go.sum +++ b/go.sum @@ -2299,8 +2299,6 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= -github.com/pulumi/pulumi-go-provider v0.14.1-0.20240314105842-9fbffb634faf h1:ASPpJovJ/v4QJIokHuLcYmr+NR44Iuiq0O+rW17c7WQ= -github.com/pulumi/pulumi-go-provider v0.14.1-0.20240314105842-9fbffb634faf/go.mod h1:q3gz5HmArwNALbFihAt1vpg/1xpZlAKjB6A6uMsTgfw= github.com/pulumi/pulumi-go-provider v0.14.1-0.20240329220324-55b011092652 h1:jrEo3/aKXNTdZpjQ/GpYHYVKOWYGRjW+WWb71mswlbk= github.com/pulumi/pulumi-go-provider v0.14.1-0.20240329220324-55b011092652/go.mod h1:q3gz5HmArwNALbFihAt1vpg/1xpZlAKjB6A6uMsTgfw= github.com/pulumi/pulumi-go-provider/integration v0.10.1-0.20240314105842-9fbffb634faf h1:7fDWArOUFH+qQ9EywoC4K2ElXP76Ks/CtVJkEBmv2pk= diff --git a/provider/cmd/pulumi-resource-dockerbuild/main.go b/provider/cmd/pulumi-resource-docker-build/main.go similarity index 94% rename from provider/cmd/pulumi-resource-dockerbuild/main.go rename to provider/cmd/pulumi-resource-docker-build/main.go index d7975fe..e6dfaed 100644 --- a/provider/cmd/pulumi-resource-dockerbuild/main.go +++ b/provider/cmd/pulumi-resource-docker-build/main.go @@ -16,9 +16,8 @@ package main import ( + "github.com/pulumi/pulumi-docker-build/provider" "github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil" - - "github.com/pulumi/pulumi-dockerbuild/provider" ) func main() { diff --git a/provider/cmd/pulumi-resource-dockerbuild/schema.json b/provider/cmd/pulumi-resource-docker-build/schema.json similarity index 86% rename from provider/cmd/pulumi-resource-dockerbuild/schema.json rename to provider/cmd/pulumi-resource-docker-build/schema.json index 59cce2a..04cd379 100644 --- a/provider/cmd/pulumi-resource-dockerbuild/schema.json +++ b/provider/cmd/pulumi-resource-docker-build/schema.json @@ -1,7 +1,7 @@ { - "name": "dockerbuild", - "displayName": "dockerbuild", - "version": "0.0.2-alpha.1711751834+fe4de036", + "name": "docker-build", + "displayName": "docker-build", + "version": "0.0.2-alpha.1713217867+b41855c6.dirty", "description": "A Pulumi provider for Docker buildx", "keywords": [ "docker", @@ -10,8 +10,8 @@ ], "homepage": "https://pulumi.io", "license": "Apache-2.0", - "repository": "https://github.com/pulumi/pulumi-dockerbuild", - "pluginDownloadURL": "github.com/pulumi/pulumi-dockerbuild", + "repository": "https://github.com/pulumi/pulumi-docker-build", + "pluginDownloadURL": "github.com/pulumi/pulumi-docker-build", "publisher": "pulumi", "meta": { "moduleFormat": "(.*)" @@ -23,9 +23,9 @@ } }, "go": { - "importBasePath": "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild", + "importBasePath": "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild", "packageImportAliases": { - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild": "dockerbuild" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild": "dockerbuild" }, "generics": "side-by-side" }, @@ -69,13 +69,13 @@ "registries": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:Registry" + "$ref": "#/types/docker-build:index:Registry" } } } }, "types": { - "dockerbuild:index:BuildContext": { + "docker-build:index:BuildContext": { "properties": { "location": { "type": "string", @@ -84,7 +84,7 @@ "named": { "type": "object", "additionalProperties": { - "$ref": "#/types/dockerbuild:index:Context" + "$ref": "#/types/docker-build:index:Context" }, "description": "Additional build contexts to use.\n\nThese contexts are accessed with `FROM name` or `--from=name`\nstatements when using Dockerfile 1.4+ syntax.\n\nValues can be local paths, HTTP URLs, or `docker-image://` images." } @@ -94,7 +94,7 @@ "location" ] }, - "dockerbuild:index:BuilderConfig": { + "docker-build:index:BuilderConfig": { "properties": { "name": { "type": "string", @@ -103,10 +103,10 @@ }, "type": "object" }, - "dockerbuild:index:CacheFrom": { + "docker-build:index:CacheFrom": { "properties": { "azblob": { - "$ref": "#/types/dockerbuild:index:CacheFromAzureBlob", + "$ref": "#/types/docker-build:index:CacheFromAzureBlob", "description": "Upload build caches to Azure's blob storage service." }, "disabled": { @@ -114,11 +114,11 @@ "description": "When `true` this entry will be excluded. Defaults to `false`." }, "gha": { - "$ref": "#/types/dockerbuild:index:CacheFromGitHubActions", + "$ref": "#/types/docker-build:index:CacheFromGitHubActions", "description": "Recommended for use with GitHub Actions workflows.\n\nAn action like `crazy-max/ghaction-github-runtime` is recommended to\nexpose appropriate credentials to your GitHub workflow." }, "local": { - "$ref": "#/types/dockerbuild:index:CacheFromLocal", + "$ref": "#/types/docker-build:index:CacheFromLocal", "description": "A simple backend which caches images on your local filesystem." }, "raw": { @@ -126,17 +126,17 @@ "description": "A raw string as you would provide it to the Docker CLI (e.g.,\n`type=inline`)." }, "registry": { - "$ref": "#/types/dockerbuild:index:CacheFromRegistry", + "$ref": "#/types/docker-build:index:CacheFromRegistry", "description": "Upload build caches to remote registries." }, "s3": { - "$ref": "#/types/dockerbuild:index:CacheFromS3", + "$ref": "#/types/docker-build:index:CacheFromS3", "description": "Upload build caches to AWS S3 or an S3-compatible services such as\nMinIO." } }, "type": "object" }, - "dockerbuild:index:CacheFromAzureBlob": { + "docker-build:index:CacheFromAzureBlob": { "properties": { "accountUrl": { "type": "string", @@ -157,7 +157,7 @@ "name" ] }, - "dockerbuild:index:CacheFromGitHubActions": { + "docker-build:index:CacheFromGitHubActions": { "properties": { "scope": { "type": "string", @@ -193,7 +193,7 @@ }, "type": "object" }, - "dockerbuild:index:CacheFromLocal": { + "docker-build:index:CacheFromLocal": { "properties": { "digest": { "type": "string", @@ -209,7 +209,7 @@ "src" ] }, - "dockerbuild:index:CacheFromRegistry": { + "docker-build:index:CacheFromRegistry": { "properties": { "ref": { "type": "string", @@ -221,7 +221,7 @@ "ref" ] }, - "dockerbuild:index:CacheFromS3": { + "docker-build:index:CacheFromS3": { "properties": { "accessKeyId": { "type": "string", @@ -296,7 +296,7 @@ "region" ] }, - "dockerbuild:index:CacheMode": { + "docker-build:index:CacheMode": { "type": "string", "enum": [ { @@ -309,10 +309,10 @@ } ] }, - "dockerbuild:index:CacheTo": { + "docker-build:index:CacheTo": { "properties": { "azblob": { - "$ref": "#/types/dockerbuild:index:CacheToAzureBlob", + "$ref": "#/types/docker-build:index:CacheToAzureBlob", "description": "Push cache to Azure's blob storage service." }, "disabled": { @@ -320,15 +320,15 @@ "description": "When `true` this entry will be excluded. Defaults to `false`." }, "gha": { - "$ref": "#/types/dockerbuild:index:CacheToGitHubActions", + "$ref": "#/types/docker-build:index:CacheToGitHubActions", "description": "Recommended for use with GitHub Actions workflows.\n\nAn action like `crazy-max/ghaction-github-runtime` is recommended to\nexpose appropriate credentials to your GitHub workflow." }, "inline": { - "$ref": "#/types/dockerbuild:index:CacheToInline", + "$ref": "#/types/docker-build:index:CacheToInline", "description": "The inline cache storage backend is the simplest implementation to get\nstarted with, but it does not handle multi-stage builds. Consider the\n`registry` cache backend instead." }, "local": { - "$ref": "#/types/dockerbuild:index:CacheToLocal", + "$ref": "#/types/docker-build:index:CacheToLocal", "description": "A simple backend which caches imagines on your local filesystem." }, "raw": { @@ -336,17 +336,17 @@ "description": "A raw string as you would provide it to the Docker CLI (e.g.,\n`type=inline`)" }, "registry": { - "$ref": "#/types/dockerbuild:index:CacheToRegistry", + "$ref": "#/types/docker-build:index:CacheToRegistry", "description": "Push caches to remote registries. Incompatible with the `docker` build\ndriver." }, "s3": { - "$ref": "#/types/dockerbuild:index:CacheToS3", + "$ref": "#/types/docker-build:index:CacheToS3", "description": "Push cache to AWS S3 or S3-compatible services such as MinIO." } }, "type": "object" }, - "dockerbuild:index:CacheToAzureBlob": { + "docker-build:index:CacheToAzureBlob": { "properties": { "accountUrl": { "type": "string", @@ -358,7 +358,7 @@ "default": false }, "mode": { - "$ref": "#/types/dockerbuild:index:CacheMode", + "$ref": "#/types/docker-build:index:CacheMode", "description": "The cache mode to use. Defaults to `min`.", "default": "min" }, @@ -377,7 +377,7 @@ "name" ] }, - "dockerbuild:index:CacheToGitHubActions": { + "docker-build:index:CacheToGitHubActions": { "properties": { "ignoreError": { "type": "boolean", @@ -385,7 +385,7 @@ "default": false }, "mode": { - "$ref": "#/types/dockerbuild:index:CacheMode", + "$ref": "#/types/docker-build:index:CacheMode", "description": "The cache mode to use. Defaults to `min`.", "default": "min" }, @@ -423,14 +423,14 @@ }, "type": "object" }, - "dockerbuild:index:CacheToInline": { + "docker-build:index:CacheToInline": { "description": "Include an inline cache with the exported image.", "type": "object" }, - "dockerbuild:index:CacheToLocal": { + "docker-build:index:CacheToLocal": { "properties": { "compression": { - "$ref": "#/types/dockerbuild:index:CompressionType", + "$ref": "#/types/docker-build:index:CompressionType", "description": "The compression type to use.", "default": "gzip" }, @@ -454,7 +454,7 @@ "default": false }, "mode": { - "$ref": "#/types/dockerbuild:index:CacheMode", + "$ref": "#/types/docker-build:index:CacheMode", "description": "The cache mode to use. Defaults to `min`.", "default": "min" } @@ -464,10 +464,10 @@ "dest" ] }, - "dockerbuild:index:CacheToRegistry": { + "docker-build:index:CacheToRegistry": { "properties": { "compression": { - "$ref": "#/types/dockerbuild:index:CompressionType", + "$ref": "#/types/docker-build:index:CompressionType", "description": "The compression type to use.", "default": "gzip" }, @@ -492,7 +492,7 @@ "default": false }, "mode": { - "$ref": "#/types/dockerbuild:index:CacheMode", + "$ref": "#/types/docker-build:index:CacheMode", "description": "The cache mode to use. Defaults to `min`.", "default": "min" }, @@ -511,7 +511,7 @@ "ref" ] }, - "dockerbuild:index:CacheToS3": { + "docker-build:index:CacheToS3": { "properties": { "accessKeyId": { "type": "string", @@ -545,7 +545,7 @@ "description": "Prefix to prepend on manifest filenames." }, "mode": { - "$ref": "#/types/dockerbuild:index:CacheMode", + "$ref": "#/types/docker-build:index:CacheMode", "description": "The cache mode to use. Defaults to `min`.", "default": "min" }, @@ -596,7 +596,7 @@ "region" ] }, - "dockerbuild:index:CompressionType": { + "docker-build:index:CompressionType": { "type": "string", "enum": [ { @@ -613,7 +613,7 @@ } ] }, - "dockerbuild:index:Context": { + "docker-build:index:Context": { "properties": { "location": { "type": "string", @@ -625,7 +625,7 @@ "location" ] }, - "dockerbuild:index:Dockerfile": { + "docker-build:index:Dockerfile": { "properties": { "inline": { "type": "string", @@ -638,10 +638,10 @@ }, "type": "object" }, - "dockerbuild:index:Export": { + "docker-build:index:Export": { "properties": { "cacheonly": { - "$ref": "#/types/dockerbuild:index:ExportCacheOnly", + "$ref": "#/types/docker-build:index:ExportCacheOnly", "description": "A no-op export. Helpful for silencing the 'no exports' warning if you\njust want to populate caches." }, "disabled": { @@ -649,19 +649,19 @@ "description": "When `true` this entry will be excluded. Defaults to `false`." }, "docker": { - "$ref": "#/types/dockerbuild:index:ExportDocker", + "$ref": "#/types/docker-build:index:ExportDocker", "description": "Export as a Docker image layout." }, "image": { - "$ref": "#/types/dockerbuild:index:ExportImage", + "$ref": "#/types/docker-build:index:ExportImage", "description": "Outputs the build result into a container image format." }, "local": { - "$ref": "#/types/dockerbuild:index:ExportLocal", + "$ref": "#/types/docker-build:index:ExportLocal", "description": "Export to a local directory as files and directories." }, "oci": { - "$ref": "#/types/dockerbuild:index:ExportOCI", + "$ref": "#/types/docker-build:index:ExportOCI", "description": "Identical to the Docker exporter but uses OCI media types by default." }, "raw": { @@ -669,20 +669,20 @@ "description": "A raw string as you would provide it to the Docker CLI (e.g.,\n`type=docker`)" }, "registry": { - "$ref": "#/types/dockerbuild:index:ExportRegistry", + "$ref": "#/types/docker-build:index:ExportRegistry", "description": "Identical to the Image exporter, but pushes by default." }, "tar": { - "$ref": "#/types/dockerbuild:index:ExportTar", + "$ref": "#/types/docker-build:index:ExportTar", "description": "Export to a local directory as a tarball." } }, "type": "object" }, - "dockerbuild:index:ExportCacheOnly": { + "docker-build:index:ExportCacheOnly": { "type": "object" }, - "dockerbuild:index:ExportDocker": { + "docker-build:index:ExportDocker": { "properties": { "annotations": { "type": "object", @@ -692,7 +692,7 @@ "description": "Attach an arbitrary key/value annotation to the image." }, "compression": { - "$ref": "#/types/dockerbuild:index:CompressionType", + "$ref": "#/types/docker-build:index:CompressionType", "description": "The compression type to use.", "default": "gzip" }, @@ -730,7 +730,7 @@ }, "type": "object" }, - "dockerbuild:index:ExportImage": { + "docker-build:index:ExportImage": { "properties": { "annotations": { "type": "object", @@ -740,7 +740,7 @@ "description": "Attach an arbitrary key/value annotation to the image." }, "compression": { - "$ref": "#/types/dockerbuild:index:CompressionType", + "$ref": "#/types/docker-build:index:CompressionType", "description": "The compression type to use.", "default": "gzip" }, @@ -798,7 +798,7 @@ }, "type": "object" }, - "dockerbuild:index:ExportLocal": { + "docker-build:index:ExportLocal": { "properties": { "dest": { "type": "string", @@ -810,7 +810,7 @@ "dest" ] }, - "dockerbuild:index:ExportOCI": { + "docker-build:index:ExportOCI": { "properties": { "annotations": { "type": "object", @@ -820,7 +820,7 @@ "description": "Attach an arbitrary key/value annotation to the image." }, "compression": { - "$ref": "#/types/dockerbuild:index:CompressionType", + "$ref": "#/types/docker-build:index:CompressionType", "description": "The compression type to use.", "default": "gzip" }, @@ -858,7 +858,7 @@ }, "type": "object" }, - "dockerbuild:index:ExportRegistry": { + "docker-build:index:ExportRegistry": { "properties": { "annotations": { "type": "object", @@ -868,7 +868,7 @@ "description": "Attach an arbitrary key/value annotation to the image." }, "compression": { - "$ref": "#/types/dockerbuild:index:CompressionType", + "$ref": "#/types/docker-build:index:CompressionType", "description": "The compression type to use.", "default": "gzip" }, @@ -927,7 +927,7 @@ }, "type": "object" }, - "dockerbuild:index:ExportTar": { + "docker-build:index:ExportTar": { "properties": { "dest": { "type": "string", @@ -939,7 +939,7 @@ "dest" ] }, - "dockerbuild:index:NetworkMode": { + "docker-build:index:NetworkMode": { "type": "string", "enum": [ { @@ -956,7 +956,7 @@ } ] }, - "dockerbuild:index:Platform": { + "docker-build:index:Platform": { "type": "string", "enum": [ { @@ -1045,7 +1045,7 @@ } ] }, - "dockerbuild:index:Registry": { + "docker-build:index:Registry": { "properties": { "address": { "type": "string", @@ -1066,7 +1066,7 @@ "address" ] }, - "dockerbuild:index:SSH": { + "docker-build:index:SSH": { "properties": { "id": { "type": "string", @@ -1114,13 +1114,13 @@ "registries": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:Registry" + "$ref": "#/types/docker-build:index:Registry" } } } }, "resources": { - "dockerbuild:index:Image": { + "docker-build:index:Image": { "description": "A Docker image built using buildx -- Docker's interface to the improved\nBuildKit backend.\n\n## Stability\n\n**This resource is experimental and subject to change.**\n\nAPI types are unstable. Subsequent releases _may_ require manual edits\nto your state file(s) in order to adopt API changes.\n\n`retainOnDelete: true` is recommended with this resource until it is\nstable. This enables future API changes to be adopted more easily by renaming\nresources.\n\nOnly use this resource if you understand and accept the risks.\n\n## Migrating v3 and v4 Image resources\n\nThe `dockerbuild.Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider.\nExisting `Image` resources can be converted to `dockerbuild.Image` resources with minor modifications.\n\n### Behavioral differences\n\nThere are several key behavioral differences to keep in mind when transitioning images to the new `dockerbuild.Image` resource.\n\n#### Previews\n\nVersion `3.x` of the Pulumi Docker provider always builds images during preview operations.\nThis is helpful as a safeguard to prevent \"broken\" images from merging, but users found the behavior unnecessarily redundant when running previews and updates locally.\n\nVersion `4.x` changed build-on-preview behavior to be opt-in.\nBy default, `v4.x` `Image` resources do _not_ build during previews, but this behavior can be toggled with the `buildOnPreview` option.\nSome users felt this made previews in CI less helpful because they no longer detected bad images by default.\n\nThe default behavior of the `dockerbuild.Image` resource has been changed to strike a better balance between CI use cases and manual updates.\nBy default, Pulumi will now only build `dockerbuild.Image` resources during previews when it detects a CI environment like GitHub Actions.\nPreviews run in non-CI environments will not build images.\nThis behavior is still configurable with `buildOnPreview`.\n\n#### Push behavior\n\nVersions `3.x` and `4.x` of the Pulumi Docker provider attempt to push images to remote registries by default.\nThey expose a `skipPush: true` option to disable pushing.\n\nThe `dockerbuild.Image` resource matches the Docker CLI's behavior and does not push images anywhere by default.\n\nTo push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`).\nLike Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally.\n\n#### Secrets\n\nVersion `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field.\n\nVersion `4.x` of the Pulumi Docker provider does not support secrets.\n\nThe `dockerbuild.Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables.\nInstead, they should be passed directly as values.\n(Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).)\nPulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments.\n\n#### Caching\n\nVersion `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`.\nIt builds targets individually and pushes them to separate images for caching.\n\nVersion `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches.\n\nBoth versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior.\nThis can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc.\n\nThe `dockerbuild.Image` resource delegates all caching behavior to Docker.\n`cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc.\n\n#### Outputs\n\nVersions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest.\nIn `4.x` this could also be a single sha256 hash if the image wasn't pushed.\n\nUnlike earlier providers the `dockerbuild.Image` resource can push multiple tags.\nAs a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed.\nIf multiple tags were pushed this uses one at random.\n\nIf you need more control over tag references you can use the `digest` output, which is always a single sha256 hash as long as the image was exported somewhere.\n\n#### Tag deletion and refreshes\n\nVersions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` resource is deleted, nor do they confirm expected tags exist during `refresh` operations.\n\nThe `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist.\nIf any are missing a subsequent `update` will push them.\n\nWhen a `dockerbuild.Image` is deleted, it will _attempt_ to also delete any pushed tags.\nDeletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular).\nManifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace.\n\nUse the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted.\n\n### Example migration\n\nExamples of \"fully-featured\" `v3` and `v4` `Image` resources are shown below, along with an example `dockerbuild.Image` resource showing how they would look after migration.\n\nThe `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`.\nAfter migration, the environment variable is no longer needed and CLI flags are now properties on the `dockerbuild.Image`.\nIn almost all cases, properties of `dockerbuild.Image` are named after the Docker CLI flag they correspond to.\n\nThe `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`.\nIt it is shown with parameters similar to the `v3` example for completeness.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### v3/v4 migration\n\n```typescript\n\n// v3 Image\nconst v3 = new docker.Image(\"v3-image\", {\n imageName: \"myregistry.com/user/repo:latest\",\n localImageName: \"local-tag\",\n skipPush: false,\n build: {\n dockerfile: \"./Dockerfile\",\n context: \"../app\",\n target: \"mytarget\",\n args: {\n MY_BUILD_ARG: \"foo\",\n },\n env: {\n DOCKER_BUILDKIT: \"1\",\n },\n extraOptions: [\n \"--cache-from\",\n \"type=registry,myregistry.com/user/repo:cache\",\n \"--cache-to\",\n \"type=registry,myregistry.com/user/repo:cache\",\n \"--add-host\",\n \"metadata.google.internal:169.254.169.254\",\n \"--secret\",\n \"id=mysecret,src=/local/secret\",\n \"--ssh\",\n \"default=/home/runner/.ssh/id_ed25519\",\n \"--network\",\n \"host\",\n \"--platform\",\n \"linux/amd64\",\n ],\n },\n registry: {\n server: \"myregistry.com\",\n username: \"username\",\n password: pulumi.secret(\"password\"),\n },\n});\n\n// v3 Image after migrating to dockerbuild.Image\nconst v3Migrated = new dockerbuild.Image(\"v3-to-buildx\", {\n tags: [\"myregistry.com/user/repo:latest\", \"local-tag\"],\n push: true,\n dockerfile: {\n location: \"./Dockerfile\",\n },\n context: {\n location: \"../app\",\n },\n targets: [\"mytarget\"],\n buildArgs: {\n MY_BUILD_ARG: \"foo\",\n },\n cacheFrom: [{ registry: { ref: \"myregistry.com/user/repo:cache\" } }],\n cacheTo: [{ registry: { ref: \"myregistry.com/user/repo:cache\" } }],\n secrets: {\n mysecret: \"value\",\n },\n addHosts: [\"metadata.google.internal:169.254.169.254\"],\n ssh: {\n default: [\"/home/runner/.ssh/id_ed25519\"],\n },\n network: \"host\",\n platforms: [\"linux/amd64\"],\n registries: [{\n address: \"myregistry.com\",\n username: \"username\",\n password: pulumi.secret(\"password\"),\n }],\n});\n\n\n// v4 Image\nconst v4 = new docker.Image(\"v4-image\", {\n imageName: \"myregistry.com/user/repo:latest\",\n skipPush: false,\n build: {\n dockerfile: \"./Dockerfile\",\n context: \"../app\",\n target: \"mytarget\",\n args: {\n MY_BUILD_ARG: \"foo\",\n },\n cacheFrom: {\n images: [\"myregistry.com/user/repo:cache\"],\n },\n addHosts: [\"metadata.google.internal:169.254.169.254\"],\n network: \"host\",\n platform: \"linux/amd64\",\n },\n buildOnPreview: true,\n registry: {\n server: \"myregistry.com\",\n username: \"username\",\n password: pulumi.secret(\"password\"),\n },\n});\n\n// v4 Image after migrating to dockerbuild.Image\nconst v4Migrated = new dockerbuild.Image(\"v4-to-buildx\", {\n tags: [\"myregistry.com/user/repo:latest\"],\n push: true,\n dockerfile: {\n location: \"./Dockerfile\",\n },\n context: {\n location: \"../app\",\n },\n targets: [\"mytarget\"],\n buildArgs: {\n MY_BUILD_ARG: \"foo\",\n },\n cacheFrom: [{ registry: { ref: \"myregistry.com/user/repo:cache\" } }],\n cacheTo: [{ registry: { ref: \"myregistry.com/user/repo:cache\" } }],\n addHosts: [\"metadata.google.internal:169.254.169.254\"],\n network: \"host\",\n platforms: [\"linux/amd64\"],\n registries: [{\n address: \"myregistry.com\",\n username: \"username\",\n password: pulumi.secret(\"password\"),\n }],\n});\n\n```\n\n{{% /example %}}\n\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Push to AWS ECR with caching\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst ecrRepository = new aws.ecr.Repository(\"ecr-repository\", {});\nconst authToken = aws.ecr.getAuthorizationTokenOutput({\n registryId: ecrRepository.registryId,\n});\nconst myImage = new dockerbuild.Image(\"my-image\", {\n cacheFrom: [{\n registry: {\n ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`,\n },\n }],\n cacheTo: [{\n registry: {\n imageManifest: true,\n ociMediaTypes: true,\n ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`,\n },\n }],\n context: {\n location: \"./app\",\n },\n push: true,\n registries: [{\n address: ecrRepository.repositoryUrl,\n password: authToken.apply(authToken =\u003e authToken.password),\n username: authToken.apply(authToken =\u003e authToken.userName),\n }],\n tags: [pulumi.interpolate`${ecrRepository.repositoryUrl}:latest`],\n});\nexport const ref = myImage.ref;\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_dockerbuild as dockerbuild\n\necr_repository = aws.ecr.Repository(\"ecr-repository\")\nauth_token = aws.ecr.get_authorization_token_output(registry_id=ecr_repository.registry_id)\nmy_image = dockerbuild.Image(\"my-image\",\n cache_from=[dockerbuild.CacheFromArgs(\n registry=dockerbuild.CacheFromRegistryArgs(\n ref=ecr_repository.repository_url.apply(lambda repository_url: f\"{repository_url}:cache\"),\n ),\n )],\n cache_to=[dockerbuild.CacheToArgs(\n registry=dockerbuild.CacheToRegistryArgs(\n image_manifest=True,\n oci_media_types=True,\n ref=ecr_repository.repository_url.apply(lambda repository_url: f\"{repository_url}:cache\"),\n ),\n )],\n context=dockerbuild.BuildContextArgs(\n location=\"./app\",\n ),\n push=True,\n registries=[dockerbuild.RegistryArgs(\n address=ecr_repository.repository_url,\n password=auth_token.password,\n username=auth_token.user_name,\n )],\n tags=[ecr_repository.repository_url.apply(lambda repository_url: f\"{repository_url}:latest\")])\npulumi.export(\"ref\", my_image.ref)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ecrRepository = new Aws.Ecr.Repository(\"ecr-repository\");\n\n var authToken = Aws.Ecr.GetAuthorizationToken.Invoke(new()\n {\n RegistryId = ecrRepository.RegistryId,\n });\n\n var myImage = new Dockerbuild.Image(\"my-image\", new()\n {\n CacheFrom = new[]\n {\n new Dockerbuild.Inputs.CacheFromArgs\n {\n Registry = new Dockerbuild.Inputs.CacheFromRegistryArgs\n {\n Ref = ecrRepository.RepositoryUrl.Apply(repositoryUrl =\u003e $\"{repositoryUrl}:cache\"),\n },\n },\n },\n CacheTo = new[]\n {\n new Dockerbuild.Inputs.CacheToArgs\n {\n Registry = new Dockerbuild.Inputs.CacheToRegistryArgs\n {\n ImageManifest = true,\n OciMediaTypes = true,\n Ref = ecrRepository.RepositoryUrl.Apply(repositoryUrl =\u003e $\"{repositoryUrl}:cache\"),\n },\n },\n },\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"./app\",\n },\n Push = true,\n Registries = new[]\n {\n new Dockerbuild.Inputs.RegistryArgs\n {\n Address = ecrRepository.RepositoryUrl,\n Password = authToken.Apply(getAuthorizationTokenResult =\u003e getAuthorizationTokenResult.Password),\n Username = authToken.Apply(getAuthorizationTokenResult =\u003e getAuthorizationTokenResult.UserName),\n },\n },\n Tags = new[]\n {\n ecrRepository.RepositoryUrl.Apply(repositoryUrl =\u003e $\"{repositoryUrl}:latest\"),\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"ref\"] = myImage.Ref,\n };\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tecrRepository, err := ecr.NewRepository(ctx, \"ecr-repository\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tauthToken := ecr.GetAuthorizationTokenOutput(ctx, ecr.GetAuthorizationTokenOutputArgs{\n\t\t\tRegistryId: ecrRepository.RegistryId,\n\t\t}, nil)\n\t\tmyImage, err := dockerbuild.NewImage(ctx, \"my-image\", \u0026dockerbuild.ImageArgs{\n\t\t\tCacheFrom: dockerbuild.CacheFromArray{\n\t\t\t\t\u0026dockerbuild.CacheFromArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheFromRegistryArgs{\n\t\t\t\t\t\tRef: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v:cache\", repositoryUrl), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCacheTo: dockerbuild.CacheToArray{\n\t\t\t\t\u0026dockerbuild.CacheToArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheToRegistryArgs{\n\t\t\t\t\t\tImageManifest: pulumi.Bool(true),\n\t\t\t\t\t\tOciMediaTypes: pulumi.Bool(true),\n\t\t\t\t\t\tRef: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v:cache\", repositoryUrl), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"./app\"),\n\t\t\t},\n\t\t\tPush: pulumi.Bool(true),\n\t\t\tRegistries: dockerbuild.RegistryArray{\n\t\t\t\t\u0026dockerbuild.RegistryArgs{\n\t\t\t\t\tAddress: ecrRepository.RepositoryUrl,\n\t\t\t\t\tPassword: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) {\n\t\t\t\t\t\treturn \u0026authToken.Password, nil\n\t\t\t\t\t}).(pulumi.StringPtrOutput),\n\t\t\t\t\tUsername: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) {\n\t\t\t\t\t\treturn \u0026authToken.UserName, nil\n\t\t\t\t\t}).(pulumi.StringPtrOutput),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) {\n\t\t\t\t\treturn fmt.Sprintf(\"%v:latest\", repositoryUrl), nil\n\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"ref\", myImage.Ref)\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Push to AWS ECR with caching\nname: ecr\noutputs:\n ref: ${my-image.ref}\nresources:\n ecr-repository:\n type: aws:ecr:Repository\n my-image:\n properties:\n cacheFrom:\n - registry:\n ref: ${ecr-repository.repositoryUrl}:cache\n cacheTo:\n - registry:\n imageManifest: true\n ociMediaTypes: true\n ref: ${ecr-repository.repositoryUrl}:cache\n context:\n location: ./app\n push: true\n registries:\n - address: ${ecr-repository.repositoryUrl}\n password: ${auth-token.password}\n username: ${auth-token.userName}\n tags:\n - ${ecr-repository.repositoryUrl}:latest\n type: dockerbuild:Image\nruntime: yaml\nvariables:\n auth-token:\n fn::aws:ecr:getAuthorizationToken:\n registryId: ${ecr-repository.registryId}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecr.Repository;\nimport com.pulumi.aws.ecr.EcrFunctions;\nimport com.pulumi.aws.ecr.inputs.GetAuthorizationTokenArgs;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromRegistryArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToRegistryArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.inputs.RegistryArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ecrRepository = new Repository(\"ecrRepository\");\n\n final var authToken = EcrFunctions.getAuthorizationToken(GetAuthorizationTokenArgs.builder()\n .registryId(ecrRepository.registryId())\n .build());\n\n var myImage = new Image(\"myImage\", ImageArgs.builder() \n .cacheFrom(CacheFromArgs.builder()\n .registry(CacheFromRegistryArgs.builder()\n .ref(ecrRepository.repositoryUrl().applyValue(repositoryUrl -\u003e String.format(\"%s:cache\", repositoryUrl)))\n .build())\n .build())\n .cacheTo(CacheToArgs.builder()\n .registry(CacheToRegistryArgs.builder()\n .imageManifest(true)\n .ociMediaTypes(true)\n .ref(ecrRepository.repositoryUrl().applyValue(repositoryUrl -\u003e String.format(\"%s:cache\", repositoryUrl)))\n .build())\n .build())\n .context(BuildContextArgs.builder()\n .location(\"./app\")\n .build())\n .push(true)\n .registries(RegistryArgs.builder()\n .address(ecrRepository.repositoryUrl())\n .password(authToken.applyValue(getAuthorizationTokenResult -\u003e getAuthorizationTokenResult).applyValue(authToken -\u003e authToken.applyValue(getAuthorizationTokenResult -\u003e getAuthorizationTokenResult.password())))\n .username(authToken.applyValue(getAuthorizationTokenResult -\u003e getAuthorizationTokenResult).applyValue(authToken -\u003e authToken.applyValue(getAuthorizationTokenResult -\u003e getAuthorizationTokenResult.userName())))\n .build())\n .tags(ecrRepository.repositoryUrl().applyValue(repositoryUrl -\u003e String.format(\"%s:latest\", repositoryUrl)))\n .build());\n\n ctx.export(\"ref\", myImage.ref());\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Multi-platform image\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst image = new dockerbuild.Image(\"image\", {\n context: {\n location: \"app\",\n },\n platforms: [\n dockerbuild.Platform.Plan9_amd64,\n dockerbuild.Platform.Plan9_386,\n ],\n});\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\nimage = dockerbuild.Image(\"image\",\n context=dockerbuild.BuildContextArgs(\n location=\"app\",\n ),\n platforms=[\n dockerbuild.Platform.PLAN9_AMD64,\n dockerbuild.Platform.PLAN9_386,\n ])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new Dockerbuild.Image(\"image\", new()\n {\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Platforms = new[]\n {\n Dockerbuild.Platform.Plan9_amd64,\n Dockerbuild.Platform.Plan9_386,\n },\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPlatforms: dockerbuild.PlatformArray{\n\t\t\t\tdockerbuild.Platform_Plan9_amd64,\n\t\t\t\tdockerbuild.Platform_Plan9_386,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Multi-platform image\nname: multi-platform\nresources:\n image:\n properties:\n context:\n location: app\n platforms:\n - plan9/amd64\n - plan9/386\n type: dockerbuild:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .platforms( \n \"plan9/amd64\",\n \"plan9/386\")\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Registry export\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst image = new dockerbuild.Image(\"image\", {\n context: {\n location: \"app\",\n },\n push: true,\n registries: [{\n address: \"docker.io\",\n password: dockerHubPassword,\n username: \"pulumibot\",\n }],\n tags: [\"docker.io/pulumi/pulumi:3.107.0\"],\n});\nexport const ref = myImage.ref;\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\nimage = dockerbuild.Image(\"image\",\n context=dockerbuild.BuildContextArgs(\n location=\"app\",\n ),\n push=True,\n registries=[dockerbuild.RegistryArgs(\n address=\"docker.io\",\n password=docker_hub_password,\n username=\"pulumibot\",\n )],\n tags=[\"docker.io/pulumi/pulumi:3.107.0\"])\npulumi.export(\"ref\", my_image[\"ref\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new Dockerbuild.Image(\"image\", new()\n {\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Push = true,\n Registries = new[]\n {\n new Dockerbuild.Inputs.RegistryArgs\n {\n Address = \"docker.io\",\n Password = dockerHubPassword,\n Username = \"pulumibot\",\n },\n },\n Tags = new[]\n {\n \"docker.io/pulumi/pulumi:3.107.0\",\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"ref\"] = myImage.Ref,\n };\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPush: pulumi.Bool(true),\n\t\t\tRegistries: dockerbuild.RegistryArray{\n\t\t\t\t\u0026dockerbuild.RegistryArgs{\n\t\t\t\t\tAddress: pulumi.String(\"docker.io\"),\n\t\t\t\t\tPassword: pulumi.Any(dockerHubPassword),\n\t\t\t\t\tUsername: pulumi.String(\"pulumibot\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"docker.io/pulumi/pulumi:3.107.0\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"ref\", myImage.Ref)\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Registry export\nname: registry\noutputs:\n ref: ${my-image.ref}\nresources:\n image:\n properties:\n context:\n location: app\n push: true\n registries:\n - address: docker.io\n password: ${dockerHubPassword}\n username: pulumibot\n tags:\n - docker.io/pulumi/pulumi:3.107.0\n type: dockerbuild:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.inputs.RegistryArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .push(true)\n .registries(RegistryArgs.builder()\n .address(\"docker.io\")\n .password(dockerHubPassword)\n .username(\"pulumibot\")\n .build())\n .tags(\"docker.io/pulumi/pulumi:3.107.0\")\n .build());\n\n ctx.export(\"ref\", myImage.ref());\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Caching\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst image = new dockerbuild.Image(\"image\", {\n cacheFrom: [{\n local: {\n src: \"tmp/cache\",\n },\n }],\n cacheTo: [{\n local: {\n dest: \"tmp/cache\",\n mode: dockerbuild.CacheMode.Max,\n },\n }],\n context: {\n location: \"app\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\nimage = dockerbuild.Image(\"image\",\n cache_from=[dockerbuild.CacheFromArgs(\n local=dockerbuild.CacheFromLocalArgs(\n src=\"tmp/cache\",\n ),\n )],\n cache_to=[dockerbuild.CacheToArgs(\n local=dockerbuild.CacheToLocalArgs(\n dest=\"tmp/cache\",\n mode=dockerbuild.CacheMode.MAX,\n ),\n )],\n context=dockerbuild.BuildContextArgs(\n location=\"app\",\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new Dockerbuild.Image(\"image\", new()\n {\n CacheFrom = new[]\n {\n new Dockerbuild.Inputs.CacheFromArgs\n {\n Local = new Dockerbuild.Inputs.CacheFromLocalArgs\n {\n Src = \"tmp/cache\",\n },\n },\n },\n CacheTo = new[]\n {\n new Dockerbuild.Inputs.CacheToArgs\n {\n Local = new Dockerbuild.Inputs.CacheToLocalArgs\n {\n Dest = \"tmp/cache\",\n Mode = Dockerbuild.CacheMode.Max,\n },\n },\n },\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tCacheFrom: dockerbuild.CacheFromArray{\n\t\t\t\t\u0026dockerbuild.CacheFromArgs{\n\t\t\t\t\tLocal: \u0026dockerbuild.CacheFromLocalArgs{\n\t\t\t\t\t\tSrc: pulumi.String(\"tmp/cache\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCacheTo: dockerbuild.CacheToArray{\n\t\t\t\t\u0026dockerbuild.CacheToArgs{\n\t\t\t\t\tLocal: \u0026dockerbuild.CacheToLocalArgs{\n\t\t\t\t\t\tDest: pulumi.String(\"tmp/cache\"),\n\t\t\t\t\t\tMode: dockerbuild.CacheModeMax,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Caching\nname: caching\nresources:\n image:\n properties:\n cacheFrom:\n - local:\n src: tmp/cache\n cacheTo:\n - local:\n dest: tmp/cache\n mode: max\n context:\n location: app\n type: dockerbuild:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromLocalArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToLocalArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .cacheFrom(CacheFromArgs.builder()\n .local(CacheFromLocalArgs.builder()\n .src(\"tmp/cache\")\n .build())\n .build())\n .cacheTo(CacheToArgs.builder()\n .local(CacheToLocalArgs.builder()\n .dest(\"tmp/cache\")\n .mode(\"max\")\n .build())\n .build())\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Docker Build Cloud\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst image = new dockerbuild.Image(\"image\", {\n builder: {\n name: \"cloud-builder-name\",\n },\n context: {\n location: \"app\",\n },\n exec: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\nimage = dockerbuild.Image(\"image\",\n builder=dockerbuild.BuilderConfigArgs(\n name=\"cloud-builder-name\",\n ),\n context=dockerbuild.BuildContextArgs(\n location=\"app\",\n ),\n exec_=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new Dockerbuild.Image(\"image\", new()\n {\n Builder = new Dockerbuild.Inputs.BuilderConfigArgs\n {\n Name = \"cloud-builder-name\",\n },\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Exec = true,\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tBuilder: \u0026dockerbuild.BuilderConfigArgs{\n\t\t\t\tName: pulumi.String(\"cloud-builder-name\"),\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tExec: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Docker Build Cloud\nname: dbc\nresources:\n image:\n properties:\n builder:\n name: cloud-builder-name\n context:\n location: app\n exec: true\n type: dockerbuild:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuilderConfigArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .builder(BuilderConfigArgs.builder()\n .name(\"cloud-builder-name\")\n .build())\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .exec(true)\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Build arguments\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst image = new dockerbuild.Image(\"image\", {\n buildArgs: {\n SET_ME_TO_TRUE: \"true\",\n },\n context: {\n location: \"app\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\nimage = dockerbuild.Image(\"image\",\n build_args={\n \"SET_ME_TO_TRUE\": \"true\",\n },\n context=dockerbuild.BuildContextArgs(\n location=\"app\",\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new Dockerbuild.Image(\"image\", new()\n {\n BuildArgs = \n {\n { \"SET_ME_TO_TRUE\", \"true\" },\n },\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tBuildArgs: pulumi.StringMap{\n\t\t\t\t\"SET_ME_TO_TRUE\": pulumi.String(\"true\"),\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Build arguments\nname: build-args\nresources:\n image:\n properties:\n buildArgs:\n SET_ME_TO_TRUE: \"true\"\n context:\n location: app\n type: dockerbuild:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .buildArgs(Map.of(\"SET_ME_TO_TRUE\", \"true\"))\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Build target\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst image = new dockerbuild.Image(\"image\", {\n context: {\n location: \"app\",\n },\n target: \"build-me\",\n});\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\nimage = dockerbuild.Image(\"image\",\n context=dockerbuild.BuildContextArgs(\n location=\"app\",\n ),\n target=\"build-me\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new Dockerbuild.Image(\"image\", new()\n {\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Target = \"build-me\",\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tTarget: pulumi.String(\"build-me\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Build target\nname: build-target\nresources:\n image:\n properties:\n context:\n location: app\n target: build-me\n type: dockerbuild:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .target(\"build-me\")\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Named contexts\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst image = new dockerbuild.Image(\"image\", {context: {\n location: \"app\",\n named: {\n \"golang:latest\": {\n location: \"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\",\n },\n },\n}});\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\nimage = dockerbuild.Image(\"image\", context=dockerbuild.BuildContextArgs(\n location=\"app\",\n named={\n \"golang:latest\": dockerbuild.ContextArgs(\n location=\"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\",\n ),\n },\n))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new Dockerbuild.Image(\"image\", new()\n {\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n Named = \n {\n { \"golang:latest\", new Dockerbuild.Inputs.ContextArgs\n {\n Location = \"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\",\n } },\n },\n },\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t\tNamed: dockerbuild.ContextMap{\n\t\t\t\t\t\"golang:latest\": \u0026dockerbuild.ContextArgs{\n\t\t\t\t\t\tLocation: pulumi.String(\"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Named contexts\nname: named-contexts\nresources:\n image:\n properties:\n context:\n location: app\n named:\n golang:latest:\n location: docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\n type: dockerbuild:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .named(Map.of(\"golang:latest\", Map.of(\"location\", \"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\")))\n .build())\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Remote context\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst image = new dockerbuild.Image(\"image\", {context: {\n location: \"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\",\n}});\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\nimage = dockerbuild.Image(\"image\", context=dockerbuild.BuildContextArgs(\n location=\"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\",\n))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new Dockerbuild.Image(\"image\", new()\n {\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\",\n },\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Remote context\nname: remote-context\nresources:\n image:\n properties:\n context:\n location: https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\n type: dockerbuild:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\")\n .build())\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Inline Dockerfile\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst image = new dockerbuild.Image(\"image\", {\n context: {\n location: \"app\",\n },\n dockerfile: {\n inline: `FROM busybox\nCOPY hello.c ./\n`,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\nimage = dockerbuild.Image(\"image\",\n context=dockerbuild.BuildContextArgs(\n location=\"app\",\n ),\n dockerfile=dockerbuild.DockerfileArgs(\n inline=\"\"\"FROM busybox\nCOPY hello.c ./\n\"\"\",\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new Dockerbuild.Image(\"image\", new()\n {\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Dockerfile = new Dockerbuild.Inputs.DockerfileArgs\n {\n Inline = @\"FROM busybox\nCOPY hello.c ./\n\",\n },\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tDockerfile: \u0026dockerbuild.DockerfileArgs{\n\t\t\t\tInline: pulumi.String(\"FROM busybox\\nCOPY hello.c ./\\n\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Inline Dockerfile\nname: inline\nresources:\n image:\n properties:\n context:\n location: app\n dockerfile:\n inline: |\n FROM busybox\n COPY hello.c ./\n type: dockerbuild:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.inputs.DockerfileArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .dockerfile(DockerfileArgs.builder()\n .inline(\"\"\"\nFROM busybox\nCOPY hello.c ./\n \"\"\")\n .build())\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Remote context\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst image = new dockerbuild.Image(\"image\", {\n context: {\n location: \"https://github.com/docker-library/hello-world.git\",\n },\n dockerfile: {\n location: \"app/Dockerfile\",\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\nimage = dockerbuild.Image(\"image\",\n context=dockerbuild.BuildContextArgs(\n location=\"https://github.com/docker-library/hello-world.git\",\n ),\n dockerfile=dockerbuild.DockerfileArgs(\n location=\"app/Dockerfile\",\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new Dockerbuild.Image(\"image\", new()\n {\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"https://github.com/docker-library/hello-world.git\",\n },\n Dockerfile = new Dockerbuild.Inputs.DockerfileArgs\n {\n Location = \"app/Dockerfile\",\n },\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"https://github.com/docker-library/hello-world.git\"),\n\t\t\t},\n\t\t\tDockerfile: \u0026dockerbuild.DockerfileArgs{\n\t\t\t\tLocation: pulumi.String(\"app/Dockerfile\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Remote context\nname: remote-context\nresources:\n image:\n properties:\n context:\n location: https://github.com/docker-library/hello-world.git\n dockerfile:\n location: app/Dockerfile\n type: dockerbuild:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.inputs.DockerfileArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"https://github.com/docker-library/hello-world.git\")\n .build())\n .dockerfile(DockerfileArgs.builder()\n .location(\"app/Dockerfile\")\n .build())\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Local export\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst image = new dockerbuild.Image(\"image\", {\n context: {\n location: \"app\",\n },\n exports: [{\n docker: {\n tar: true,\n },\n }],\n});\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\nimage = dockerbuild.Image(\"image\",\n context=dockerbuild.BuildContextArgs(\n location=\"app\",\n ),\n exports=[dockerbuild.ExportArgs(\n docker=dockerbuild.ExportDockerArgs(\n tar=True,\n ),\n )])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new Dockerbuild.Image(\"image\", new()\n {\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Exports = new[]\n {\n new Dockerbuild.Inputs.ExportArgs\n {\n Docker = new Dockerbuild.Inputs.ExportDockerArgs\n {\n Tar = true,\n },\n },\n },\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tExports: dockerbuild.ExportArray{\n\t\t\t\t\u0026dockerbuild.ExportArgs{\n\t\t\t\t\tDocker: \u0026dockerbuild.ExportDockerArgs{\n\t\t\t\t\t\tTar: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Local export\nname: docker-load\nresources:\n image:\n properties:\n context:\n location: app\n exports:\n - docker:\n tar: true\n type: dockerbuild:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.inputs.ExportArgs;\nimport com.pulumi.dockerbuild.inputs.ExportDockerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .exports(ExportArgs.builder()\n .docker(ExportDockerArgs.builder()\n .tar(true)\n .build())\n .build())\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% /examples %}}", "properties": { "addHosts": { @@ -1142,25 +1142,25 @@ "description": "By default, preview behavior depends on the execution environment. If\nPulumi detects the operation is running on a CI system (GitHub Actions,\nTravis CI, Azure Pipelines, etc.) then it will build images during\npreviews as a safeguard. Otherwise, if not running on CI, previews will\nnot build images.\n\nSetting this to `false` forces previews to never perform builds, and\nsetting it to `true` will always build the image during previews.\n\nImages built during previews are never exported to registries, however\ncache manifests are still exported.\n\nOn-disk Dockerfiles are always validated for syntactic correctness\nregardless of this setting." }, "builder": { - "$ref": "#/types/dockerbuild:index:BuilderConfig", + "$ref": "#/types/docker-build:index:BuilderConfig", "description": "Builder configuration." }, "cacheFrom": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:CacheFrom" + "$ref": "#/types/docker-build:index:CacheFrom" }, "description": "Cache export configuration.\n\nEquivalent to Docker's `--cache-from` flag." }, "cacheTo": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:CacheTo" + "$ref": "#/types/docker-build:index:CacheTo" }, "description": "Cache import configuration.\n\nEquivalent to Docker's `--cache-to` flag." }, "context": { - "$ref": "#/types/dockerbuild:index:BuildContext", + "$ref": "#/types/docker-build:index:BuildContext", "description": "Build context settings.\n\nEquivalent to Docker's `PATH | URL | -` positional argument." }, "contextHash": { @@ -1172,7 +1172,7 @@ "description": "A SHA256 digest of the image if it was exported to a registry or\nelsewhere.\n\nEmpty if the image was not exported.\n\nRegistry images can be referenced precisely as `\u003ctag\u003e@\u003cdigest\u003e`. The\n`ref` output provides one such reference as a convenience." }, "dockerfile": { - "$ref": "#/types/dockerbuild:index:Dockerfile", + "$ref": "#/types/docker-build:index:Dockerfile", "description": "Dockerfile settings.\n\nEquivalent to Docker's `--file` flag." }, "exec": { @@ -1182,7 +1182,7 @@ "exports": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:Export" + "$ref": "#/types/docker-build:index:Export" }, "description": "Controls where images are persisted after building.\n\nImages are only stored in the local cache unless `exports` are\nexplicitly configured.\n\nExporting to multiple destinations requires a daemon running BuildKit\n0.13 or later.\n\nEquivalent to Docker's `--output` flag." }, @@ -1198,7 +1198,7 @@ "description": "When `true` the build will automatically include a `docker` export.\n\nDefaults to `false`.\n\nEquivalent to Docker's `--load` flag." }, "network": { - "$ref": "#/types/dockerbuild:index:NetworkMode", + "$ref": "#/types/docker-build:index:NetworkMode", "description": "Set the network mode for `RUN` instructions. Defaults to `default`.\n\nFor custom networks, configure your builder with `--driver-opt network=...`.\n\nEquivalent to Docker's `--network` flag.", "default": "default" }, @@ -1209,7 +1209,7 @@ "platforms": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:Platform" + "$ref": "#/types/docker-build:index:Platform" }, "description": "Set target platform(s) for the build. Defaults to the host's platform.\n\nEquivalent to Docker's `--platform` flag." }, @@ -1228,7 +1228,7 @@ "registries": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:Registry" + "$ref": "#/types/docker-build:index:Registry" }, "description": "Registry credentials. Required if reading or exporting to private\nrepositories.\n\nCredentials are kept in-memory and do not pollute pre-existing\ncredentials on the host.\n\nSimilar to `docker login`." }, @@ -1242,7 +1242,7 @@ "ssh": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:SSH" + "$ref": "#/types/docker-build:index:SSH" }, "description": "SSH agent socket or keys to expose to the build.\n\nEquivalent to Docker's `--ssh` flag." }, @@ -1284,29 +1284,29 @@ "description": "By default, preview behavior depends on the execution environment. If\nPulumi detects the operation is running on a CI system (GitHub Actions,\nTravis CI, Azure Pipelines, etc.) then it will build images during\npreviews as a safeguard. Otherwise, if not running on CI, previews will\nnot build images.\n\nSetting this to `false` forces previews to never perform builds, and\nsetting it to `true` will always build the image during previews.\n\nImages built during previews are never exported to registries, however\ncache manifests are still exported.\n\nOn-disk Dockerfiles are always validated for syntactic correctness\nregardless of this setting." }, "builder": { - "$ref": "#/types/dockerbuild:index:BuilderConfig", + "$ref": "#/types/docker-build:index:BuilderConfig", "description": "Builder configuration." }, "cacheFrom": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:CacheFrom" + "$ref": "#/types/docker-build:index:CacheFrom" }, "description": "Cache export configuration.\n\nEquivalent to Docker's `--cache-from` flag." }, "cacheTo": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:CacheTo" + "$ref": "#/types/docker-build:index:CacheTo" }, "description": "Cache import configuration.\n\nEquivalent to Docker's `--cache-to` flag." }, "context": { - "$ref": "#/types/dockerbuild:index:BuildContext", + "$ref": "#/types/docker-build:index:BuildContext", "description": "Build context settings.\n\nEquivalent to Docker's `PATH | URL | -` positional argument." }, "dockerfile": { - "$ref": "#/types/dockerbuild:index:Dockerfile", + "$ref": "#/types/docker-build:index:Dockerfile", "description": "Dockerfile settings.\n\nEquivalent to Docker's `--file` flag." }, "exec": { @@ -1316,7 +1316,7 @@ "exports": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:Export" + "$ref": "#/types/docker-build:index:Export" }, "description": "Controls where images are persisted after building.\n\nImages are only stored in the local cache unless `exports` are\nexplicitly configured.\n\nExporting to multiple destinations requires a daemon running BuildKit\n0.13 or later.\n\nEquivalent to Docker's `--output` flag." }, @@ -1332,7 +1332,7 @@ "description": "When `true` the build will automatically include a `docker` export.\n\nDefaults to `false`.\n\nEquivalent to Docker's `--load` flag." }, "network": { - "$ref": "#/types/dockerbuild:index:NetworkMode", + "$ref": "#/types/docker-build:index:NetworkMode", "description": "Set the network mode for `RUN` instructions. Defaults to `default`.\n\nFor custom networks, configure your builder with `--driver-opt network=...`.\n\nEquivalent to Docker's `--network` flag.", "default": "default" }, @@ -1343,7 +1343,7 @@ "platforms": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:Platform" + "$ref": "#/types/docker-build:index:Platform" }, "description": "Set target platform(s) for the build. Defaults to the host's platform.\n\nEquivalent to Docker's `--platform` flag." }, @@ -1358,7 +1358,7 @@ "registries": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:Registry" + "$ref": "#/types/docker-build:index:Registry" }, "description": "Registry credentials. Required if reading or exporting to private\nrepositories.\n\nCredentials are kept in-memory and do not pollute pre-existing\ncredentials on the host.\n\nSimilar to `docker login`." }, @@ -1372,7 +1372,7 @@ "ssh": { "type": "array", "items": { - "$ref": "#/types/dockerbuild:index:SSH" + "$ref": "#/types/docker-build:index:SSH" }, "description": "SSH agent socket or keys to expose to the build.\n\nEquivalent to Docker's `--ssh` flag." }, @@ -1389,8 +1389,8 @@ } } }, - "dockerbuild:index:Index": { - "description": "An index (or manifest list) referencing one or more existing images.\n\nUseful for crafting a multi-platform image from several\nplatform-specific images.\n\nThis creates an OCI image index or a Docker manifest list depending on\nthe media types of the source images.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Multi-platform registry caching\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as dockerbuild from \"@pulumi/dockerbuild\";\n\nconst amd64 = new dockerbuild.Image(\"amd64\", {\n cacheFrom: [{\n registry: {\n ref: \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n }],\n cacheTo: [{\n registry: {\n mode: dockerbuild.CacheMode.Max,\n ref: \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n }],\n context: {\n location: \"app\",\n },\n platforms: [dockerbuild.Platform.Linux_amd64],\n tags: [\"docker.io/pulumi/pulumi:3.107.0-amd64\"],\n});\nconst arm64 = new dockerbuild.Image(\"arm64\", {\n cacheFrom: [{\n registry: {\n ref: \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n }],\n cacheTo: [{\n registry: {\n mode: dockerbuild.CacheMode.Max,\n ref: \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n }],\n context: {\n location: \"app\",\n },\n platforms: [dockerbuild.Platform.Linux_arm64],\n tags: [\"docker.io/pulumi/pulumi:3.107.0-arm64\"],\n});\nconst index = new dockerbuild.Index(\"index\", {\n sources: [\n amd64.ref,\n arm64.ref,\n ],\n tag: \"docker.io/pulumi/pulumi:3.107.0\",\n});\nexport const ref = index.ref;\n```\n```python\nimport pulumi\nimport pulumi_dockerbuild as dockerbuild\n\namd64 = dockerbuild.Image(\"amd64\",\n cache_from=[dockerbuild.CacheFromArgs(\n registry=dockerbuild.CacheFromRegistryArgs(\n ref=\"docker.io/pulumi/pulumi:cache-amd64\",\n ),\n )],\n cache_to=[dockerbuild.CacheToArgs(\n registry=dockerbuild.CacheToRegistryArgs(\n mode=dockerbuild.CacheMode.MAX,\n ref=\"docker.io/pulumi/pulumi:cache-amd64\",\n ),\n )],\n context=dockerbuild.BuildContextArgs(\n location=\"app\",\n ),\n platforms=[dockerbuild.Platform.LINUX_AMD64],\n tags=[\"docker.io/pulumi/pulumi:3.107.0-amd64\"])\narm64 = dockerbuild.Image(\"arm64\",\n cache_from=[dockerbuild.CacheFromArgs(\n registry=dockerbuild.CacheFromRegistryArgs(\n ref=\"docker.io/pulumi/pulumi:cache-arm64\",\n ),\n )],\n cache_to=[dockerbuild.CacheToArgs(\n registry=dockerbuild.CacheToRegistryArgs(\n mode=dockerbuild.CacheMode.MAX,\n ref=\"docker.io/pulumi/pulumi:cache-arm64\",\n ),\n )],\n context=dockerbuild.BuildContextArgs(\n location=\"app\",\n ),\n platforms=[dockerbuild.Platform.LINUX_ARM64],\n tags=[\"docker.io/pulumi/pulumi:3.107.0-arm64\"])\nindex = dockerbuild.Index(\"index\",\n sources=[\n amd64.ref,\n arm64.ref,\n ],\n tag=\"docker.io/pulumi/pulumi:3.107.0\")\npulumi.export(\"ref\", index.ref)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Dockerbuild = Pulumi.Dockerbuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var amd64 = new Dockerbuild.Image(\"amd64\", new()\n {\n CacheFrom = new[]\n {\n new Dockerbuild.Inputs.CacheFromArgs\n {\n Registry = new Dockerbuild.Inputs.CacheFromRegistryArgs\n {\n Ref = \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n },\n },\n CacheTo = new[]\n {\n new Dockerbuild.Inputs.CacheToArgs\n {\n Registry = new Dockerbuild.Inputs.CacheToRegistryArgs\n {\n Mode = Dockerbuild.CacheMode.Max,\n Ref = \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n },\n },\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Platforms = new[]\n {\n Dockerbuild.Platform.Linux_amd64,\n },\n Tags = new[]\n {\n \"docker.io/pulumi/pulumi:3.107.0-amd64\",\n },\n });\n\n var arm64 = new Dockerbuild.Image(\"arm64\", new()\n {\n CacheFrom = new[]\n {\n new Dockerbuild.Inputs.CacheFromArgs\n {\n Registry = new Dockerbuild.Inputs.CacheFromRegistryArgs\n {\n Ref = \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n },\n },\n CacheTo = new[]\n {\n new Dockerbuild.Inputs.CacheToArgs\n {\n Registry = new Dockerbuild.Inputs.CacheToRegistryArgs\n {\n Mode = Dockerbuild.CacheMode.Max,\n Ref = \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n },\n },\n Context = new Dockerbuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Platforms = new[]\n {\n Dockerbuild.Platform.Linux_arm64,\n },\n Tags = new[]\n {\n \"docker.io/pulumi/pulumi:3.107.0-arm64\",\n },\n });\n\n var index = new Dockerbuild.Index(\"index\", new()\n {\n Sources = new[]\n {\n amd64.Ref,\n arm64.Ref,\n },\n Tag = \"docker.io/pulumi/pulumi:3.107.0\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"ref\"] = index.Ref,\n };\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tamd64, err := dockerbuild.NewImage(ctx, \"amd64\", \u0026dockerbuild.ImageArgs{\n\t\t\tCacheFrom: dockerbuild.CacheFromArray{\n\t\t\t\t\u0026dockerbuild.CacheFromArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheFromRegistryArgs{\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-amd64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCacheTo: dockerbuild.CacheToArray{\n\t\t\t\t\u0026dockerbuild.CacheToArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheToRegistryArgs{\n\t\t\t\t\t\tMode: dockerbuild.CacheModeMax,\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-amd64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPlatforms: dockerbuild.PlatformArray{\n\t\t\t\tdockerbuild.Platform_Linux_amd64,\n\t\t\t},\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"docker.io/pulumi/pulumi:3.107.0-amd64\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tarm64, err := dockerbuild.NewImage(ctx, \"arm64\", \u0026dockerbuild.ImageArgs{\n\t\t\tCacheFrom: dockerbuild.CacheFromArray{\n\t\t\t\t\u0026dockerbuild.CacheFromArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheFromRegistryArgs{\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-arm64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCacheTo: dockerbuild.CacheToArray{\n\t\t\t\t\u0026dockerbuild.CacheToArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheToRegistryArgs{\n\t\t\t\t\t\tMode: dockerbuild.CacheModeMax,\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-arm64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPlatforms: dockerbuild.PlatformArray{\n\t\t\t\tdockerbuild.Platform_Linux_arm64,\n\t\t\t},\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"docker.io/pulumi/pulumi:3.107.0-arm64\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tindex, err := dockerbuild.NewIndex(ctx, \"index\", \u0026dockerbuild.IndexArgs{\n\t\t\tSources: pulumi.StringArray{\n\t\t\t\tamd64.Ref,\n\t\t\t\tarm64.Ref,\n\t\t\t},\n\t\t\tTag: pulumi.String(\"docker.io/pulumi/pulumi:3.107.0\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"ref\", index.Ref)\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Multi-platform registry caching\nname: registry-caching\noutputs:\n ref: ${index.ref}\nresources:\n amd64:\n properties:\n cacheFrom:\n - registry:\n ref: docker.io/pulumi/pulumi:cache-amd64\n cacheTo:\n - registry:\n mode: max\n ref: docker.io/pulumi/pulumi:cache-amd64\n context:\n location: app\n platforms:\n - linux/amd64\n tags:\n - docker.io/pulumi/pulumi:3.107.0-amd64\n type: dockerbuild:Image\n arm64:\n properties:\n cacheFrom:\n - registry:\n ref: docker.io/pulumi/pulumi:cache-arm64\n cacheTo:\n - registry:\n mode: max\n ref: docker.io/pulumi/pulumi:cache-arm64\n context:\n location: app\n platforms:\n - linux/arm64\n tags:\n - docker.io/pulumi/pulumi:3.107.0-arm64\n type: dockerbuild:Image\n index:\n properties:\n sources:\n - ${amd64.ref}\n - ${arm64.ref}\n tag: docker.io/pulumi/pulumi:3.107.0\n type: dockerbuild:Index\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromRegistryArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToRegistryArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.Index;\nimport com.pulumi.dockerbuild.IndexArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var amd64 = new Image(\"amd64\", ImageArgs.builder() \n .cacheFrom(CacheFromArgs.builder()\n .registry(CacheFromRegistryArgs.builder()\n .ref(\"docker.io/pulumi/pulumi:cache-amd64\")\n .build())\n .build())\n .cacheTo(CacheToArgs.builder()\n .registry(CacheToRegistryArgs.builder()\n .mode(\"max\")\n .ref(\"docker.io/pulumi/pulumi:cache-amd64\")\n .build())\n .build())\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .platforms(\"linux/amd64\")\n .tags(\"docker.io/pulumi/pulumi:3.107.0-amd64\")\n .build());\n\n var arm64 = new Image(\"arm64\", ImageArgs.builder() \n .cacheFrom(CacheFromArgs.builder()\n .registry(CacheFromRegistryArgs.builder()\n .ref(\"docker.io/pulumi/pulumi:cache-arm64\")\n .build())\n .build())\n .cacheTo(CacheToArgs.builder()\n .registry(CacheToRegistryArgs.builder()\n .mode(\"max\")\n .ref(\"docker.io/pulumi/pulumi:cache-arm64\")\n .build())\n .build())\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .platforms(\"linux/arm64\")\n .tags(\"docker.io/pulumi/pulumi:3.107.0-arm64\")\n .build());\n\n var index = new Index(\"index\", IndexArgs.builder() \n .sources( \n amd64.ref(),\n arm64.ref())\n .tag(\"docker.io/pulumi/pulumi:3.107.0\")\n .build());\n\n ctx.export(\"ref\", index.ref());\n }\n}\n```\n{{% /example %}}\n{{% /examples %}}", + "docker-build:index:Index": { + "description": "An index (or manifest list) referencing one or more existing images.\n\nUseful for crafting a multi-platform image from several\nplatform-specific images.\n\nThis creates an OCI image index or a Docker manifest list depending on\nthe media types of the source images.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Multi-platform registry caching\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst amd64 = new docker_build.Image(\"amd64\", {\n cacheFrom: [{\n registry: {\n ref: \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n }],\n cacheTo: [{\n registry: {\n mode: docker_build.CacheMode.Max,\n ref: \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n }],\n context: {\n location: \"app\",\n },\n platforms: [docker_build.Platform.Linux_amd64],\n tags: [\"docker.io/pulumi/pulumi:3.107.0-amd64\"],\n});\nconst arm64 = new docker_build.Image(\"arm64\", {\n cacheFrom: [{\n registry: {\n ref: \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n }],\n cacheTo: [{\n registry: {\n mode: docker_build.CacheMode.Max,\n ref: \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n }],\n context: {\n location: \"app\",\n },\n platforms: [docker_build.Platform.Linux_arm64],\n tags: [\"docker.io/pulumi/pulumi:3.107.0-arm64\"],\n});\nconst index = new docker_build.Index(\"index\", {\n sources: [\n amd64.ref,\n arm64.ref,\n ],\n tag: \"docker.io/pulumi/pulumi:3.107.0\",\n});\nexport const ref = index.ref;\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\namd64 = docker_build.Image(\"amd64\",\n cache_from=[docker_build.CacheFromArgs(\n registry=docker_build.CacheFromRegistryArgs(\n ref=\"docker.io/pulumi/pulumi:cache-amd64\",\n ),\n )],\n cache_to=[docker_build.CacheToArgs(\n registry=docker_build.CacheToRegistryArgs(\n mode=docker_build.CacheMode.MAX,\n ref=\"docker.io/pulumi/pulumi:cache-amd64\",\n ),\n )],\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n platforms=[docker_build.Platform.LINUX_AMD64],\n tags=[\"docker.io/pulumi/pulumi:3.107.0-amd64\"])\narm64 = docker_build.Image(\"arm64\",\n cache_from=[docker_build.CacheFromArgs(\n registry=docker_build.CacheFromRegistryArgs(\n ref=\"docker.io/pulumi/pulumi:cache-arm64\",\n ),\n )],\n cache_to=[docker_build.CacheToArgs(\n registry=docker_build.CacheToRegistryArgs(\n mode=docker_build.CacheMode.MAX,\n ref=\"docker.io/pulumi/pulumi:cache-arm64\",\n ),\n )],\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n platforms=[docker_build.Platform.LINUX_ARM64],\n tags=[\"docker.io/pulumi/pulumi:3.107.0-arm64\"])\nindex = docker_build.Index(\"index\",\n sources=[\n amd64.ref,\n arm64.ref,\n ],\n tag=\"docker.io/pulumi/pulumi:3.107.0\")\npulumi.export(\"ref\", index.ref)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var amd64 = new DockerBuild.Image(\"amd64\", new()\n {\n CacheFrom = new[]\n {\n new DockerBuild.Inputs.CacheFromArgs\n {\n Registry = new DockerBuild.Inputs.CacheFromRegistryArgs\n {\n Ref = \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n },\n },\n CacheTo = new[]\n {\n new DockerBuild.Inputs.CacheToArgs\n {\n Registry = new DockerBuild.Inputs.CacheToRegistryArgs\n {\n Mode = DockerBuild.CacheMode.Max,\n Ref = \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n },\n },\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Platforms = new[]\n {\n DockerBuild.Platform.Linux_amd64,\n },\n Tags = new[]\n {\n \"docker.io/pulumi/pulumi:3.107.0-amd64\",\n },\n });\n\n var arm64 = new DockerBuild.Image(\"arm64\", new()\n {\n CacheFrom = new[]\n {\n new DockerBuild.Inputs.CacheFromArgs\n {\n Registry = new DockerBuild.Inputs.CacheFromRegistryArgs\n {\n Ref = \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n },\n },\n CacheTo = new[]\n {\n new DockerBuild.Inputs.CacheToArgs\n {\n Registry = new DockerBuild.Inputs.CacheToRegistryArgs\n {\n Mode = DockerBuild.CacheMode.Max,\n Ref = \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n },\n },\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Platforms = new[]\n {\n DockerBuild.Platform.Linux_arm64,\n },\n Tags = new[]\n {\n \"docker.io/pulumi/pulumi:3.107.0-arm64\",\n },\n });\n\n var index = new DockerBuild.Index(\"index\", new()\n {\n Sources = new[]\n {\n amd64.Ref,\n arm64.Ref,\n },\n Tag = \"docker.io/pulumi/pulumi:3.107.0\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"ref\"] = index.Ref,\n };\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tamd64, err := dockerbuild.NewImage(ctx, \"amd64\", \u0026dockerbuild.ImageArgs{\n\t\t\tCacheFrom: dockerbuild.CacheFromArray{\n\t\t\t\t\u0026dockerbuild.CacheFromArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheFromRegistryArgs{\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-amd64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCacheTo: dockerbuild.CacheToArray{\n\t\t\t\t\u0026dockerbuild.CacheToArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheToRegistryArgs{\n\t\t\t\t\t\tMode: dockerbuild.CacheModeMax,\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-amd64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPlatforms: docker - build.PlatformArray{\n\t\t\t\tdockerbuild.Platform_Linux_amd64,\n\t\t\t},\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"docker.io/pulumi/pulumi:3.107.0-amd64\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tarm64, err := dockerbuild.NewImage(ctx, \"arm64\", \u0026dockerbuild.ImageArgs{\n\t\t\tCacheFrom: dockerbuild.CacheFromArray{\n\t\t\t\t\u0026dockerbuild.CacheFromArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheFromRegistryArgs{\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-arm64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCacheTo: dockerbuild.CacheToArray{\n\t\t\t\t\u0026dockerbuild.CacheToArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheToRegistryArgs{\n\t\t\t\t\t\tMode: dockerbuild.CacheModeMax,\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-arm64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPlatforms: docker - build.PlatformArray{\n\t\t\t\tdockerbuild.Platform_Linux_arm64,\n\t\t\t},\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"docker.io/pulumi/pulumi:3.107.0-arm64\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tindex, err := dockerbuild.NewIndex(ctx, \"index\", \u0026dockerbuild.IndexArgs{\n\t\t\tSources: pulumi.StringArray{\n\t\t\t\tamd64.Ref,\n\t\t\t\tarm64.Ref,\n\t\t\t},\n\t\t\tTag: pulumi.String(\"docker.io/pulumi/pulumi:3.107.0\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"ref\", index.Ref)\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Multi-platform registry caching\nname: registry-caching\noutputs:\n ref: ${index.ref}\nresources:\n amd64:\n properties:\n cacheFrom:\n - registry:\n ref: docker.io/pulumi/pulumi:cache-amd64\n cacheTo:\n - registry:\n mode: max\n ref: docker.io/pulumi/pulumi:cache-amd64\n context:\n location: app\n platforms:\n - linux/amd64\n tags:\n - docker.io/pulumi/pulumi:3.107.0-amd64\n type: docker-build:Image\n arm64:\n properties:\n cacheFrom:\n - registry:\n ref: docker.io/pulumi/pulumi:cache-arm64\n cacheTo:\n - registry:\n mode: max\n ref: docker.io/pulumi/pulumi:cache-arm64\n context:\n location: app\n platforms:\n - linux/arm64\n tags:\n - docker.io/pulumi/pulumi:3.107.0-arm64\n type: docker-build:Image\n index:\n properties:\n sources:\n - ${amd64.ref}\n - ${arm64.ref}\n tag: docker.io/pulumi/pulumi:3.107.0\n type: docker-build:Index\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromRegistryArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToRegistryArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.Index;\nimport com.pulumi.dockerbuild.IndexArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var amd64 = new Image(\"amd64\", ImageArgs.builder() \n .cacheFrom(CacheFromArgs.builder()\n .registry(CacheFromRegistryArgs.builder()\n .ref(\"docker.io/pulumi/pulumi:cache-amd64\")\n .build())\n .build())\n .cacheTo(CacheToArgs.builder()\n .registry(CacheToRegistryArgs.builder()\n .mode(\"max\")\n .ref(\"docker.io/pulumi/pulumi:cache-amd64\")\n .build())\n .build())\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .platforms(\"linux/amd64\")\n .tags(\"docker.io/pulumi/pulumi:3.107.0-amd64\")\n .build());\n\n var arm64 = new Image(\"arm64\", ImageArgs.builder() \n .cacheFrom(CacheFromArgs.builder()\n .registry(CacheFromRegistryArgs.builder()\n .ref(\"docker.io/pulumi/pulumi:cache-arm64\")\n .build())\n .build())\n .cacheTo(CacheToArgs.builder()\n .registry(CacheToRegistryArgs.builder()\n .mode(\"max\")\n .ref(\"docker.io/pulumi/pulumi:cache-arm64\")\n .build())\n .build())\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .platforms(\"linux/arm64\")\n .tags(\"docker.io/pulumi/pulumi:3.107.0-arm64\")\n .build());\n\n var index = new Index(\"index\", IndexArgs.builder() \n .sources( \n amd64.ref(),\n arm64.ref())\n .tag(\"docker.io/pulumi/pulumi:3.107.0\")\n .build());\n\n ctx.export(\"ref\", index.ref());\n }\n}\n```\n{{% /example %}}\n{{% /examples %}}", "properties": { "push": { "type": "boolean", @@ -1402,7 +1402,7 @@ "description": "The pushed tag with digest.\n\nIdentical to the tag if the index was not pushed." }, "registry": { - "$ref": "#/types/dockerbuild:index:Registry", + "$ref": "#/types/docker-build:index:Registry", "description": "Authentication for the registry where the tagged index will be pushed.\n\nCredentials can also be included with the provider's configuration." }, "sources": { @@ -1430,7 +1430,7 @@ "default": true }, "registry": { - "$ref": "#/types/dockerbuild:index:Registry", + "$ref": "#/types/docker-build:index:Registry", "description": "Authentication for the registry where the tagged index will be pushed.\n\nCredentials can also be included with the provider's configuration." }, "sources": { diff --git a/provider/internal/cli.go b/provider/internal/cli.go index a0d743c..7e62b96 100644 --- a/provider/internal/cli.go +++ b/provider/internal/cli.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:generate go run go.uber.org/mock/mockgen -typed -package internal -source client.go -destination mockcli_test.go --self_package github.com/pulumi/pulumi-dockerbuild/provider/internal +//go:generate go run go.uber.org/mock/mockgen -typed -package internal -source cli.go -destination mockcli_test.go --self_package github.com/pulumi/pulumi-docker-build/provider/internal package internal diff --git a/provider/internal/client.go b/provider/internal/client.go index a31818d..a807102 100644 --- a/provider/internal/client.go +++ b/provider/internal/client.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:generate go run go.uber.org/mock/mockgen -typed -package internal -source client.go -destination mockclient_test.go --self_package github.com/pulumi/pulumi-dockerbuild/provider/internal +//go:generate go run go.uber.org/mock/mockgen -typed -package internal -source client.go -destination mockclient_test.go --self_package github.com/pulumi/pulumi-docker-build/provider/internal package internal diff --git a/provider/internal/doc.go b/provider/internal/doc.go index bf78439..ac50355 100644 --- a/provider/internal/doc.go +++ b/provider/internal/doc.go @@ -12,8 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -//go:generate go run ../pkg/docs-gen/examples examples doc - // Package internal contains our clients, validation, and provider // implementation for interacting with Docker's buildx APIs. // diff --git a/provider/internal/embed/image-migration.md b/provider/internal/embed/image-migration.md index 0b562e5..0ffb86a 100644 --- a/provider/internal/embed/image-migration.md +++ b/provider/internal/embed/image-migration.md @@ -1,11 +1,11 @@ ## Migrating v3 and v4 Image resources -The `dockerbuild.Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider. -Existing `Image` resources can be converted to `dockerbuild.Image` resources with minor modifications. +The `Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider. +Existing `Image` resources can be converted to the docker-build `Image` resources with minor modifications. ### Behavioral differences -There are several key behavioral differences to keep in mind when transitioning images to the new `dockerbuild.Image` resource. +There are several key behavioral differences to keep in mind when transitioning images to the new `Image` resource. #### Previews @@ -16,8 +16,8 @@ Version `4.x` changed build-on-preview behavior to be opt-in. By default, `v4.x` `Image` resources do _not_ build during previews, but this behavior can be toggled with the `buildOnPreview` option. Some users felt this made previews in CI less helpful because they no longer detected bad images by default. -The default behavior of the `dockerbuild.Image` resource has been changed to strike a better balance between CI use cases and manual updates. -By default, Pulumi will now only build `dockerbuild.Image` resources during previews when it detects a CI environment like GitHub Actions. +The default behavior of the `Image` resource has been changed to strike a better balance between CI use cases and manual updates. +By default, Pulumi will now only build `Image` resources during previews when it detects a CI environment like GitHub Actions. Previews run in non-CI environments will not build images. This behavior is still configurable with `buildOnPreview`. @@ -26,7 +26,7 @@ This behavior is still configurable with `buildOnPreview`. Versions `3.x` and `4.x` of the Pulumi Docker provider attempt to push images to remote registries by default. They expose a `skipPush: true` option to disable pushing. -The `dockerbuild.Image` resource matches the Docker CLI's behavior and does not push images anywhere by default. +The `Image` resource matches the Docker CLI's behavior and does not push images anywhere by default. To push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`). Like Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally. @@ -37,7 +37,7 @@ Version `3.x` of the Pulumi Docker provider supports secrets by way of the `extr Version `4.x` of the Pulumi Docker provider does not support secrets. -The `dockerbuild.Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables. +The `Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables. Instead, they should be passed directly as values. (Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).) Pulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments. @@ -52,7 +52,7 @@ Version `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which p Both versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior. This can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc. -The `dockerbuild.Image` resource delegates all caching behavior to Docker. +The `Image` resource delegates all caching behavior to Docker. `cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc. #### Outputs @@ -60,7 +60,7 @@ The `dockerbuild.Image` resource delegates all caching behavior to Docker. Versions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest. In `4.x` this could also be a single sha256 hash if the image wasn't pushed. -Unlike earlier providers the `dockerbuild.Image` resource can push multiple tags. +Unlike earlier providers the `Image` resource can push multiple tags. As a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed. If multiple tags were pushed this uses one at random. @@ -73,7 +73,7 @@ Versions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` r The `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist. If any are missing a subsequent `update` will push them. -When a `dockerbuild.Image` is deleted, it will _attempt_ to also delete any pushed tags. +When a `Image` is deleted, it will _attempt_ to also delete any pushed tags. Deletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular). Manifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace. @@ -81,11 +81,11 @@ Use the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/re ### Example migration -Examples of "fully-featured" `v3` and `v4` `Image` resources are shown below, along with an example `dockerbuild.Image` resource showing how they would look after migration. +Examples of "fully-featured" `v3` and `v4` `Image` resources are shown below, along with an example `Image` resource showing how they would look after migration. The `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`. -After migration, the environment variable is no longer needed and CLI flags are now properties on the `dockerbuild.Image`. -In almost all cases, properties of `dockerbuild.Image` are named after the Docker CLI flag they correspond to. +After migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`. +In almost all cases, properties of `Image` are named after the Docker CLI flag they correspond to. The `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`. It it is shown with parameters similar to the `v3` example for completeness. @@ -136,7 +136,7 @@ const v3 = new docker.Image("v3-image", { }, }); -// v3 Image after migrating to dockerbuild.Image +// v3 Image after migrating to docker-build.Image const v3Migrated = new dockerbuild.Image("v3-to-buildx", { tags: ["myregistry.com/user/repo:latest", "local-tag"], push: true, @@ -195,7 +195,7 @@ const v4 = new docker.Image("v4-image", { }, }); -// v4 Image after migrating to dockerbuild.Image +// v4 Image after migrating to docker-build.Image const v4Migrated = new dockerbuild.Image("v4-to-buildx", { tags: ["myregistry.com/user/repo:latest"], push: true, diff --git a/provider/internal/embed/index-examples.md b/provider/internal/embed/index-examples.md index 663dc11..415b026 100644 --- a/provider/internal/embed/index-examples.md +++ b/provider/internal/embed/index-examples.md @@ -5,9 +5,9 @@ ```typescript import * as pulumi from "@pulumi/pulumi"; -import * as dockerbuild from "@pulumi/dockerbuild"; +import * as docker_build from "@pulumi/docker-build"; -const amd64 = new dockerbuild.Image("amd64", { +const amd64 = new docker_build.Image("amd64", { cacheFrom: [{ registry: { ref: "docker.io/pulumi/pulumi:cache-amd64", @@ -15,17 +15,17 @@ const amd64 = new dockerbuild.Image("amd64", { }], cacheTo: [{ registry: { - mode: dockerbuild.CacheMode.Max, + mode: docker_build.CacheMode.Max, ref: "docker.io/pulumi/pulumi:cache-amd64", }, }], context: { location: "app", }, - platforms: [dockerbuild.Platform.Linux_amd64], + platforms: [docker_build.Platform.Linux_amd64], tags: ["docker.io/pulumi/pulumi:3.107.0-amd64"], }); -const arm64 = new dockerbuild.Image("arm64", { +const arm64 = new docker_build.Image("arm64", { cacheFrom: [{ registry: { ref: "docker.io/pulumi/pulumi:cache-arm64", @@ -33,17 +33,17 @@ const arm64 = new dockerbuild.Image("arm64", { }], cacheTo: [{ registry: { - mode: dockerbuild.CacheMode.Max, + mode: docker_build.CacheMode.Max, ref: "docker.io/pulumi/pulumi:cache-arm64", }, }], context: { location: "app", }, - platforms: [dockerbuild.Platform.Linux_arm64], + platforms: [docker_build.Platform.Linux_arm64], tags: ["docker.io/pulumi/pulumi:3.107.0-arm64"], }); -const index = new dockerbuild.Index("index", { +const index = new docker_build.Index("index", { sources: [ amd64.ref, arm64.ref, @@ -54,43 +54,43 @@ export const ref = index.ref; ``` ```python import pulumi -import pulumi_dockerbuild as dockerbuild +import pulumi_docker_build as docker_build -amd64 = dockerbuild.Image("amd64", - cache_from=[dockerbuild.CacheFromArgs( - registry=dockerbuild.CacheFromRegistryArgs( +amd64 = docker_build.Image("amd64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( ref="docker.io/pulumi/pulumi:cache-amd64", ), )], - cache_to=[dockerbuild.CacheToArgs( - registry=dockerbuild.CacheToRegistryArgs( - mode=dockerbuild.CacheMode.MAX, + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, ref="docker.io/pulumi/pulumi:cache-amd64", ), )], - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="app", ), - platforms=[dockerbuild.Platform.LINUX_AMD64], + platforms=[docker_build.Platform.LINUX_AMD64], tags=["docker.io/pulumi/pulumi:3.107.0-amd64"]) -arm64 = dockerbuild.Image("arm64", - cache_from=[dockerbuild.CacheFromArgs( - registry=dockerbuild.CacheFromRegistryArgs( +arm64 = docker_build.Image("arm64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( ref="docker.io/pulumi/pulumi:cache-arm64", ), )], - cache_to=[dockerbuild.CacheToArgs( - registry=dockerbuild.CacheToRegistryArgs( - mode=dockerbuild.CacheMode.MAX, + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, ref="docker.io/pulumi/pulumi:cache-arm64", ), )], - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="app", ), - platforms=[dockerbuild.Platform.LINUX_ARM64], + platforms=[docker_build.Platform.LINUX_ARM64], tags=["docker.io/pulumi/pulumi:3.107.0-arm64"]) -index = dockerbuild.Index("index", +index = docker_build.Index("index", sources=[ amd64.ref, arm64.ref, @@ -102,17 +102,17 @@ pulumi.export("ref", index.ref) using System.Collections.Generic; using System.Linq; using Pulumi; -using Dockerbuild = Pulumi.Dockerbuild; +using DockerBuild = Pulumi.DockerBuild; return await Deployment.RunAsync(() => { - var amd64 = new Dockerbuild.Image("amd64", new() + var amd64 = new DockerBuild.Image("amd64", new() { CacheFrom = new[] { - new Dockerbuild.Inputs.CacheFromArgs + new DockerBuild.Inputs.CacheFromArgs { - Registry = new Dockerbuild.Inputs.CacheFromRegistryArgs + Registry = new DockerBuild.Inputs.CacheFromRegistryArgs { Ref = "docker.io/pulumi/pulumi:cache-amd64", }, @@ -120,22 +120,22 @@ return await Deployment.RunAsync(() => }, CacheTo = new[] { - new Dockerbuild.Inputs.CacheToArgs + new DockerBuild.Inputs.CacheToArgs { - Registry = new Dockerbuild.Inputs.CacheToRegistryArgs + Registry = new DockerBuild.Inputs.CacheToRegistryArgs { - Mode = Dockerbuild.CacheMode.Max, + Mode = DockerBuild.CacheMode.Max, Ref = "docker.io/pulumi/pulumi:cache-amd64", }, }, }, - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "app", }, Platforms = new[] { - Dockerbuild.Platform.Linux_amd64, + DockerBuild.Platform.Linux_amd64, }, Tags = new[] { @@ -143,13 +143,13 @@ return await Deployment.RunAsync(() => }, }); - var arm64 = new Dockerbuild.Image("arm64", new() + var arm64 = new DockerBuild.Image("arm64", new() { CacheFrom = new[] { - new Dockerbuild.Inputs.CacheFromArgs + new DockerBuild.Inputs.CacheFromArgs { - Registry = new Dockerbuild.Inputs.CacheFromRegistryArgs + Registry = new DockerBuild.Inputs.CacheFromRegistryArgs { Ref = "docker.io/pulumi/pulumi:cache-arm64", }, @@ -157,22 +157,22 @@ return await Deployment.RunAsync(() => }, CacheTo = new[] { - new Dockerbuild.Inputs.CacheToArgs + new DockerBuild.Inputs.CacheToArgs { - Registry = new Dockerbuild.Inputs.CacheToRegistryArgs + Registry = new DockerBuild.Inputs.CacheToRegistryArgs { - Mode = Dockerbuild.CacheMode.Max, + Mode = DockerBuild.CacheMode.Max, Ref = "docker.io/pulumi/pulumi:cache-arm64", }, }, }, - Context = new Dockerbuild.Inputs.BuildContextArgs + Context = new DockerBuild.Inputs.BuildContextArgs { Location = "app", }, Platforms = new[] { - Dockerbuild.Platform.Linux_arm64, + DockerBuild.Platform.Linux_arm64, }, Tags = new[] { @@ -180,7 +180,7 @@ return await Deployment.RunAsync(() => }, }); - var index = new Dockerbuild.Index("index", new() + var index = new DockerBuild.Index("index", new() { Sources = new[] { @@ -201,7 +201,7 @@ return await Deployment.RunAsync(() => package main import ( - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -226,7 +226,7 @@ func main() { Context: &dockerbuild.BuildContextArgs{ Location: pulumi.String("app"), }, - Platforms: dockerbuild.PlatformArray{ + Platforms: docker - build.PlatformArray{ dockerbuild.Platform_Linux_amd64, }, Tags: pulumi.StringArray{ @@ -255,7 +255,7 @@ func main() { Context: &dockerbuild.BuildContextArgs{ Location: pulumi.String("app"), }, - Platforms: dockerbuild.PlatformArray{ + Platforms: docker - build.PlatformArray{ dockerbuild.Platform_Linux_arm64, }, Tags: pulumi.StringArray{ @@ -301,7 +301,7 @@ resources: - linux/amd64 tags: - docker.io/pulumi/pulumi:3.107.0-amd64 - type: dockerbuild:Image + type: docker-build:Image arm64: properties: cacheFrom: @@ -317,14 +317,14 @@ resources: - linux/arm64 tags: - docker.io/pulumi/pulumi:3.107.0-arm64 - type: dockerbuild:Image + type: docker-build:Image index: properties: sources: - ${amd64.ref} - ${arm64.ref} tag: docker.io/pulumi/pulumi:3.107.0 - type: dockerbuild:Index + type: docker-build:Index runtime: yaml ``` ```java diff --git a/provider/internal/image_test.go b/provider/internal/image_test.go index 41d73b3..0f3b0b1 100644 --- a/provider/internal/image_test.go +++ b/provider/internal/image_test.go @@ -39,7 +39,7 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -var _fakeURN = resource.NewURN("test", "provider", "a", "dockerbuild:index:Image", "test") +var _fakeURN = resource.NewURN("test", "provider", "a", "docker-build:index:Image", "test") func TestImageLifecycle(t *testing.T) { t.Parallel() @@ -273,7 +273,7 @@ func TestImageLifecycle(t *testing.T) { t.Run(tt.name, func(t *testing.T) { t.Parallel() lc := integration.LifeCycleTest{ - Resource: "dockerbuild:index:Image", + Resource: "docker-build:index:Image", Create: tt.op(t), } s := newServer(tt.client(t)) diff --git a/provider/internal/index_test.go b/provider/internal/index_test.go index 385aa69..7dd7bbb 100644 --- a/provider/internal/index_test.go +++ b/provider/internal/index_test.go @@ -94,7 +94,7 @@ func TestIndexLifecycle(t *testing.T) { t.Skip("missing environment variables") } lc := integration.LifeCycleTest{ - Resource: "dockerbuild:index:Index", + Resource: "docker-build:index:Index", Create: tt.op(t), } s := newServer(tt.client(t)) @@ -109,7 +109,7 @@ func TestIndexLifecycle(t *testing.T) { func TestIndexDiff(t *testing.T) { t.Parallel() - urn := resource.NewURN("test", "provider", "a", "dockerbuild:index:Index", "test") + urn := resource.NewURN("test", "provider", "a", "docker-build:index:Index", "test") baseArgs := IndexArgs{Sources: []string{"docker.io/nginx:latest"}} baseState := IndexState{IndexArgs: baseArgs} diff --git a/provider/internal/mockclient_test.go b/provider/internal/mockclient_test.go index cfe8ba0..da357ff 100644 --- a/provider/internal/mockclient_test.go +++ b/provider/internal/mockclient_test.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -typed -package internal -source client.go -destination mockclient_test.go --self_package github.com/pulumi/pulumi-dockerbuild/provider/internal +// mockgen -typed -package internal -source client.go -destination mockclient_test.go --self_package github.com/pulumi/pulumi-docker-build/provider/internal // // Package internal is a generated GoMock package. package internal diff --git a/provider/internal/provider.go b/provider/internal/provider.go index 0a97e2d..742e981 100644 --- a/provider/internal/provider.go +++ b/provider/internal/provider.go @@ -69,22 +69,22 @@ func NewBuildxProvider() provider.Provider { return infer.Provider( infer.Options{ Metadata: pschema.Metadata{ - DisplayName: "dockerbuild", + DisplayName: "docker-build", Keywords: []string{"docker", "buildkit", "buildx"}, Description: "A Pulumi provider for Docker buildx", Homepage: "https://pulumi.io", Publisher: "pulumi", License: "Apache-2.0", - Repository: "https://github.com/pulumi/pulumi-dockerbuild", - PluginDownloadURL: "github.com/pulumi/pulumi-dockerbuild", + Repository: "https://github.com/pulumi/pulumi-docker-build", + PluginDownloadURL: "github.com/pulumi/pulumi-docker-build", LanguageMap: map[string]any{ "go": gogen.GoPackageInfo{ // GenerateResourceContainerTypes: true, Generics: gogen.GenericsSettingSideBySide, PackageImportAliases: map[string]string{ - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild": "dockerbuild", + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild": "dockerbuild", }, - ImportBasePath: "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild", + ImportBasePath: "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild", }, "csharp": csgen.CSharpPackageInfo{ PackageReferences: map[string]string{ @@ -130,7 +130,7 @@ func NewBuildxProvider() provider.Provider { // Schema returns our package specification. func Schema(ctx context.Context, version string) schema.PackageSpec { p := NewBuildxProvider() - spec, err := provider.GetSchema(ctx, "dockerbuild", version, p) + spec, err := provider.GetSchema(ctx, "docker-build", version, p) contract.AssertNoErrorf(err, "missing schema") return spec } diff --git a/provider/provider.go b/provider/provider.go index 6ba861f..fe7dcbc 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -18,20 +18,19 @@ import ( "context" "fmt" + "github.com/pulumi/pulumi-docker-build/provider/internal" + "github.com/pulumi/pulumi-docker-build/provider/internal/deprecated" gp "github.com/pulumi/pulumi-go-provider" "github.com/pulumi/pulumi/pkg/v3/resource/provider" "github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin" rpc "github.com/pulumi/pulumi/sdk/v3/proto/go" - - "github.com/pulumi/pulumi-dockerbuild/provider/internal" - "github.com/pulumi/pulumi-dockerbuild/provider/internal/deprecated" ) // Version is initialized by the Go linker to contain the semver of this build. var Version string // Name needs to match $PACK in Makefile. -const Name string = "dockerbuild" +const Name string = "docker-build" // Serve launches the gRPC server for the resource provider. func Serve() error { diff --git a/sdk/dotnet/Config/Config.cs b/sdk/dotnet/Config/Config.cs index 7b70793..d7a95be 100644 --- a/sdk/dotnet/Config/Config.cs +++ b/sdk/dotnet/Config/Config.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Immutable; -namespace Pulumi.Dockerbuild +namespace Pulumi.DockerBuild { public static class Config { @@ -30,7 +30,7 @@ namespace Pulumi.Dockerbuild } } - private static readonly global::Pulumi.Config __config = new global::Pulumi.Config("dockerbuild"); + private static readonly global::Pulumi.Config __config = new global::Pulumi.Config("docker-build"); private static readonly __Value _host = new __Value(() => __config.Get("host") ?? Utilities.GetEnv("DOCKER_HOST") ?? ""); /// diff --git a/sdk/dotnet/Enums.cs b/sdk/dotnet/Enums.cs index 48cffe4..3c68d7c 100644 --- a/sdk/dotnet/Enums.cs +++ b/sdk/dotnet/Enums.cs @@ -5,7 +5,7 @@ using System; using System.ComponentModel; using Pulumi; -namespace Pulumi.Dockerbuild +namespace Pulumi.DockerBuild { [EnumType] public readonly struct CacheMode : IEquatable diff --git a/sdk/dotnet/Image.cs b/sdk/dotnet/Image.cs index ae1b159..d09b657 100644 --- a/sdk/dotnet/Image.cs +++ b/sdk/dotnet/Image.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild +namespace Pulumi.DockerBuild { /// /// A Docker image built using buildx -- Docker's interface to the improved @@ -491,7 +491,7 @@ namespace Pulumi.Dockerbuild /// /// ``` /// - [DockerbuildResourceType("dockerbuild:index:Image")] + [DockerBuildResourceType("docker-build:index:Image")] public partial class Image : global::Pulumi.CustomResource { /// @@ -658,7 +658,7 @@ namespace Pulumi.Dockerbuild /// Equivalent to Docker's `--network` flag. /// [Output("network")] - public Output Network { get; private set; } = null!; + public Output Network { get; private set; } = null!; /// /// Do not import cache manifests when building the image. @@ -674,7 +674,7 @@ namespace Pulumi.Dockerbuild /// Equivalent to Docker's `--platform` flag. /// [Output("platforms")] - public Output> Platforms { get; private set; } = null!; + public Output> Platforms { get; private set; } = null!; /// /// Always pull referenced images. @@ -777,12 +777,12 @@ namespace Pulumi.Dockerbuild /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Image(string name, ImageArgs? args = null, CustomResourceOptions? options = null) - : base("dockerbuild:index:Image", name, args ?? new ImageArgs(), MakeResourceOptions(options, "")) + : base("docker-build:index:Image", name, args ?? new ImageArgs(), MakeResourceOptions(options, "")) { } private Image(string name, Input id, CustomResourceOptions? options = null) - : base("dockerbuild:index:Image", name, null, MakeResourceOptions(options, id)) + : base("docker-build:index:Image", name, null, MakeResourceOptions(options, id)) { } @@ -791,7 +791,7 @@ namespace Pulumi.Dockerbuild var defaultOptions = new CustomResourceOptions { Version = Utilities.Version, - PluginDownloadURL = "github.com/pulumi/pulumi-dockerbuild", + PluginDownloadURL = "github.com/pulumi/pulumi-docker-build", }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. @@ -994,7 +994,7 @@ namespace Pulumi.Dockerbuild /// Equivalent to Docker's `--network` flag. /// [Input("network")] - public Input? Network { get; set; } + public Input? Network { get; set; } /// /// Do not import cache manifests when building the image. @@ -1005,16 +1005,16 @@ namespace Pulumi.Dockerbuild public Input? NoCache { get; set; } [Input("platforms")] - private InputList? _platforms; + private InputList? _platforms; /// /// Set target platform(s) for the build. Defaults to the host's platform. /// /// Equivalent to Docker's `--platform` flag. /// - public InputList Platforms + public InputList Platforms { - get => _platforms ?? (_platforms = new InputList()); + get => _platforms ?? (_platforms = new InputList()); set => _platforms = value; } @@ -1117,7 +1117,7 @@ namespace Pulumi.Dockerbuild public ImageArgs() { - Network = Pulumi.Dockerbuild.NetworkMode.@Default; + Network = Pulumi.DockerBuild.NetworkMode.@Default; } public static new ImageArgs Empty => new ImageArgs(); } diff --git a/sdk/dotnet/Index.cs b/sdk/dotnet/Index.cs index b425711..a068abf 100644 --- a/sdk/dotnet/Index.cs +++ b/sdk/dotnet/Index.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild +namespace Pulumi.DockerBuild { /// /// An index (or manifest list) referencing one or more existing images. @@ -24,17 +24,17 @@ namespace Pulumi.Dockerbuild /// using System.Collections.Generic; /// using System.Linq; /// using Pulumi; - /// using Dockerbuild = Pulumi.Dockerbuild; + /// using DockerBuild = Pulumi.DockerBuild; /// /// return await Deployment.RunAsync(() => /// { - /// var amd64 = new Dockerbuild.Image("amd64", new() + /// var amd64 = new DockerBuild.Image("amd64", new() /// { /// CacheFrom = new[] /// { - /// new Dockerbuild.Inputs.CacheFromArgs + /// new DockerBuild.Inputs.CacheFromArgs /// { - /// Registry = new Dockerbuild.Inputs.CacheFromRegistryArgs + /// Registry = new DockerBuild.Inputs.CacheFromRegistryArgs /// { /// Ref = "docker.io/pulumi/pulumi:cache-amd64", /// }, @@ -42,22 +42,22 @@ namespace Pulumi.Dockerbuild /// }, /// CacheTo = new[] /// { - /// new Dockerbuild.Inputs.CacheToArgs + /// new DockerBuild.Inputs.CacheToArgs /// { - /// Registry = new Dockerbuild.Inputs.CacheToRegistryArgs + /// Registry = new DockerBuild.Inputs.CacheToRegistryArgs /// { - /// Mode = Dockerbuild.CacheMode.Max, + /// Mode = DockerBuild.CacheMode.Max, /// Ref = "docker.io/pulumi/pulumi:cache-amd64", /// }, /// }, /// }, - /// Context = new Dockerbuild.Inputs.BuildContextArgs + /// Context = new DockerBuild.Inputs.BuildContextArgs /// { /// Location = "app", /// }, /// Platforms = new[] /// { - /// Dockerbuild.Platform.Linux_amd64, + /// DockerBuild.Platform.Linux_amd64, /// }, /// Tags = new[] /// { @@ -65,13 +65,13 @@ namespace Pulumi.Dockerbuild /// }, /// }); /// - /// var arm64 = new Dockerbuild.Image("arm64", new() + /// var arm64 = new DockerBuild.Image("arm64", new() /// { /// CacheFrom = new[] /// { - /// new Dockerbuild.Inputs.CacheFromArgs + /// new DockerBuild.Inputs.CacheFromArgs /// { - /// Registry = new Dockerbuild.Inputs.CacheFromRegistryArgs + /// Registry = new DockerBuild.Inputs.CacheFromRegistryArgs /// { /// Ref = "docker.io/pulumi/pulumi:cache-arm64", /// }, @@ -79,22 +79,22 @@ namespace Pulumi.Dockerbuild /// }, /// CacheTo = new[] /// { - /// new Dockerbuild.Inputs.CacheToArgs + /// new DockerBuild.Inputs.CacheToArgs /// { - /// Registry = new Dockerbuild.Inputs.CacheToRegistryArgs + /// Registry = new DockerBuild.Inputs.CacheToRegistryArgs /// { - /// Mode = Dockerbuild.CacheMode.Max, + /// Mode = DockerBuild.CacheMode.Max, /// Ref = "docker.io/pulumi/pulumi:cache-arm64", /// }, /// }, /// }, - /// Context = new Dockerbuild.Inputs.BuildContextArgs + /// Context = new DockerBuild.Inputs.BuildContextArgs /// { /// Location = "app", /// }, /// Platforms = new[] /// { - /// Dockerbuild.Platform.Linux_arm64, + /// DockerBuild.Platform.Linux_arm64, /// }, /// Tags = new[] /// { @@ -102,7 +102,7 @@ namespace Pulumi.Dockerbuild /// }, /// }); /// - /// var index = new Dockerbuild.Index("index", new() + /// var index = new DockerBuild.Index("index", new() /// { /// Sources = new[] /// { @@ -120,7 +120,7 @@ namespace Pulumi.Dockerbuild /// /// ``` /// - [DockerbuildResourceType("dockerbuild:index:Index")] + [DockerBuildResourceType("docker-build:index:Index")] public partial class Index : global::Pulumi.CustomResource { /// @@ -168,12 +168,12 @@ namespace Pulumi.Dockerbuild /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Index(string name, IndexArgs args, CustomResourceOptions? options = null) - : base("dockerbuild:index:Index", name, args ?? new IndexArgs(), MakeResourceOptions(options, "")) + : base("docker-build:index:Index", name, args ?? new IndexArgs(), MakeResourceOptions(options, "")) { } private Index(string name, Input id, CustomResourceOptions? options = null) - : base("dockerbuild:index:Index", name, null, MakeResourceOptions(options, id)) + : base("docker-build:index:Index", name, null, MakeResourceOptions(options, id)) { } @@ -182,7 +182,7 @@ namespace Pulumi.Dockerbuild var defaultOptions = new CustomResourceOptions { Version = Utilities.Version, - PluginDownloadURL = "github.com/pulumi/pulumi-dockerbuild", + PluginDownloadURL = "github.com/pulumi/pulumi-docker-build", }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/Inputs/BuildContextArgs.cs b/sdk/dotnet/Inputs/BuildContextArgs.cs index 8dc6108..77120c7 100644 --- a/sdk/dotnet/Inputs/BuildContextArgs.cs +++ b/sdk/dotnet/Inputs/BuildContextArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class BuildContextArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/BuilderConfigArgs.cs b/sdk/dotnet/Inputs/BuilderConfigArgs.cs index da95844..a252385 100644 --- a/sdk/dotnet/Inputs/BuilderConfigArgs.cs +++ b/sdk/dotnet/Inputs/BuilderConfigArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class BuilderConfigArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/CacheFromArgs.cs b/sdk/dotnet/Inputs/CacheFromArgs.cs index 1c28476..f4de87a 100644 --- a/sdk/dotnet/Inputs/CacheFromArgs.cs +++ b/sdk/dotnet/Inputs/CacheFromArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheFromArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/CacheFromAzureBlobArgs.cs b/sdk/dotnet/Inputs/CacheFromAzureBlobArgs.cs index bbe0d8c..f5135f6 100644 --- a/sdk/dotnet/Inputs/CacheFromAzureBlobArgs.cs +++ b/sdk/dotnet/Inputs/CacheFromAzureBlobArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheFromAzureBlobArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs b/sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs index a2b7394..e26500b 100644 --- a/sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs +++ b/sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheFromGitHubActionsArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/CacheFromLocalArgs.cs b/sdk/dotnet/Inputs/CacheFromLocalArgs.cs index 447491b..e6e2b4d 100644 --- a/sdk/dotnet/Inputs/CacheFromLocalArgs.cs +++ b/sdk/dotnet/Inputs/CacheFromLocalArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheFromLocalArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/CacheFromRegistryArgs.cs b/sdk/dotnet/Inputs/CacheFromRegistryArgs.cs index d706893..b55256f 100644 --- a/sdk/dotnet/Inputs/CacheFromRegistryArgs.cs +++ b/sdk/dotnet/Inputs/CacheFromRegistryArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheFromRegistryArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/CacheFromS3Args.cs b/sdk/dotnet/Inputs/CacheFromS3Args.cs index aec381e..9ee8132 100644 --- a/sdk/dotnet/Inputs/CacheFromS3Args.cs +++ b/sdk/dotnet/Inputs/CacheFromS3Args.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheFromS3Args : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/CacheToArgs.cs b/sdk/dotnet/Inputs/CacheToArgs.cs index 9c7d568..5c0ede6 100644 --- a/sdk/dotnet/Inputs/CacheToArgs.cs +++ b/sdk/dotnet/Inputs/CacheToArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheToArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/CacheToAzureBlobArgs.cs b/sdk/dotnet/Inputs/CacheToAzureBlobArgs.cs index b487bd7..5b85076 100644 --- a/sdk/dotnet/Inputs/CacheToAzureBlobArgs.cs +++ b/sdk/dotnet/Inputs/CacheToAzureBlobArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheToAzureBlobArgs : global::Pulumi.ResourceArgs @@ -28,7 +28,7 @@ namespace Pulumi.Dockerbuild.Inputs /// The cache mode to use. Defaults to `min`. /// [Input("mode")] - public Input? Mode { get; set; } + public Input? Mode { get; set; } /// /// The name of the cache image. @@ -55,7 +55,7 @@ namespace Pulumi.Dockerbuild.Inputs public CacheToAzureBlobArgs() { IgnoreError = false; - Mode = Pulumi.Dockerbuild.CacheMode.Min; + Mode = Pulumi.DockerBuild.CacheMode.Min; } public static new CacheToAzureBlobArgs Empty => new CacheToAzureBlobArgs(); } diff --git a/sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs b/sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs index fb5b805..98b97eb 100644 --- a/sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs +++ b/sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheToGitHubActionsArgs : global::Pulumi.ResourceArgs @@ -22,7 +22,7 @@ namespace Pulumi.Dockerbuild.Inputs /// The cache mode to use. Defaults to `min`. /// [Input("mode")] - public Input? Mode { get; set; } + public Input? Mode { get; set; } /// /// The scope to use for cache keys. Defaults to `buildkit`. @@ -67,7 +67,7 @@ namespace Pulumi.Dockerbuild.Inputs public CacheToGitHubActionsArgs() { IgnoreError = false; - Mode = Pulumi.Dockerbuild.CacheMode.Min; + Mode = Pulumi.DockerBuild.CacheMode.Min; Scope = Utilities.GetEnv("buildkit") ?? ""; Token = Utilities.GetEnv("ACTIONS_RUNTIME_TOKEN") ?? ""; Url = Utilities.GetEnv("ACTIONS_RUNTIME_URL") ?? ""; diff --git a/sdk/dotnet/Inputs/CacheToInlineArgs.cs b/sdk/dotnet/Inputs/CacheToInlineArgs.cs index 74d977c..bb996af 100644 --- a/sdk/dotnet/Inputs/CacheToInlineArgs.cs +++ b/sdk/dotnet/Inputs/CacheToInlineArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { /// diff --git a/sdk/dotnet/Inputs/CacheToLocalArgs.cs b/sdk/dotnet/Inputs/CacheToLocalArgs.cs index 4cd7241..806b3fd 100644 --- a/sdk/dotnet/Inputs/CacheToLocalArgs.cs +++ b/sdk/dotnet/Inputs/CacheToLocalArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheToLocalArgs : global::Pulumi.ResourceArgs @@ -16,7 +16,7 @@ namespace Pulumi.Dockerbuild.Inputs /// The compression type to use. /// [Input("compression")] - public Input? Compression { get; set; } + public Input? Compression { get; set; } /// /// Compression level from 0 to 22. @@ -46,15 +46,15 @@ namespace Pulumi.Dockerbuild.Inputs /// The cache mode to use. Defaults to `min`. /// [Input("mode")] - public Input? Mode { get; set; } + public Input? Mode { get; set; } public CacheToLocalArgs() { - Compression = Pulumi.Dockerbuild.CompressionType.Gzip; + Compression = Pulumi.DockerBuild.CompressionType.Gzip; CompressionLevel = 0; ForceCompression = false; IgnoreError = false; - Mode = Pulumi.Dockerbuild.CacheMode.Min; + Mode = Pulumi.DockerBuild.CacheMode.Min; } public static new CacheToLocalArgs Empty => new CacheToLocalArgs(); } diff --git a/sdk/dotnet/Inputs/CacheToRegistryArgs.cs b/sdk/dotnet/Inputs/CacheToRegistryArgs.cs index d07ce45..e26cafb 100644 --- a/sdk/dotnet/Inputs/CacheToRegistryArgs.cs +++ b/sdk/dotnet/Inputs/CacheToRegistryArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheToRegistryArgs : global::Pulumi.ResourceArgs @@ -16,7 +16,7 @@ namespace Pulumi.Dockerbuild.Inputs /// The compression type to use. /// [Input("compression")] - public Input? Compression { get; set; } + public Input? Compression { get; set; } /// /// Compression level from 0 to 22. @@ -52,7 +52,7 @@ namespace Pulumi.Dockerbuild.Inputs /// The cache mode to use. Defaults to `min`. /// [Input("mode")] - public Input? Mode { get; set; } + public Input? Mode { get; set; } /// /// Whether to use OCI media types in exported manifests. Defaults to @@ -69,12 +69,12 @@ namespace Pulumi.Dockerbuild.Inputs public CacheToRegistryArgs() { - Compression = Pulumi.Dockerbuild.CompressionType.Gzip; + Compression = Pulumi.DockerBuild.CompressionType.Gzip; CompressionLevel = 0; ForceCompression = false; IgnoreError = false; ImageManifest = false; - Mode = Pulumi.Dockerbuild.CacheMode.Min; + Mode = Pulumi.DockerBuild.CacheMode.Min; OciMediaTypes = true; } public static new CacheToRegistryArgs Empty => new CacheToRegistryArgs(); diff --git a/sdk/dotnet/Inputs/CacheToS3Args.cs b/sdk/dotnet/Inputs/CacheToS3Args.cs index 8423817..f0aa4a6 100644 --- a/sdk/dotnet/Inputs/CacheToS3Args.cs +++ b/sdk/dotnet/Inputs/CacheToS3Args.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class CacheToS3Args : global::Pulumi.ResourceArgs @@ -52,7 +52,7 @@ namespace Pulumi.Dockerbuild.Inputs /// The cache mode to use. Defaults to `min`. /// [Input("mode")] - public Input? Mode { get; set; } + public Input? Mode { get; set; } /// /// Name of the cache image. @@ -108,7 +108,7 @@ namespace Pulumi.Dockerbuild.Inputs { AccessKeyId = Utilities.GetEnv("AWS_ACCESS_KEY_ID") ?? ""; IgnoreError = false; - Mode = Pulumi.Dockerbuild.CacheMode.Min; + Mode = Pulumi.DockerBuild.CacheMode.Min; Region = Utilities.GetEnv("AWS_REGION") ?? ""; SecretAccessKey = Utilities.GetEnv("AWS_SECRET_ACCESS_KEY") ?? ""; SessionToken = Utilities.GetEnv("AWS_SESSION_TOKEN") ?? ""; diff --git a/sdk/dotnet/Inputs/ContextArgs.cs b/sdk/dotnet/Inputs/ContextArgs.cs index 8930ee1..e567e23 100644 --- a/sdk/dotnet/Inputs/ContextArgs.cs +++ b/sdk/dotnet/Inputs/ContextArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class ContextArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/DockerfileArgs.cs b/sdk/dotnet/Inputs/DockerfileArgs.cs index 2ddbdc6..e787b5a 100644 --- a/sdk/dotnet/Inputs/DockerfileArgs.cs +++ b/sdk/dotnet/Inputs/DockerfileArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class DockerfileArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/ExportArgs.cs b/sdk/dotnet/Inputs/ExportArgs.cs index cd55597..7ac5b81 100644 --- a/sdk/dotnet/Inputs/ExportArgs.cs +++ b/sdk/dotnet/Inputs/ExportArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class ExportArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/ExportCacheOnlyArgs.cs b/sdk/dotnet/Inputs/ExportCacheOnlyArgs.cs index 6e5b34e..213dde1 100644 --- a/sdk/dotnet/Inputs/ExportCacheOnlyArgs.cs +++ b/sdk/dotnet/Inputs/ExportCacheOnlyArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class ExportCacheOnlyArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/ExportDockerArgs.cs b/sdk/dotnet/Inputs/ExportDockerArgs.cs index 21e0d04..194723a 100644 --- a/sdk/dotnet/Inputs/ExportDockerArgs.cs +++ b/sdk/dotnet/Inputs/ExportDockerArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class ExportDockerArgs : global::Pulumi.ResourceArgs @@ -28,7 +28,7 @@ namespace Pulumi.Dockerbuild.Inputs /// The compression type to use. /// [Input("compression")] - public Input? Compression { get; set; } + public Input? Compression { get; set; } /// /// Compression level from 0 to 22. @@ -74,7 +74,7 @@ namespace Pulumi.Dockerbuild.Inputs public ExportDockerArgs() { - Compression = Pulumi.Dockerbuild.CompressionType.Gzip; + Compression = Pulumi.DockerBuild.CompressionType.Gzip; CompressionLevel = 0; ForceCompression = false; OciMediaTypes = false; diff --git a/sdk/dotnet/Inputs/ExportImageArgs.cs b/sdk/dotnet/Inputs/ExportImageArgs.cs index 2cfb39e..25bd9bf 100644 --- a/sdk/dotnet/Inputs/ExportImageArgs.cs +++ b/sdk/dotnet/Inputs/ExportImageArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class ExportImageArgs : global::Pulumi.ResourceArgs @@ -28,7 +28,7 @@ namespace Pulumi.Dockerbuild.Inputs /// The compression type to use. /// [Input("compression")] - public Input? Compression { get; set; } + public Input? Compression { get; set; } /// /// Compression level from 0 to 22. @@ -111,7 +111,7 @@ namespace Pulumi.Dockerbuild.Inputs public ExportImageArgs() { - Compression = Pulumi.Dockerbuild.CompressionType.Gzip; + Compression = Pulumi.DockerBuild.CompressionType.Gzip; CompressionLevel = 0; ForceCompression = false; OciMediaTypes = false; diff --git a/sdk/dotnet/Inputs/ExportLocalArgs.cs b/sdk/dotnet/Inputs/ExportLocalArgs.cs index 53aebd1..cb29334 100644 --- a/sdk/dotnet/Inputs/ExportLocalArgs.cs +++ b/sdk/dotnet/Inputs/ExportLocalArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class ExportLocalArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/ExportOCIArgs.cs b/sdk/dotnet/Inputs/ExportOCIArgs.cs index 6201c82..1699dc0 100644 --- a/sdk/dotnet/Inputs/ExportOCIArgs.cs +++ b/sdk/dotnet/Inputs/ExportOCIArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class ExportOCIArgs : global::Pulumi.ResourceArgs @@ -28,7 +28,7 @@ namespace Pulumi.Dockerbuild.Inputs /// The compression type to use. /// [Input("compression")] - public Input? Compression { get; set; } + public Input? Compression { get; set; } /// /// Compression level from 0 to 22. @@ -74,7 +74,7 @@ namespace Pulumi.Dockerbuild.Inputs public ExportOCIArgs() { - Compression = Pulumi.Dockerbuild.CompressionType.Gzip; + Compression = Pulumi.DockerBuild.CompressionType.Gzip; CompressionLevel = 0; ForceCompression = false; OciMediaTypes = true; diff --git a/sdk/dotnet/Inputs/ExportRegistryArgs.cs b/sdk/dotnet/Inputs/ExportRegistryArgs.cs index dba2db7..5884a30 100644 --- a/sdk/dotnet/Inputs/ExportRegistryArgs.cs +++ b/sdk/dotnet/Inputs/ExportRegistryArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class ExportRegistryArgs : global::Pulumi.ResourceArgs @@ -28,7 +28,7 @@ namespace Pulumi.Dockerbuild.Inputs /// The compression type to use. /// [Input("compression")] - public Input? Compression { get; set; } + public Input? Compression { get; set; } /// /// Compression level from 0 to 22. @@ -111,7 +111,7 @@ namespace Pulumi.Dockerbuild.Inputs public ExportRegistryArgs() { - Compression = Pulumi.Dockerbuild.CompressionType.Gzip; + Compression = Pulumi.DockerBuild.CompressionType.Gzip; CompressionLevel = 0; ForceCompression = false; OciMediaTypes = false; diff --git a/sdk/dotnet/Inputs/ExportTarArgs.cs b/sdk/dotnet/Inputs/ExportTarArgs.cs index 0b79867..376d4c9 100644 --- a/sdk/dotnet/Inputs/ExportTarArgs.cs +++ b/sdk/dotnet/Inputs/ExportTarArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class ExportTarArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/RegistryArgs.cs b/sdk/dotnet/Inputs/RegistryArgs.cs index 4373ac0..d058be0 100644 --- a/sdk/dotnet/Inputs/RegistryArgs.cs +++ b/sdk/dotnet/Inputs/RegistryArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class RegistryArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Inputs/SSHArgs.cs b/sdk/dotnet/Inputs/SSHArgs.cs index 1d23421..c9def6e 100644 --- a/sdk/dotnet/Inputs/SSHArgs.cs +++ b/sdk/dotnet/Inputs/SSHArgs.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Inputs +namespace Pulumi.DockerBuild.Inputs { public sealed class SSHArgs : global::Pulumi.ResourceArgs diff --git a/sdk/dotnet/Outputs/BuildContext.cs b/sdk/dotnet/Outputs/BuildContext.cs index 8e51ff6..db1e183 100644 --- a/sdk/dotnet/Outputs/BuildContext.cs +++ b/sdk/dotnet/Outputs/BuildContext.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/BuilderConfig.cs b/sdk/dotnet/Outputs/BuilderConfig.cs index 134ffae..9504359 100644 --- a/sdk/dotnet/Outputs/BuilderConfig.cs +++ b/sdk/dotnet/Outputs/BuilderConfig.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/CacheFrom.cs b/sdk/dotnet/Outputs/CacheFrom.cs index 5b53d7e..def5872 100644 --- a/sdk/dotnet/Outputs/CacheFrom.cs +++ b/sdk/dotnet/Outputs/CacheFrom.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/CacheFromAzureBlob.cs b/sdk/dotnet/Outputs/CacheFromAzureBlob.cs index 421c27e..5f14148 100644 --- a/sdk/dotnet/Outputs/CacheFromAzureBlob.cs +++ b/sdk/dotnet/Outputs/CacheFromAzureBlob.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/CacheFromGitHubActions.cs b/sdk/dotnet/Outputs/CacheFromGitHubActions.cs index 56648bb..4501da8 100644 --- a/sdk/dotnet/Outputs/CacheFromGitHubActions.cs +++ b/sdk/dotnet/Outputs/CacheFromGitHubActions.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/CacheFromLocal.cs b/sdk/dotnet/Outputs/CacheFromLocal.cs index c998d14..dca9d07 100644 --- a/sdk/dotnet/Outputs/CacheFromLocal.cs +++ b/sdk/dotnet/Outputs/CacheFromLocal.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/CacheFromRegistry.cs b/sdk/dotnet/Outputs/CacheFromRegistry.cs index 31db3d6..0215928 100644 --- a/sdk/dotnet/Outputs/CacheFromRegistry.cs +++ b/sdk/dotnet/Outputs/CacheFromRegistry.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/CacheFromS3.cs b/sdk/dotnet/Outputs/CacheFromS3.cs index f80df95..4e62d0d 100644 --- a/sdk/dotnet/Outputs/CacheFromS3.cs +++ b/sdk/dotnet/Outputs/CacheFromS3.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/CacheTo.cs b/sdk/dotnet/Outputs/CacheTo.cs index 6322a97..7a2aa23 100644 --- a/sdk/dotnet/Outputs/CacheTo.cs +++ b/sdk/dotnet/Outputs/CacheTo.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/CacheToAzureBlob.cs b/sdk/dotnet/Outputs/CacheToAzureBlob.cs index f19f0fb..25cb62e 100644 --- a/sdk/dotnet/Outputs/CacheToAzureBlob.cs +++ b/sdk/dotnet/Outputs/CacheToAzureBlob.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] @@ -24,7 +24,7 @@ namespace Pulumi.Dockerbuild.Outputs /// /// The cache mode to use. Defaults to `min`. /// - public readonly Pulumi.Dockerbuild.CacheMode? Mode; + public readonly Pulumi.DockerBuild.CacheMode? Mode; /// /// The name of the cache image. /// @@ -40,7 +40,7 @@ namespace Pulumi.Dockerbuild.Outputs bool? ignoreError, - Pulumi.Dockerbuild.CacheMode? mode, + Pulumi.DockerBuild.CacheMode? mode, string name, diff --git a/sdk/dotnet/Outputs/CacheToGitHubActions.cs b/sdk/dotnet/Outputs/CacheToGitHubActions.cs index 575d335..a280288 100644 --- a/sdk/dotnet/Outputs/CacheToGitHubActions.cs +++ b/sdk/dotnet/Outputs/CacheToGitHubActions.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] @@ -20,7 +20,7 @@ namespace Pulumi.Dockerbuild.Outputs /// /// The cache mode to use. Defaults to `min`. /// - public readonly Pulumi.Dockerbuild.CacheMode? Mode; + public readonly Pulumi.DockerBuild.CacheMode? Mode; /// /// The scope to use for cache keys. Defaults to `buildkit`. /// @@ -50,7 +50,7 @@ namespace Pulumi.Dockerbuild.Outputs private CacheToGitHubActions( bool? ignoreError, - Pulumi.Dockerbuild.CacheMode? mode, + Pulumi.DockerBuild.CacheMode? mode, string? scope, diff --git a/sdk/dotnet/Outputs/CacheToInline.cs b/sdk/dotnet/Outputs/CacheToInline.cs index 9ba22d7..4a37cd5 100644 --- a/sdk/dotnet/Outputs/CacheToInline.cs +++ b/sdk/dotnet/Outputs/CacheToInline.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { /// diff --git a/sdk/dotnet/Outputs/CacheToLocal.cs b/sdk/dotnet/Outputs/CacheToLocal.cs index fa17568..23ee20f 100644 --- a/sdk/dotnet/Outputs/CacheToLocal.cs +++ b/sdk/dotnet/Outputs/CacheToLocal.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] @@ -16,7 +16,7 @@ namespace Pulumi.Dockerbuild.Outputs /// /// The compression type to use. /// - public readonly Pulumi.Dockerbuild.CompressionType? Compression; + public readonly Pulumi.DockerBuild.CompressionType? Compression; /// /// Compression level from 0 to 22. /// @@ -36,11 +36,11 @@ namespace Pulumi.Dockerbuild.Outputs /// /// The cache mode to use. Defaults to `min`. /// - public readonly Pulumi.Dockerbuild.CacheMode? Mode; + public readonly Pulumi.DockerBuild.CacheMode? Mode; [OutputConstructor] private CacheToLocal( - Pulumi.Dockerbuild.CompressionType? compression, + Pulumi.DockerBuild.CompressionType? compression, int? compressionLevel, @@ -50,7 +50,7 @@ namespace Pulumi.Dockerbuild.Outputs bool? ignoreError, - Pulumi.Dockerbuild.CacheMode? mode) + Pulumi.DockerBuild.CacheMode? mode) { Compression = compression; CompressionLevel = compressionLevel; diff --git a/sdk/dotnet/Outputs/CacheToRegistry.cs b/sdk/dotnet/Outputs/CacheToRegistry.cs index 44abd99..f8197a6 100644 --- a/sdk/dotnet/Outputs/CacheToRegistry.cs +++ b/sdk/dotnet/Outputs/CacheToRegistry.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] @@ -16,7 +16,7 @@ namespace Pulumi.Dockerbuild.Outputs /// /// The compression type to use. /// - public readonly Pulumi.Dockerbuild.CompressionType? Compression; + public readonly Pulumi.DockerBuild.CompressionType? Compression; /// /// Compression level from 0 to 22. /// @@ -42,7 +42,7 @@ namespace Pulumi.Dockerbuild.Outputs /// /// The cache mode to use. Defaults to `min`. /// - public readonly Pulumi.Dockerbuild.CacheMode? Mode; + public readonly Pulumi.DockerBuild.CacheMode? Mode; /// /// Whether to use OCI media types in exported manifests. Defaults to /// `true`. @@ -55,7 +55,7 @@ namespace Pulumi.Dockerbuild.Outputs [OutputConstructor] private CacheToRegistry( - Pulumi.Dockerbuild.CompressionType? compression, + Pulumi.DockerBuild.CompressionType? compression, int? compressionLevel, @@ -65,7 +65,7 @@ namespace Pulumi.Dockerbuild.Outputs bool? imageManifest, - Pulumi.Dockerbuild.CacheMode? mode, + Pulumi.DockerBuild.CacheMode? mode, bool? ociMediaTypes, diff --git a/sdk/dotnet/Outputs/CacheToS3.cs b/sdk/dotnet/Outputs/CacheToS3.cs index 372d7e5..b6c94ca 100644 --- a/sdk/dotnet/Outputs/CacheToS3.cs +++ b/sdk/dotnet/Outputs/CacheToS3.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] @@ -40,7 +40,7 @@ namespace Pulumi.Dockerbuild.Outputs /// /// The cache mode to use. Defaults to `min`. /// - public readonly Pulumi.Dockerbuild.CacheMode? Mode; + public readonly Pulumi.DockerBuild.CacheMode? Mode; /// /// Name of the cache image. /// @@ -76,7 +76,7 @@ namespace Pulumi.Dockerbuild.Outputs string? manifestsPrefix, - Pulumi.Dockerbuild.CacheMode? mode, + Pulumi.DockerBuild.CacheMode? mode, string? name, diff --git a/sdk/dotnet/Outputs/Context.cs b/sdk/dotnet/Outputs/Context.cs index de22a7d..afd954d 100644 --- a/sdk/dotnet/Outputs/Context.cs +++ b/sdk/dotnet/Outputs/Context.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/Dockerfile.cs b/sdk/dotnet/Outputs/Dockerfile.cs index 22bc3e4..141e32d 100644 --- a/sdk/dotnet/Outputs/Dockerfile.cs +++ b/sdk/dotnet/Outputs/Dockerfile.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/Export.cs b/sdk/dotnet/Outputs/Export.cs index c4d39da..2620d7e 100644 --- a/sdk/dotnet/Outputs/Export.cs +++ b/sdk/dotnet/Outputs/Export.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/ExportCacheOnly.cs b/sdk/dotnet/Outputs/ExportCacheOnly.cs index 42062fc..74eb8df 100644 --- a/sdk/dotnet/Outputs/ExportCacheOnly.cs +++ b/sdk/dotnet/Outputs/ExportCacheOnly.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/ExportDocker.cs b/sdk/dotnet/Outputs/ExportDocker.cs index d0a0e89..e6f7723 100644 --- a/sdk/dotnet/Outputs/ExportDocker.cs +++ b/sdk/dotnet/Outputs/ExportDocker.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] @@ -20,7 +20,7 @@ namespace Pulumi.Dockerbuild.Outputs /// /// The compression type to use. /// - public readonly Pulumi.Dockerbuild.CompressionType? Compression; + public readonly Pulumi.DockerBuild.CompressionType? Compression; /// /// Compression level from 0 to 22. /// @@ -50,7 +50,7 @@ namespace Pulumi.Dockerbuild.Outputs private ExportDocker( ImmutableDictionary? annotations, - Pulumi.Dockerbuild.CompressionType? compression, + Pulumi.DockerBuild.CompressionType? compression, int? compressionLevel, diff --git a/sdk/dotnet/Outputs/ExportImage.cs b/sdk/dotnet/Outputs/ExportImage.cs index 893ac01..f6fee83 100644 --- a/sdk/dotnet/Outputs/ExportImage.cs +++ b/sdk/dotnet/Outputs/ExportImage.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] @@ -20,7 +20,7 @@ namespace Pulumi.Dockerbuild.Outputs /// /// The compression type to use. /// - public readonly Pulumi.Dockerbuild.CompressionType? Compression; + public readonly Pulumi.DockerBuild.CompressionType? Compression; /// /// Compression level from 0 to 22. /// @@ -77,7 +77,7 @@ namespace Pulumi.Dockerbuild.Outputs private ExportImage( ImmutableDictionary? annotations, - Pulumi.Dockerbuild.CompressionType? compression, + Pulumi.DockerBuild.CompressionType? compression, int? compressionLevel, diff --git a/sdk/dotnet/Outputs/ExportLocal.cs b/sdk/dotnet/Outputs/ExportLocal.cs index 357117e..3612deb 100644 --- a/sdk/dotnet/Outputs/ExportLocal.cs +++ b/sdk/dotnet/Outputs/ExportLocal.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/ExportOCI.cs b/sdk/dotnet/Outputs/ExportOCI.cs index 013d62f..14dd1d6 100644 --- a/sdk/dotnet/Outputs/ExportOCI.cs +++ b/sdk/dotnet/Outputs/ExportOCI.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] @@ -20,7 +20,7 @@ namespace Pulumi.Dockerbuild.Outputs /// /// The compression type to use. /// - public readonly Pulumi.Dockerbuild.CompressionType? Compression; + public readonly Pulumi.DockerBuild.CompressionType? Compression; /// /// Compression level from 0 to 22. /// @@ -50,7 +50,7 @@ namespace Pulumi.Dockerbuild.Outputs private ExportOCI( ImmutableDictionary? annotations, - Pulumi.Dockerbuild.CompressionType? compression, + Pulumi.DockerBuild.CompressionType? compression, int? compressionLevel, diff --git a/sdk/dotnet/Outputs/ExportRegistry.cs b/sdk/dotnet/Outputs/ExportRegistry.cs index 24347cc..6a96dc8 100644 --- a/sdk/dotnet/Outputs/ExportRegistry.cs +++ b/sdk/dotnet/Outputs/ExportRegistry.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] @@ -20,7 +20,7 @@ namespace Pulumi.Dockerbuild.Outputs /// /// The compression type to use. /// - public readonly Pulumi.Dockerbuild.CompressionType? Compression; + public readonly Pulumi.DockerBuild.CompressionType? Compression; /// /// Compression level from 0 to 22. /// @@ -77,7 +77,7 @@ namespace Pulumi.Dockerbuild.Outputs private ExportRegistry( ImmutableDictionary? annotations, - Pulumi.Dockerbuild.CompressionType? compression, + Pulumi.DockerBuild.CompressionType? compression, int? compressionLevel, diff --git a/sdk/dotnet/Outputs/ExportTar.cs b/sdk/dotnet/Outputs/ExportTar.cs index 9deda63..8bba255 100644 --- a/sdk/dotnet/Outputs/ExportTar.cs +++ b/sdk/dotnet/Outputs/ExportTar.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/Registry.cs b/sdk/dotnet/Outputs/Registry.cs index f18a015..2bf1996 100644 --- a/sdk/dotnet/Outputs/Registry.cs +++ b/sdk/dotnet/Outputs/Registry.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Outputs/SSH.cs b/sdk/dotnet/Outputs/SSH.cs index df144c3..b111110 100644 --- a/sdk/dotnet/Outputs/SSH.cs +++ b/sdk/dotnet/Outputs/SSH.cs @@ -7,7 +7,7 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild.Outputs +namespace Pulumi.DockerBuild.Outputs { [OutputType] diff --git a/sdk/dotnet/Provider.cs b/sdk/dotnet/Provider.cs index f44b4d4..69d461f 100644 --- a/sdk/dotnet/Provider.cs +++ b/sdk/dotnet/Provider.cs @@ -7,9 +7,9 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild +namespace Pulumi.DockerBuild { - [DockerbuildResourceType("pulumi:providers:dockerbuild")] + [DockerBuildResourceType("pulumi:providers:docker-build")] public partial class Provider : global::Pulumi.ProviderResource { /// @@ -27,7 +27,7 @@ namespace Pulumi.Dockerbuild /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null) - : base("dockerbuild", name, args ?? new ProviderArgs(), MakeResourceOptions(options, "")) + : base("docker-build", name, args ?? new ProviderArgs(), MakeResourceOptions(options, "")) { } @@ -36,7 +36,7 @@ namespace Pulumi.Dockerbuild var defaultOptions = new CustomResourceOptions { Version = Utilities.Version, - PluginDownloadURL = "github.com/pulumi/pulumi-dockerbuild", + PluginDownloadURL = "github.com/pulumi/pulumi-docker-build", }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. diff --git a/sdk/dotnet/Pulumi.Dockerbuild.csproj b/sdk/dotnet/Pulumi.Dockerbuild.csproj index 9150232..884b9d1 100644 --- a/sdk/dotnet/Pulumi.Dockerbuild.csproj +++ b/sdk/dotnet/Pulumi.Dockerbuild.csproj @@ -7,7 +7,7 @@ A Pulumi provider for Docker buildx Apache-2.0 https://pulumi.io - https://github.com/pulumi/pulumi-dockerbuild + https://github.com/pulumi/pulumi-docker-build logo.png net6.0 diff --git a/sdk/dotnet/Utilities.cs b/sdk/dotnet/Utilities.cs index a1cb27d..6d6f5eb 100644 --- a/sdk/dotnet/Utilities.cs +++ b/sdk/dotnet/Utilities.cs @@ -1,7 +1,7 @@ // *** WARNING: this file was generated by pulumi. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** -namespace Pulumi.Dockerbuild +namespace Pulumi.DockerBuild { static class Utilities { @@ -53,7 +53,7 @@ namespace Pulumi.Dockerbuild { var dst = src ?? new global::Pulumi.InvokeOptions{}; dst.Version = src?.Version ?? Version; - dst.PluginDownloadURL = src?.PluginDownloadURL ?? "github.com/pulumi/pulumi-dockerbuild"; + dst.PluginDownloadURL = src?.PluginDownloadURL ?? "github.com/pulumi/pulumi-docker-build"; return dst; } @@ -63,7 +63,7 @@ namespace Pulumi.Dockerbuild static Utilities() { var assembly = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(Utilities)).Assembly; - using var stream = assembly.GetManifestResourceStream("Pulumi.Dockerbuild.version.txt"); + using var stream = assembly.GetManifestResourceStream("Pulumi.DockerBuild.version.txt"); using var reader = new global::System.IO.StreamReader(stream ?? throw new global::System.NotSupportedException("Missing embedded version.txt file")); version = reader.ReadToEnd().Trim(); var parts = version.Split("\n"); @@ -75,9 +75,9 @@ namespace Pulumi.Dockerbuild } } - internal sealed class DockerbuildResourceTypeAttribute : global::Pulumi.ResourceTypeAttribute + internal sealed class DockerBuildResourceTypeAttribute : global::Pulumi.ResourceTypeAttribute { - public DockerbuildResourceTypeAttribute(string type) : base(type, Utilities.Version) + public DockerBuildResourceTypeAttribute(string type) : base(type, Utilities.Version) { } } diff --git a/sdk/dotnet/pulumi-plugin.json b/sdk/dotnet/pulumi-plugin.json index e716637..9eda045 100644 --- a/sdk/dotnet/pulumi-plugin.json +++ b/sdk/dotnet/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, - "name": "dockerbuild", - "server": "github.com/pulumi/pulumi-dockerbuild" + "name": "docker-build", + "server": "github.com/pulumi/pulumi-docker-build" } diff --git a/sdk/go/dockerbuild/config/config.go b/sdk/go/dockerbuild/config/config.go index 77db53a..d0baa7e 100644 --- a/sdk/go/dockerbuild/config/config.go +++ b/sdk/go/dockerbuild/config/config.go @@ -4,8 +4,8 @@ package config import ( - dockerbuild "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + dockerbuild "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "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" ) @@ -14,7 +14,7 @@ var _ = internal.GetEnvOrDefault // The build daemon's address. func GetHost(ctx *pulumi.Context) string { - v, err := config.Try(ctx, "dockerbuild:host") + v, err := config.Try(ctx, "docker-build:host") if err == nil { return v } @@ -25,5 +25,5 @@ func GetHost(ctx *pulumi.Context) string { return value } func GetRegistries(ctx *pulumi.Context) string { - return config.Get(ctx, "dockerbuild:registries") + return config.Get(ctx, "docker-build:registries") } diff --git a/sdk/go/dockerbuild/go.mod b/sdk/go/dockerbuild/go.mod index d400bfd..673fbae 100644 --- a/sdk/go/dockerbuild/go.mod +++ b/sdk/go/dockerbuild/go.mod @@ -1,4 +1,4 @@ -module github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild +module github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild go 1.21.7 diff --git a/sdk/go/dockerbuild/image.go b/sdk/go/dockerbuild/image.go index 48f5084..67812be 100644 --- a/sdk/go/dockerbuild/image.go +++ b/sdk/go/dockerbuild/image.go @@ -7,7 +7,7 @@ import ( "context" "reflect" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "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" ) @@ -731,7 +731,7 @@ func NewImage(ctx *pulumi.Context, } opts = internal.PkgResourceDefaultOpts(opts) var resource Image - err := ctx.RegisterResource("dockerbuild:index:Image", name, args, &resource, opts...) + err := ctx.RegisterResource("docker-build:index:Image", name, args, &resource, opts...) if err != nil { return nil, err } @@ -743,7 +743,7 @@ func NewImage(ctx *pulumi.Context, func GetImage(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ImageState, opts ...pulumi.ResourceOption) (*Image, error) { var resource Image - err := ctx.ReadResource("dockerbuild:index:Image", name, id, state, &resource, opts...) + err := ctx.ReadResource("docker-build:index:Image", name, id, state, &resource, opts...) if err != nil { return nil, err } diff --git a/sdk/go/dockerbuild/index.go b/sdk/go/dockerbuild/index.go index e16322c..547b3be 100644 --- a/sdk/go/dockerbuild/index.go +++ b/sdk/go/dockerbuild/index.go @@ -8,7 +8,7 @@ import ( "reflect" "errors" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "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" ) @@ -28,7 +28,7 @@ import ( // // import ( // -// "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) @@ -54,7 +54,7 @@ import ( // Context: &dockerbuild.BuildContextArgs{ // Location: pulumi.String("app"), // }, -// Platforms: dockerbuild.PlatformArray{ +// Platforms: docker - build.PlatformArray{ // dockerbuild.Platform_Linux_amd64, // }, // Tags: pulumi.StringArray{ @@ -83,7 +83,7 @@ import ( // Context: &dockerbuild.BuildContextArgs{ // Location: pulumi.String("app"), // }, -// Platforms: dockerbuild.PlatformArray{ +// Platforms: docker - build.PlatformArray{ // dockerbuild.Platform_Linux_arm64, // }, // Tags: pulumi.StringArray{ @@ -148,7 +148,7 @@ func NewIndex(ctx *pulumi.Context, } opts = internal.PkgResourceDefaultOpts(opts) var resource Index - err := ctx.RegisterResource("dockerbuild:index:Index", name, args, &resource, opts...) + err := ctx.RegisterResource("docker-build:index:Index", name, args, &resource, opts...) if err != nil { return nil, err } @@ -160,7 +160,7 @@ func NewIndex(ctx *pulumi.Context, func GetIndex(ctx *pulumi.Context, name string, id pulumi.IDInput, state *IndexState, opts ...pulumi.ResourceOption) (*Index, error) { var resource Index - err := ctx.ReadResource("dockerbuild:index:Index", name, id, state, &resource, opts...) + err := ctx.ReadResource("docker-build:index:Index", name, id, state, &resource, opts...) if err != nil { return nil, err } diff --git a/sdk/go/dockerbuild/init.go b/sdk/go/dockerbuild/init.go index b08ae17..33469af 100644 --- a/sdk/go/dockerbuild/init.go +++ b/sdk/go/dockerbuild/init.go @@ -7,7 +7,7 @@ import ( "fmt" "github.com/blang/semver" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -21,9 +21,9 @@ func (m *module) Version() semver.Version { func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { - case "dockerbuild:index:Image": + case "docker-build:index:Image": r = &Image{} - case "dockerbuild:index:Index": + case "docker-build:index:Index": r = &Index{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) @@ -42,7 +42,7 @@ func (p *pkg) Version() semver.Version { } func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) { - if typ != "pulumi:providers:dockerbuild" { + if typ != "pulumi:providers:docker-build" { return nil, fmt.Errorf("unknown provider type: %s", typ) } @@ -57,12 +57,12 @@ func init() { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( - "dockerbuild", + "docker-build", "index", &module{version}, ) pulumi.RegisterResourcePackage( - "dockerbuild", + "docker-build", &pkg{version}, ) } diff --git a/sdk/go/dockerbuild/internal/pulumiUtilities.go b/sdk/go/dockerbuild/internal/pulumiUtilities.go index 14e763f..34b5ade 100644 --- a/sdk/go/dockerbuild/internal/pulumiUtilities.go +++ b/sdk/go/dockerbuild/internal/pulumiUtilities.go @@ -75,7 +75,7 @@ func PkgVersion() (semver.Version, error) { } type sentinal struct{} pkgPath := reflect.TypeOf(sentinal{}).PkgPath() - re := regexp.MustCompile("^.*/pulumi-dockerbuild/sdk(/v\\d+)?") + 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. @@ -164,7 +164,7 @@ func callPlainInner( // PkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource. func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - defaults = append(defaults, pulumi.PluginDownloadURL("github.com/pulumi/pulumi-dockerbuild")) + defaults = append(defaults, pulumi.PluginDownloadURL("github.com/pulumi/pulumi-docker-build")) version := SdkVersion if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) @@ -175,7 +175,7 @@ func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOptio // PkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke. func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { defaults := []pulumi.InvokeOption{} - defaults = append(defaults, pulumi.PluginDownloadURL("github.com/pulumi/pulumi-dockerbuild")) + defaults = append(defaults, pulumi.PluginDownloadURL("github.com/pulumi/pulumi-docker-build")) version := SdkVersion if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) diff --git a/sdk/go/dockerbuild/provider.go b/sdk/go/dockerbuild/provider.go index 258cb9c..15b1b77 100644 --- a/sdk/go/dockerbuild/provider.go +++ b/sdk/go/dockerbuild/provider.go @@ -7,7 +7,7 @@ import ( "context" "reflect" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "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" ) @@ -33,7 +33,7 @@ func NewProvider(ctx *pulumi.Context, } opts = internal.PkgResourceDefaultOpts(opts) var resource Provider - err := ctx.RegisterResource("pulumi:providers:dockerbuild", name, args, &resource, opts...) + err := ctx.RegisterResource("pulumi:providers:docker-build", name, args, &resource, opts...) if err != nil { return nil, err } diff --git a/sdk/go/dockerbuild/pulumi-plugin.json b/sdk/go/dockerbuild/pulumi-plugin.json index e716637..9eda045 100644 --- a/sdk/go/dockerbuild/pulumi-plugin.json +++ b/sdk/go/dockerbuild/pulumi-plugin.json @@ -1,5 +1,5 @@ { "resource": true, - "name": "dockerbuild", - "server": "github.com/pulumi/pulumi-dockerbuild" + "name": "docker-build", + "server": "github.com/pulumi/pulumi-docker-build" } diff --git a/sdk/go/dockerbuild/pulumiTypes.go b/sdk/go/dockerbuild/pulumiTypes.go index cd02cfc..48c01e0 100644 --- a/sdk/go/dockerbuild/pulumiTypes.go +++ b/sdk/go/dockerbuild/pulumiTypes.go @@ -7,7 +7,7 @@ import ( "context" "reflect" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "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" ) diff --git a/sdk/go/dockerbuild/x/config/config.go b/sdk/go/dockerbuild/x/config/config.go index 77db53a..d0baa7e 100644 --- a/sdk/go/dockerbuild/x/config/config.go +++ b/sdk/go/dockerbuild/x/config/config.go @@ -4,8 +4,8 @@ package config import ( - dockerbuild "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + dockerbuild "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "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" ) @@ -14,7 +14,7 @@ var _ = internal.GetEnvOrDefault // The build daemon's address. func GetHost(ctx *pulumi.Context) string { - v, err := config.Try(ctx, "dockerbuild:host") + v, err := config.Try(ctx, "docker-build:host") if err == nil { return v } @@ -25,5 +25,5 @@ func GetHost(ctx *pulumi.Context) string { return value } func GetRegistries(ctx *pulumi.Context) string { - return config.Get(ctx, "dockerbuild:registries") + return config.Get(ctx, "docker-build:registries") } diff --git a/sdk/go/dockerbuild/x/image.go b/sdk/go/dockerbuild/x/image.go index b8a6a23..6e5c5ae 100644 --- a/sdk/go/dockerbuild/x/image.go +++ b/sdk/go/dockerbuild/x/image.go @@ -7,7 +7,7 @@ import ( "context" "reflect" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "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" ) @@ -731,7 +731,7 @@ func NewImage(ctx *pulumi.Context, } opts = internal.PkgResourceDefaultOpts(opts) var resource Image - err := ctx.RegisterResource("dockerbuild:index:Image", name, args, &resource, opts...) + err := ctx.RegisterResource("docker-build:index:Image", name, args, &resource, opts...) if err != nil { return nil, err } @@ -743,7 +743,7 @@ func NewImage(ctx *pulumi.Context, func GetImage(ctx *pulumi.Context, name string, id pulumi.IDInput, state *ImageState, opts ...pulumi.ResourceOption) (*Image, error) { var resource Image - err := ctx.ReadResource("dockerbuild:index:Image", name, id, state, &resource, opts...) + err := ctx.ReadResource("docker-build:index:Image", name, id, state, &resource, opts...) if err != nil { return nil, err } diff --git a/sdk/go/dockerbuild/x/index.go b/sdk/go/dockerbuild/x/index.go index 1d446a5..b153b0b 100644 --- a/sdk/go/dockerbuild/x/index.go +++ b/sdk/go/dockerbuild/x/index.go @@ -8,7 +8,7 @@ import ( "reflect" "errors" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "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" ) @@ -28,7 +28,7 @@ import ( // // import ( // -// "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // // ) @@ -54,7 +54,7 @@ import ( // Context: &dockerbuild.BuildContextArgs{ // Location: pulumi.String("app"), // }, -// Platforms: dockerbuild.PlatformArray{ +// Platforms: docker - build.PlatformArray{ // dockerbuild.Platform_Linux_amd64, // }, // Tags: pulumi.StringArray{ @@ -83,7 +83,7 @@ import ( // Context: &dockerbuild.BuildContextArgs{ // Location: pulumi.String("app"), // }, -// Platforms: dockerbuild.PlatformArray{ +// Platforms: docker - build.PlatformArray{ // dockerbuild.Platform_Linux_arm64, // }, // Tags: pulumi.StringArray{ @@ -148,7 +148,7 @@ func NewIndex(ctx *pulumi.Context, } opts = internal.PkgResourceDefaultOpts(opts) var resource Index - err := ctx.RegisterResource("dockerbuild:index:Index", name, args, &resource, opts...) + err := ctx.RegisterResource("docker-build:index:Index", name, args, &resource, opts...) if err != nil { return nil, err } @@ -160,7 +160,7 @@ func NewIndex(ctx *pulumi.Context, func GetIndex(ctx *pulumi.Context, name string, id pulumi.IDInput, state *IndexState, opts ...pulumi.ResourceOption) (*Index, error) { var resource Index - err := ctx.ReadResource("dockerbuild:index:Index", name, id, state, &resource, opts...) + err := ctx.ReadResource("docker-build:index:Index", name, id, state, &resource, opts...) if err != nil { return nil, err } diff --git a/sdk/go/dockerbuild/x/init.go b/sdk/go/dockerbuild/x/init.go index b08ae17..33469af 100644 --- a/sdk/go/dockerbuild/x/init.go +++ b/sdk/go/dockerbuild/x/init.go @@ -7,7 +7,7 @@ import ( "fmt" "github.com/blang/semver" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -21,9 +21,9 @@ func (m *module) Version() semver.Version { func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { - case "dockerbuild:index:Image": + case "docker-build:index:Image": r = &Image{} - case "dockerbuild:index:Index": + case "docker-build:index:Index": r = &Index{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) @@ -42,7 +42,7 @@ func (p *pkg) Version() semver.Version { } func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) { - if typ != "pulumi:providers:dockerbuild" { + if typ != "pulumi:providers:docker-build" { return nil, fmt.Errorf("unknown provider type: %s", typ) } @@ -57,12 +57,12 @@ func init() { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( - "dockerbuild", + "docker-build", "index", &module{version}, ) pulumi.RegisterResourcePackage( - "dockerbuild", + "docker-build", &pkg{version}, ) } diff --git a/sdk/go/dockerbuild/x/provider.go b/sdk/go/dockerbuild/x/provider.go index f3d2146..f9c9b96 100644 --- a/sdk/go/dockerbuild/x/provider.go +++ b/sdk/go/dockerbuild/x/provider.go @@ -7,7 +7,7 @@ import ( "context" "reflect" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "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" ) @@ -33,7 +33,7 @@ func NewProvider(ctx *pulumi.Context, } opts = internal.PkgResourceDefaultOpts(opts) var resource Provider - err := ctx.RegisterResource("pulumi:providers:dockerbuild", name, args, &resource, opts...) + err := ctx.RegisterResource("pulumi:providers:docker-build", name, args, &resource, opts...) if err != nil { return nil, err } diff --git a/sdk/go/dockerbuild/x/pulumiTypes.go b/sdk/go/dockerbuild/x/pulumiTypes.go index 5c71ea2..6f4d693 100644 --- a/sdk/go/dockerbuild/x/pulumiTypes.go +++ b/sdk/go/dockerbuild/x/pulumiTypes.go @@ -7,7 +7,7 @@ import ( "context" "reflect" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "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" ) diff --git a/sdk/java/settings.gradle b/sdk/java/settings.gradle index 1704904..74155ae 100644 --- a/sdk/java/settings.gradle +++ b/sdk/java/settings.gradle @@ -10,5 +10,5 @@ pluginManagement { } } -rootProject.name = "com.pulumi.dockerbuild" +rootProject.name = "com.pulumi.docker-build" include("lib") diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/Config.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/Config.java index 8b57144..188bc35 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/Config.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/Config.java @@ -12,7 +12,7 @@ import java.util.Optional; public final class Config { - private static final com.pulumi.Config config = com.pulumi.Config.of("dockerbuild"); + private static final com.pulumi.Config config = com.pulumi.Config.of("docker-build"); /** * The build daemon's address. * diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/Image.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/Image.java index f631034..d1e5637 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/Image.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/Image.java @@ -610,7 +610,7 @@ import javax.annotation.Nullable; * ``` * */ -@ResourceType(type="dockerbuild:index:Image") +@ResourceType(type="docker-build:index:Image") public class Image extends com.pulumi.resources.CustomResource { /** * Custom `host:ip` mappings to use during the build. @@ -1233,11 +1233,11 @@ public class Image extends com.pulumi.resources.CustomResource { * @param options A bag of options that control this resource's behavior. */ public Image(String name, @Nullable ImageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("dockerbuild:index:Image", name, args == null ? ImageArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + super("docker-build:index:Image", name, args == null ? ImageArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); } private Image(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("dockerbuild:index:Image", name, null, makeResourceOptions(options, id)); + super("docker-build:index:Image", name, null, makeResourceOptions(options, id)); } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/Index.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/Index.java index 9dafae2..c752591 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/Index.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/Index.java @@ -106,7 +106,7 @@ import javax.annotation.Nullable; * ``` * */ -@ResourceType(type="dockerbuild:index:Index") +@ResourceType(type="docker-build:index:Index") public class Index extends com.pulumi.resources.CustomResource { /** * If true, push the index to the target registry. @@ -213,11 +213,11 @@ public class Index extends com.pulumi.resources.CustomResource { * @param options A bag of options that control this resource's behavior. */ public Index(String name, IndexArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("dockerbuild:index:Index", name, args == null ? IndexArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + super("docker-build:index:Index", name, args == null ? IndexArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); } private Index(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("dockerbuild:index:Index", name, null, makeResourceOptions(options, id)); + super("docker-build:index:Index", name, null, makeResourceOptions(options, id)); } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/Provider.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/Provider.java index 11d78a9..0d8460b 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/Provider.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/Provider.java @@ -13,7 +13,7 @@ import java.lang.String; import java.util.Optional; import javax.annotation.Nullable; -@ResourceType(type="pulumi:providers:dockerbuild") +@ResourceType(type="pulumi:providers:docker-build") public class Provider extends com.pulumi.resources.ProviderResource { /** * The build daemon's address. @@ -52,7 +52,7 @@ public class Provider extends com.pulumi.resources.ProviderResource { * @param options A bag of options that control this resource's behavior. */ public Provider(String name, @Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("dockerbuild", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + super("docker-build", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/Utilities.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/Utilities.java index 66c6d72..c8c809b 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/Utilities.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/Utilities.java @@ -74,7 +74,7 @@ public class Utilities { } static { - var resourceName = "com/pulumi/dockerbuild/version.txt"; + var resourceName = "com/pulumi/docker-build/version.txt"; var versionFile = Utilities.class.getClassLoader().getResourceAsStream(resourceName); if (versionFile == null) { throw new IllegalStateException( diff --git a/sdk/nodejs/config/vars.ts b/sdk/nodejs/config/vars.ts index 99e93e2..4a074ee 100644 --- a/sdk/nodejs/config/vars.ts +++ b/sdk/nodejs/config/vars.ts @@ -8,7 +8,7 @@ import * as enums from "../types/enums"; import * as utilities from "../utilities"; declare var exports: any; -const __config = new pulumi.Config("dockerbuild"); +const __config = new pulumi.Config("docker-build"); /** * The build daemon's address. diff --git a/sdk/nodejs/image.ts b/sdk/nodejs/image.ts index 3d9d005..af2246a 100644 --- a/sdk/nodejs/image.ts +++ b/sdk/nodejs/image.ts @@ -477,7 +477,7 @@ export class Image extends pulumi.CustomResource { } /** @internal */ - public static readonly __pulumiType = 'dockerbuild:index:Image'; + public static readonly __pulumiType = 'docker-build:index:Image'; /** * Returns true if the given object is an instance of Image. This is designed to work even diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index c038951..778a45c 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -37,20 +37,20 @@ const _module = { version: utilities.getVersion(), construct: (name: string, type: string, urn: string): pulumi.Resource => { switch (type) { - case "dockerbuild:index:Image": + case "docker-build:index:Image": return new Image(name, undefined, { urn }) - case "dockerbuild:index:Index": + case "docker-build:index:Index": return new Index(name, undefined, { urn }) default: throw new Error(`unknown resource type ${type}`); } }, }; -pulumi.runtime.registerResourceModule("dockerbuild", "index", _module) -pulumi.runtime.registerResourcePackage("dockerbuild", { +pulumi.runtime.registerResourceModule("docker-build", "index", _module) +pulumi.runtime.registerResourcePackage("docker-build", { version: utilities.getVersion(), constructProvider: (name: string, type: string, urn: string): pulumi.ProviderResource => { - if (type !== "pulumi:providers:dockerbuild") { + if (type !== "pulumi:providers:docker-build") { throw new Error(`unknown provider type ${type}`); } return new Provider(name, undefined, { urn }); diff --git a/sdk/nodejs/index_.ts b/sdk/nodejs/index_.ts index 0109824..1ebbba7 100644 --- a/sdk/nodejs/index_.ts +++ b/sdk/nodejs/index_.ts @@ -21,9 +21,9 @@ import * as utilities from "./utilities"; * * ```typescript * import * as pulumi from "@pulumi/pulumi"; - * import * as dockerbuild from "@pulumi/dockerbuild"; + * import * as docker_build from "@pulumi/docker-build"; * - * const amd64 = new dockerbuild.Image("amd64", { + * const amd64 = new docker_build.Image("amd64", { * cacheFrom: [{ * registry: { * ref: "docker.io/pulumi/pulumi:cache-amd64", @@ -31,17 +31,17 @@ import * as utilities from "./utilities"; * }], * cacheTo: [{ * registry: { - * mode: dockerbuild.CacheMode.Max, + * mode: docker_build.CacheMode.Max, * ref: "docker.io/pulumi/pulumi:cache-amd64", * }, * }], * context: { * location: "app", * }, - * platforms: [dockerbuild.Platform.Linux_amd64], + * platforms: [docker_build.Platform.Linux_amd64], * tags: ["docker.io/pulumi/pulumi:3.107.0-amd64"], * }); - * const arm64 = new dockerbuild.Image("arm64", { + * const arm64 = new docker_build.Image("arm64", { * cacheFrom: [{ * registry: { * ref: "docker.io/pulumi/pulumi:cache-arm64", @@ -49,17 +49,17 @@ import * as utilities from "./utilities"; * }], * cacheTo: [{ * registry: { - * mode: dockerbuild.CacheMode.Max, + * mode: docker_build.CacheMode.Max, * ref: "docker.io/pulumi/pulumi:cache-arm64", * }, * }], * context: { * location: "app", * }, - * platforms: [dockerbuild.Platform.Linux_arm64], + * platforms: [docker_build.Platform.Linux_arm64], * tags: ["docker.io/pulumi/pulumi:3.107.0-arm64"], * }); - * const index = new dockerbuild.Index("index", { + * const index = new docker_build.Index("index", { * sources: [ * amd64.ref, * arm64.ref, @@ -83,7 +83,7 @@ export class Index extends pulumi.CustomResource { } /** @internal */ - public static readonly __pulumiType = 'dockerbuild:index:Index'; + public static readonly __pulumiType = 'docker-build:index:Index'; /** * Returns true if the given object is an instance of Index. This is designed to work even diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index be54ddc..88fe31a 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -1,5 +1,5 @@ { - "name": "@pulumi/dockerbuild", + "name": "@pulumi/docker-build", "version": "${VERSION}", "keywords": [ "docker", @@ -7,7 +7,7 @@ "buildx" ], "homepage": "https://pulumi.io", - "repository": "https://github.com/pulumi/pulumi-dockerbuild", + "repository": "https://github.com/pulumi/pulumi-docker-build", "license": "Apache-2.0", "scripts": { "build": "tsc" @@ -21,7 +21,7 @@ }, "pulumi": { "resource": true, - "name": "dockerbuild", - "server": "github.com/pulumi/pulumi-dockerbuild" + "name": "docker-build", + "server": "github.com/pulumi/pulumi-docker-build" } } diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts index 9d08416..a2ed3e7 100644 --- a/sdk/nodejs/provider.ts +++ b/sdk/nodejs/provider.ts @@ -9,7 +9,7 @@ import * as utilities from "./utilities"; export class Provider extends pulumi.ProviderResource { /** @internal */ - public static readonly __pulumiType = 'dockerbuild'; + public static readonly __pulumiType = 'docker-build'; /** * Returns true if the given object is an instance of Provider. This is designed to work even diff --git a/sdk/nodejs/utilities.ts b/sdk/nodejs/utilities.ts index 0641e23..ca55188 100644 --- a/sdk/nodejs/utilities.ts +++ b/sdk/nodejs/utilities.ts @@ -53,7 +53,7 @@ export function getVersion(): string { /** @internal */ export function resourceOptsDefaults(): any { - return { version: getVersion(), pluginDownloadURL: "github.com/pulumi/pulumi-dockerbuild" }; + return { version: getVersion(), pluginDownloadURL: "github.com/pulumi/pulumi-docker-build" }; } /** @internal */ diff --git a/sdk/python/pulumi_dockerbuild/README.md b/sdk/python/pulumi_docker_build/README.md similarity index 100% rename from sdk/python/pulumi_dockerbuild/README.md rename to sdk/python/pulumi_docker_build/README.md diff --git a/sdk/python/pulumi_dockerbuild/__init__.py b/sdk/python/pulumi_docker_build/__init__.py similarity index 64% rename from sdk/python/pulumi_dockerbuild/__init__.py rename to sdk/python/pulumi_docker_build/__init__.py index 8bba59d..b15e3e3 100644 --- a/sdk/python/pulumi_dockerbuild/__init__.py +++ b/sdk/python/pulumi_docker_build/__init__.py @@ -14,21 +14,21 @@ from . import outputs # Make subpackages available: if typing.TYPE_CHECKING: - import pulumi_dockerbuild.config as __config + import pulumi_docker_build.config as __config config = __config else: - config = _utilities.lazy_import('pulumi_dockerbuild.config') + config = _utilities.lazy_import('pulumi_docker_build.config') _utilities.register( resource_modules=""" [ { - "pkg": "dockerbuild", + "pkg": "docker-build", "mod": "index", - "fqn": "pulumi_dockerbuild", + "fqn": "pulumi_docker_build", "classes": { - "dockerbuild:index:Image": "Image", - "dockerbuild:index:Index": "Index" + "docker-build:index:Image": "Image", + "docker-build:index:Index": "Index" } } ] @@ -36,9 +36,9 @@ _utilities.register( resource_packages=""" [ { - "pkg": "dockerbuild", - "token": "pulumi:providers:dockerbuild", - "fqn": "pulumi_dockerbuild", + "pkg": "docker-build", + "token": "pulumi:providers:docker-build", + "fqn": "pulumi_docker_build", "class": "Provider" } ] diff --git a/sdk/python/pulumi_dockerbuild/_enums.py b/sdk/python/pulumi_docker_build/_enums.py similarity index 100% rename from sdk/python/pulumi_dockerbuild/_enums.py rename to sdk/python/pulumi_docker_build/_enums.py diff --git a/sdk/python/pulumi_dockerbuild/_inputs.py b/sdk/python/pulumi_docker_build/_inputs.py similarity index 100% rename from sdk/python/pulumi_dockerbuild/_inputs.py rename to sdk/python/pulumi_docker_build/_inputs.py diff --git a/sdk/python/pulumi_dockerbuild/_utilities.py b/sdk/python/pulumi_docker_build/_utilities.py similarity index 99% rename from sdk/python/pulumi_dockerbuild/_utilities.py rename to sdk/python/pulumi_docker_build/_utilities.py index 0de933e..55b1f14 100644 --- a/sdk/python/pulumi_dockerbuild/_utilities.py +++ b/sdk/python/pulumi_docker_build/_utilities.py @@ -288,4 +288,4 @@ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bo ) def get_plugin_download_url(): - return "github.com/pulumi/pulumi-dockerbuild" + return "github.com/pulumi/pulumi-docker-build" diff --git a/sdk/python/pulumi_dockerbuild/config/__init__.py b/sdk/python/pulumi_docker_build/config/__init__.py similarity index 100% rename from sdk/python/pulumi_dockerbuild/config/__init__.py rename to sdk/python/pulumi_docker_build/config/__init__.py diff --git a/sdk/python/pulumi_dockerbuild/config/__init__.pyi b/sdk/python/pulumi_docker_build/config/__init__.pyi similarity index 100% rename from sdk/python/pulumi_dockerbuild/config/__init__.pyi rename to sdk/python/pulumi_docker_build/config/__init__.pyi diff --git a/sdk/python/pulumi_dockerbuild/config/vars.py b/sdk/python/pulumi_docker_build/config/vars.py similarity index 94% rename from sdk/python/pulumi_dockerbuild/config/vars.py rename to sdk/python/pulumi_docker_build/config/vars.py index 823ad05..340ed0e 100644 --- a/sdk/python/pulumi_dockerbuild/config/vars.py +++ b/sdk/python/pulumi_docker_build/config/vars.py @@ -12,7 +12,7 @@ from .. import outputs as _root_outputs import types -__config__ = pulumi.Config('dockerbuild') +__config__ = pulumi.Config('docker-build') class _ExportableConfig(types.ModuleType): diff --git a/sdk/python/pulumi_dockerbuild/image.py b/sdk/python/pulumi_docker_build/image.py similarity index 99% rename from sdk/python/pulumi_dockerbuild/image.py rename to sdk/python/pulumi_docker_build/image.py index 5f3bb01..f82d1b5 100644 --- a/sdk/python/pulumi_dockerbuild/image.py +++ b/sdk/python/pulumi_docker_build/image.py @@ -1424,7 +1424,7 @@ class Image(pulumi.CustomResource): __props__.__dict__["digest"] = None __props__.__dict__["ref"] = None super(Image, __self__).__init__( - 'dockerbuild:index:Image', + 'docker-build:index:Image', resource_name, __props__, opts) diff --git a/sdk/python/pulumi_dockerbuild/index.py b/sdk/python/pulumi_docker_build/index.py similarity index 85% rename from sdk/python/pulumi_dockerbuild/index.py rename to sdk/python/pulumi_docker_build/index.py index b6de6d9..cbbbbff 100644 --- a/sdk/python/pulumi_dockerbuild/index.py +++ b/sdk/python/pulumi_docker_build/index.py @@ -116,43 +116,43 @@ class Index(pulumi.CustomResource): ### Multi-platform registry caching ```python import pulumi - import pulumi_dockerbuild as dockerbuild + import pulumi_docker_build as docker_build - amd64 = dockerbuild.Image("amd64", - cache_from=[dockerbuild.CacheFromArgs( - registry=dockerbuild.CacheFromRegistryArgs( + amd64 = docker_build.Image("amd64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( ref="docker.io/pulumi/pulumi:cache-amd64", ), )], - cache_to=[dockerbuild.CacheToArgs( - registry=dockerbuild.CacheToRegistryArgs( - mode=dockerbuild.CacheMode.MAX, + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, ref="docker.io/pulumi/pulumi:cache-amd64", ), )], - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="app", ), - platforms=[dockerbuild.Platform.LINUX_AMD64], + platforms=[docker_build.Platform.LINUX_AMD64], tags=["docker.io/pulumi/pulumi:3.107.0-amd64"]) - arm64 = dockerbuild.Image("arm64", - cache_from=[dockerbuild.CacheFromArgs( - registry=dockerbuild.CacheFromRegistryArgs( + arm64 = docker_build.Image("arm64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( ref="docker.io/pulumi/pulumi:cache-arm64", ), )], - cache_to=[dockerbuild.CacheToArgs( - registry=dockerbuild.CacheToRegistryArgs( - mode=dockerbuild.CacheMode.MAX, + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, ref="docker.io/pulumi/pulumi:cache-arm64", ), )], - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="app", ), - platforms=[dockerbuild.Platform.LINUX_ARM64], + platforms=[docker_build.Platform.LINUX_ARM64], tags=["docker.io/pulumi/pulumi:3.107.0-arm64"]) - index = dockerbuild.Index("index", + index = docker_build.Index("index", sources=[ amd64.ref, arm64.ref, @@ -191,43 +191,43 @@ class Index(pulumi.CustomResource): ### Multi-platform registry caching ```python import pulumi - import pulumi_dockerbuild as dockerbuild + import pulumi_docker_build as docker_build - amd64 = dockerbuild.Image("amd64", - cache_from=[dockerbuild.CacheFromArgs( - registry=dockerbuild.CacheFromRegistryArgs( + amd64 = docker_build.Image("amd64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( ref="docker.io/pulumi/pulumi:cache-amd64", ), )], - cache_to=[dockerbuild.CacheToArgs( - registry=dockerbuild.CacheToRegistryArgs( - mode=dockerbuild.CacheMode.MAX, + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, ref="docker.io/pulumi/pulumi:cache-amd64", ), )], - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="app", ), - platforms=[dockerbuild.Platform.LINUX_AMD64], + platforms=[docker_build.Platform.LINUX_AMD64], tags=["docker.io/pulumi/pulumi:3.107.0-amd64"]) - arm64 = dockerbuild.Image("arm64", - cache_from=[dockerbuild.CacheFromArgs( - registry=dockerbuild.CacheFromRegistryArgs( + arm64 = docker_build.Image("arm64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( ref="docker.io/pulumi/pulumi:cache-arm64", ), )], - cache_to=[dockerbuild.CacheToArgs( - registry=dockerbuild.CacheToRegistryArgs( - mode=dockerbuild.CacheMode.MAX, + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, ref="docker.io/pulumi/pulumi:cache-arm64", ), )], - context=dockerbuild.BuildContextArgs( + context=docker_build.BuildContextArgs( location="app", ), - platforms=[dockerbuild.Platform.LINUX_ARM64], + platforms=[docker_build.Platform.LINUX_ARM64], tags=["docker.io/pulumi/pulumi:3.107.0-arm64"]) - index = dockerbuild.Index("index", + index = docker_build.Index("index", sources=[ amd64.ref, arm64.ref, @@ -276,7 +276,7 @@ class Index(pulumi.CustomResource): __props__.__dict__["tag"] = tag __props__.__dict__["ref"] = None super(Index, __self__).__init__( - 'dockerbuild:index:Index', + 'docker-build:index:Index', resource_name, __props__, opts) diff --git a/sdk/python/pulumi_dockerbuild/outputs.py b/sdk/python/pulumi_docker_build/outputs.py similarity index 100% rename from sdk/python/pulumi_dockerbuild/outputs.py rename to sdk/python/pulumi_docker_build/outputs.py diff --git a/sdk/python/pulumi_dockerbuild/provider.py b/sdk/python/pulumi_docker_build/provider.py similarity index 95% rename from sdk/python/pulumi_dockerbuild/provider.py rename to sdk/python/pulumi_docker_build/provider.py index 23a7198..9c62765 100644 --- a/sdk/python/pulumi_dockerbuild/provider.py +++ b/sdk/python/pulumi_docker_build/provider.py @@ -59,7 +59,7 @@ class Provider(pulumi.ProviderResource): registries: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RegistryArgs']]]]] = None, __props__=None): """ - Create a Dockerbuild resource with the given unique name, props, and options. + Create a Docker-build resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] host: The build daemon's address. @@ -71,7 +71,7 @@ class Provider(pulumi.ProviderResource): args: Optional[ProviderArgs] = None, opts: Optional[pulumi.ResourceOptions] = None): """ - Create a Dockerbuild resource with the given unique name, props, and options. + Create a Docker-build resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param ProviderArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. @@ -103,7 +103,7 @@ class Provider(pulumi.ProviderResource): __props__.__dict__["host"] = host __props__.__dict__["registries"] = pulumi.Output.from_input(registries).apply(pulumi.runtime.to_json) if registries is not None else None super(Provider, __self__).__init__( - 'dockerbuild', + 'docker-build', resource_name, __props__, opts) diff --git a/sdk/python/pulumi_docker_build/pulumi-plugin.json b/sdk/python/pulumi_docker_build/pulumi-plugin.json new file mode 100644 index 0000000..9eda045 --- /dev/null +++ b/sdk/python/pulumi_docker_build/pulumi-plugin.json @@ -0,0 +1,5 @@ +{ + "resource": true, + "name": "docker-build", + "server": "github.com/pulumi/pulumi-docker-build" +} diff --git a/sdk/python/pulumi_dockerbuild/py.typed b/sdk/python/pulumi_docker_build/py.typed similarity index 100% rename from sdk/python/pulumi_dockerbuild/py.typed rename to sdk/python/pulumi_docker_build/py.typed diff --git a/sdk/python/pulumi_dockerbuild/pulumi-plugin.json b/sdk/python/pulumi_dockerbuild/pulumi-plugin.json deleted file mode 100644 index e716637..0000000 --- a/sdk/python/pulumi_dockerbuild/pulumi-plugin.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "resource": true, - "name": "dockerbuild", - "server": "github.com/pulumi/pulumi-dockerbuild" -} diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index 281286b..b5cdc14 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -1,5 +1,5 @@ [project] - name = "pulumi_dockerbuild" + name = "pulumi_docker_build" description = "A Pulumi provider for Docker buildx" dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "semver>=2.8.1"] keywords = ["docker", "buildkit", "buildx"] @@ -10,7 +10,7 @@ text = "Apache-2.0" [project.urls] Homepage = "https://pulumi.io" - Repository = "https://github.com/pulumi/pulumi-dockerbuild" + Repository = "https://github.com/pulumi/pulumi-docker-build" [build-system] requires = ["setuptools>=61.0"] @@ -19,4 +19,4 @@ [tool] [tool.setuptools] [tool.setuptools.package-data] - pulumi_dockerbuild = ["py.typed", "pulumi-plugin.json"] + pulumi_docker_build = ["py.typed", "pulumi-plugin.json"]