Rename to docker-build

This commit is contained in:
Bryce Lampe
2024-04-15 14:51:07 -07:00
parent 4cd6d49ba9
commit 12bf5dd689
139 changed files with 638 additions and 645 deletions

View File

@@ -1,10 +1,10 @@
PROJECT_NAME := Pulumi Docker Build Resource Provider PROJECT_NAME := Pulumi Docker Build Resource Provider
PACK := dockerbuild PACK := docker-build
PACKDIR := sdk PACKDIR := sdk
PROJECT := github.com/pulumi/pulumi-dockerbuild PROJECT := github.com/pulumi/pulumi-docker-build
NODE_MODULE_NAME := @pulumi/dockerbuild NODE_MODULE_NAME := @pulumi/docker-build
NUGET_PKG_NAME := Pulumi.Dockerbuild NUGET_PKG_NAME := Pulumi.DockerBuild
PROVIDER := pulumi-resource-${PACK} PROVIDER := pulumi-resource-${PACK}
VERSION ?= $(shell pulumictl get version) 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 examples/dotnet: ${PULUMI} bin/${PROVIDER} ${WORKING_DIR}/examples/yaml/Pulumi.yaml
$(call example,dotnet) $(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 examples/java: ${PULUMI} bin/${PROVIDER} ${WORKING_DIR}/examples/yaml/Pulumi.yaml
$(call example,java) $(call example,java)
@@ -219,9 +219,9 @@ sdk/go: TMPDIR := $(shell mktemp -d)
sdk/go: $(PULUMI) bin/${PROVIDER} sdk/go: $(PULUMI) bin/${PROVIDER}
rm -rf sdk/go rm -rf sdk/go
$(PULUMI) package gen-sdk bin/$(PROVIDER) --language go -o ${TMPDIR} $(PULUMI) package gen-sdk bin/$(PROVIDER) --language go -o ${TMPDIR}
cp go.mod ${TMPDIR}/go/${PACK}/go.mod cp go.mod ${TMPDIR}/go/dockerbuild/go.mod
cd ${TMPDIR}/go/${PACK} && \ cd ${TMPDIR}/go/dockerbuild && \
go mod edit -module=github.com/pulumi/pulumi-${PACK}/${PACKDIR}/go/${PACK} && \ go mod edit -module=github.com/pulumi/pulumi-${PACK}/${PACKDIR}/go/dockerbuild && \
go mod tidy go mod tidy
mv -f ${TMPDIR}/go ${WORKING_DIR}/sdk/. mv -f ${TMPDIR}/go ${WORKING_DIR}/sdk/.

View File

@@ -3,7 +3,7 @@ description: Multi-platform registry caching
runtime: yaml runtime: yaml
resources: resources:
arm64: arm64:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
context: context:
location: "app" location: "app"
@@ -20,7 +20,7 @@ resources:
ref: "docker.io/pulumi/pulumi:cache-arm64" ref: "docker.io/pulumi/pulumi:cache-arm64"
amd64: amd64:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
context: context:
location: "app" location: "app"
@@ -37,7 +37,7 @@ resources:
ref: "docker.io/pulumi/pulumi:cache-amd64" ref: "docker.io/pulumi/pulumi:cache-amd64"
index: index:
type: dockerbuild:Index type: docker-build:Index
properties: properties:
tag: "docker.io/pulumi/pulumi:3.107.0" tag: "docker.io/pulumi/pulumi:3.107.0"
sources: sources:

View File

@@ -1,32 +1,32 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Pulumi; using Pulumi;
using Dockerbuild = Pulumi.Dockerbuild; using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() => return await Deployment.RunAsync(() =>
{ {
var config = new Config(); var config = new Config();
var dockerHubPassword = config.Require("dockerHubPassword"); 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", Location = "./app/Dockerfile.multiPlatform",
}, },
Context = new Dockerbuild.Inputs.BuildContextArgs Context = new DockerBuild.Inputs.BuildContextArgs
{ {
Location = "./app", Location = "./app",
}, },
Platforms = new[] Platforms = new[]
{ {
Dockerbuild.Platform.Plan9_amd64, DockerBuild.Platform.Plan9_amd64,
Dockerbuild.Platform.Plan9_386, 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", Location = "./app",
}, },
@@ -36,9 +36,9 @@ return await Deployment.RunAsync(() =>
}, },
Exports = new[] Exports = new[]
{ {
new Dockerbuild.Inputs.ExportArgs new DockerBuild.Inputs.ExportArgs
{ {
Registry = new Dockerbuild.Inputs.ExportRegistryArgs Registry = new DockerBuild.Inputs.ExportRegistryArgs
{ {
OciMediaTypes = true, OciMediaTypes = true,
Push = false, Push = false,
@@ -47,7 +47,7 @@ return await Deployment.RunAsync(() =>
}, },
Registries = new[] Registries = new[]
{ {
new Dockerbuild.Inputs.RegistryArgs new DockerBuild.Inputs.RegistryArgs
{ {
Address = "docker.io", Address = "docker.io",
Username = "pulumibot", 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", Location = "./app",
}, },
CacheTo = new[] CacheTo = new[]
{ {
new Dockerbuild.Inputs.CacheToArgs new DockerBuild.Inputs.CacheToArgs
{ {
Local = new Dockerbuild.Inputs.CacheToLocalArgs Local = new DockerBuild.Inputs.CacheToLocalArgs
{ {
Dest = "tmp/cache", Dest = "tmp/cache",
Mode = Dockerbuild.CacheMode.Max, Mode = DockerBuild.CacheMode.Max,
}, },
}, },
}, },
CacheFrom = new[] CacheFrom = new[]
{ {
new Dockerbuild.Inputs.CacheFromArgs new DockerBuild.Inputs.CacheFromArgs
{ {
Local = new Dockerbuild.Inputs.CacheFromLocalArgs Local = new DockerBuild.Inputs.CacheFromLocalArgs
{ {
Src = "tmp/cache", 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", Location = "./app/Dockerfile.buildArgs",
}, },
Context = new Dockerbuild.Inputs.BuildContextArgs Context = new DockerBuild.Inputs.BuildContextArgs
{ {
Location = "./app", 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", Location = "./app/Dockerfile.extraHosts",
}, },
Context = new Dockerbuild.Inputs.BuildContextArgs Context = new DockerBuild.Inputs.BuildContextArgs
{ {
Location = "./app", 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", Location = "./app/Dockerfile.sshMount",
}, },
Context = new Dockerbuild.Inputs.BuildContextArgs Context = new DockerBuild.Inputs.BuildContextArgs
{ {
Location = "./app", Location = "./app",
}, },
Ssh = new[] Ssh = new[]
{ {
new Dockerbuild.Inputs.SSHArgs new DockerBuild.Inputs.SSHArgs
{ {
Id = "default", 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", Location = "./app/Dockerfile.secrets",
}, },
Context = new Dockerbuild.Inputs.BuildContextArgs Context = new DockerBuild.Inputs.BuildContextArgs
{ {
Location = "./app", 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", 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", Location = "./app/Dockerfile.target",
}, },
Context = new Dockerbuild.Inputs.BuildContextArgs Context = new DockerBuild.Inputs.BuildContextArgs
{ {
Location = "./app", Location = "./app",
}, },
Target = "build-me", 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", Location = "./app/Dockerfile.namedContexts",
}, },
Context = new Dockerbuild.Inputs.BuildContextArgs Context = new DockerBuild.Inputs.BuildContextArgs
{ {
Location = "./app", Location = "./app",
Named = Named =
{ {
{ "golang:latest", new Dockerbuild.Inputs.ContextArgs { "golang:latest", new DockerBuild.Inputs.ContextArgs
{ {
Location = "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", 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", 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 Inline = @"FROM busybox
COPY hello.c ./ COPY hello.c ./
", ",
}, },
Context = new Dockerbuild.Inputs.BuildContextArgs Context = new DockerBuild.Inputs.BuildContextArgs
{ {
Location = "https://github.com/docker-library/hello-world.git", 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 Inline = @"FROM alpine
RUN echo ""This uses an inline Dockerfile! 👍"" RUN echo ""This uses an inline Dockerfile! 👍""
", ",
}, },
Context = new Dockerbuild.Inputs.BuildContextArgs Context = new DockerBuild.Inputs.BuildContextArgs
{ {
Location = "./app", 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", Location = "./app",
}, },
Exports = new[] Exports = new[]
{ {
new Dockerbuild.Inputs.ExportArgs new DockerBuild.Inputs.ExportArgs
{ {
Docker = new Dockerbuild.Inputs.ExportDockerArgs Docker = new DockerBuild.Inputs.ExportDockerArgs
{ {
Tar = true, Tar = true,
}, },

View File

@@ -1,4 +1,4 @@
name: provider-dockerbuild name: provider-docker-build
runtime: dotnet runtime: dotnet
config: config:
dockerHubPassword: dockerHubPassword:
@@ -6,5 +6,5 @@ config:
secret: true secret: true
plugins: plugins:
providers: providers:
- name: dockerbuild - name: docker-build
path: ../../bin path: ../../bin

View File

@@ -8,7 +8,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Pulumi" Version="3.*" /> <PackageReference Include="Pulumi" Version="3.*" />
<PackageReference Include="Pulumi.Dockerbuild" Version="*" /> <PackageReference Include="Pulumi.DockerBuild" Version="0.0.2-alpha.1712594380+4cd6d49b.dirty" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -27,7 +27,7 @@ func TestDotNetExample(t *testing.T) {
test := integration.ProgramTestOptions{ test := integration.ProgramTestOptions{
Dir: path.Join(cwd, "dotnet"), Dir: path.Join(cwd, "dotnet"),
Dependencies: []string{ Dependencies: []string{
"Pulumi.Dockerbuild", "Pulumi.DockerBuild",
}, },
Secrets: map[string]string{ Secrets: map[string]string{
"dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"), "dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"),

View File

@@ -1,4 +1,4 @@
name: provider-dockerbuild name: provider-docker-build
runtime: go runtime: go
config: config:
dockerHubPassword: dockerHubPassword:
@@ -6,5 +6,5 @@ config:
secret: true secret: true
plugins: plugins:
providers: providers:
- name: dockerbuild - name: docker-build
path: ../../bin path: ../../bin

View File

@@ -1,4 +1,4 @@
module provider-dockerbuild module provider-docker-build
go 1.20 go 1.20

View File

@@ -1,7 +1,7 @@
package main package main
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" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
) )

View File

@@ -19,7 +19,7 @@ func TestGoExample(t *testing.T) {
test := integration.ProgramTestOptions{ test := integration.ProgramTestOptions{
Dir: path.Join(cwd, "go"), Dir: path.Join(cwd, "go"),
Dependencies: []string{ 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{ Secrets: map[string]string{
"dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"), "dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"),

View File

@@ -1,4 +1,4 @@
name: provider-dockerbuild name: provider-docker-build
runtime: java runtime: java
config: config:
dockerHubPassword: dockerHubPassword:
@@ -6,5 +6,5 @@ config:
secret: true secret: true
plugins: plugins:
providers: providers:
- name: dockerbuild - name: docker-build
path: ../../bin path: ../../bin

View File

@@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.pulumi</groupId> <groupId>com.pulumi</groupId>
<artifactId>provider-dockerbuild</artifactId> <artifactId>provider-docker-build</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<properties> <properties>
@@ -25,7 +25,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.pulumi</groupId> <groupId>com.pulumi</groupId>
<artifactId>dockerbuild</artifactId> <artifactId>docker-build</artifactId>
<version>[0.0.0,)</version> <version>[0.0.0,)</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@@ -1,4 +1,4 @@
name: provider-dockerbuild name: provider-docker-build
runtime: nodejs runtime: nodejs
config: config:
dockerHubPassword: dockerHubPassword:
@@ -6,5 +6,5 @@ config:
secret: true secret: true
plugins: plugins:
providers: providers:
- name: dockerbuild - name: docker-build
path: ../../bin path: ../../bin

View File

@@ -1,9 +1,9 @@
import * as pulumi from "@pulumi/pulumi"; 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 config = new pulumi.Config();
const dockerHubPassword = config.require("dockerHubPassword"); const dockerHubPassword = config.require("dockerHubPassword");
const multiPlatform = new dockerbuild.Image("multiPlatform", { const multiPlatform = new docker_build.Image("multiPlatform", {
dockerfile: { dockerfile: {
location: "./app/Dockerfile.multiPlatform", location: "./app/Dockerfile.multiPlatform",
}, },
@@ -11,11 +11,11 @@ const multiPlatform = new dockerbuild.Image("multiPlatform", {
location: "./app", location: "./app",
}, },
platforms: [ platforms: [
dockerbuild.Platform.Plan9_amd64, docker_build.Platform.Plan9_amd64,
dockerbuild.Platform.Plan9_386, docker_build.Platform.Plan9_386,
], ],
}); });
const registryPush = new dockerbuild.Image("registryPush", { const registryPush = new docker_build.Image("registryPush", {
context: { context: {
location: "./app", location: "./app",
}, },
@@ -32,14 +32,14 @@ const registryPush = new dockerbuild.Image("registryPush", {
password: dockerHubPassword, password: dockerHubPassword,
}], }],
}); });
const cached = new dockerbuild.Image("cached", { const cached = new docker_build.Image("cached", {
context: { context: {
location: "./app", location: "./app",
}, },
cacheTo: [{ cacheTo: [{
local: { local: {
dest: "tmp/cache", dest: "tmp/cache",
mode: dockerbuild.CacheMode.Max, mode: docker_build.CacheMode.Max,
}, },
}], }],
cacheFrom: [{ 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: { dockerfile: {
location: "./app/Dockerfile.buildArgs", location: "./app/Dockerfile.buildArgs",
}, },
@@ -59,7 +59,7 @@ const buildArgs = new dockerbuild.Image("buildArgs", {
SET_ME_TO_TRUE: "true", SET_ME_TO_TRUE: "true",
}, },
}); });
const extraHosts = new dockerbuild.Image("extraHosts", { const extraHosts = new docker_build.Image("extraHosts", {
dockerfile: { dockerfile: {
location: "./app/Dockerfile.extraHosts", location: "./app/Dockerfile.extraHosts",
}, },
@@ -68,7 +68,7 @@ const extraHosts = new dockerbuild.Image("extraHosts", {
}, },
addHosts: ["metadata.google.internal:169.254.169.254"], addHosts: ["metadata.google.internal:169.254.169.254"],
}); });
const sshMount = new dockerbuild.Image("sshMount", { const sshMount = new docker_build.Image("sshMount", {
dockerfile: { dockerfile: {
location: "./app/Dockerfile.sshMount", location: "./app/Dockerfile.sshMount",
}, },
@@ -79,7 +79,7 @@ const sshMount = new dockerbuild.Image("sshMount", {
id: "default", id: "default",
}], }],
}); });
const secrets = new dockerbuild.Image("secrets", { const secrets = new docker_build.Image("secrets", {
dockerfile: { dockerfile: {
location: "./app/Dockerfile.secrets", location: "./app/Dockerfile.secrets",
}, },
@@ -90,7 +90,7 @@ const secrets = new dockerbuild.Image("secrets", {
password: "hunter2", password: "hunter2",
}, },
}); });
const labels = new dockerbuild.Image("labels", { const labels = new docker_build.Image("labels", {
context: { context: {
location: "./app", location: "./app",
}, },
@@ -98,7 +98,7 @@ const labels = new dockerbuild.Image("labels", {
description: "This image will get a descriptive label 👍", description: "This image will get a descriptive label 👍",
}, },
}); });
const target = new dockerbuild.Image("target", { const target = new docker_build.Image("target", {
dockerfile: { dockerfile: {
location: "./app/Dockerfile.target", location: "./app/Dockerfile.target",
}, },
@@ -107,7 +107,7 @@ const target = new dockerbuild.Image("target", {
}, },
target: "build-me", target: "build-me",
}); });
const namedContexts = new dockerbuild.Image("namedContexts", { const namedContexts = new docker_build.Image("namedContexts", {
dockerfile: { dockerfile: {
location: "./app/Dockerfile.namedContexts", 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", 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: { dockerfile: {
inline: `FROM busybox inline: `FROM busybox
COPY hello.c ./ COPY hello.c ./
@@ -133,7 +133,7 @@ COPY hello.c ./
location: "https://github.com/docker-library/hello-world.git", location: "https://github.com/docker-library/hello-world.git",
}, },
}); });
const inline = new dockerbuild.Image("inline", { const inline = new docker_build.Image("inline", {
dockerfile: { dockerfile: {
inline: `FROM alpine inline: `FROM alpine
RUN echo "This uses an inline Dockerfile! 👍" RUN echo "This uses an inline Dockerfile! 👍"
@@ -143,7 +143,7 @@ RUN echo "This uses an inline Dockerfile! 👍"
location: "./app", location: "./app",
}, },
}); });
const dockerLoad = new dockerbuild.Image("dockerLoad", { const dockerLoad = new docker_build.Image("dockerLoad", {
context: { context: {
location: "./app", location: "./app",
}, },

View File

@@ -1,5 +1,5 @@
{ {
"name": "provider-dockerbuild", "name": "provider-docker-build",
"devDependencies": { "devDependencies": {
"@types/node": "^18" "@types/node": "^18"
}, },
@@ -8,4 +8,3 @@
"@pulumi/pulumi": "^3.0.0" "@pulumi/pulumi": "^3.0.0"
} }
} }

View File

@@ -18,7 +18,7 @@ func TestNodeExample(t *testing.T) {
test := integration.ProgramTestOptions{ test := integration.ProgramTestOptions{
Dir: path.Join(cwd, "nodejs"), Dir: path.Join(cwd, "nodejs"),
Dependencies: []string{"@pulumi/dockerbuild"}, Dependencies: []string{"@pulumi/docker-build"},
Secrets: map[string]string{ Secrets: map[string]string{
"dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"), "dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"),
}, },

View File

@@ -1,4 +1,4 @@
name: provider-dockerbuild name: provider-docker-build
runtime: python runtime: python
config: config:
dockerHubPassword: dockerHubPassword:
@@ -6,5 +6,5 @@ config:
secret: true secret: true
plugins: plugins:
providers: providers:
- name: dockerbuild - name: docker-build
path: ../../bin path: ../../bin

View File

@@ -1,142 +1,142 @@
import pulumi import pulumi
import pulumi_dockerbuild as dockerbuild import pulumi_docker_build as docker_build
config = pulumi.Config() config = pulumi.Config()
docker_hub_password = config.require("dockerHubPassword") docker_hub_password = config.require("dockerHubPassword")
multi_platform = dockerbuild.Image("multiPlatform", multi_platform = docker_build.Image("multiPlatform",
dockerfile=dockerbuild.DockerfileArgs( dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.multiPlatform", location="./app/Dockerfile.multiPlatform",
), ),
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
), ),
platforms=[ platforms=[
dockerbuild.Platform.PLAN9_AMD64, docker_build.Platform.PLAN9_AMD64,
dockerbuild.Platform.PLAN9_386, docker_build.Platform.PLAN9_386,
]) ])
registry_push = dockerbuild.Image("registryPush", registry_push = docker_build.Image("registryPush",
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
), ),
tags=["docker.io/pulumibot/buildkit-e2e:example"], tags=["docker.io/pulumibot/buildkit-e2e:example"],
exports=[dockerbuild.ExportArgs( exports=[docker_build.ExportArgs(
registry=dockerbuild.ExportRegistryArgs( registry=docker_build.ExportRegistryArgs(
oci_media_types=True, oci_media_types=True,
push=False, push=False,
), ),
)], )],
registries=[dockerbuild.RegistryArgs( registries=[docker_build.RegistryArgs(
address="docker.io", address="docker.io",
username="pulumibot", username="pulumibot",
password=docker_hub_password, password=docker_hub_password,
)]) )])
cached = dockerbuild.Image("cached", cached = docker_build.Image("cached",
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
), ),
cache_to=[dockerbuild.CacheToArgs( cache_to=[docker_build.CacheToArgs(
local=dockerbuild.CacheToLocalArgs( local=docker_build.CacheToLocalArgs(
dest="tmp/cache", dest="tmp/cache",
mode=dockerbuild.CacheMode.MAX, mode=docker_build.CacheMode.MAX,
), ),
)], )],
cache_from=[dockerbuild.CacheFromArgs( cache_from=[docker_build.CacheFromArgs(
local=dockerbuild.CacheFromLocalArgs( local=docker_build.CacheFromLocalArgs(
src="tmp/cache", src="tmp/cache",
), ),
)]) )])
build_args = dockerbuild.Image("buildArgs", build_args = docker_build.Image("buildArgs",
dockerfile=dockerbuild.DockerfileArgs( dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.buildArgs", location="./app/Dockerfile.buildArgs",
), ),
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
), ),
build_args={ build_args={
"SET_ME_TO_TRUE": "true", "SET_ME_TO_TRUE": "true",
}) })
extra_hosts = dockerbuild.Image("extraHosts", extra_hosts = docker_build.Image("extraHosts",
dockerfile=dockerbuild.DockerfileArgs( dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.extraHosts", location="./app/Dockerfile.extraHosts",
), ),
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
), ),
add_hosts=["metadata.google.internal:169.254.169.254"]) add_hosts=["metadata.google.internal:169.254.169.254"])
ssh_mount = dockerbuild.Image("sshMount", ssh_mount = docker_build.Image("sshMount",
dockerfile=dockerbuild.DockerfileArgs( dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.sshMount", location="./app/Dockerfile.sshMount",
), ),
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
), ),
ssh=[dockerbuild.SSHArgs( ssh=[docker_build.SSHArgs(
id="default", id="default",
)]) )])
secrets = dockerbuild.Image("secrets", secrets = docker_build.Image("secrets",
dockerfile=dockerbuild.DockerfileArgs( dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.secrets", location="./app/Dockerfile.secrets",
), ),
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
), ),
secrets={ secrets={
"password": "hunter2", "password": "hunter2",
}) })
labels = dockerbuild.Image("labels", labels = docker_build.Image("labels",
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
), ),
labels={ labels={
"description": "This image will get a descriptive label 👍", "description": "This image will get a descriptive label 👍",
}) })
target = dockerbuild.Image("target", target = docker_build.Image("target",
dockerfile=dockerbuild.DockerfileArgs( dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.target", location="./app/Dockerfile.target",
), ),
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
), ),
target="build-me") target="build-me")
named_contexts = dockerbuild.Image("namedContexts", named_contexts = docker_build.Image("namedContexts",
dockerfile=dockerbuild.DockerfileArgs( dockerfile=docker_build.DockerfileArgs(
location="./app/Dockerfile.namedContexts", location="./app/Dockerfile.namedContexts",
), ),
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
named={ named={
"golang:latest": dockerbuild.ContextArgs( "golang:latest": docker_build.ContextArgs(
location="docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", 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", location="https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile",
)) ))
remote_context_with_inline = dockerbuild.Image("remoteContextWithInline", remote_context_with_inline = docker_build.Image("remoteContextWithInline",
dockerfile=dockerbuild.DockerfileArgs( dockerfile=docker_build.DockerfileArgs(
inline="""FROM busybox inline="""FROM busybox
COPY hello.c ./ COPY hello.c ./
""", """,
), ),
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="https://github.com/docker-library/hello-world.git", location="https://github.com/docker-library/hello-world.git",
)) ))
inline = dockerbuild.Image("inline", inline = docker_build.Image("inline",
dockerfile=dockerbuild.DockerfileArgs( dockerfile=docker_build.DockerfileArgs(
inline="""FROM alpine inline="""FROM alpine
RUN echo "This uses an inline Dockerfile! 👍" RUN echo "This uses an inline Dockerfile! 👍"
""", """,
), ),
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
)) ))
docker_load = dockerbuild.Image("dockerLoad", docker_load = docker_build.Image("dockerLoad",
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="./app", location="./app",
), ),
exports=[dockerbuild.ExportArgs( exports=[docker_build.ExportArgs(
docker=dockerbuild.ExportDockerArgs( docker=docker_build.ExportDockerArgs(
tar=True, tar=True,
), ),
)]) )])

View File

@@ -1,14 +1,14 @@
name: provider-dockerbuild name: provider-docker-build
runtime: yaml runtime: yaml
plugins: plugins:
providers: providers:
- name: dockerbuild - name: docker-build
path: ../../bin path: ../../bin
resources: resources:
# docker buildx build -f app/Dockerfile.multiPlatform --platform plan9/amd64,plan9/386 app # docker buildx build -f app/Dockerfile.multiPlatform --platform plan9/amd64,plan9/386 app
multiPlatform: multiPlatform:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
dockerfile: dockerfile:
location: "./app/Dockerfile.multiPlatform" location: "./app/Dockerfile.multiPlatform"
@@ -20,7 +20,7 @@ resources:
# docker buildx build --output=type=registry app # docker buildx build --output=type=registry app
registryPush: registryPush:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
context: context:
location: "./app" 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 # docker buildx build --cache-to=type=local,dest=tmp/cache,mode=max --cache-from=type=local,src=tmp/cache app
cached: cached:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
context: context:
location: "./app" location: "./app"
@@ -50,7 +50,7 @@ resources:
# docker buildx build -f app/Dockerfile.buildArgs --build-arg SET_ME_TO_TRUE=true app # docker buildx build -f app/Dockerfile.buildArgs --build-arg SET_ME_TO_TRUE=true app
buildArgs: buildArgs:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
dockerfile: dockerfile:
location: "./app/Dockerfile.buildArgs" 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 # docker buildx build -f app/Dockerfile.extraHosts --add-host metadata.google.internal:169.254.169.254 app
extraHosts: extraHosts:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
dockerfile: dockerfile:
location: "./app/Dockerfile.extraHosts" location: "./app/Dockerfile.extraHosts"
@@ -72,7 +72,7 @@ resources:
# docker buildx build -f app/Dockerfile.sshMount --ssh default app # docker buildx build -f app/Dockerfile.sshMount --ssh default app
sshMount: sshMount:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
dockerfile: dockerfile:
location: "./app/Dockerfile.sshMount" location: "./app/Dockerfile.sshMount"
@@ -83,7 +83,7 @@ resources:
# PASSWORD=hunter2 docker buildx build -f app/Dockerfile.secrets --secret id=password,env=PASSWORD app # PASSWORD=hunter2 docker buildx build -f app/Dockerfile.secrets --secret id=password,env=PASSWORD app
secrets: secrets:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
dockerfile: dockerfile:
location: "./app/Dockerfile.secrets" location: "./app/Dockerfile.secrets"
@@ -94,7 +94,7 @@ resources:
# docker buildx build --label "description=This image will get a descriptive label 👍" app # docker buildx build --label "description=This image will get a descriptive label 👍" app
labels: labels:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
context: context:
location: "./app" location: "./app"
@@ -103,7 +103,7 @@ resources:
# docker buildx build -f app/Dockerfile.target --target build-me app # docker buildx build -f app/Dockerfile.target --target build-me app
target: target:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
dockerfile: dockerfile:
location: "./app/Dockerfile.target" location: "./app/Dockerfile.target"
@@ -114,7 +114,7 @@ resources:
# docker buildx build -f app/Dockerfile.namedContexts \ # docker buildx build -f app/Dockerfile.namedContexts \
# --build-context golang:latest=docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984 app # --build-context golang:latest=docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984 app
namedContexts: namedContexts:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
dockerfile: dockerfile:
location: "./app/Dockerfile.namedContexts" location: "./app/Dockerfile.namedContexts"
@@ -126,7 +126,7 @@ resources:
# docker buildx build https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile # docker buildx build https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile
remoteContext: remoteContext:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
context: context:
location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile" location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"
@@ -136,7 +136,7 @@ resources:
# COPY hello.c ./ # COPY hello.c ./
# EOF # EOF
remoteContextWithInline: remoteContextWithInline:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
dockerfile: dockerfile:
inline: | inline: |
@@ -147,7 +147,7 @@ resources:
# echo "FROM alpine" | docker buildx build -f - . # echo "FROM alpine" | docker buildx build -f - .
inline: inline:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
dockerfile: dockerfile:
inline: | inline: |
@@ -158,7 +158,7 @@ resources:
# docker buildx build --load . # docker buildx build --load .
dockerLoad: dockerLoad:
type: dockerbuild:Image type: docker-build:Image
properties: properties:
context: context:
location: "./app" location: "./app"
@@ -168,7 +168,7 @@ resources:
# docker buildx build - < app/Dockerfile.emptyContext # docker buildx build - < app/Dockerfile.emptyContext
#emptyContext: #emptyContext:
# type: dockerbuild:Image # type: docker-build:Image
# properties: # properties:
# file: "app/Dockerfile.emptyContext" # file: "app/Dockerfile.emptyContext"
# context: "-" # context: "-"

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/pulumi/pulumi-dockerbuild module github.com/pulumi/pulumi-docker-build
go 1.21.7 go 1.21.7

2
go.sum
View File

@@ -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/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 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw=
github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= 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 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 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= github.com/pulumi/pulumi-go-provider/integration v0.10.1-0.20240314105842-9fbffb634faf h1:7fDWArOUFH+qQ9EywoC4K2ElXP76Ks/CtVJkEBmv2pk=

View File

@@ -16,9 +16,8 @@
package main package main
import ( import (
"github.com/pulumi/pulumi-docker-build/provider"
"github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil" "github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil"
"github.com/pulumi/pulumi-dockerbuild/provider"
) )
func main() { func main() {

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // 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 package internal

View File

@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // 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 package internal

View File

@@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
//go:generate go run ../pkg/docs-gen/examples examples doc
// Package internal contains our clients, validation, and provider // Package internal contains our clients, validation, and provider
// implementation for interacting with Docker's buildx APIs. // implementation for interacting with Docker's buildx APIs.
// //

View File

@@ -1,11 +1,11 @@
## Migrating v3 and v4 Image resources ## 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. 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 `dockerbuild.Image` resources with minor modifications. Existing `Image` resources can be converted to the docker-build `Image` resources with minor modifications.
### Behavioral differences ### 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 #### 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. 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. 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. 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 `dockerbuild.Image` resources during previews when it detects a CI environment like GitHub Actions. 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. Previews run in non-CI environments will not build images.
This behavior is still configurable with `buildOnPreview`. 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. 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. 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`). 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. 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. 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. 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/).) (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. 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. 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. 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. `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 #### 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. 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. 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. 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. 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. 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. 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). 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. 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 ### 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`. 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`. After migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`.
In almost all cases, properties of `dockerbuild.Image` are named after the Docker CLI flag they correspond to. 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`. 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. 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", { const v3Migrated = new dockerbuild.Image("v3-to-buildx", {
tags: ["myregistry.com/user/repo:latest", "local-tag"], tags: ["myregistry.com/user/repo:latest", "local-tag"],
push: true, 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", { const v4Migrated = new dockerbuild.Image("v4-to-buildx", {
tags: ["myregistry.com/user/repo:latest"], tags: ["myregistry.com/user/repo:latest"],
push: true, push: true,

View File

@@ -5,9 +5,9 @@
```typescript ```typescript
import * as pulumi from "@pulumi/pulumi"; 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: [{ cacheFrom: [{
registry: { registry: {
ref: "docker.io/pulumi/pulumi:cache-amd64", ref: "docker.io/pulumi/pulumi:cache-amd64",
@@ -15,17 +15,17 @@ const amd64 = new dockerbuild.Image("amd64", {
}], }],
cacheTo: [{ cacheTo: [{
registry: { registry: {
mode: dockerbuild.CacheMode.Max, mode: docker_build.CacheMode.Max,
ref: "docker.io/pulumi/pulumi:cache-amd64", ref: "docker.io/pulumi/pulumi:cache-amd64",
}, },
}], }],
context: { context: {
location: "app", location: "app",
}, },
platforms: [dockerbuild.Platform.Linux_amd64], platforms: [docker_build.Platform.Linux_amd64],
tags: ["docker.io/pulumi/pulumi:3.107.0-amd64"], tags: ["docker.io/pulumi/pulumi:3.107.0-amd64"],
}); });
const arm64 = new dockerbuild.Image("arm64", { const arm64 = new docker_build.Image("arm64", {
cacheFrom: [{ cacheFrom: [{
registry: { registry: {
ref: "docker.io/pulumi/pulumi:cache-arm64", ref: "docker.io/pulumi/pulumi:cache-arm64",
@@ -33,17 +33,17 @@ const arm64 = new dockerbuild.Image("arm64", {
}], }],
cacheTo: [{ cacheTo: [{
registry: { registry: {
mode: dockerbuild.CacheMode.Max, mode: docker_build.CacheMode.Max,
ref: "docker.io/pulumi/pulumi:cache-arm64", ref: "docker.io/pulumi/pulumi:cache-arm64",
}, },
}], }],
context: { context: {
location: "app", location: "app",
}, },
platforms: [dockerbuild.Platform.Linux_arm64], platforms: [docker_build.Platform.Linux_arm64],
tags: ["docker.io/pulumi/pulumi:3.107.0-arm64"], tags: ["docker.io/pulumi/pulumi:3.107.0-arm64"],
}); });
const index = new dockerbuild.Index("index", { const index = new docker_build.Index("index", {
sources: [ sources: [
amd64.ref, amd64.ref,
arm64.ref, arm64.ref,
@@ -54,43 +54,43 @@ export const ref = index.ref;
``` ```
```python ```python
import pulumi import pulumi
import pulumi_dockerbuild as dockerbuild import pulumi_docker_build as docker_build
amd64 = dockerbuild.Image("amd64", amd64 = docker_build.Image("amd64",
cache_from=[dockerbuild.CacheFromArgs( cache_from=[docker_build.CacheFromArgs(
registry=dockerbuild.CacheFromRegistryArgs( registry=docker_build.CacheFromRegistryArgs(
ref="docker.io/pulumi/pulumi:cache-amd64", ref="docker.io/pulumi/pulumi:cache-amd64",
), ),
)], )],
cache_to=[dockerbuild.CacheToArgs( cache_to=[docker_build.CacheToArgs(
registry=dockerbuild.CacheToRegistryArgs( registry=docker_build.CacheToRegistryArgs(
mode=dockerbuild.CacheMode.MAX, mode=docker_build.CacheMode.MAX,
ref="docker.io/pulumi/pulumi:cache-amd64", ref="docker.io/pulumi/pulumi:cache-amd64",
), ),
)], )],
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="app", location="app",
), ),
platforms=[dockerbuild.Platform.LINUX_AMD64], platforms=[docker_build.Platform.LINUX_AMD64],
tags=["docker.io/pulumi/pulumi:3.107.0-amd64"]) tags=["docker.io/pulumi/pulumi:3.107.0-amd64"])
arm64 = dockerbuild.Image("arm64", arm64 = docker_build.Image("arm64",
cache_from=[dockerbuild.CacheFromArgs( cache_from=[docker_build.CacheFromArgs(
registry=dockerbuild.CacheFromRegistryArgs( registry=docker_build.CacheFromRegistryArgs(
ref="docker.io/pulumi/pulumi:cache-arm64", ref="docker.io/pulumi/pulumi:cache-arm64",
), ),
)], )],
cache_to=[dockerbuild.CacheToArgs( cache_to=[docker_build.CacheToArgs(
registry=dockerbuild.CacheToRegistryArgs( registry=docker_build.CacheToRegistryArgs(
mode=dockerbuild.CacheMode.MAX, mode=docker_build.CacheMode.MAX,
ref="docker.io/pulumi/pulumi:cache-arm64", ref="docker.io/pulumi/pulumi:cache-arm64",
), ),
)], )],
context=dockerbuild.BuildContextArgs( context=docker_build.BuildContextArgs(
location="app", location="app",
), ),
platforms=[dockerbuild.Platform.LINUX_ARM64], platforms=[docker_build.Platform.LINUX_ARM64],
tags=["docker.io/pulumi/pulumi:3.107.0-arm64"]) tags=["docker.io/pulumi/pulumi:3.107.0-arm64"])
index = dockerbuild.Index("index", index = docker_build.Index("index",
sources=[ sources=[
amd64.ref, amd64.ref,
arm64.ref, arm64.ref,
@@ -102,17 +102,17 @@ pulumi.export("ref", index.ref)
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using Pulumi; using Pulumi;
using Dockerbuild = Pulumi.Dockerbuild; using DockerBuild = Pulumi.DockerBuild;
return await Deployment.RunAsync(() => return await Deployment.RunAsync(() =>
{ {
var amd64 = new Dockerbuild.Image("amd64", new() var amd64 = new DockerBuild.Image("amd64", new()
{ {
CacheFrom = 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", Ref = "docker.io/pulumi/pulumi:cache-amd64",
}, },
@@ -120,22 +120,22 @@ return await Deployment.RunAsync(() =>
}, },
CacheTo = new[] 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", Ref = "docker.io/pulumi/pulumi:cache-amd64",
}, },
}, },
}, },
Context = new Dockerbuild.Inputs.BuildContextArgs Context = new DockerBuild.Inputs.BuildContextArgs
{ {
Location = "app", Location = "app",
}, },
Platforms = new[] Platforms = new[]
{ {
Dockerbuild.Platform.Linux_amd64, DockerBuild.Platform.Linux_amd64,
}, },
Tags = new[] 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[] 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", Ref = "docker.io/pulumi/pulumi:cache-arm64",
}, },
@@ -157,22 +157,22 @@ return await Deployment.RunAsync(() =>
}, },
CacheTo = new[] 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", Ref = "docker.io/pulumi/pulumi:cache-arm64",
}, },
}, },
}, },
Context = new Dockerbuild.Inputs.BuildContextArgs Context = new DockerBuild.Inputs.BuildContextArgs
{ {
Location = "app", Location = "app",
}, },
Platforms = new[] Platforms = new[]
{ {
Dockerbuild.Platform.Linux_arm64, DockerBuild.Platform.Linux_arm64,
}, },
Tags = new[] 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[] Sources = new[]
{ {
@@ -201,7 +201,7 @@ return await Deployment.RunAsync(() =>
package main package main
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" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
) )
@@ -226,7 +226,7 @@ func main() {
Context: &dockerbuild.BuildContextArgs{ Context: &dockerbuild.BuildContextArgs{
Location: pulumi.String("app"), Location: pulumi.String("app"),
}, },
Platforms: dockerbuild.PlatformArray{ Platforms: docker - build.PlatformArray{
dockerbuild.Platform_Linux_amd64, dockerbuild.Platform_Linux_amd64,
}, },
Tags: pulumi.StringArray{ Tags: pulumi.StringArray{
@@ -255,7 +255,7 @@ func main() {
Context: &dockerbuild.BuildContextArgs{ Context: &dockerbuild.BuildContextArgs{
Location: pulumi.String("app"), Location: pulumi.String("app"),
}, },
Platforms: dockerbuild.PlatformArray{ Platforms: docker - build.PlatformArray{
dockerbuild.Platform_Linux_arm64, dockerbuild.Platform_Linux_arm64,
}, },
Tags: pulumi.StringArray{ Tags: pulumi.StringArray{
@@ -301,7 +301,7 @@ resources:
- linux/amd64 - linux/amd64
tags: tags:
- docker.io/pulumi/pulumi:3.107.0-amd64 - docker.io/pulumi/pulumi:3.107.0-amd64
type: dockerbuild:Image type: docker-build:Image
arm64: arm64:
properties: properties:
cacheFrom: cacheFrom:
@@ -317,14 +317,14 @@ resources:
- linux/arm64 - linux/arm64
tags: tags:
- docker.io/pulumi/pulumi:3.107.0-arm64 - docker.io/pulumi/pulumi:3.107.0-arm64
type: dockerbuild:Image type: docker-build:Image
index: index:
properties: properties:
sources: sources:
- ${amd64.ref} - ${amd64.ref}
- ${arm64.ref} - ${arm64.ref}
tag: docker.io/pulumi/pulumi:3.107.0 tag: docker.io/pulumi/pulumi:3.107.0
type: dockerbuild:Index type: docker-build:Index
runtime: yaml runtime: yaml
``` ```
```java ```java

View File

@@ -39,7 +39,7 @@ import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi" "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) { func TestImageLifecycle(t *testing.T) {
t.Parallel() t.Parallel()
@@ -273,7 +273,7 @@ func TestImageLifecycle(t *testing.T) {
t.Run(tt.name, func(t *testing.T) { t.Run(tt.name, func(t *testing.T) {
t.Parallel() t.Parallel()
lc := integration.LifeCycleTest{ lc := integration.LifeCycleTest{
Resource: "dockerbuild:index:Image", Resource: "docker-build:index:Image",
Create: tt.op(t), Create: tt.op(t),
} }
s := newServer(tt.client(t)) s := newServer(tt.client(t))

View File

@@ -94,7 +94,7 @@ func TestIndexLifecycle(t *testing.T) {
t.Skip("missing environment variables") t.Skip("missing environment variables")
} }
lc := integration.LifeCycleTest{ lc := integration.LifeCycleTest{
Resource: "dockerbuild:index:Index", Resource: "docker-build:index:Index",
Create: tt.op(t), Create: tt.op(t),
} }
s := newServer(tt.client(t)) s := newServer(tt.client(t))
@@ -109,7 +109,7 @@ func TestIndexLifecycle(t *testing.T) {
func TestIndexDiff(t *testing.T) { func TestIndexDiff(t *testing.T) {
t.Parallel() 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"}} baseArgs := IndexArgs{Sources: []string{"docker.io/nginx:latest"}}
baseState := IndexState{IndexArgs: baseArgs} baseState := IndexState{IndexArgs: baseArgs}

View File

@@ -3,7 +3,7 @@
// //
// Generated by this command: // 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 is a generated GoMock package.
package internal package internal

View File

@@ -69,22 +69,22 @@ func NewBuildxProvider() provider.Provider {
return infer.Provider( return infer.Provider(
infer.Options{ infer.Options{
Metadata: pschema.Metadata{ Metadata: pschema.Metadata{
DisplayName: "dockerbuild", DisplayName: "docker-build",
Keywords: []string{"docker", "buildkit", "buildx"}, Keywords: []string{"docker", "buildkit", "buildx"},
Description: "A Pulumi provider for Docker buildx", Description: "A Pulumi provider for Docker buildx",
Homepage: "https://pulumi.io", Homepage: "https://pulumi.io",
Publisher: "pulumi", Publisher: "pulumi",
License: "Apache-2.0", License: "Apache-2.0",
Repository: "https://github.com/pulumi/pulumi-dockerbuild", Repository: "https://github.com/pulumi/pulumi-docker-build",
PluginDownloadURL: "github.com/pulumi/pulumi-dockerbuild", PluginDownloadURL: "github.com/pulumi/pulumi-docker-build",
LanguageMap: map[string]any{ LanguageMap: map[string]any{
"go": gogen.GoPackageInfo{ "go": gogen.GoPackageInfo{
// GenerateResourceContainerTypes: true, // GenerateResourceContainerTypes: true,
Generics: gogen.GenericsSettingSideBySide, Generics: gogen.GenericsSettingSideBySide,
PackageImportAliases: map[string]string{ 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{ "csharp": csgen.CSharpPackageInfo{
PackageReferences: map[string]string{ PackageReferences: map[string]string{
@@ -130,7 +130,7 @@ func NewBuildxProvider() provider.Provider {
// Schema returns our package specification. // Schema returns our package specification.
func Schema(ctx context.Context, version string) schema.PackageSpec { func Schema(ctx context.Context, version string) schema.PackageSpec {
p := NewBuildxProvider() p := NewBuildxProvider()
spec, err := provider.GetSchema(ctx, "dockerbuild", version, p) spec, err := provider.GetSchema(ctx, "docker-build", version, p)
contract.AssertNoErrorf(err, "missing schema") contract.AssertNoErrorf(err, "missing schema")
return spec return spec
} }

View File

@@ -18,20 +18,19 @@ import (
"context" "context"
"fmt" "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" gp "github.com/pulumi/pulumi-go-provider"
"github.com/pulumi/pulumi/pkg/v3/resource/provider" "github.com/pulumi/pulumi/pkg/v3/resource/provider"
"github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin" "github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin"
rpc "github.com/pulumi/pulumi/sdk/v3/proto/go" 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. // Version is initialized by the Go linker to contain the semver of this build.
var Version string var Version string
// Name needs to match $PACK in Makefile. // 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. // Serve launches the gRPC server for the resource provider.
func Serve() error { func Serve() error {

View File

@@ -4,7 +4,7 @@
using System; using System;
using System.Collections.Immutable; using System.Collections.Immutable;
namespace Pulumi.Dockerbuild namespace Pulumi.DockerBuild
{ {
public static class Config 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<string?> _host = new __Value<string?>(() => __config.Get("host") ?? Utilities.GetEnv("DOCKER_HOST") ?? ""); private static readonly __Value<string?> _host = new __Value<string?>(() => __config.Get("host") ?? Utilities.GetEnv("DOCKER_HOST") ?? "");
/// <summary> /// <summary>

2
sdk/dotnet/Enums.cs generated
View File

@@ -5,7 +5,7 @@ using System;
using System.ComponentModel; using System.ComponentModel;
using Pulumi; using Pulumi;
namespace Pulumi.Dockerbuild namespace Pulumi.DockerBuild
{ {
[EnumType] [EnumType]
public readonly struct CacheMode : IEquatable<CacheMode> public readonly struct CacheMode : IEquatable<CacheMode>

24
sdk/dotnet/Image.cs generated
View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild namespace Pulumi.DockerBuild
{ {
/// <summary> /// <summary>
/// A Docker image built using buildx -- Docker's interface to the improved /// A Docker image built using buildx -- Docker's interface to the improved
@@ -491,7 +491,7 @@ namespace Pulumi.Dockerbuild
/// ///
/// ``` /// ```
/// </summary> /// </summary>
[DockerbuildResourceType("dockerbuild:index:Image")] [DockerBuildResourceType("docker-build:index:Image")]
public partial class Image : global::Pulumi.CustomResource public partial class Image : global::Pulumi.CustomResource
{ {
/// <summary> /// <summary>
@@ -658,7 +658,7 @@ namespace Pulumi.Dockerbuild
/// Equivalent to Docker's `--network` flag. /// Equivalent to Docker's `--network` flag.
/// </summary> /// </summary>
[Output("network")] [Output("network")]
public Output<Pulumi.Dockerbuild.NetworkMode?> Network { get; private set; } = null!; public Output<Pulumi.DockerBuild.NetworkMode?> Network { get; private set; } = null!;
/// <summary> /// <summary>
/// Do not import cache manifests when building the image. /// Do not import cache manifests when building the image.
@@ -674,7 +674,7 @@ namespace Pulumi.Dockerbuild
/// Equivalent to Docker's `--platform` flag. /// Equivalent to Docker's `--platform` flag.
/// </summary> /// </summary>
[Output("platforms")] [Output("platforms")]
public Output<ImmutableArray<Pulumi.Dockerbuild.Platform>> Platforms { get; private set; } = null!; public Output<ImmutableArray<Pulumi.DockerBuild.Platform>> Platforms { get; private set; } = null!;
/// <summary> /// <summary>
/// Always pull referenced images. /// Always pull referenced images.
@@ -777,12 +777,12 @@ namespace Pulumi.Dockerbuild
/// <param name="args">The arguments used to populate this resource's properties</param> /// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param> /// <param name="options">A bag of options that control this resource's behavior</param>
public Image(string name, ImageArgs? args = null, CustomResourceOptions? options = null) 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<string> id, CustomResourceOptions? options = null) private Image(string name, Input<string> 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 var defaultOptions = new CustomResourceOptions
{ {
Version = Utilities.Version, Version = Utilities.Version,
PluginDownloadURL = "github.com/pulumi/pulumi-dockerbuild", PluginDownloadURL = "github.com/pulumi/pulumi-docker-build",
}; };
var merged = CustomResourceOptions.Merge(defaultOptions, options); var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs. // 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. /// Equivalent to Docker's `--network` flag.
/// </summary> /// </summary>
[Input("network")] [Input("network")]
public Input<Pulumi.Dockerbuild.NetworkMode>? Network { get; set; } public Input<Pulumi.DockerBuild.NetworkMode>? Network { get; set; }
/// <summary> /// <summary>
/// Do not import cache manifests when building the image. /// Do not import cache manifests when building the image.
@@ -1005,16 +1005,16 @@ namespace Pulumi.Dockerbuild
public Input<bool>? NoCache { get; set; } public Input<bool>? NoCache { get; set; }
[Input("platforms")] [Input("platforms")]
private InputList<Pulumi.Dockerbuild.Platform>? _platforms; private InputList<Pulumi.DockerBuild.Platform>? _platforms;
/// <summary> /// <summary>
/// Set target platform(s) for the build. Defaults to the host's platform. /// Set target platform(s) for the build. Defaults to the host's platform.
/// ///
/// Equivalent to Docker's `--platform` flag. /// Equivalent to Docker's `--platform` flag.
/// </summary> /// </summary>
public InputList<Pulumi.Dockerbuild.Platform> Platforms public InputList<Pulumi.DockerBuild.Platform> Platforms
{ {
get => _platforms ?? (_platforms = new InputList<Pulumi.Dockerbuild.Platform>()); get => _platforms ?? (_platforms = new InputList<Pulumi.DockerBuild.Platform>());
set => _platforms = value; set => _platforms = value;
} }
@@ -1117,7 +1117,7 @@ namespace Pulumi.Dockerbuild
public ImageArgs() public ImageArgs()
{ {
Network = Pulumi.Dockerbuild.NetworkMode.@Default; Network = Pulumi.DockerBuild.NetworkMode.@Default;
} }
public static new ImageArgs Empty => new ImageArgs(); public static new ImageArgs Empty => new ImageArgs();
} }

46
sdk/dotnet/Index.cs generated
View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild namespace Pulumi.DockerBuild
{ {
/// <summary> /// <summary>
/// An index (or manifest list) referencing one or more existing images. /// An index (or manifest list) referencing one or more existing images.
@@ -24,17 +24,17 @@ namespace Pulumi.Dockerbuild
/// using System.Collections.Generic; /// using System.Collections.Generic;
/// using System.Linq; /// using System.Linq;
/// using Pulumi; /// using Pulumi;
/// using Dockerbuild = Pulumi.Dockerbuild; /// using DockerBuild = Pulumi.DockerBuild;
/// ///
/// return await Deployment.RunAsync(() =&gt; /// return await Deployment.RunAsync(() =&gt;
/// { /// {
/// var amd64 = new Dockerbuild.Image("amd64", new() /// var amd64 = new DockerBuild.Image("amd64", new()
/// { /// {
/// CacheFrom = 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", /// Ref = "docker.io/pulumi/pulumi:cache-amd64",
/// }, /// },
@@ -42,22 +42,22 @@ namespace Pulumi.Dockerbuild
/// }, /// },
/// CacheTo = new[] /// 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", /// Ref = "docker.io/pulumi/pulumi:cache-amd64",
/// }, /// },
/// }, /// },
/// }, /// },
/// Context = new Dockerbuild.Inputs.BuildContextArgs /// Context = new DockerBuild.Inputs.BuildContextArgs
/// { /// {
/// Location = "app", /// Location = "app",
/// }, /// },
/// Platforms = new[] /// Platforms = new[]
/// { /// {
/// Dockerbuild.Platform.Linux_amd64, /// DockerBuild.Platform.Linux_amd64,
/// }, /// },
/// Tags = new[] /// 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[] /// 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", /// Ref = "docker.io/pulumi/pulumi:cache-arm64",
/// }, /// },
@@ -79,22 +79,22 @@ namespace Pulumi.Dockerbuild
/// }, /// },
/// CacheTo = new[] /// 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", /// Ref = "docker.io/pulumi/pulumi:cache-arm64",
/// }, /// },
/// }, /// },
/// }, /// },
/// Context = new Dockerbuild.Inputs.BuildContextArgs /// Context = new DockerBuild.Inputs.BuildContextArgs
/// { /// {
/// Location = "app", /// Location = "app",
/// }, /// },
/// Platforms = new[] /// Platforms = new[]
/// { /// {
/// Dockerbuild.Platform.Linux_arm64, /// DockerBuild.Platform.Linux_arm64,
/// }, /// },
/// Tags = new[] /// 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[] /// Sources = new[]
/// { /// {
@@ -120,7 +120,7 @@ namespace Pulumi.Dockerbuild
/// ///
/// ``` /// ```
/// </summary> /// </summary>
[DockerbuildResourceType("dockerbuild:index:Index")] [DockerBuildResourceType("docker-build:index:Index")]
public partial class Index : global::Pulumi.CustomResource public partial class Index : global::Pulumi.CustomResource
{ {
/// <summary> /// <summary>
@@ -168,12 +168,12 @@ namespace Pulumi.Dockerbuild
/// <param name="args">The arguments used to populate this resource's properties</param> /// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param> /// <param name="options">A bag of options that control this resource's behavior</param>
public Index(string name, IndexArgs args, CustomResourceOptions? options = null) 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<string> id, CustomResourceOptions? options = null) private Index(string name, Input<string> 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 var defaultOptions = new CustomResourceOptions
{ {
Version = Utilities.Version, Version = Utilities.Version,
PluginDownloadURL = "github.com/pulumi/pulumi-dockerbuild", PluginDownloadURL = "github.com/pulumi/pulumi-docker-build",
}; };
var merged = CustomResourceOptions.Merge(defaultOptions, options); var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs. // Override the ID if one was specified for consistency with other language SDKs.

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class BuildContextArgs : global::Pulumi.ResourceArgs public sealed class BuildContextArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class BuilderConfigArgs : global::Pulumi.ResourceArgs public sealed class BuilderConfigArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheFromArgs : global::Pulumi.ResourceArgs public sealed class CacheFromArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheFromAzureBlobArgs : global::Pulumi.ResourceArgs public sealed class CacheFromAzureBlobArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheFromGitHubActionsArgs : global::Pulumi.ResourceArgs public sealed class CacheFromGitHubActionsArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheFromLocalArgs : global::Pulumi.ResourceArgs public sealed class CacheFromLocalArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheFromRegistryArgs : global::Pulumi.ResourceArgs public sealed class CacheFromRegistryArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheFromS3Args : global::Pulumi.ResourceArgs public sealed class CacheFromS3Args : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheToArgs : global::Pulumi.ResourceArgs public sealed class CacheToArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheToAzureBlobArgs : global::Pulumi.ResourceArgs public sealed class CacheToAzureBlobArgs : global::Pulumi.ResourceArgs
@@ -28,7 +28,7 @@ namespace Pulumi.Dockerbuild.Inputs
/// The cache mode to use. Defaults to `min`. /// The cache mode to use. Defaults to `min`.
/// </summary> /// </summary>
[Input("mode")] [Input("mode")]
public Input<Pulumi.Dockerbuild.CacheMode>? Mode { get; set; } public Input<Pulumi.DockerBuild.CacheMode>? Mode { get; set; }
/// <summary> /// <summary>
/// The name of the cache image. /// The name of the cache image.
@@ -55,7 +55,7 @@ namespace Pulumi.Dockerbuild.Inputs
public CacheToAzureBlobArgs() public CacheToAzureBlobArgs()
{ {
IgnoreError = false; IgnoreError = false;
Mode = Pulumi.Dockerbuild.CacheMode.Min; Mode = Pulumi.DockerBuild.CacheMode.Min;
} }
public static new CacheToAzureBlobArgs Empty => new CacheToAzureBlobArgs(); public static new CacheToAzureBlobArgs Empty => new CacheToAzureBlobArgs();
} }

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheToGitHubActionsArgs : global::Pulumi.ResourceArgs public sealed class CacheToGitHubActionsArgs : global::Pulumi.ResourceArgs
@@ -22,7 +22,7 @@ namespace Pulumi.Dockerbuild.Inputs
/// The cache mode to use. Defaults to `min`. /// The cache mode to use. Defaults to `min`.
/// </summary> /// </summary>
[Input("mode")] [Input("mode")]
public Input<Pulumi.Dockerbuild.CacheMode>? Mode { get; set; } public Input<Pulumi.DockerBuild.CacheMode>? Mode { get; set; }
/// <summary> /// <summary>
/// The scope to use for cache keys. Defaults to `buildkit`. /// The scope to use for cache keys. Defaults to `buildkit`.
@@ -67,7 +67,7 @@ namespace Pulumi.Dockerbuild.Inputs
public CacheToGitHubActionsArgs() public CacheToGitHubActionsArgs()
{ {
IgnoreError = false; IgnoreError = false;
Mode = Pulumi.Dockerbuild.CacheMode.Min; Mode = Pulumi.DockerBuild.CacheMode.Min;
Scope = Utilities.GetEnv("buildkit") ?? ""; Scope = Utilities.GetEnv("buildkit") ?? "";
Token = Utilities.GetEnv("ACTIONS_RUNTIME_TOKEN") ?? ""; Token = Utilities.GetEnv("ACTIONS_RUNTIME_TOKEN") ?? "";
Url = Utilities.GetEnv("ACTIONS_RUNTIME_URL") ?? ""; Url = Utilities.GetEnv("ACTIONS_RUNTIME_URL") ?? "";

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
/// <summary> /// <summary>

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheToLocalArgs : global::Pulumi.ResourceArgs public sealed class CacheToLocalArgs : global::Pulumi.ResourceArgs
@@ -16,7 +16,7 @@ namespace Pulumi.Dockerbuild.Inputs
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
[Input("compression")] [Input("compression")]
public Input<Pulumi.Dockerbuild.CompressionType>? Compression { get; set; } public Input<Pulumi.DockerBuild.CompressionType>? Compression { get; set; }
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
@@ -46,15 +46,15 @@ namespace Pulumi.Dockerbuild.Inputs
/// The cache mode to use. Defaults to `min`. /// The cache mode to use. Defaults to `min`.
/// </summary> /// </summary>
[Input("mode")] [Input("mode")]
public Input<Pulumi.Dockerbuild.CacheMode>? Mode { get; set; } public Input<Pulumi.DockerBuild.CacheMode>? Mode { get; set; }
public CacheToLocalArgs() public CacheToLocalArgs()
{ {
Compression = Pulumi.Dockerbuild.CompressionType.Gzip; Compression = Pulumi.DockerBuild.CompressionType.Gzip;
CompressionLevel = 0; CompressionLevel = 0;
ForceCompression = false; ForceCompression = false;
IgnoreError = false; IgnoreError = false;
Mode = Pulumi.Dockerbuild.CacheMode.Min; Mode = Pulumi.DockerBuild.CacheMode.Min;
} }
public static new CacheToLocalArgs Empty => new CacheToLocalArgs(); public static new CacheToLocalArgs Empty => new CacheToLocalArgs();
} }

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheToRegistryArgs : global::Pulumi.ResourceArgs public sealed class CacheToRegistryArgs : global::Pulumi.ResourceArgs
@@ -16,7 +16,7 @@ namespace Pulumi.Dockerbuild.Inputs
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
[Input("compression")] [Input("compression")]
public Input<Pulumi.Dockerbuild.CompressionType>? Compression { get; set; } public Input<Pulumi.DockerBuild.CompressionType>? Compression { get; set; }
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
@@ -52,7 +52,7 @@ namespace Pulumi.Dockerbuild.Inputs
/// The cache mode to use. Defaults to `min`. /// The cache mode to use. Defaults to `min`.
/// </summary> /// </summary>
[Input("mode")] [Input("mode")]
public Input<Pulumi.Dockerbuild.CacheMode>? Mode { get; set; } public Input<Pulumi.DockerBuild.CacheMode>? Mode { get; set; }
/// <summary> /// <summary>
/// Whether to use OCI media types in exported manifests. Defaults to /// Whether to use OCI media types in exported manifests. Defaults to
@@ -69,12 +69,12 @@ namespace Pulumi.Dockerbuild.Inputs
public CacheToRegistryArgs() public CacheToRegistryArgs()
{ {
Compression = Pulumi.Dockerbuild.CompressionType.Gzip; Compression = Pulumi.DockerBuild.CompressionType.Gzip;
CompressionLevel = 0; CompressionLevel = 0;
ForceCompression = false; ForceCompression = false;
IgnoreError = false; IgnoreError = false;
ImageManifest = false; ImageManifest = false;
Mode = Pulumi.Dockerbuild.CacheMode.Min; Mode = Pulumi.DockerBuild.CacheMode.Min;
OciMediaTypes = true; OciMediaTypes = true;
} }
public static new CacheToRegistryArgs Empty => new CacheToRegistryArgs(); public static new CacheToRegistryArgs Empty => new CacheToRegistryArgs();

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class CacheToS3Args : global::Pulumi.ResourceArgs public sealed class CacheToS3Args : global::Pulumi.ResourceArgs
@@ -52,7 +52,7 @@ namespace Pulumi.Dockerbuild.Inputs
/// The cache mode to use. Defaults to `min`. /// The cache mode to use. Defaults to `min`.
/// </summary> /// </summary>
[Input("mode")] [Input("mode")]
public Input<Pulumi.Dockerbuild.CacheMode>? Mode { get; set; } public Input<Pulumi.DockerBuild.CacheMode>? Mode { get; set; }
/// <summary> /// <summary>
/// Name of the cache image. /// Name of the cache image.
@@ -108,7 +108,7 @@ namespace Pulumi.Dockerbuild.Inputs
{ {
AccessKeyId = Utilities.GetEnv("AWS_ACCESS_KEY_ID") ?? ""; AccessKeyId = Utilities.GetEnv("AWS_ACCESS_KEY_ID") ?? "";
IgnoreError = false; IgnoreError = false;
Mode = Pulumi.Dockerbuild.CacheMode.Min; Mode = Pulumi.DockerBuild.CacheMode.Min;
Region = Utilities.GetEnv("AWS_REGION") ?? ""; Region = Utilities.GetEnv("AWS_REGION") ?? "";
SecretAccessKey = Utilities.GetEnv("AWS_SECRET_ACCESS_KEY") ?? ""; SecretAccessKey = Utilities.GetEnv("AWS_SECRET_ACCESS_KEY") ?? "";
SessionToken = Utilities.GetEnv("AWS_SESSION_TOKEN") ?? ""; SessionToken = Utilities.GetEnv("AWS_SESSION_TOKEN") ?? "";

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class ContextArgs : global::Pulumi.ResourceArgs public sealed class ContextArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class DockerfileArgs : global::Pulumi.ResourceArgs public sealed class DockerfileArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class ExportArgs : global::Pulumi.ResourceArgs public sealed class ExportArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class ExportCacheOnlyArgs : global::Pulumi.ResourceArgs public sealed class ExportCacheOnlyArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class ExportDockerArgs : global::Pulumi.ResourceArgs public sealed class ExportDockerArgs : global::Pulumi.ResourceArgs
@@ -28,7 +28,7 @@ namespace Pulumi.Dockerbuild.Inputs
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
[Input("compression")] [Input("compression")]
public Input<Pulumi.Dockerbuild.CompressionType>? Compression { get; set; } public Input<Pulumi.DockerBuild.CompressionType>? Compression { get; set; }
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
@@ -74,7 +74,7 @@ namespace Pulumi.Dockerbuild.Inputs
public ExportDockerArgs() public ExportDockerArgs()
{ {
Compression = Pulumi.Dockerbuild.CompressionType.Gzip; Compression = Pulumi.DockerBuild.CompressionType.Gzip;
CompressionLevel = 0; CompressionLevel = 0;
ForceCompression = false; ForceCompression = false;
OciMediaTypes = false; OciMediaTypes = false;

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class ExportImageArgs : global::Pulumi.ResourceArgs public sealed class ExportImageArgs : global::Pulumi.ResourceArgs
@@ -28,7 +28,7 @@ namespace Pulumi.Dockerbuild.Inputs
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
[Input("compression")] [Input("compression")]
public Input<Pulumi.Dockerbuild.CompressionType>? Compression { get; set; } public Input<Pulumi.DockerBuild.CompressionType>? Compression { get; set; }
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
@@ -111,7 +111,7 @@ namespace Pulumi.Dockerbuild.Inputs
public ExportImageArgs() public ExportImageArgs()
{ {
Compression = Pulumi.Dockerbuild.CompressionType.Gzip; Compression = Pulumi.DockerBuild.CompressionType.Gzip;
CompressionLevel = 0; CompressionLevel = 0;
ForceCompression = false; ForceCompression = false;
OciMediaTypes = false; OciMediaTypes = false;

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class ExportLocalArgs : global::Pulumi.ResourceArgs public sealed class ExportLocalArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class ExportOCIArgs : global::Pulumi.ResourceArgs public sealed class ExportOCIArgs : global::Pulumi.ResourceArgs
@@ -28,7 +28,7 @@ namespace Pulumi.Dockerbuild.Inputs
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
[Input("compression")] [Input("compression")]
public Input<Pulumi.Dockerbuild.CompressionType>? Compression { get; set; } public Input<Pulumi.DockerBuild.CompressionType>? Compression { get; set; }
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
@@ -74,7 +74,7 @@ namespace Pulumi.Dockerbuild.Inputs
public ExportOCIArgs() public ExportOCIArgs()
{ {
Compression = Pulumi.Dockerbuild.CompressionType.Gzip; Compression = Pulumi.DockerBuild.CompressionType.Gzip;
CompressionLevel = 0; CompressionLevel = 0;
ForceCompression = false; ForceCompression = false;
OciMediaTypes = true; OciMediaTypes = true;

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class ExportRegistryArgs : global::Pulumi.ResourceArgs public sealed class ExportRegistryArgs : global::Pulumi.ResourceArgs
@@ -28,7 +28,7 @@ namespace Pulumi.Dockerbuild.Inputs
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
[Input("compression")] [Input("compression")]
public Input<Pulumi.Dockerbuild.CompressionType>? Compression { get; set; } public Input<Pulumi.DockerBuild.CompressionType>? Compression { get; set; }
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
@@ -111,7 +111,7 @@ namespace Pulumi.Dockerbuild.Inputs
public ExportRegistryArgs() public ExportRegistryArgs()
{ {
Compression = Pulumi.Dockerbuild.CompressionType.Gzip; Compression = Pulumi.DockerBuild.CompressionType.Gzip;
CompressionLevel = 0; CompressionLevel = 0;
ForceCompression = false; ForceCompression = false;
OciMediaTypes = false; OciMediaTypes = false;

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class ExportTarArgs : global::Pulumi.ResourceArgs public sealed class ExportTarArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class RegistryArgs : global::Pulumi.ResourceArgs public sealed class RegistryArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Inputs namespace Pulumi.DockerBuild.Inputs
{ {
public sealed class SSHArgs : global::Pulumi.ResourceArgs public sealed class SSHArgs : global::Pulumi.ResourceArgs

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]
@@ -24,7 +24,7 @@ namespace Pulumi.Dockerbuild.Outputs
/// <summary> /// <summary>
/// The cache mode to use. Defaults to `min`. /// The cache mode to use. Defaults to `min`.
/// </summary> /// </summary>
public readonly Pulumi.Dockerbuild.CacheMode? Mode; public readonly Pulumi.DockerBuild.CacheMode? Mode;
/// <summary> /// <summary>
/// The name of the cache image. /// The name of the cache image.
/// </summary> /// </summary>
@@ -40,7 +40,7 @@ namespace Pulumi.Dockerbuild.Outputs
bool? ignoreError, bool? ignoreError,
Pulumi.Dockerbuild.CacheMode? mode, Pulumi.DockerBuild.CacheMode? mode,
string name, string name,

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]
@@ -20,7 +20,7 @@ namespace Pulumi.Dockerbuild.Outputs
/// <summary> /// <summary>
/// The cache mode to use. Defaults to `min`. /// The cache mode to use. Defaults to `min`.
/// </summary> /// </summary>
public readonly Pulumi.Dockerbuild.CacheMode? Mode; public readonly Pulumi.DockerBuild.CacheMode? Mode;
/// <summary> /// <summary>
/// The scope to use for cache keys. Defaults to `buildkit`. /// The scope to use for cache keys. Defaults to `buildkit`.
/// ///
@@ -50,7 +50,7 @@ namespace Pulumi.Dockerbuild.Outputs
private CacheToGitHubActions( private CacheToGitHubActions(
bool? ignoreError, bool? ignoreError,
Pulumi.Dockerbuild.CacheMode? mode, Pulumi.DockerBuild.CacheMode? mode,
string? scope, string? scope,

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
/// <summary> /// <summary>

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]
@@ -16,7 +16,7 @@ namespace Pulumi.Dockerbuild.Outputs
/// <summary> /// <summary>
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
public readonly Pulumi.Dockerbuild.CompressionType? Compression; public readonly Pulumi.DockerBuild.CompressionType? Compression;
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
/// </summary> /// </summary>
@@ -36,11 +36,11 @@ namespace Pulumi.Dockerbuild.Outputs
/// <summary> /// <summary>
/// The cache mode to use. Defaults to `min`. /// The cache mode to use. Defaults to `min`.
/// </summary> /// </summary>
public readonly Pulumi.Dockerbuild.CacheMode? Mode; public readonly Pulumi.DockerBuild.CacheMode? Mode;
[OutputConstructor] [OutputConstructor]
private CacheToLocal( private CacheToLocal(
Pulumi.Dockerbuild.CompressionType? compression, Pulumi.DockerBuild.CompressionType? compression,
int? compressionLevel, int? compressionLevel,
@@ -50,7 +50,7 @@ namespace Pulumi.Dockerbuild.Outputs
bool? ignoreError, bool? ignoreError,
Pulumi.Dockerbuild.CacheMode? mode) Pulumi.DockerBuild.CacheMode? mode)
{ {
Compression = compression; Compression = compression;
CompressionLevel = compressionLevel; CompressionLevel = compressionLevel;

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]
@@ -16,7 +16,7 @@ namespace Pulumi.Dockerbuild.Outputs
/// <summary> /// <summary>
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
public readonly Pulumi.Dockerbuild.CompressionType? Compression; public readonly Pulumi.DockerBuild.CompressionType? Compression;
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
/// </summary> /// </summary>
@@ -42,7 +42,7 @@ namespace Pulumi.Dockerbuild.Outputs
/// <summary> /// <summary>
/// The cache mode to use. Defaults to `min`. /// The cache mode to use. Defaults to `min`.
/// </summary> /// </summary>
public readonly Pulumi.Dockerbuild.CacheMode? Mode; public readonly Pulumi.DockerBuild.CacheMode? Mode;
/// <summary> /// <summary>
/// Whether to use OCI media types in exported manifests. Defaults to /// Whether to use OCI media types in exported manifests. Defaults to
/// `true`. /// `true`.
@@ -55,7 +55,7 @@ namespace Pulumi.Dockerbuild.Outputs
[OutputConstructor] [OutputConstructor]
private CacheToRegistry( private CacheToRegistry(
Pulumi.Dockerbuild.CompressionType? compression, Pulumi.DockerBuild.CompressionType? compression,
int? compressionLevel, int? compressionLevel,
@@ -65,7 +65,7 @@ namespace Pulumi.Dockerbuild.Outputs
bool? imageManifest, bool? imageManifest,
Pulumi.Dockerbuild.CacheMode? mode, Pulumi.DockerBuild.CacheMode? mode,
bool? ociMediaTypes, bool? ociMediaTypes,

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]
@@ -40,7 +40,7 @@ namespace Pulumi.Dockerbuild.Outputs
/// <summary> /// <summary>
/// The cache mode to use. Defaults to `min`. /// The cache mode to use. Defaults to `min`.
/// </summary> /// </summary>
public readonly Pulumi.Dockerbuild.CacheMode? Mode; public readonly Pulumi.DockerBuild.CacheMode? Mode;
/// <summary> /// <summary>
/// Name of the cache image. /// Name of the cache image.
/// </summary> /// </summary>
@@ -76,7 +76,7 @@ namespace Pulumi.Dockerbuild.Outputs
string? manifestsPrefix, string? manifestsPrefix,
Pulumi.Dockerbuild.CacheMode? mode, Pulumi.DockerBuild.CacheMode? mode,
string? name, string? name,

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]
@@ -20,7 +20,7 @@ namespace Pulumi.Dockerbuild.Outputs
/// <summary> /// <summary>
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
public readonly Pulumi.Dockerbuild.CompressionType? Compression; public readonly Pulumi.DockerBuild.CompressionType? Compression;
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
/// </summary> /// </summary>
@@ -50,7 +50,7 @@ namespace Pulumi.Dockerbuild.Outputs
private ExportDocker( private ExportDocker(
ImmutableDictionary<string, string>? annotations, ImmutableDictionary<string, string>? annotations,
Pulumi.Dockerbuild.CompressionType? compression, Pulumi.DockerBuild.CompressionType? compression,
int? compressionLevel, int? compressionLevel,

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]
@@ -20,7 +20,7 @@ namespace Pulumi.Dockerbuild.Outputs
/// <summary> /// <summary>
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
public readonly Pulumi.Dockerbuild.CompressionType? Compression; public readonly Pulumi.DockerBuild.CompressionType? Compression;
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
/// </summary> /// </summary>
@@ -77,7 +77,7 @@ namespace Pulumi.Dockerbuild.Outputs
private ExportImage( private ExportImage(
ImmutableDictionary<string, string>? annotations, ImmutableDictionary<string, string>? annotations,
Pulumi.Dockerbuild.CompressionType? compression, Pulumi.DockerBuild.CompressionType? compression,
int? compressionLevel, int? compressionLevel,

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]
@@ -20,7 +20,7 @@ namespace Pulumi.Dockerbuild.Outputs
/// <summary> /// <summary>
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
public readonly Pulumi.Dockerbuild.CompressionType? Compression; public readonly Pulumi.DockerBuild.CompressionType? Compression;
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
/// </summary> /// </summary>
@@ -50,7 +50,7 @@ namespace Pulumi.Dockerbuild.Outputs
private ExportOCI( private ExportOCI(
ImmutableDictionary<string, string>? annotations, ImmutableDictionary<string, string>? annotations,
Pulumi.Dockerbuild.CompressionType? compression, Pulumi.DockerBuild.CompressionType? compression,
int? compressionLevel, int? compressionLevel,

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]
@@ -20,7 +20,7 @@ namespace Pulumi.Dockerbuild.Outputs
/// <summary> /// <summary>
/// The compression type to use. /// The compression type to use.
/// </summary> /// </summary>
public readonly Pulumi.Dockerbuild.CompressionType? Compression; public readonly Pulumi.DockerBuild.CompressionType? Compression;
/// <summary> /// <summary>
/// Compression level from 0 to 22. /// Compression level from 0 to 22.
/// </summary> /// </summary>
@@ -77,7 +77,7 @@ namespace Pulumi.Dockerbuild.Outputs
private ExportRegistry( private ExportRegistry(
ImmutableDictionary<string, string>? annotations, ImmutableDictionary<string, string>? annotations,
Pulumi.Dockerbuild.CompressionType? compression, Pulumi.DockerBuild.CompressionType? compression,
int? compressionLevel, int? compressionLevel,

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,7 +7,7 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; using Pulumi.Serialization;
namespace Pulumi.Dockerbuild.Outputs namespace Pulumi.DockerBuild.Outputs
{ {
[OutputType] [OutputType]

View File

@@ -7,9 +7,9 @@ using System.Collections.Immutable;
using System.Threading.Tasks; using System.Threading.Tasks;
using Pulumi.Serialization; 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 public partial class Provider : global::Pulumi.ProviderResource
{ {
/// <summary> /// <summary>
@@ -27,7 +27,7 @@ namespace Pulumi.Dockerbuild
/// <param name="args">The arguments used to populate this resource's properties</param> /// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param> /// <param name="options">A bag of options that control this resource's behavior</param>
public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null) 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 var defaultOptions = new CustomResourceOptions
{ {
Version = Utilities.Version, Version = Utilities.Version,
PluginDownloadURL = "github.com/pulumi/pulumi-dockerbuild", PluginDownloadURL = "github.com/pulumi/pulumi-docker-build",
}; };
var merged = CustomResourceOptions.Merge(defaultOptions, options); var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs. // Override the ID if one was specified for consistency with other language SDKs.

View File

@@ -7,7 +7,7 @@
<Description>A Pulumi provider for Docker buildx</Description> <Description>A Pulumi provider for Docker buildx</Description>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> <PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://pulumi.io</PackageProjectUrl> <PackageProjectUrl>https://pulumi.io</PackageProjectUrl>
<RepositoryUrl>https://github.com/pulumi/pulumi-dockerbuild</RepositoryUrl> <RepositoryUrl>https://github.com/pulumi/pulumi-docker-build</RepositoryUrl>
<PackageIcon>logo.png</PackageIcon> <PackageIcon>logo.png</PackageIcon>
<TargetFramework>net6.0</TargetFramework> <TargetFramework>net6.0</TargetFramework>

View File

@@ -1,7 +1,7 @@
// *** WARNING: this file was generated by pulumi. *** // *** WARNING: this file was generated by pulumi. ***
// *** Do not edit by hand unless you're certain you know what you are doing! *** // *** Do not edit by hand unless you're certain you know what you are doing! ***
namespace Pulumi.Dockerbuild namespace Pulumi.DockerBuild
{ {
static class Utilities static class Utilities
{ {
@@ -53,7 +53,7 @@ namespace Pulumi.Dockerbuild
{ {
var dst = src ?? new global::Pulumi.InvokeOptions{}; var dst = src ?? new global::Pulumi.InvokeOptions{};
dst.Version = src?.Version ?? Version; 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; return dst;
} }
@@ -63,7 +63,7 @@ namespace Pulumi.Dockerbuild
static Utilities() static Utilities()
{ {
var assembly = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(Utilities)).Assembly; 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")); using var reader = new global::System.IO.StreamReader(stream ?? throw new global::System.NotSupportedException("Missing embedded version.txt file"));
version = reader.ReadToEnd().Trim(); version = reader.ReadToEnd().Trim();
var parts = version.Split("\n"); 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)
{ {
} }
} }

View File

@@ -1,5 +1,5 @@
{ {
"resource": true, "resource": true,
"name": "dockerbuild", "name": "docker-build",
"server": "github.com/pulumi/pulumi-dockerbuild" "server": "github.com/pulumi/pulumi-docker-build"
} }

View File

@@ -4,8 +4,8 @@
package config package config
import ( import (
dockerbuild "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild" dockerbuild "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild"
"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/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
) )
@@ -14,7 +14,7 @@ var _ = internal.GetEnvOrDefault
// The build daemon's address. // The build daemon's address.
func GetHost(ctx *pulumi.Context) string { func GetHost(ctx *pulumi.Context) string {
v, err := config.Try(ctx, "dockerbuild:host") v, err := config.Try(ctx, "docker-build:host")
if err == nil { if err == nil {
return v return v
} }
@@ -25,5 +25,5 @@ func GetHost(ctx *pulumi.Context) string {
return value return value
} }
func GetRegistries(ctx *pulumi.Context) string { func GetRegistries(ctx *pulumi.Context) string {
return config.Get(ctx, "dockerbuild:registries") return config.Get(ctx, "docker-build:registries")
} }

View File

@@ -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 go 1.21.7

View File

@@ -7,7 +7,7 @@ import (
"context" "context"
"reflect" "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/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumix" "github.com/pulumi/pulumi/sdk/v3/go/pulumix"
) )
@@ -731,7 +731,7 @@ func NewImage(ctx *pulumi.Context,
} }
opts = internal.PkgResourceDefaultOpts(opts) opts = internal.PkgResourceDefaultOpts(opts)
var resource Image 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 { if err != nil {
return nil, err return nil, err
} }
@@ -743,7 +743,7 @@ func NewImage(ctx *pulumi.Context,
func GetImage(ctx *pulumi.Context, func GetImage(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ImageState, opts ...pulumi.ResourceOption) (*Image, error) { name string, id pulumi.IDInput, state *ImageState, opts ...pulumi.ResourceOption) (*Image, error) {
var resource Image 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 { if err != nil {
return nil, err return nil, err
} }

View File

@@ -8,7 +8,7 @@ import (
"reflect" "reflect"
"errors" "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/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumix" "github.com/pulumi/pulumi/sdk/v3/go/pulumix"
) )
@@ -28,7 +28,7 @@ import (
// //
// 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" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// //
// ) // )
@@ -54,7 +54,7 @@ import (
// Context: &dockerbuild.BuildContextArgs{ // Context: &dockerbuild.BuildContextArgs{
// Location: pulumi.String("app"), // Location: pulumi.String("app"),
// }, // },
// Platforms: dockerbuild.PlatformArray{ // Platforms: docker - build.PlatformArray{
// dockerbuild.Platform_Linux_amd64, // dockerbuild.Platform_Linux_amd64,
// }, // },
// Tags: pulumi.StringArray{ // Tags: pulumi.StringArray{
@@ -83,7 +83,7 @@ import (
// Context: &dockerbuild.BuildContextArgs{ // Context: &dockerbuild.BuildContextArgs{
// Location: pulumi.String("app"), // Location: pulumi.String("app"),
// }, // },
// Platforms: dockerbuild.PlatformArray{ // Platforms: docker - build.PlatformArray{
// dockerbuild.Platform_Linux_arm64, // dockerbuild.Platform_Linux_arm64,
// }, // },
// Tags: pulumi.StringArray{ // Tags: pulumi.StringArray{
@@ -148,7 +148,7 @@ func NewIndex(ctx *pulumi.Context,
} }
opts = internal.PkgResourceDefaultOpts(opts) opts = internal.PkgResourceDefaultOpts(opts)
var resource Index 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 { if err != nil {
return nil, err return nil, err
} }
@@ -160,7 +160,7 @@ func NewIndex(ctx *pulumi.Context,
func GetIndex(ctx *pulumi.Context, func GetIndex(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *IndexState, opts ...pulumi.ResourceOption) (*Index, error) { name string, id pulumi.IDInput, state *IndexState, opts ...pulumi.ResourceOption) (*Index, error) {
var resource Index 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 { if err != nil {
return nil, err return nil, err
} }

View File

@@ -7,7 +7,7 @@ import (
"fmt" "fmt"
"github.com/blang/semver" "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" "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) { func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) {
switch typ { switch typ {
case "dockerbuild:index:Image": case "docker-build:index:Image":
r = &Image{} r = &Image{}
case "dockerbuild:index:Index": case "docker-build:index:Index":
r = &Index{} r = &Index{}
default: default:
return nil, fmt.Errorf("unknown resource type: %s", typ) 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) { 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) return nil, fmt.Errorf("unknown provider type: %s", typ)
} }
@@ -57,12 +57,12 @@ func init() {
version = semver.Version{Major: 1} version = semver.Version{Major: 1}
} }
pulumi.RegisterResourceModule( pulumi.RegisterResourceModule(
"dockerbuild", "docker-build",
"index", "index",
&module{version}, &module{version},
) )
pulumi.RegisterResourcePackage( pulumi.RegisterResourcePackage(
"dockerbuild", "docker-build",
&pkg{version}, &pkg{version},
) )
} }

Some files were not shown because too many files have changed in this diff Show More