From 26c144c916b7c2d63ab04210c974cbf0f4ee7396 Mon Sep 17 00:00:00 2001 From: Bryce Lampe Date: Thu, 25 Apr 2024 11:03:59 -0700 Subject: [PATCH] Initial provider implementation (#18) This brings over the initial buildx prototype from pulumi/pulumi-docker and fixes various build and release issues. --- .gitattributes | 1 + .github/dependabot.yml | 2 - .gitignore | 1 + .golangci.yml | 86 +- Makefile | 50 +- README.md | 117 +- docs/generate.go | 216 + docs/yaml/image-examples.yaml | 190 + docs/yaml/index-examples.yaml | 48 + examples/app/Dockerfile | 2 + examples/app/Dockerfile.buildArgs | 5 + examples/app/Dockerfile.emptyContext | 2 + examples/app/Dockerfile.extraHosts | 3 + examples/app/Dockerfile.multiPlatform | 7 + examples/app/Dockerfile.namedContexts | 5 + examples/app/Dockerfile.secrets | 4 + examples/app/Dockerfile.sshMount | 5 + examples/app/Dockerfile.target | 8 + examples/dotnet/Program.cs | 262 +- examples/dotnet/Pulumi.yaml | 8 +- examples/dotnet/app/Dockerfile | 2 + examples/dotnet/app/Dockerfile.buildArgs | 5 + examples/dotnet/app/Dockerfile.emptyContext | 2 + examples/dotnet/app/Dockerfile.extraHosts | 3 + examples/dotnet/app/Dockerfile.multiPlatform | 7 + examples/dotnet/app/Dockerfile.namedContexts | 5 + examples/dotnet/app/Dockerfile.secrets | 4 + examples/dotnet/app/Dockerfile.sshMount | 5 + examples/dotnet/app/Dockerfile.target | 8 + ...ld.csproj => provider-docker-build.csproj} | 4 +- examples/dotnet_test.go | 2 +- examples/go/Pulumi.yaml | 8 +- examples/go/app/Dockerfile | 2 + examples/go/app/Dockerfile.buildArgs | 5 + examples/go/app/Dockerfile.emptyContext | 2 + examples/go/app/Dockerfile.extraHosts | 3 + examples/go/app/Dockerfile.multiPlatform | 7 + examples/go/app/Dockerfile.namedContexts | 5 + examples/go/app/Dockerfile.secrets | 4 + examples/go/app/Dockerfile.sshMount | 5 + examples/go/app/Dockerfile.target | 8 + examples/go/go.mod | 2 +- examples/go/main.go | 225 +- examples/go_test.go | 2 +- examples/java/Pulumi.yaml | 8 +- examples/java/app/Dockerfile | 2 + examples/java/app/Dockerfile.buildArgs | 5 + examples/java/app/Dockerfile.emptyContext | 2 + examples/java/app/Dockerfile.extraHosts | 3 + examples/java/app/Dockerfile.multiPlatform | 7 + examples/java/app/Dockerfile.namedContexts | 5 + examples/java/app/Dockerfile.secrets | 4 + examples/java/app/Dockerfile.sshMount | 5 + examples/java/app/Dockerfile.target | 8 + examples/java/pom.xml | 4 +- .../src/main/java/generated_program/App.java | 190 +- examples/main_test.go | 61 + examples/nodejs/Pulumi.yaml | 8 +- examples/nodejs/app/Dockerfile | 2 + examples/nodejs/app/Dockerfile.buildArgs | 5 + examples/nodejs/app/Dockerfile.emptyContext | 2 + examples/nodejs/app/Dockerfile.extraHosts | 3 + examples/nodejs/app/Dockerfile.multiPlatform | 7 + examples/nodejs/app/Dockerfile.namedContexts | 5 + examples/nodejs/app/Dockerfile.secrets | 4 + examples/nodejs/app/Dockerfile.sshMount | 5 + examples/nodejs/app/Dockerfile.target | 8 + examples/nodejs/index.ts | 173 +- examples/nodejs/package.json | 3 +- examples/nodejs_test.go | 2 +- examples/python/Pulumi.yaml | 8 +- examples/python/__main__.py | 159 +- examples/python/app/Dockerfile | 2 + examples/python/app/Dockerfile.buildArgs | 5 + examples/python/app/Dockerfile.emptyContext | 2 + examples/python/app/Dockerfile.extraHosts | 3 + examples/python/app/Dockerfile.multiPlatform | 7 + examples/python/app/Dockerfile.namedContexts | 5 + examples/python/app/Dockerfile.secrets | 4 + examples/python/app/Dockerfile.sshMount | 5 + examples/python/app/Dockerfile.target | 8 + examples/python_test.go | 3 +- .../upgrade/0.0.1/grpc.json | 238 + .../upgrade/0.0.1/state.json | 856 ++ examples/tests/dockerhub/.dockerignore | 1 + examples/tests/dockerhub/Pulumi.yaml | 34 + examples/tests/ecr/.dockerignore | 1 + examples/tests/ecr/Pulumi.yaml | 40 + examples/tests/unauthenticated/.dockerignore | 1 + examples/tests/unauthenticated/Pulumi.yaml | 19 + examples/upgrade/Pulumi.yaml | 187 + examples/upgrade/README.md | 15 + examples/upgrade/app/Dockerfile | 2 + examples/upgrade/app/Dockerfile.buildArgs | 5 + examples/upgrade/app/Dockerfile.emptyContext | 2 + examples/upgrade/app/Dockerfile.extraHosts | 3 + examples/upgrade/app/Dockerfile.multiPlatform | 7 + examples/upgrade/app/Dockerfile.namedContexts | 5 + examples/upgrade/app/Dockerfile.secrets | 4 + examples/upgrade/app/Dockerfile.sshMount | 5 + examples/upgrade/app/Dockerfile.target | 8 + examples/yaml/Pulumi.yaml | 192 +- examples/yaml/app/Dockerfile | 2 + examples/yaml/app/Dockerfile.buildArgs | 5 + examples/yaml/app/Dockerfile.emptyContext | 2 + examples/yaml/app/Dockerfile.extraHosts | 3 + examples/yaml/app/Dockerfile.multiPlatform | 7 + examples/yaml/app/Dockerfile.namedContexts | 5 + examples/yaml/app/Dockerfile.secrets | 4 + examples/yaml/app/Dockerfile.sshMount | 5 + examples/yaml/app/Dockerfile.target | 8 + examples/yaml_test.go | 69 + go.mod | 443 +- go.sum | 1678 +++- .../cmd/pulumi-resource-docker-build/main.go | 16 +- .../pulumi-resource-docker-build/schema.json | 1428 +++- provider/doc.go | 16 + provider/internal/auth.go | 31 + provider/internal/builder.go | 38 + provider/internal/cache.go | 746 ++ provider/internal/cache_test.go | 139 + provider/internal/cli.go | 420 + provider/internal/cli_test.go | 108 + provider/internal/client.go | 367 + provider/internal/client_test.go | 481 ++ provider/internal/context.go | 345 + provider/internal/context_test.go | 417 + provider/internal/coverage.out | 870 ++ provider/internal/dedent.go | 27 + provider/internal/dedent_test.go | 51 + .../internal/deprecated/configencoding.go | 213 + .../deprecated/configencoding_test.go | 295 + provider/internal/deprecated/doc.go | 19 + provider/internal/doc.go | 63 + provider/internal/dockerfile.go | 108 + provider/internal/dockerfile_test.go | 102 + provider/internal/embed/image-examples.md | 1862 +++++ provider/internal/embed/image-migration.md | 224 + provider/internal/embed/index-examples.md | 408 + provider/internal/export.go | 475 ++ provider/internal/export_test.go | 246 + provider/internal/host.go | 163 + provider/internal/image.go | 1012 +++ provider/internal/image_test.go | 994 +++ provider/internal/index.go | 335 + provider/internal/index_test.go | 210 + provider/internal/metadata.json | 1 + provider/internal/mockcli_test.go | 737 ++ provider/internal/mockclient_test.go | 494 ++ provider/internal/mockprovidercontext_test.go | 386 + provider/internal/network.go | 53 + provider/internal/platform.go | 79 + provider/internal/preview.go | 117 + provider/internal/provider.go | 135 + provider/internal/provider_test.go | 82 + provider/internal/providercontext.go | 27 + provider/internal/ssh.go | 79 + provider/internal/ssh_test.go | 52 + provider/internal/testdata/Dockerfile.invalid | 2 + .../dockerfile-location-irrelevant/app/foo.sh | 3 + .../step1.Dockerfile | 5 + .../step2.Dockerfile | 5 + .../filemode-matters/step1/Dockerfile | 5 + .../testdata/filemode-matters/step1/foo.sh | 3 + .../filemode-matters/step2-chmod-x/Dockerfile | 5 + .../filemode-matters/step2-chmod-x/foo.sh | 3 + .../.dockerignore | 7 + .../basedir-modified-ignored-file/Dockerfile | 5 + .../projects/foo/src/app.js | 1 + .../.dockerignore | 7 + .../basedir-modified-included-file/Dockerfile | 5 + .../projects/foo/src/app.js | 1 + .../ignores-wildcard/basedir/.dockerignore | 7 + .../ignores-wildcard/basedir/Dockerfile | 5 + .../basedir/projects/foo/src/app.js | 1 + .../basedir-with-ignored-files/.dockerignore | 3 + .../basedir-with-ignored-files/Dockerfile | 5 + .../basedir-with-ignored-files/bar/app.js | 1 + .../basedir-with-ignored-files/bar/ignored.js | 0 .../basedir-with-ignored-files/foo.txt | 1 + .../basedir-with-ignored-files/ignored.txt | 0 .../testdata/ignores/basedir/Dockerfile | 5 + .../testdata/ignores/basedir/bar/app.js | 1 + .../internal/testdata/ignores/basedir/foo.txt | 1 + provider/internal/testdata/noop/Dockerfile | 1 + .../renaming-matters/step1/Dockerfile | 5 + .../testdata/renaming-matters/step1/foo.a.txt | 1 + .../renaming-matters/step2/Dockerfile | 5 + .../testdata/renaming-matters/step2/foo.b.txt | 1 + .../internal/testdata/symlinks/Dockerfile | 5 + .../testdata/symlinks/linkedFromDeep.txt | 1 + .../testdata/symlinks/linkedToDeep.txt | 1 + .../proxy-for-sub/dir/linkedFromTop.txt | 1 + .../proxy-for-sub/dir/linkedToTop.txt | 1 + .../symlinks/sub/dir/linkedFromTop.txt | 1 + .../testdata/symlinks/sub/dir/linkedToTop.txt | 1 + .../.dockerignore | 6 + .../basedir-with-unignored-files/Dockerfile | 5 + .../top-dir/subdir/app.js | 1 + .../top-dir/subdir/ignored.js | 0 .../testdata/unignores/basedir/Dockerfile | 5 + .../unignores/basedir/top-dir/subdir/app.js | 1 + .../basedir/top-dir/subdir/ignored.js | 0 provider/provider.go | 162 +- provider/provider_test.go | 59 +- sdk/dotnet/Config/Config.cs | 72 + sdk/dotnet/Config/README.md | 1 + sdk/dotnet/Enums.cs | 173 + sdk/dotnet/Image.cs | 1120 +++ sdk/dotnet/Index.cs | 259 + sdk/dotnet/Inputs/BuildContextArgs.cs | 50 + sdk/dotnet/Inputs/BuilderConfigArgs.cs | 31 + sdk/dotnet/Inputs/CacheFromArgs.cs | 67 + sdk/dotnet/Inputs/CacheFromAzureBlobArgs.cs | 48 + .../Inputs/CacheFromGitHubActionsArgs.cs | 63 + sdk/dotnet/Inputs/CacheFromLocalArgs.cs | 32 + sdk/dotnet/Inputs/CacheFromRegistryArgs.cs | 26 + sdk/dotnet/Inputs/CacheFromS3Args.cs | 104 + sdk/dotnet/Inputs/CacheToArgs.cs | 75 + sdk/dotnet/Inputs/CacheToAzureBlobArgs.cs | 62 + sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs | 77 + sdk/dotnet/Inputs/CacheToInlineArgs.cs | 23 + sdk/dotnet/Inputs/CacheToLocalArgs.cs | 61 + sdk/dotnet/Inputs/CacheToRegistryArgs.cs | 82 + sdk/dotnet/Inputs/CacheToS3Args.cs | 118 + sdk/dotnet/Inputs/ContextArgs.cs | 33 + sdk/dotnet/Inputs/DockerfileArgs.cs | 42 + sdk/dotnet/Inputs/ExportArgs.cs | 76 + sdk/dotnet/Inputs/ExportCacheOnlyArgs.cs | 20 + sdk/dotnet/Inputs/ExportDockerArgs.cs | 85 + sdk/dotnet/Inputs/ExportImageArgs.cs | 122 + sdk/dotnet/Inputs/ExportLocalArgs.cs | 26 + sdk/dotnet/Inputs/ExportOCIArgs.cs | 85 + sdk/dotnet/Inputs/ExportRegistryArgs.cs | 123 + sdk/dotnet/Inputs/ExportTarArgs.cs | 26 + sdk/dotnet/Inputs/RegistryArgs.cs | 48 + sdk/dotnet/Inputs/SSHArgs.cs | 48 + sdk/dotnet/Outputs/BuildContext.cs | 47 + sdk/dotnet/Outputs/BuilderConfig.cs | 32 + sdk/dotnet/Outputs/CacheFrom.cs | 75 + sdk/dotnet/Outputs/CacheFromAzureBlob.cs | 42 + sdk/dotnet/Outputs/CacheFromGitHubActions.cs | 54 + sdk/dotnet/Outputs/CacheFromLocal.cs | 35 + sdk/dotnet/Outputs/CacheFromRegistry.cs | 27 + sdk/dotnet/Outputs/CacheFromS3.cs | 91 + sdk/dotnet/Outputs/CacheTo.cs | 84 + sdk/dotnet/Outputs/CacheToAzureBlob.cs | 56 + sdk/dotnet/Outputs/CacheToGitHubActions.cs | 68 + sdk/dotnet/Outputs/CacheToInline.cs | 24 + sdk/dotnet/Outputs/CacheToLocal.cs | 63 + sdk/dotnet/Outputs/CacheToRegistry.cs | 84 + sdk/dotnet/Outputs/CacheToS3.cs | 105 + sdk/dotnet/Outputs/Context.cs | 34 + sdk/dotnet/Outputs/Dockerfile.cs | 45 + sdk/dotnet/Outputs/Export.cs | 86 + sdk/dotnet/Outputs/ExportCacheOnly.cs | 21 + sdk/dotnet/Outputs/ExportDocker.cs | 77 + sdk/dotnet/Outputs/ExportImage.cs | 119 + sdk/dotnet/Outputs/ExportLocal.cs | 27 + sdk/dotnet/Outputs/ExportOCI.cs | 77 + sdk/dotnet/Outputs/ExportRegistry.cs | 119 + sdk/dotnet/Outputs/ExportTar.cs | 27 + sdk/dotnet/Outputs/Registry.cs | 42 + sdk/dotnet/Outputs/SSH.cs | 45 + sdk/dotnet/Provider.cs | 29 +- ...build.csproj => Pulumi.DockerBuild.csproj} | 8 +- sdk/dotnet/README.md | 2 +- sdk/dotnet/Random.cs | 75 - sdk/dotnet/Utilities.cs | 9 +- sdk/dotnet/pulumi-plugin.json | 3 +- sdk/go/dockerbuild/config/config.go | 28 + sdk/go/dockerbuild/doc.go | 2 +- sdk/go/dockerbuild/go.mod | 53 +- sdk/go/dockerbuild/go.sum | 127 +- sdk/go/dockerbuild/image.go | 1363 ++++ sdk/go/dockerbuild/index.go | 307 + sdk/go/dockerbuild/init.go | 14 +- .../dockerbuild/internal/pulumiUtilities.go | 6 +- sdk/go/dockerbuild/provider.go | 55 +- sdk/go/dockerbuild/pulumi-plugin.json | 3 +- sdk/go/dockerbuild/pulumiEnums.go | 886 ++ sdk/go/dockerbuild/pulumiTypes.go | 7217 +++++++++++++++++ sdk/go/dockerbuild/random.go | 110 - sdk/go/dockerbuild/x/config/config.go | 28 + sdk/go/dockerbuild/x/doc.go | 2 + sdk/go/dockerbuild/x/image.go | 1376 ++++ sdk/go/dockerbuild/x/index.go | 288 + sdk/go/dockerbuild/x/init.go | 68 + sdk/go/dockerbuild/x/provider.go | 88 + sdk/go/dockerbuild/x/pulumiEnums.go | 68 + sdk/go/dockerbuild/x/pulumiTypes.go | 3413 ++++++++ sdk/java/README.md | 2 +- sdk/java/settings.gradle | 2 +- .../java/com/pulumi/dockerbuild/Config.java | 26 + .../java/com/pulumi/dockerbuild/Image.java | 1257 +++ .../com/pulumi/dockerbuild/ImageArgs.java | 1389 ++++ .../java/com/pulumi/dockerbuild/Index.java | 253 + .../com/pulumi/dockerbuild/IndexArgs.java | 232 + .../java/com/pulumi/dockerbuild/Provider.java | 22 +- .../com/pulumi/dockerbuild/ProviderArgs.java | 82 +- .../java/com/pulumi/dockerbuild/Random.java | 78 - .../com/pulumi/dockerbuild/RandomArgs.java | 65 - .../com/pulumi/dockerbuild/Utilities.java | 2 +- .../pulumi/dockerbuild/enums/CacheMode.java | 41 + .../dockerbuild/enums/CompressionType.java | 46 + .../pulumi/dockerbuild/enums/NetworkMode.java | 46 + .../pulumi/dockerbuild/enums/Platform.java | 59 + .../dockerbuild/inputs/BuildContextArgs.java | 174 + .../dockerbuild/inputs/BuilderConfigArgs.java | 103 + .../dockerbuild/inputs/CacheFromArgs.java | 331 + .../inputs/CacheFromAzureBlobArgs.java | 161 + .../inputs/CacheFromGitHubActionsArgs.java | 209 + .../inputs/CacheFromLocalArgs.java | 124 + .../inputs/CacheFromRegistryArgs.java | 85 + .../dockerbuild/inputs/CacheFromS3Args.java | 426 + .../dockerbuild/inputs/CacheToArgs.java | 377 + .../inputs/CacheToAzureBlobArgs.java | 240 + .../inputs/CacheToGitHubActionsArgs.java | 287 + .../dockerbuild/inputs/CacheToInlineArgs.java | 32 + .../dockerbuild/inputs/CacheToLocalArgs.java | 282 + .../inputs/CacheToRegistryArgs.java | 386 + .../dockerbuild/inputs/CacheToS3Args.java | 503 ++ .../dockerbuild/inputs/ContextArgs.java | 113 + .../dockerbuild/inputs/DockerfileArgs.java | 160 + .../pulumi/dockerbuild/inputs/ExportArgs.java | 395 + .../inputs/ExportCacheOnlyArgs.java | 28 + .../dockerbuild/inputs/ExportDockerArgs.java | 363 + .../dockerbuild/inputs/ExportImageArgs.java | 576 ++ .../dockerbuild/inputs/ExportLocalArgs.java | 85 + .../dockerbuild/inputs/ExportOCIArgs.java | 363 + .../inputs/ExportRegistryArgs.java | 577 ++ .../dockerbuild/inputs/ExportTarArgs.java | 85 + .../pulumi/dockerbuild/inputs/Registry.java | 102 + .../dockerbuild/inputs/RegistryArgs.java | 161 + .../pulumi/dockerbuild/inputs/SSHArgs.java | 182 + .../dockerbuild/outputs/BuildContext.java | 106 + .../dockerbuild/outputs/BuilderConfig.java | 67 + .../pulumi/dockerbuild/outputs/CacheFrom.java | 199 + .../outputs/CacheFromAzureBlob.java | 102 + .../outputs/CacheFromGitHubActions.java | 123 + .../dockerbuild/outputs/CacheFromLocal.java | 81 + .../outputs/CacheFromRegistry.java | 58 + .../dockerbuild/outputs/CacheFromS3.java | 252 + .../pulumi/dockerbuild/outputs/CacheTo.java | 225 + .../dockerbuild/outputs/CacheToAzureBlob.java | 146 + .../outputs/CacheToGitHubActions.java | 167 + .../dockerbuild/outputs/CacheToInline.java | 32 + .../dockerbuild/outputs/CacheToLocal.java | 169 + .../dockerbuild/outputs/CacheToRegistry.java | 225 + .../pulumi/dockerbuild/outputs/CacheToS3.java | 295 + .../pulumi/dockerbuild/outputs/Context.java | 72 + .../dockerbuild/outputs/Dockerfile.java | 98 + .../pulumi/dockerbuild/outputs/Export.java | 237 + .../dockerbuild/outputs/ExportCacheOnly.java | 32 + .../dockerbuild/outputs/ExportDocker.java | 212 + .../dockerbuild/outputs/ExportImage.java | 331 + .../dockerbuild/outputs/ExportLocal.java | 58 + .../pulumi/dockerbuild/outputs/ExportOCI.java | 212 + .../dockerbuild/outputs/ExportRegistry.java | 331 + .../pulumi/dockerbuild/outputs/ExportTar.java | 58 + .../pulumi/dockerbuild/outputs/Registry.java | 102 + .../com/pulumi/dockerbuild/outputs/SSH.java | 104 + sdk/nodejs/README.md | 117 +- sdk/nodejs/config/index.ts | 5 + sdk/nodejs/config/vars.ts | 31 + sdk/nodejs/image.ts | 984 +++ sdk/nodejs/index.ts | 37 +- sdk/nodejs/index_.ts | 196 + sdk/nodejs/package.json | 15 +- sdk/nodejs/provider.ts | 16 +- sdk/nodejs/random.ts | 67 - sdk/nodejs/tsconfig.json | 9 +- sdk/nodejs/types/enums/index.ts | 83 + sdk/nodejs/types/index.ts | 15 + sdk/nodejs/types/input.ts | 908 +++ sdk/nodejs/types/output.ts | 909 +++ sdk/nodejs/utilities.ts | 2 +- sdk/python/README.md | 117 +- sdk/python/pulumi_docker_build/README.md | 1 + sdk/python/pulumi_docker_build/__init__.py | 46 + sdk/python/pulumi_docker_build/_enums.py | 84 + sdk/python/pulumi_docker_build/_inputs.py | 2672 ++++++ .../_utilities.py | 2 +- .../pulumi_docker_build/config/__init__.py | 8 + .../pulumi_docker_build/config/__init__.pyi | 19 + sdk/python/pulumi_docker_build/config/vars.py | 29 + sdk/python/pulumi_docker_build/image.py | 1799 ++++ sdk/python/pulumi_docker_build/index.py | 376 + sdk/python/pulumi_docker_build/outputs.py | 2399 ++++++ .../provider.py | 57 +- .../pulumi_docker_build/pulumi-plugin.json | 4 + sdk/python/pulumi_docker_build/py.typed | 0 sdk/python/pulumi_dockerbuild/README.md | 1 - sdk/python/pulumi_dockerbuild/__init__.py | 33 - .../pulumi_dockerbuild/pulumi-plugin.json | 5 - sdk/python/pulumi_dockerbuild/random.py | 117 - sdk/python/pyproject.toml | 14 +- tools/tools.go | 2 + 398 files changed, 65361 insertions(+), 1702 deletions(-) create mode 100644 docs/generate.go create mode 100644 docs/yaml/image-examples.yaml create mode 100644 docs/yaml/index-examples.yaml create mode 100644 examples/app/Dockerfile create mode 100644 examples/app/Dockerfile.buildArgs create mode 100644 examples/app/Dockerfile.emptyContext create mode 100644 examples/app/Dockerfile.extraHosts create mode 100644 examples/app/Dockerfile.multiPlatform create mode 100644 examples/app/Dockerfile.namedContexts create mode 100644 examples/app/Dockerfile.secrets create mode 100644 examples/app/Dockerfile.sshMount create mode 100644 examples/app/Dockerfile.target create mode 100644 examples/dotnet/app/Dockerfile create mode 100644 examples/dotnet/app/Dockerfile.buildArgs create mode 100644 examples/dotnet/app/Dockerfile.emptyContext create mode 100644 examples/dotnet/app/Dockerfile.extraHosts create mode 100644 examples/dotnet/app/Dockerfile.multiPlatform create mode 100644 examples/dotnet/app/Dockerfile.namedContexts create mode 100644 examples/dotnet/app/Dockerfile.secrets create mode 100644 examples/dotnet/app/Dockerfile.sshMount create mode 100644 examples/dotnet/app/Dockerfile.target rename examples/dotnet/{provider-dockerbuild.csproj => provider-docker-build.csproj} (70%) create mode 100644 examples/go/app/Dockerfile create mode 100644 examples/go/app/Dockerfile.buildArgs create mode 100644 examples/go/app/Dockerfile.emptyContext create mode 100644 examples/go/app/Dockerfile.extraHosts create mode 100644 examples/go/app/Dockerfile.multiPlatform create mode 100644 examples/go/app/Dockerfile.namedContexts create mode 100644 examples/go/app/Dockerfile.secrets create mode 100644 examples/go/app/Dockerfile.sshMount create mode 100644 examples/go/app/Dockerfile.target create mode 100644 examples/java/app/Dockerfile create mode 100644 examples/java/app/Dockerfile.buildArgs create mode 100644 examples/java/app/Dockerfile.emptyContext create mode 100644 examples/java/app/Dockerfile.extraHosts create mode 100644 examples/java/app/Dockerfile.multiPlatform create mode 100644 examples/java/app/Dockerfile.namedContexts create mode 100644 examples/java/app/Dockerfile.secrets create mode 100644 examples/java/app/Dockerfile.sshMount create mode 100644 examples/java/app/Dockerfile.target create mode 100644 examples/main_test.go create mode 100644 examples/nodejs/app/Dockerfile create mode 100644 examples/nodejs/app/Dockerfile.buildArgs create mode 100644 examples/nodejs/app/Dockerfile.emptyContext create mode 100644 examples/nodejs/app/Dockerfile.extraHosts create mode 100644 examples/nodejs/app/Dockerfile.multiPlatform create mode 100644 examples/nodejs/app/Dockerfile.namedContexts create mode 100644 examples/nodejs/app/Dockerfile.secrets create mode 100644 examples/nodejs/app/Dockerfile.sshMount create mode 100644 examples/nodejs/app/Dockerfile.target create mode 100644 examples/python/app/Dockerfile create mode 100644 examples/python/app/Dockerfile.buildArgs create mode 100644 examples/python/app/Dockerfile.emptyContext create mode 100644 examples/python/app/Dockerfile.extraHosts create mode 100644 examples/python/app/Dockerfile.multiPlatform create mode 100644 examples/python/app/Dockerfile.namedContexts create mode 100644 examples/python/app/Dockerfile.secrets create mode 100644 examples/python/app/Dockerfile.sshMount create mode 100644 examples/python/app/Dockerfile.target create mode 100644 examples/testdata/recorded/TestProviderUpgrade/upgrade/0.0.1/grpc.json create mode 100755 examples/testdata/recorded/TestProviderUpgrade/upgrade/0.0.1/state.json create mode 100644 examples/tests/dockerhub/.dockerignore create mode 100644 examples/tests/dockerhub/Pulumi.yaml create mode 100644 examples/tests/ecr/.dockerignore create mode 100644 examples/tests/ecr/Pulumi.yaml create mode 100644 examples/tests/unauthenticated/.dockerignore create mode 100644 examples/tests/unauthenticated/Pulumi.yaml create mode 100644 examples/upgrade/Pulumi.yaml create mode 100644 examples/upgrade/README.md create mode 100644 examples/upgrade/app/Dockerfile create mode 100644 examples/upgrade/app/Dockerfile.buildArgs create mode 100644 examples/upgrade/app/Dockerfile.emptyContext create mode 100644 examples/upgrade/app/Dockerfile.extraHosts create mode 100644 examples/upgrade/app/Dockerfile.multiPlatform create mode 100644 examples/upgrade/app/Dockerfile.namedContexts create mode 100644 examples/upgrade/app/Dockerfile.secrets create mode 100644 examples/upgrade/app/Dockerfile.sshMount create mode 100644 examples/upgrade/app/Dockerfile.target create mode 100644 examples/yaml/app/Dockerfile create mode 100644 examples/yaml/app/Dockerfile.buildArgs create mode 100644 examples/yaml/app/Dockerfile.emptyContext create mode 100644 examples/yaml/app/Dockerfile.extraHosts create mode 100644 examples/yaml/app/Dockerfile.multiPlatform create mode 100644 examples/yaml/app/Dockerfile.namedContexts create mode 100644 examples/yaml/app/Dockerfile.secrets create mode 100644 examples/yaml/app/Dockerfile.sshMount create mode 100644 examples/yaml/app/Dockerfile.target create mode 100644 provider/doc.go create mode 100644 provider/internal/auth.go create mode 100644 provider/internal/builder.go create mode 100644 provider/internal/cache.go create mode 100644 provider/internal/cache_test.go create mode 100644 provider/internal/cli.go create mode 100644 provider/internal/cli_test.go create mode 100644 provider/internal/client.go create mode 100644 provider/internal/client_test.go create mode 100644 provider/internal/context.go create mode 100644 provider/internal/context_test.go create mode 100644 provider/internal/coverage.out create mode 100644 provider/internal/dedent.go create mode 100644 provider/internal/dedent_test.go create mode 100644 provider/internal/deprecated/configencoding.go create mode 100644 provider/internal/deprecated/configencoding_test.go create mode 100644 provider/internal/deprecated/doc.go create mode 100644 provider/internal/doc.go create mode 100644 provider/internal/dockerfile.go create mode 100644 provider/internal/dockerfile_test.go create mode 100644 provider/internal/embed/image-examples.md create mode 100644 provider/internal/embed/image-migration.md create mode 100644 provider/internal/embed/index-examples.md create mode 100644 provider/internal/export.go create mode 100644 provider/internal/export_test.go create mode 100644 provider/internal/host.go create mode 100644 provider/internal/image.go create mode 100644 provider/internal/image_test.go create mode 100644 provider/internal/index.go create mode 100644 provider/internal/index_test.go create mode 100644 provider/internal/metadata.json create mode 100644 provider/internal/mockcli_test.go create mode 100644 provider/internal/mockclient_test.go create mode 100644 provider/internal/mockprovidercontext_test.go create mode 100644 provider/internal/network.go create mode 100644 provider/internal/platform.go create mode 100644 provider/internal/preview.go create mode 100644 provider/internal/provider.go create mode 100644 provider/internal/provider_test.go create mode 100644 provider/internal/providercontext.go create mode 100644 provider/internal/ssh.go create mode 100644 provider/internal/ssh_test.go create mode 100644 provider/internal/testdata/Dockerfile.invalid create mode 100644 provider/internal/testdata/dockerfile-location-irrelevant/app/foo.sh create mode 100644 provider/internal/testdata/dockerfile-location-irrelevant/step1.Dockerfile create mode 100644 provider/internal/testdata/dockerfile-location-irrelevant/step2.Dockerfile create mode 100644 provider/internal/testdata/filemode-matters/step1/Dockerfile create mode 100644 provider/internal/testdata/filemode-matters/step1/foo.sh create mode 100644 provider/internal/testdata/filemode-matters/step2-chmod-x/Dockerfile create mode 100755 provider/internal/testdata/filemode-matters/step2-chmod-x/foo.sh create mode 100644 provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/.dockerignore create mode 100644 provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/Dockerfile create mode 100644 provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/projects/foo/src/app.js create mode 100644 provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/.dockerignore create mode 100644 provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/Dockerfile create mode 100644 provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/projects/foo/src/app.js create mode 100644 provider/internal/testdata/ignores-wildcard/basedir/.dockerignore create mode 100644 provider/internal/testdata/ignores-wildcard/basedir/Dockerfile create mode 100644 provider/internal/testdata/ignores-wildcard/basedir/projects/foo/src/app.js create mode 100644 provider/internal/testdata/ignores/basedir-with-ignored-files/.dockerignore create mode 100644 provider/internal/testdata/ignores/basedir-with-ignored-files/Dockerfile create mode 100644 provider/internal/testdata/ignores/basedir-with-ignored-files/bar/app.js rename sdk/python/pulumi_dockerbuild/py.typed => provider/internal/testdata/ignores/basedir-with-ignored-files/bar/ignored.js (100%) create mode 100644 provider/internal/testdata/ignores/basedir-with-ignored-files/foo.txt create mode 100644 provider/internal/testdata/ignores/basedir-with-ignored-files/ignored.txt create mode 100644 provider/internal/testdata/ignores/basedir/Dockerfile create mode 100644 provider/internal/testdata/ignores/basedir/bar/app.js create mode 100644 provider/internal/testdata/ignores/basedir/foo.txt create mode 100644 provider/internal/testdata/noop/Dockerfile create mode 100644 provider/internal/testdata/renaming-matters/step1/Dockerfile create mode 100644 provider/internal/testdata/renaming-matters/step1/foo.a.txt create mode 100644 provider/internal/testdata/renaming-matters/step2/Dockerfile create mode 100644 provider/internal/testdata/renaming-matters/step2/foo.b.txt create mode 100644 provider/internal/testdata/symlinks/Dockerfile create mode 100644 provider/internal/testdata/symlinks/linkedFromDeep.txt create mode 100644 provider/internal/testdata/symlinks/linkedToDeep.txt create mode 100644 provider/internal/testdata/symlinks/proxy-for-sub/dir/linkedFromTop.txt create mode 100644 provider/internal/testdata/symlinks/proxy-for-sub/dir/linkedToTop.txt create mode 100644 provider/internal/testdata/symlinks/sub/dir/linkedFromTop.txt create mode 100644 provider/internal/testdata/symlinks/sub/dir/linkedToTop.txt create mode 100644 provider/internal/testdata/unignores/basedir-with-unignored-files/.dockerignore create mode 100644 provider/internal/testdata/unignores/basedir-with-unignored-files/Dockerfile create mode 100644 provider/internal/testdata/unignores/basedir-with-unignored-files/top-dir/subdir/app.js create mode 100644 provider/internal/testdata/unignores/basedir-with-unignored-files/top-dir/subdir/ignored.js create mode 100644 provider/internal/testdata/unignores/basedir/Dockerfile create mode 100644 provider/internal/testdata/unignores/basedir/top-dir/subdir/app.js create mode 100644 provider/internal/testdata/unignores/basedir/top-dir/subdir/ignored.js create mode 100644 sdk/dotnet/Config/Config.cs create mode 100644 sdk/dotnet/Config/README.md create mode 100644 sdk/dotnet/Enums.cs create mode 100644 sdk/dotnet/Image.cs create mode 100644 sdk/dotnet/Index.cs create mode 100644 sdk/dotnet/Inputs/BuildContextArgs.cs create mode 100644 sdk/dotnet/Inputs/BuilderConfigArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheFromArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheFromAzureBlobArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheFromLocalArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheFromRegistryArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheFromS3Args.cs create mode 100644 sdk/dotnet/Inputs/CacheToArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheToAzureBlobArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheToInlineArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheToLocalArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheToRegistryArgs.cs create mode 100644 sdk/dotnet/Inputs/CacheToS3Args.cs create mode 100644 sdk/dotnet/Inputs/ContextArgs.cs create mode 100644 sdk/dotnet/Inputs/DockerfileArgs.cs create mode 100644 sdk/dotnet/Inputs/ExportArgs.cs create mode 100644 sdk/dotnet/Inputs/ExportCacheOnlyArgs.cs create mode 100644 sdk/dotnet/Inputs/ExportDockerArgs.cs create mode 100644 sdk/dotnet/Inputs/ExportImageArgs.cs create mode 100644 sdk/dotnet/Inputs/ExportLocalArgs.cs create mode 100644 sdk/dotnet/Inputs/ExportOCIArgs.cs create mode 100644 sdk/dotnet/Inputs/ExportRegistryArgs.cs create mode 100644 sdk/dotnet/Inputs/ExportTarArgs.cs create mode 100644 sdk/dotnet/Inputs/RegistryArgs.cs create mode 100644 sdk/dotnet/Inputs/SSHArgs.cs create mode 100644 sdk/dotnet/Outputs/BuildContext.cs create mode 100644 sdk/dotnet/Outputs/BuilderConfig.cs create mode 100644 sdk/dotnet/Outputs/CacheFrom.cs create mode 100644 sdk/dotnet/Outputs/CacheFromAzureBlob.cs create mode 100644 sdk/dotnet/Outputs/CacheFromGitHubActions.cs create mode 100644 sdk/dotnet/Outputs/CacheFromLocal.cs create mode 100644 sdk/dotnet/Outputs/CacheFromRegistry.cs create mode 100644 sdk/dotnet/Outputs/CacheFromS3.cs create mode 100644 sdk/dotnet/Outputs/CacheTo.cs create mode 100644 sdk/dotnet/Outputs/CacheToAzureBlob.cs create mode 100644 sdk/dotnet/Outputs/CacheToGitHubActions.cs create mode 100644 sdk/dotnet/Outputs/CacheToInline.cs create mode 100644 sdk/dotnet/Outputs/CacheToLocal.cs create mode 100644 sdk/dotnet/Outputs/CacheToRegistry.cs create mode 100644 sdk/dotnet/Outputs/CacheToS3.cs create mode 100644 sdk/dotnet/Outputs/Context.cs create mode 100644 sdk/dotnet/Outputs/Dockerfile.cs create mode 100644 sdk/dotnet/Outputs/Export.cs create mode 100644 sdk/dotnet/Outputs/ExportCacheOnly.cs create mode 100644 sdk/dotnet/Outputs/ExportDocker.cs create mode 100644 sdk/dotnet/Outputs/ExportImage.cs create mode 100644 sdk/dotnet/Outputs/ExportLocal.cs create mode 100644 sdk/dotnet/Outputs/ExportOCI.cs create mode 100644 sdk/dotnet/Outputs/ExportRegistry.cs create mode 100644 sdk/dotnet/Outputs/ExportTar.cs create mode 100644 sdk/dotnet/Outputs/Registry.cs create mode 100644 sdk/dotnet/Outputs/SSH.cs rename sdk/dotnet/{Pulumi.Dockerbuild.csproj => Pulumi.DockerBuild.csproj} (83%) delete mode 100644 sdk/dotnet/Random.cs create mode 100644 sdk/go/dockerbuild/config/config.go create mode 100644 sdk/go/dockerbuild/image.go create mode 100644 sdk/go/dockerbuild/index.go create mode 100644 sdk/go/dockerbuild/pulumiEnums.go create mode 100644 sdk/go/dockerbuild/pulumiTypes.go delete mode 100644 sdk/go/dockerbuild/random.go create mode 100644 sdk/go/dockerbuild/x/config/config.go create mode 100644 sdk/go/dockerbuild/x/doc.go create mode 100644 sdk/go/dockerbuild/x/image.go create mode 100644 sdk/go/dockerbuild/x/index.go create mode 100644 sdk/go/dockerbuild/x/init.go create mode 100644 sdk/go/dockerbuild/x/provider.go create mode 100644 sdk/go/dockerbuild/x/pulumiEnums.go create mode 100644 sdk/go/dockerbuild/x/pulumiTypes.go create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/Config.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/Image.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/ImageArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/Index.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/IndexArgs.java delete mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/Random.java delete mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/RandomArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/enums/CacheMode.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/enums/CompressionType.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/enums/NetworkMode.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/enums/Platform.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/BuildContextArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/BuilderConfigArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromAzureBlobArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromGitHubActionsArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromLocalArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromRegistryArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromS3Args.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToAzureBlobArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToGitHubActionsArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToInlineArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToLocalArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToRegistryArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToS3Args.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ContextArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/DockerfileArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportCacheOnlyArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportDockerArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportImageArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportLocalArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportOCIArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportRegistryArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportTarArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/Registry.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/RegistryArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/SSHArgs.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/BuildContext.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/BuilderConfig.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFrom.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromAzureBlob.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromGitHubActions.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromLocal.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromRegistry.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromS3.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheTo.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToAzureBlob.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToGitHubActions.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToInline.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToLocal.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToRegistry.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToS3.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Context.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Dockerfile.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Export.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportCacheOnly.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportDocker.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportImage.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportLocal.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportOCI.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportRegistry.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportTar.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Registry.java create mode 100644 sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/SSH.java create mode 100644 sdk/nodejs/config/index.ts create mode 100644 sdk/nodejs/config/vars.ts create mode 100644 sdk/nodejs/image.ts create mode 100644 sdk/nodejs/index_.ts delete mode 100644 sdk/nodejs/random.ts create mode 100644 sdk/nodejs/types/enums/index.ts create mode 100644 sdk/nodejs/types/index.ts create mode 100644 sdk/nodejs/types/input.ts create mode 100644 sdk/nodejs/types/output.ts create mode 100644 sdk/python/pulumi_docker_build/README.md create mode 100644 sdk/python/pulumi_docker_build/__init__.py create mode 100644 sdk/python/pulumi_docker_build/_enums.py create mode 100644 sdk/python/pulumi_docker_build/_inputs.py rename sdk/python/{pulumi_dockerbuild => pulumi_docker_build}/_utilities.py (99%) create mode 100644 sdk/python/pulumi_docker_build/config/__init__.py create mode 100644 sdk/python/pulumi_docker_build/config/__init__.pyi create mode 100644 sdk/python/pulumi_docker_build/config/vars.py create mode 100644 sdk/python/pulumi_docker_build/image.py create mode 100644 sdk/python/pulumi_docker_build/index.py create mode 100644 sdk/python/pulumi_docker_build/outputs.py rename sdk/python/{pulumi_dockerbuild => pulumi_docker_build}/provider.py (52%) create mode 100644 sdk/python/pulumi_docker_build/pulumi-plugin.json create mode 100644 sdk/python/pulumi_docker_build/py.typed delete mode 100644 sdk/python/pulumi_dockerbuild/README.md delete mode 100644 sdk/python/pulumi_dockerbuild/__init__.py delete mode 100644 sdk/python/pulumi_dockerbuild/pulumi-plugin.json delete mode 100644 sdk/python/pulumi_dockerbuild/random.py diff --git a/.gitattributes b/.gitattributes index ff9aa4f..e01d77b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ sdk/**/* linguist-generated=true +provider/internal/mock*.go linguist-generated=true diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c1bc7e5..3332f19 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,8 +8,6 @@ updates: pulumi: patterns: - "github.com/pulumi/*" - exclude-patterns: - - "k8s.io/utils" labels: - dependencies - impact/no-changelog-required diff --git a/.gitignore b/.gitignore index 5efa649..a4cd8b9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ **/.vs **/.idea **/.ionide +**/.vscode *.swp Pulumi.*.yaml yarn.lock diff --git a/.golangci.yml b/.golangci.yml index 689c351..5b65c9b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -4,36 +4,64 @@ run: linters: enable-all: false enable: + - depguard - errcheck - exhaustive - - prealloc - - gofumpt - - revive + - exportloopref - gci + - gocritic + - gofumpt + - goheader - gosec - govet + - importas - ineffassign - lll - misspell - - nolintlint - nakedret - - unconvert - - unused + - nolintlint - paralleltest - perfsprint - - depguard - - importas + - prealloc + - revive + - unconvert + - unused linters-settings: - nakedret: - # Make an issue if func has more lines of code than this setting, and it has naked returns. - # Default: 30 - max-func-lines: 60 - nolintlint: - # Some linter exclusions are added to generated or templated files - # pre-emptively. - # Don't complain about these. - allow-unused: true + depguard: + rules: + protobuf: + deny: + - pkg: "github.com/golang/protobuf" + desc: Use google.golang.org/protobuf instead + gci: + sections: + - standard # Standard section: captures all standard library packages. + - blank # Blank section: contains all blank imports. + - default # Default section: contains all imports that could not be matched to another section type. + - prefix(github.com/pulumi/) # Custom section: groups all imports with the github.com/pulumi/ prefix. + - prefix(github.com/pulumi/pulumi-dockerbuild/) # Custom section: local imports + custom-order: true + gocritic: + enable-all: true + disabled-checks: + - hugeParam + - importShadow + goheader: + template: |- + Copyright 2024, Pulumi Corporation. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. govet: enable: - nilness @@ -43,22 +71,18 @@ linters-settings: - sortslice # Detect write to struct/arrays by-value that aren't read again. - unusedwrite - gci: - sections: - - standard # Standard section: captures all standard library packages. - - blank # Blank section: contains all blank imports. - - default # Default section: contains all imports that could not be matched to another section type. - - prefix(github.com/pulumi/) # Custom section: groups all imports with the github.com/pulumi/ prefix. - - prefix(github.com/pulumi/pulumi-dockerbuild) # Custom section: local imports - custom-order: true - depguard: - rules: - protobuf: - deny: - - pkg: "github.com/golang/protobuf" - desc: Use google.golang.org/protobuf instead + nakedret: + # Make an issue if func has more lines of code than this setting, and it has naked returns. + # Default: 30 + max-func-lines: 60 + nolintlint: + # Some linter exclusions are added to generated or templated files + # pre-emptively. + # Don't complain about these. + allow-unused: true issues: + exclude-use-default: false exclude-rules: # Don't warn on unused parameters. # Parameter names are useful; replacing them with '_' is undesirable. diff --git a/Makefile b/Makefile index b9ae67b..a886e7e 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ PROJECT_NAME := Pulumi Docker Build Resource Provider -PACK := dockerbuild +PACK := docker-build PACKDIR := sdk -PROJECT := github.com/pulumi/pulumi-dockerbuild -NODE_MODULE_NAME := @pulumi/dockerbuild -NUGET_PKG_NAME := Pulumi.Dockerbuild +PROJECT := github.com/pulumi/pulumi-docker-build +NODE_MODULE_NAME := @pulumi/docker-build +NUGET_PKG_NAME := Pulumi.DockerBuild PROVIDER := pulumi-resource-${PACK} VERSION ?= $(shell pulumictl get version) @@ -19,12 +19,14 @@ EXAMPLES_DIR := ${WORKING_DIR}/examples/yaml TESTPARALLELISM := 4 PULUMI := bin/pulumi +GOGLANGCILINT := bin/golangci-lint .PHONY: ensure ensure:: tidy lint test_provider examples .PHONY: tidy -tidy: go.sum +tidy: + go mod tidy .PHONY: provider provider: bin/${PROVIDER} bin/pulumi-gen-${PACK} # Required by CI @@ -44,7 +46,11 @@ test_all:: test_provider test_examples gen_examples: examples: $(shell mkdir -p examples) -examples: sdk examples/go examples/nodejs examples/python examples/dotnet examples/java +examples: sdk examples/yaml examples/go examples/nodejs examples/python examples/dotnet examples/java + +examples/yaml: + rm -rf ${WORKING_DIR}/examples/yaml/app + cp -r ${WORKING_DIR}/examples/app ${WORKING_DIR}/examples/yaml/app examples/go: ${PULUMI} bin/${PROVIDER} ${WORKING_DIR}/examples/yaml/Pulumi.yaml $(call example,go) @@ -60,7 +66,7 @@ examples/python: ${PULUMI} bin/${PROVIDER} ${WORKING_DIR}/examples/yaml/Pulumi.y examples/dotnet: ${PULUMI} bin/${PROVIDER} ${WORKING_DIR}/examples/yaml/Pulumi.yaml $(call example,dotnet) - @git checkout examples/dotnet/provider-dockerbuild.csproj + @git checkout examples/dotnet/provider-docker-build.csproj examples/java: ${PULUMI} bin/${PROVIDER} ${WORKING_DIR}/examples/yaml/Pulumi.yaml $(call example,java) @@ -68,6 +74,10 @@ examples/java: ${PULUMI} bin/${PROVIDER} ${WORKING_DIR}/examples/yaml/Pulumi.yam ${PULUMI}: go.sum GOBIN=${WORKING_DIR}/bin go install github.com/pulumi/pulumi/pkg/v3/cmd/pulumi + GOBIN=${WORKING_DIR}/bin go install github.com/pulumi/pulumi/sdk/go/pulumi-language-go/v3 + +${GOGLANGCILINT}: go.sum + GOBIN=${WORKING_DIR}/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint define pulumi_login export PULUMI_CONFIG_PASSPHRASE=asdfqwerty1234; \ @@ -75,7 +85,6 @@ define pulumi_login endef define example - echo "GOT $(1)" rm -rf ${WORKING_DIR}/examples/$(1) $(PULUMI) convert \ --cwd ${WORKING_DIR}/examples/yaml \ @@ -84,6 +93,7 @@ define example --non-interactive \ --language $(1) \ --out ${WORKING_DIR}/examples/$(1) + cp -r ${WORKING_DIR}/examples/app ${WORKING_DIR}/examples/$(1)/app endef up:: @@ -113,14 +123,12 @@ build:: provider dotnet_sdk go_sdk nodejs_sdk python_sdk only_build:: build .PHONY: lint -lint: - golangci-lint run --fix -c .golangci.yml +lint: ${GOGLANGCILINT} + ${GOGLANGCILINT} run --fix -c .golangci.yml install:: install_nodejs_sdk install_dotnet_sdk cp $(WORKING_DIR)/bin/${PROVIDER} ${GOPATH}/bin -GO_TEST := go test -v -count=1 -cover -timeout 2h -parallel ${TESTPARALLELISM} - install_dotnet_sdk:: # Required by CI rm -rf $(WORKING_DIR)/nuget/$(NUGET_PKG_NAME).*.nupkg @@ -170,11 +178,8 @@ bin/${PROVIDER}: $(shell find ./provider -name '*.go') go.mod bin/pulumi-gen-${PACK}: # Required by CI touch bin/pulumi-gen-${PACK} -$(shell find . -name '*.go'): - go.mod: $(shell find . -name '*.go') go.sum: go.mod - go mod tidy sdk: $(shell mkdir -p sdk) sdk: sdk/python sdk/nodejs sdk/java sdk/python sdk/go sdk/dotnet @@ -210,14 +215,15 @@ sdk/nodejs: $(PULUMI) bin/${PROVIDER} mv -f ${TMPDIR}/nodejs ${WORKING_DIR}/sdk/. sdk/go: TMPDIR := $(shell mktemp -d) +sdk/go: PATH := "$(WORKING_DIR)/bin:$(PATH)" sdk/go: $(PULUMI) bin/${PROVIDER} rm -rf sdk/go - $(PULUMI) package gen-sdk bin/$(PROVIDER) --language go -o ${TMPDIR} - cp go.mod ${TMPDIR}/go/${PACK}/go.mod - cd ${TMPDIR}/go/${PACK} && \ - go mod edit -module=github.com/pulumi/pulumi-${PACK}/${PACKDIR}/go/${PACK} && \ + PATH=$(PATH) $(PULUMI) package gen-sdk bin/$(PROVIDER) --language go -o ${TMPDIR} + cp go.mod ${TMPDIR}/go/dockerbuild/go.mod + cd ${TMPDIR}/go/dockerbuild && \ + go mod edit -module=github.com/pulumi/pulumi-${PACK}/${PACKDIR}/go/dockerbuild && \ go mod tidy - mv -f ${TMPDIR}/go ${WORKING_DIR}/sdk/. + mv -f ${TMPDIR}/go ${WORKING_DIR}/sdk/go sdk/dotnet: DOTNET_VERSION := $(shell pulumictl get version --language dotnet) sdk/dotnet: TMPDIR := $(shell mktemp -d) @@ -236,3 +242,7 @@ sdk/java: $(PULUMI) bin/${PROVIDER} $(PULUMI) package gen-sdk --language java bin/${PROVIDER} -o ${TMPDIR} cd ${TMPDIR}/java/ && gradle --console=plain build mv -f ${TMPDIR}/java ${WORKING_DIR}/sdk/. + +docs: $(shell find docs/yaml -type f) $(shell find ./provider/internal/embed -name '*.md') ${SCHEMA_PATH} + go generate docs/generate.go + @touch docs diff --git a/README.md b/README.md index 4a0b457..a4a8af5 100644 --- a/README.md +++ b/README.md @@ -1,106 +1,23 @@ -# Pulumi Native Provider Boilerplate +[![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) +[![NPM version](https://badge.fury.io/js/%40pulumi%2fdocker-build.svg)](https://www.npmjs.com/package/@pulumi/docker-build) +[![Python version](https://badge.fury.io/py/pulumi-docker-build.svg)](https://pypi.org/project/pulumi-docker-build) +[![NuGet version](https://badge.fury.io/nu/pulumi.dockerbuild.svg)](https://badge.fury.io/nu/pulumi.dockerbuild) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-docker-build/sdk/go)](https://pkg.go.dev/github.com/pulumi/pulumi-docker-build/sdk/go) +[![License](https://img.shields.io/npm/l/%40pulumi%2Fpulumi.svg)](https://github.com/pulumi/pulumi-docker-build/blob/main/LICENSE) -This repository is a boilerplate showing how to create and locally test a native Pulumi provider. +# Docker-Build Resource Provider -## Authoring a Pulumi Native Provider +A [Pulumi](http://pulumi.com) provider for building modern Docker images with [buildx](https://docs.docker.com/build/architecture/) and [BuildKit](https://docs.docker.com/build/buildkit/). -This boilerplate creates a working Pulumi-owned provider named `xyz`. -It implements a random number generator that you can [build and test out for yourself](#test-against-the-example) and then replace the Random code with code specific to your provider. +Not to be confused with the earlier +[Docker](http://github.com/pulumi/pulumi-docker) provider, which is still +appropriate for managing resources unrelated to building images. +| Provider | Use cases | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `@pulumi/docker-build` | Anything related to building images with `docker build`. | +| `@pulumi/docker` | Everything else -- including running containers and creating networks. | -### Prerequisites +## Reference -Prerequisites for this repository are already satisfied by the [Pulumi Devcontainer](https://github.com/pulumi/devcontainer) if you are using Github Codespaces, or VSCode. - -If you are not using VSCode, you will need to ensure the following tools are installed and present in your `$PATH`: - -* [`pulumictl`](https://github.com/pulumi/pulumictl#installation) -* [Go 1.21](https://golang.org/dl/) or 1.latest -* [NodeJS](https://nodejs.org/en/) 14.x. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS installations. -* [Yarn](https://yarnpkg.com/) -* [TypeScript](https://www.typescriptlang.org/) -* [Python](https://www.python.org/downloads/) (called as `python3`). For recent versions of MacOS, the system-installed version is fine. -* [.NET](https://dotnet.microsoft.com/download) - - -### Build & test the boilerplate XYZ provider - -1. Create a new Github CodeSpaces environment using this repository. -1. Open a terminal in the CodeSpaces environment. -1. Run `make build install` to build and install the provider. -1. Run `make gen_examples` to generate the example programs in `examples/` off of the source `examples/yaml` example program. -1. Run `make up` to run the example program in `examples/yaml`. -1. Run `make down` to tear down the example program. - -### Creating a new provider repository - -Pulumi offers this repository as a [GitHub template repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) for convenience. From this repository: - -1. Click "Use this template". -1. Set the following options: - * Owner: pulumi - * Repository name: pulumi-xyz-native (replace "xyz" with the name of your provider) - * Description: Pulumi provider for xyz - * Repository type: Public -1. Clone the generated repository. - -From the templated repository: - -1. Search-replace `xyz` with the name of your desired provider. - -#### Build the provider and install the plugin - - ```bash - $ make build install - ``` - -This will: - -1. Create the SDK codegen binary and place it in a `./bin` folder (gitignored) -2. Create the provider binary and place it in the `./bin` folder (gitignored) -3. Generate the dotnet, Go, Node, and Python SDKs and place them in the `./sdk` folder -4. Install the provider on your machine. - -#### Test against the example - -```bash -$ cd examples/simple -$ yarn link @pulumi/xyz -$ yarn install -$ pulumi stack init test -$ pulumi up -``` - -Now that you have completed all of the above steps, you have a working provider that generates a random string for you. - -#### A brief repository overview - -You now have: - -1. A `provider/` folder containing the building and implementation logic - 1. `cmd/pulumi-resource-xyz/main.go` - holds the provider's sample implementation logic. -2. `deployment-templates` - a set of files to help you around deployment and publication -3. `sdk` - holds the generated code libraries created by `pulumi-gen-xyz/main.go` -4. `examples` a folder of Pulumi programs to try locally and/or use in CI. -5. A `Makefile` and this `README`. - -#### Additional Details - -This repository depends on the pulumi-go-provider library. For more details on building providers, please check -the [Pulumi Go Provider docs](https://github.com/pulumi/pulumi-go-provider). - -### Build Examples - -Create an example program using the resources defined in your provider, and place it in the `examples/` folder. - -You can now repeat the steps for [build, install, and test](#test-against-the-example). - -## Configuring CI and releases - -1. Follow the instructions laid out in the [deployment templates](./deployment-templates/README-DEPLOYMENT.md). - -## References - -Other resources/examples for implementing providers: -* [Pulumi Command provider](https://github.com/pulumi/pulumi-command/blob/master/provider/pkg/provider/provider.go) -* [Pulumi Go Provider repository](https://github.com/pulumi/pulumi-go-provider) +For more information, including examples and migration guidance, please see the Docker-Build provider's detailed [API documentation](https://www.pulumi.com/registry/packages/docker-build/). diff --git a/docs/generate.go b/docs/generate.go new file mode 100644 index 0000000..9c40759 --- /dev/null +++ b/docs/generate.go @@ -0,0 +1,216 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate go run generate.go yaml ../provider/internal/embed + +// Package main ingests a multi-document YAML file and converts it into +// Markdown examples. +package main + +import ( + "fmt" + "io" + "log" + "os" + "os/exec" + "path/filepath" + "strings" + + "gopkg.in/yaml.v3" + + "github.com/pulumi/pulumi/sdk/v3/go/common/util/contract" +) + +func main() { + if len(os.Args) < 3 { + fmt.Fprintf(os.Stdout, "Usage: %s \n", os.Args[0]) + os.Exit(1) + } + yamlPath := os.Args[1] + mdPath := os.Args[2] + + if !filepath.IsAbs(yamlPath) { + cwd, err := os.Getwd() + contract.AssertNoErrorf(err, "getting working directory") + yamlPath = filepath.Join(cwd, yamlPath) + } + + if err := os.MkdirAll(mdPath, 0o750); err != nil { + panic(err) + } + fileInfo, err := os.Lstat(mdPath) + if err != nil || !fileInfo.IsDir() { + fmt.Fprintf(os.Stderr, "Expect markdown destination %q to be a directory\n", mdPath) + os.Exit(1) + } + + yamlFiles, err := os.ReadDir(yamlPath) + if err != nil { + panic(err) + } + for _, yamlFile := range yamlFiles { + if err := processYaml(filepath.Join(yamlPath, yamlFile.Name()), mdPath); err != nil { + log.Fatal(fmt.Errorf("processing %q: %w", yamlFile.Name(), err)) + } + } +} + +func markdownExamples(examples []string) string { + s := "{{% examples %}}\n## Example Usage\n" + for _, example := range examples { + s += example + } + s += "{{% /examples %}}" + return s +} + +func markdownExample(description string, + typescript string, + python string, + csharp string, + golang string, + yaml string, + java string, +) string { + return fmt.Sprintf("{{%% example %%}}\n### %s\n\n"+ + "```typescript\n%s```\n"+ + "```python\n%s```\n"+ + "```csharp\n%s```\n"+ + "```go\n%s```\n"+ + "```yaml\n%s```\n"+ + "```java\n%s```\n"+ + "{{%% /example %%}}\n", + description, typescript, python, csharp, golang, yaml, java) +} + +func convert(language, tempDir, programFile string) (string, error) { + exampleDir := filepath.Join(tempDir, "example"+language) + //nolint:gosec // No user-provided input. + cmd := exec.Command( + "pulumi", + "convert", + "--language", + language, + "--out", + filepath.Clean(filepath.Join(tempDir, exampleDir)), + "--generate-only", + ) + + cmd.Stderr = os.Stderr + cmd.Stdout = os.Stdout + cmd.Dir = tempDir + if err := cmd.Run(); err != nil { + return "", fmt.Errorf("converting: %w", err) + } + content, err := os.ReadFile(filepath.Clean(filepath.Join(tempDir, exampleDir, programFile))) + if err != nil { + return "", fmt.Errorf("reading: %w", err) + } + + return string(content), nil +} + +func processYaml(path, mdDir string) error { + yamlFile, err := os.Open(filepath.Clean(path)) + if err != nil { + return err + } + + base := filepath.Base(path) + md := strings.NewReplacer(".yaml", ".md", ".yml", ".md").Replace(base) + + defer contract.IgnoreClose(yamlFile) + decoder := yaml.NewDecoder(yamlFile) + exampleStrings := []string{} + for { + keepGoing, err := func() (bool, error) { + example := map[string]interface{}{} + err := decoder.Decode(&example) + if err == io.EOF { + return false, nil + } + + description, ok := example["description"].(string) + if !ok { + description = "" + } + dir, err := os.MkdirTemp("", "") + if err != nil { + return false, err + } + + defer func() { + contract.IgnoreError(os.RemoveAll(dir)) + }() + + src, err := os.OpenFile(filepath.Clean(filepath.Join(dir, "Pulumi.yaml")), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o600) + if err != nil { + return false, err + } + + fmt.Println("Converting:", example) + + if err := yaml.NewEncoder(src).Encode(example); err != nil { + return false, err + } + contract.AssertNoErrorf(src.Close(), "closing") + + typescript, err := convert("typescript", dir, "index.ts") + if err != nil { + return false, err + } + python, err := convert("python", dir, "__main__.py") + if err != nil { + return false, err + } + csharp, err := convert("csharp", dir, "Program.cs") + if err != nil { + return false, err + } + golang, err := convert("go", dir, "main.go") + if err != nil { + return false, err + } + java, err := convert("java", dir, "src/main/java/generated_program/App.java") + if err != nil { + return false, err + } + + yamlContent, err := os.ReadFile(filepath.Clean(filepath.Join(dir, "Pulumi.yaml"))) + if err != nil { + return false, err + } + yaml := string(yamlContent) + + exampleStrings = append(exampleStrings, markdownExample(description, typescript, python, csharp, golang, yaml, java)) + + return true, nil + }() + if err != nil { + return err + } + if !keepGoing { + break + } + } + fmt.Fprintf(os.Stdout, "Writing %s\n", filepath.Join(mdDir, md)) + f, err := os.OpenFile(filepath.Clean(filepath.Join(mdDir, md)), os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o600) + if err != nil { + return err + } + defer contract.IgnoreClose(f) + _, err = f.WriteString(markdownExamples(exampleStrings)) + contract.AssertNoErrorf(err, "writing examples") + return nil +} diff --git a/docs/yaml/image-examples.yaml b/docs/yaml/image-examples.yaml new file mode 100644 index 0000000..bed715e --- /dev/null +++ b/docs/yaml/image-examples.yaml @@ -0,0 +1,190 @@ +name: ecr +description: Push to AWS ECR with caching +outputs: + ref: ${my-image.ref} +resources: + ecr-repository: + type: aws:ecr:Repository + my-image: + type: docker-build:Image + properties: + tags: + - ${ecr-repository.repositoryUrl}:latest + push: true + context: + location: ./app + cacheFrom: + - registry: + ref: ${ecr-repository.repositoryUrl}:cache + cacheTo: + - registry: + ref: ${ecr-repository.repositoryUrl}:cache + imageManifest: true + ociMediaTypes: true + registries: + - username: ${auth-token.userName} + password: ${auth-token.password} + address: ${ecr-repository.repositoryUrl} +runtime: yaml +variables: + auth-token: + fn::aws:ecr:getAuthorizationToken: + registryId: ${ecr-repository.registryId} +--- +name: multi-platform +runtime: yaml +description: Multi-platform image +resources: + image: + type: docker-build:Image + properties: + context: + location: "app" + platforms: + - plan9/amd64 + - plan9/386 + push: false +--- +name: registry +runtime: yaml +description: Registry export +resources: + image: + type: docker-build:Image + properties: + tags: + - "docker.io/pulumi/pulumi:3.107.0" + context: + location: "app" + push: true + registries: + - address: docker.io + username: pulumibot + password: ${dockerHubPassword} +outputs: + ref: ${my-image.ref} +--- +name: caching +runtime: yaml +description: Caching +resources: + image: + type: docker-build:Image + properties: + context: + location: "app" + cacheTo: + - local: + dest: tmp/cache + mode: max + cacheFrom: + - local: + src: tmp/cache + push: false +--- +name: dbc +runtime: yaml +description: Docker Build Cloud +resources: + image: + type: docker-build:Image + properties: + context: + location: "app" + exec: true + builder: + name: cloud-builder-name + push: false +--- +name: build-args +runtime: yaml +description: Build arguments +resources: + image: + type: docker-build:Image + properties: + context: + location: "app" + buildArgs: + SET_ME_TO_TRUE: "true" + push: false +--- +name: build-target +runtime: yaml +description: Build target +resources: + image: + type: docker-build:Image + properties: + context: + location: "app" + target: "build-me" + push: false +--- +name: named-contexts +runtime: yaml +description: Named contexts +resources: + image: + type: docker-build:Image + properties: + context: + location: app + named: + "golang:latest": + location: "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984" + push: false +--- +name: remote-context +runtime: yaml +description: Remote context +resources: + image: + type: docker-build:Image + properties: + context: + location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile" + push: false + +--- +name: inline +runtime: yaml +description: Inline Dockerfile +resources: + image: + type: docker-build:Image + properties: + dockerfile: + inline: | + FROM busybox + COPY hello.c ./ + context: + location: "app" + push: false +--- +name: remote-context +runtime: yaml +description: Remote context +resources: + image: + type: docker-build:Image + properties: + dockerfile: + location: app/Dockerfile + context: + location: "https://github.com/docker-library/hello-world.git" + push: false +--- +name: docker-load +runtime: yaml +description: Local export +resources: + image: + type: docker-build:Image + properties: + context: + location: "app" + exports: + - docker: + tar: true + push: false diff --git a/docs/yaml/index-examples.yaml b/docs/yaml/index-examples.yaml new file mode 100644 index 0000000..079ea91 --- /dev/null +++ b/docs/yaml/index-examples.yaml @@ -0,0 +1,48 @@ +name: registry-caching +description: Multi-platform registry caching +runtime: yaml +resources: + arm64: + type: docker-build:Image + properties: + context: + location: "app" + platforms: + - linux/arm64 + tags: + - "docker.io/pulumi/pulumi:3.107.0-arm64" + cacheTo: + - registry: + ref: "docker.io/pulumi/pulumi:cache-arm64" + mode: max + cacheFrom: + - registry: + ref: "docker.io/pulumi/pulumi:cache-arm64" + + amd64: + type: docker-build:Image + properties: + context: + location: "app" + platforms: + - linux/amd64 + tags: + - "docker.io/pulumi/pulumi:3.107.0-amd64" + cacheTo: + - registry: + ref: "docker.io/pulumi/pulumi:cache-amd64" + mode: max + cacheFrom: + - registry: + ref: "docker.io/pulumi/pulumi:cache-amd64" + + index: + type: docker-build:Index + properties: + tag: "docker.io/pulumi/pulumi:3.107.0" + sources: + - ${amd64.ref} + - ${arm64.ref} + +outputs: + ref: ${index.ref} diff --git a/examples/app/Dockerfile b/examples/app/Dockerfile new file mode 100644 index 0000000..e17a80c --- /dev/null +++ b/examples/app/Dockerfile @@ -0,0 +1,2 @@ +FROM alpine +RUN echo 👍 diff --git a/examples/app/Dockerfile.buildArgs b/examples/app/Dockerfile.buildArgs new file mode 100644 index 0000000..438ee01 --- /dev/null +++ b/examples/app/Dockerfile.buildArgs @@ -0,0 +1,5 @@ +FROM alpine + +ARG SET_ME_TO_TRUE +RUN [ "$SET_ME_TO_TRUE" = "true" ] +RUN echo "That's the correct build arg, thanks! 👍" diff --git a/examples/app/Dockerfile.emptyContext b/examples/app/Dockerfile.emptyContext new file mode 100644 index 0000000..769593b --- /dev/null +++ b/examples/app/Dockerfile.emptyContext @@ -0,0 +1,2 @@ +FROM alpine +RUN echo "This image doesn't use any local files, so it doesn't need a context parameter 👍" diff --git a/examples/app/Dockerfile.extraHosts b/examples/app/Dockerfile.extraHosts new file mode 100644 index 0000000..35b15f4 --- /dev/null +++ b/examples/app/Dockerfile.extraHosts @@ -0,0 +1,3 @@ +FROM bash AS base + +RUN getent hosts metadata.google.internal diff --git a/examples/app/Dockerfile.multiPlatform b/examples/app/Dockerfile.multiPlatform new file mode 100644 index 0000000..49d3c83 --- /dev/null +++ b/examples/app/Dockerfile.multiPlatform @@ -0,0 +1,7 @@ +FROM --platform=$BUILDPLATFORM alpine as build +RUN echo ${BUILDPLATFORM} > buildplatform +RUN echo ${TARGETPLATFORM} > targetplatform + +FROM build +RUN cat buildplatform +RUN cat targetplatform diff --git a/examples/app/Dockerfile.namedContexts b/examples/app/Dockerfile.namedContexts new file mode 100644 index 0000000..6e53dba --- /dev/null +++ b/examples/app/Dockerfile.namedContexts @@ -0,0 +1,5 @@ +# syntax=docker/dockerfile:1.4 +FROM golang:latest + +RUN version="$(go version)" && echo $version && [ "$version" = "go version go1.21.7 linux/amd64" ] +RUN echo "This image uses named contexts to pin golang:latest to a specific SHA 👍" diff --git a/examples/app/Dockerfile.secrets b/examples/app/Dockerfile.secrets new file mode 100644 index 0000000..513bbd2 --- /dev/null +++ b/examples/app/Dockerfile.secrets @@ -0,0 +1,4 @@ +FROM alpine + +RUN --mount=type=secret,id=password [ "$(cat /run/secrets/password)" = "hunter2" ] + diff --git a/examples/app/Dockerfile.sshMount b/examples/app/Dockerfile.sshMount new file mode 100644 index 0000000..055cb78 --- /dev/null +++ b/examples/app/Dockerfile.sshMount @@ -0,0 +1,5 @@ +FROM alpine + +RUN apk add openssh-client + +RUN --mount=type=ssh ssh-add -l diff --git a/examples/app/Dockerfile.target b/examples/app/Dockerfile.target new file mode 100644 index 0000000..7cddec7 --- /dev/null +++ b/examples/app/Dockerfile.target @@ -0,0 +1,8 @@ +FROM alpine as build-me +RUN echo 👍 + +FROM build-me as also-build-me +RUN echo 🤙 + +FROM build-me as dont-build-me +RUN [ "true" = "false" ] diff --git a/examples/dotnet/Program.cs b/examples/dotnet/Program.cs index 389bc3e..6b5489b 100644 --- a/examples/dotnet/Program.cs +++ b/examples/dotnet/Program.cs @@ -1,18 +1,272 @@ using System.Collections.Generic; using System.Linq; using Pulumi; -using Dockerbuild = Pulumi.Dockerbuild; +using DockerBuild = Pulumi.DockerBuild; return await Deployment.RunAsync(() => { - var myRandomResource = new Dockerbuild.Random("myRandomResource", new() + var config = new Config(); + var dockerHubPassword = config.Require("dockerHubPassword"); + var multiPlatform = new DockerBuild.Image("multiPlatform", new() { - Length = 24, + Push = false, + Dockerfile = new DockerBuild.Inputs.DockerfileArgs + { + Location = "./app/Dockerfile.multiPlatform", + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + Platforms = new[] + { + DockerBuild.Platform.Plan9_amd64, + DockerBuild.Platform.Plan9_386, + }, + }); + + var registryPush = new DockerBuild.Image("registryPush", new() + { + Push = false, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + Tags = new[] + { + "docker.io/pulumibot/buildkit-e2e:example", + }, + Exports = new[] + { + new DockerBuild.Inputs.ExportArgs + { + Registry = new DockerBuild.Inputs.ExportRegistryArgs + { + OciMediaTypes = true, + Push = false, + }, + }, + }, + Registries = new[] + { + new DockerBuild.Inputs.RegistryArgs + { + Address = "docker.io", + Username = "pulumibot", + Password = dockerHubPassword, + }, + }, + }); + + var cached = new DockerBuild.Image("cached", new() + { + Push = false, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + CacheTo = new[] + { + new DockerBuild.Inputs.CacheToArgs + { + Local = new DockerBuild.Inputs.CacheToLocalArgs + { + Dest = "tmp/cache", + Mode = DockerBuild.CacheMode.Max, + }, + }, + }, + CacheFrom = new[] + { + new DockerBuild.Inputs.CacheFromArgs + { + Local = new DockerBuild.Inputs.CacheFromLocalArgs + { + Src = "tmp/cache", + }, + }, + }, + }); + + var buildArgs = new DockerBuild.Image("buildArgs", new() + { + Push = false, + Dockerfile = new DockerBuild.Inputs.DockerfileArgs + { + Location = "./app/Dockerfile.buildArgs", + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + BuildArgs = + { + { "SET_ME_TO_TRUE", "true" }, + }, + }); + + var extraHosts = new DockerBuild.Image("extraHosts", new() + { + Push = false, + Dockerfile = new DockerBuild.Inputs.DockerfileArgs + { + Location = "./app/Dockerfile.extraHosts", + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + AddHosts = new[] + { + "metadata.google.internal:169.254.169.254", + }, + }); + + var sshMount = new DockerBuild.Image("sshMount", new() + { + Push = false, + Dockerfile = new DockerBuild.Inputs.DockerfileArgs + { + Location = "./app/Dockerfile.sshMount", + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + Ssh = new[] + { + new DockerBuild.Inputs.SSHArgs + { + Id = "default", + }, + }, + }); + + var secrets = new DockerBuild.Image("secrets", new() + { + Push = false, + Dockerfile = new DockerBuild.Inputs.DockerfileArgs + { + Location = "./app/Dockerfile.secrets", + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + Secrets = + { + { "password", "hunter2" }, + }, + }); + + var labels = new DockerBuild.Image("labels", new() + { + Push = false, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + Labels = + { + { "description", "This image will get a descriptive label 👍" }, + }, + }); + + var target = new DockerBuild.Image("target", new() + { + Push = false, + Dockerfile = new DockerBuild.Inputs.DockerfileArgs + { + Location = "./app/Dockerfile.target", + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + Target = "build-me", + }); + + var namedContexts = new DockerBuild.Image("namedContexts", new() + { + Push = false, + Dockerfile = new DockerBuild.Inputs.DockerfileArgs + { + Location = "./app/Dockerfile.namedContexts", + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + Named = + { + { "golang:latest", new DockerBuild.Inputs.ContextArgs + { + Location = "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", + } }, + }, + }, + }); + + var remoteContext = new DockerBuild.Image("remoteContext", new() + { + Push = false, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + }, + }); + + var remoteContextWithInline = new DockerBuild.Image("remoteContextWithInline", new() + { + Push = false, + Dockerfile = new DockerBuild.Inputs.DockerfileArgs + { + Inline = @"FROM busybox +COPY hello.c ./ +", + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "https://github.com/docker-library/hello-world.git", + }, + }); + + var inline = new DockerBuild.Image("inline", new() + { + Push = false, + Dockerfile = new DockerBuild.Inputs.DockerfileArgs + { + Inline = @"FROM alpine +RUN echo ""This uses an inline Dockerfile! 👍"" +", + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + }); + + var dockerLoad = new DockerBuild.Image("dockerLoad", new() + { + Push = false, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + Exports = new[] + { + new DockerBuild.Inputs.ExportArgs + { + Docker = new DockerBuild.Inputs.ExportDockerArgs + { + Tar = true, + }, + }, + }, }); return new Dictionary { - ["value"] = myRandomResource.Result, + ["platforms"] = multiPlatform.Platforms, }; }); diff --git a/examples/dotnet/Pulumi.yaml b/examples/dotnet/Pulumi.yaml index 88dab12..96724a2 100644 --- a/examples/dotnet/Pulumi.yaml +++ b/examples/dotnet/Pulumi.yaml @@ -1,6 +1,10 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: dotnet +config: + dockerHubPassword: + type: string + secret: true plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin diff --git a/examples/dotnet/app/Dockerfile b/examples/dotnet/app/Dockerfile new file mode 100644 index 0000000..e17a80c --- /dev/null +++ b/examples/dotnet/app/Dockerfile @@ -0,0 +1,2 @@ +FROM alpine +RUN echo 👍 diff --git a/examples/dotnet/app/Dockerfile.buildArgs b/examples/dotnet/app/Dockerfile.buildArgs new file mode 100644 index 0000000..438ee01 --- /dev/null +++ b/examples/dotnet/app/Dockerfile.buildArgs @@ -0,0 +1,5 @@ +FROM alpine + +ARG SET_ME_TO_TRUE +RUN [ "$SET_ME_TO_TRUE" = "true" ] +RUN echo "That's the correct build arg, thanks! 👍" diff --git a/examples/dotnet/app/Dockerfile.emptyContext b/examples/dotnet/app/Dockerfile.emptyContext new file mode 100644 index 0000000..769593b --- /dev/null +++ b/examples/dotnet/app/Dockerfile.emptyContext @@ -0,0 +1,2 @@ +FROM alpine +RUN echo "This image doesn't use any local files, so it doesn't need a context parameter 👍" diff --git a/examples/dotnet/app/Dockerfile.extraHosts b/examples/dotnet/app/Dockerfile.extraHosts new file mode 100644 index 0000000..35b15f4 --- /dev/null +++ b/examples/dotnet/app/Dockerfile.extraHosts @@ -0,0 +1,3 @@ +FROM bash AS base + +RUN getent hosts metadata.google.internal diff --git a/examples/dotnet/app/Dockerfile.multiPlatform b/examples/dotnet/app/Dockerfile.multiPlatform new file mode 100644 index 0000000..49d3c83 --- /dev/null +++ b/examples/dotnet/app/Dockerfile.multiPlatform @@ -0,0 +1,7 @@ +FROM --platform=$BUILDPLATFORM alpine as build +RUN echo ${BUILDPLATFORM} > buildplatform +RUN echo ${TARGETPLATFORM} > targetplatform + +FROM build +RUN cat buildplatform +RUN cat targetplatform diff --git a/examples/dotnet/app/Dockerfile.namedContexts b/examples/dotnet/app/Dockerfile.namedContexts new file mode 100644 index 0000000..6e53dba --- /dev/null +++ b/examples/dotnet/app/Dockerfile.namedContexts @@ -0,0 +1,5 @@ +# syntax=docker/dockerfile:1.4 +FROM golang:latest + +RUN version="$(go version)" && echo $version && [ "$version" = "go version go1.21.7 linux/amd64" ] +RUN echo "This image uses named contexts to pin golang:latest to a specific SHA 👍" diff --git a/examples/dotnet/app/Dockerfile.secrets b/examples/dotnet/app/Dockerfile.secrets new file mode 100644 index 0000000..513bbd2 --- /dev/null +++ b/examples/dotnet/app/Dockerfile.secrets @@ -0,0 +1,4 @@ +FROM alpine + +RUN --mount=type=secret,id=password [ "$(cat /run/secrets/password)" = "hunter2" ] + diff --git a/examples/dotnet/app/Dockerfile.sshMount b/examples/dotnet/app/Dockerfile.sshMount new file mode 100644 index 0000000..055cb78 --- /dev/null +++ b/examples/dotnet/app/Dockerfile.sshMount @@ -0,0 +1,5 @@ +FROM alpine + +RUN apk add openssh-client + +RUN --mount=type=ssh ssh-add -l diff --git a/examples/dotnet/app/Dockerfile.target b/examples/dotnet/app/Dockerfile.target new file mode 100644 index 0000000..7cddec7 --- /dev/null +++ b/examples/dotnet/app/Dockerfile.target @@ -0,0 +1,8 @@ +FROM alpine as build-me +RUN echo 👍 + +FROM build-me as also-build-me +RUN echo 🤙 + +FROM build-me as dont-build-me +RUN [ "true" = "false" ] diff --git a/examples/dotnet/provider-dockerbuild.csproj b/examples/dotnet/provider-docker-build.csproj similarity index 70% rename from examples/dotnet/provider-dockerbuild.csproj rename to examples/dotnet/provider-docker-build.csproj index 8741e01..3bf11fd 100644 --- a/examples/dotnet/provider-dockerbuild.csproj +++ b/examples/dotnet/provider-docker-build.csproj @@ -8,7 +8,7 @@ - + - + \ No newline at end of file diff --git a/examples/dotnet_test.go b/examples/dotnet_test.go index 1d4730d..130ba24 100644 --- a/examples/dotnet_test.go +++ b/examples/dotnet_test.go @@ -27,7 +27,7 @@ func TestDotNetExample(t *testing.T) { test := integration.ProgramTestOptions{ Dir: path.Join(cwd, "dotnet"), Dependencies: []string{ - "Pulumi.Dockerbuild", + "Pulumi.DockerBuild", }, Secrets: map[string]string{ "dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"), diff --git a/examples/go/Pulumi.yaml b/examples/go/Pulumi.yaml index ae867b8..cdca90a 100644 --- a/examples/go/Pulumi.yaml +++ b/examples/go/Pulumi.yaml @@ -1,6 +1,10 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: go +config: + dockerHubPassword: + type: string + secret: true plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin diff --git a/examples/go/app/Dockerfile b/examples/go/app/Dockerfile new file mode 100644 index 0000000..e17a80c --- /dev/null +++ b/examples/go/app/Dockerfile @@ -0,0 +1,2 @@ +FROM alpine +RUN echo 👍 diff --git a/examples/go/app/Dockerfile.buildArgs b/examples/go/app/Dockerfile.buildArgs new file mode 100644 index 0000000..438ee01 --- /dev/null +++ b/examples/go/app/Dockerfile.buildArgs @@ -0,0 +1,5 @@ +FROM alpine + +ARG SET_ME_TO_TRUE +RUN [ "$SET_ME_TO_TRUE" = "true" ] +RUN echo "That's the correct build arg, thanks! 👍" diff --git a/examples/go/app/Dockerfile.emptyContext b/examples/go/app/Dockerfile.emptyContext new file mode 100644 index 0000000..769593b --- /dev/null +++ b/examples/go/app/Dockerfile.emptyContext @@ -0,0 +1,2 @@ +FROM alpine +RUN echo "This image doesn't use any local files, so it doesn't need a context parameter 👍" diff --git a/examples/go/app/Dockerfile.extraHosts b/examples/go/app/Dockerfile.extraHosts new file mode 100644 index 0000000..35b15f4 --- /dev/null +++ b/examples/go/app/Dockerfile.extraHosts @@ -0,0 +1,3 @@ +FROM bash AS base + +RUN getent hosts metadata.google.internal diff --git a/examples/go/app/Dockerfile.multiPlatform b/examples/go/app/Dockerfile.multiPlatform new file mode 100644 index 0000000..49d3c83 --- /dev/null +++ b/examples/go/app/Dockerfile.multiPlatform @@ -0,0 +1,7 @@ +FROM --platform=$BUILDPLATFORM alpine as build +RUN echo ${BUILDPLATFORM} > buildplatform +RUN echo ${TARGETPLATFORM} > targetplatform + +FROM build +RUN cat buildplatform +RUN cat targetplatform diff --git a/examples/go/app/Dockerfile.namedContexts b/examples/go/app/Dockerfile.namedContexts new file mode 100644 index 0000000..6e53dba --- /dev/null +++ b/examples/go/app/Dockerfile.namedContexts @@ -0,0 +1,5 @@ +# syntax=docker/dockerfile:1.4 +FROM golang:latest + +RUN version="$(go version)" && echo $version && [ "$version" = "go version go1.21.7 linux/amd64" ] +RUN echo "This image uses named contexts to pin golang:latest to a specific SHA 👍" diff --git a/examples/go/app/Dockerfile.secrets b/examples/go/app/Dockerfile.secrets new file mode 100644 index 0000000..513bbd2 --- /dev/null +++ b/examples/go/app/Dockerfile.secrets @@ -0,0 +1,4 @@ +FROM alpine + +RUN --mount=type=secret,id=password [ "$(cat /run/secrets/password)" = "hunter2" ] + diff --git a/examples/go/app/Dockerfile.sshMount b/examples/go/app/Dockerfile.sshMount new file mode 100644 index 0000000..055cb78 --- /dev/null +++ b/examples/go/app/Dockerfile.sshMount @@ -0,0 +1,5 @@ +FROM alpine + +RUN apk add openssh-client + +RUN --mount=type=ssh ssh-add -l diff --git a/examples/go/app/Dockerfile.target b/examples/go/app/Dockerfile.target new file mode 100644 index 0000000..7cddec7 --- /dev/null +++ b/examples/go/app/Dockerfile.target @@ -0,0 +1,8 @@ +FROM alpine as build-me +RUN echo 👍 + +FROM build-me as also-build-me +RUN echo 🤙 + +FROM build-me as dont-build-me +RUN [ "true" = "false" ] diff --git a/examples/go/go.mod b/examples/go/go.mod index 4387f35..dde4b24 100644 --- a/examples/go/go.mod +++ b/examples/go/go.mod @@ -1,4 +1,4 @@ -module provider-dockerbuild +module provider-docker-build go 1.20 diff --git a/examples/go/main.go b/examples/go/main.go index 50d3988..ede0af9 100644 --- a/examples/go/main.go +++ b/examples/go/main.go @@ -1,19 +1,236 @@ package main import ( - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { - myRandomResource, err := dockerbuild.NewRandom(ctx, "myRandomResource", &dockerbuild.RandomArgs{ - Length: pulumi.Int(24), + cfg := config.New(ctx, "") + dockerHubPassword := cfg.Require("dockerHubPassword") + multiPlatform, err := dockerbuild.NewImage(ctx, "multiPlatform", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Dockerfile: &dockerbuild.DockerfileArgs{ + Location: pulumi.String("./app/Dockerfile.multiPlatform"), + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + Platforms: dockerbuild.PlatformArray{ + dockerbuild.Platform_Plan9_amd64, + dockerbuild.Platform_Plan9_386, + }, }) if err != nil { return err } - ctx.Export("value", myRandomResource.Result) + _, err = dockerbuild.NewImage(ctx, "registryPush", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + Tags: pulumi.StringArray{ + pulumi.String("docker.io/pulumibot/buildkit-e2e:example"), + }, + Exports: dockerbuild.ExportArray{ + &dockerbuild.ExportArgs{ + Registry: &dockerbuild.ExportRegistryArgs{ + OciMediaTypes: pulumi.Bool(true), + Push: pulumi.Bool(false), + }, + }, + }, + Registries: dockerbuild.RegistryArray{ + &dockerbuild.RegistryArgs{ + Address: pulumi.String("docker.io"), + Username: pulumi.String("pulumibot"), + Password: pulumi.String(dockerHubPassword), + }, + }, + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "cached", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + CacheTo: dockerbuild.CacheToArray{ + &dockerbuild.CacheToArgs{ + Local: &dockerbuild.CacheToLocalArgs{ + Dest: pulumi.String("tmp/cache"), + Mode: dockerbuild.CacheModeMax, + }, + }, + }, + CacheFrom: dockerbuild.CacheFromArray{ + &dockerbuild.CacheFromArgs{ + Local: &dockerbuild.CacheFromLocalArgs{ + Src: pulumi.String("tmp/cache"), + }, + }, + }, + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "buildArgs", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Dockerfile: &dockerbuild.DockerfileArgs{ + Location: pulumi.String("./app/Dockerfile.buildArgs"), + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + BuildArgs: pulumi.StringMap{ + "SET_ME_TO_TRUE": pulumi.String("true"), + }, + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "extraHosts", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Dockerfile: &dockerbuild.DockerfileArgs{ + Location: pulumi.String("./app/Dockerfile.extraHosts"), + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + AddHosts: pulumi.StringArray{ + pulumi.String("metadata.google.internal:169.254.169.254"), + }, + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "sshMount", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Dockerfile: &dockerbuild.DockerfileArgs{ + Location: pulumi.String("./app/Dockerfile.sshMount"), + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + Ssh: dockerbuild.SSHArray{ + &dockerbuild.SSHArgs{ + Id: pulumi.String("default"), + }, + }, + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "secrets", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Dockerfile: &dockerbuild.DockerfileArgs{ + Location: pulumi.String("./app/Dockerfile.secrets"), + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + Secrets: pulumi.StringMap{ + "password": pulumi.String("hunter2"), + }, + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "labels", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + Labels: pulumi.StringMap{ + "description": pulumi.String("This image will get a descriptive label 👍"), + }, + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "target", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Dockerfile: &dockerbuild.DockerfileArgs{ + Location: pulumi.String("./app/Dockerfile.target"), + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + Target: pulumi.String("build-me"), + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "namedContexts", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Dockerfile: &dockerbuild.DockerfileArgs{ + Location: pulumi.String("./app/Dockerfile.namedContexts"), + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + Named: dockerbuild.ContextMap{ + "golang:latest": &dockerbuild.ContextArgs{ + Location: pulumi.String("docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"), + }, + }, + }, + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "remoteContext", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"), + }, + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "remoteContextWithInline", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Dockerfile: &dockerbuild.DockerfileArgs{ + Inline: pulumi.String("FROM busybox\nCOPY hello.c ./\n"), + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("https://github.com/docker-library/hello-world.git"), + }, + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "inline", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Dockerfile: &dockerbuild.DockerfileArgs{ + Inline: pulumi.String("FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n"), + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + }) + if err != nil { + return err + } + _, err = dockerbuild.NewImage(ctx, "dockerLoad", &dockerbuild.ImageArgs{ + Push: pulumi.Bool(false), + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + Exports: dockerbuild.ExportArray{ + &dockerbuild.ExportArgs{ + Docker: &dockerbuild.ExportDockerArgs{ + Tar: pulumi.Bool(true), + }, + }, + }, + }) + if err != nil { + return err + } + ctx.Export("platforms", multiPlatform.Platforms) return nil }) } diff --git a/examples/go_test.go b/examples/go_test.go index be53b92..95588b5 100644 --- a/examples/go_test.go +++ b/examples/go_test.go @@ -19,7 +19,7 @@ func TestGoExample(t *testing.T) { test := integration.ProgramTestOptions{ Dir: path.Join(cwd, "go"), Dependencies: []string{ - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild=../sdk/go/dockerbuild", + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild=../sdk/go/dockerbuild", }, Secrets: map[string]string{ "dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"), diff --git a/examples/java/Pulumi.yaml b/examples/java/Pulumi.yaml index a33ff57..50cac76 100644 --- a/examples/java/Pulumi.yaml +++ b/examples/java/Pulumi.yaml @@ -1,6 +1,10 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: java +config: + dockerHubPassword: + type: string + secret: true plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin diff --git a/examples/java/app/Dockerfile b/examples/java/app/Dockerfile new file mode 100644 index 0000000..e17a80c --- /dev/null +++ b/examples/java/app/Dockerfile @@ -0,0 +1,2 @@ +FROM alpine +RUN echo 👍 diff --git a/examples/java/app/Dockerfile.buildArgs b/examples/java/app/Dockerfile.buildArgs new file mode 100644 index 0000000..438ee01 --- /dev/null +++ b/examples/java/app/Dockerfile.buildArgs @@ -0,0 +1,5 @@ +FROM alpine + +ARG SET_ME_TO_TRUE +RUN [ "$SET_ME_TO_TRUE" = "true" ] +RUN echo "That's the correct build arg, thanks! 👍" diff --git a/examples/java/app/Dockerfile.emptyContext b/examples/java/app/Dockerfile.emptyContext new file mode 100644 index 0000000..769593b --- /dev/null +++ b/examples/java/app/Dockerfile.emptyContext @@ -0,0 +1,2 @@ +FROM alpine +RUN echo "This image doesn't use any local files, so it doesn't need a context parameter 👍" diff --git a/examples/java/app/Dockerfile.extraHosts b/examples/java/app/Dockerfile.extraHosts new file mode 100644 index 0000000..35b15f4 --- /dev/null +++ b/examples/java/app/Dockerfile.extraHosts @@ -0,0 +1,3 @@ +FROM bash AS base + +RUN getent hosts metadata.google.internal diff --git a/examples/java/app/Dockerfile.multiPlatform b/examples/java/app/Dockerfile.multiPlatform new file mode 100644 index 0000000..49d3c83 --- /dev/null +++ b/examples/java/app/Dockerfile.multiPlatform @@ -0,0 +1,7 @@ +FROM --platform=$BUILDPLATFORM alpine as build +RUN echo ${BUILDPLATFORM} > buildplatform +RUN echo ${TARGETPLATFORM} > targetplatform + +FROM build +RUN cat buildplatform +RUN cat targetplatform diff --git a/examples/java/app/Dockerfile.namedContexts b/examples/java/app/Dockerfile.namedContexts new file mode 100644 index 0000000..6e53dba --- /dev/null +++ b/examples/java/app/Dockerfile.namedContexts @@ -0,0 +1,5 @@ +# syntax=docker/dockerfile:1.4 +FROM golang:latest + +RUN version="$(go version)" && echo $version && [ "$version" = "go version go1.21.7 linux/amd64" ] +RUN echo "This image uses named contexts to pin golang:latest to a specific SHA 👍" diff --git a/examples/java/app/Dockerfile.secrets b/examples/java/app/Dockerfile.secrets new file mode 100644 index 0000000..513bbd2 --- /dev/null +++ b/examples/java/app/Dockerfile.secrets @@ -0,0 +1,4 @@ +FROM alpine + +RUN --mount=type=secret,id=password [ "$(cat /run/secrets/password)" = "hunter2" ] + diff --git a/examples/java/app/Dockerfile.sshMount b/examples/java/app/Dockerfile.sshMount new file mode 100644 index 0000000..055cb78 --- /dev/null +++ b/examples/java/app/Dockerfile.sshMount @@ -0,0 +1,5 @@ +FROM alpine + +RUN apk add openssh-client + +RUN --mount=type=ssh ssh-add -l diff --git a/examples/java/app/Dockerfile.target b/examples/java/app/Dockerfile.target new file mode 100644 index 0000000..7cddec7 --- /dev/null +++ b/examples/java/app/Dockerfile.target @@ -0,0 +1,8 @@ +FROM alpine as build-me +RUN echo 👍 + +FROM build-me as also-build-me +RUN echo 🤙 + +FROM build-me as dont-build-me +RUN [ "true" = "false" ] diff --git a/examples/java/pom.xml b/examples/java/pom.xml index 5bf38a5..b32d9ca 100644 --- a/examples/java/pom.xml +++ b/examples/java/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.pulumi - provider-dockerbuild + provider-docker-build 1.0-SNAPSHOT @@ -25,7 +25,7 @@ com.pulumi - dockerbuild + docker-build [0.0.0,) diff --git a/examples/java/src/main/java/generated_program/App.java b/examples/java/src/main/java/generated_program/App.java index 754b846..e7e21ab 100644 --- a/examples/java/src/main/java/generated_program/App.java +++ b/examples/java/src/main/java/generated_program/App.java @@ -3,8 +3,19 @@ package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; -import com.pulumi.dockerbuild.Random; -import com.pulumi.dockerbuild.RandomArgs; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.DockerfileArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import com.pulumi.dockerbuild.inputs.ExportArgs; +import com.pulumi.dockerbuild.inputs.ExportRegistryArgs; +import com.pulumi.dockerbuild.inputs.RegistryArgs; +import com.pulumi.dockerbuild.inputs.CacheToArgs; +import com.pulumi.dockerbuild.inputs.CacheToLocalArgs; +import com.pulumi.dockerbuild.inputs.CacheFromArgs; +import com.pulumi.dockerbuild.inputs.CacheFromLocalArgs; +import com.pulumi.dockerbuild.inputs.SSHArgs; +import com.pulumi.dockerbuild.inputs.ExportDockerArgs; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -18,10 +29,179 @@ public class App { } public static void stack(Context ctx) { - var myRandomResource = new Random("myRandomResource", RandomArgs.builder() - .length(24) + final var config = ctx.config(); + final var dockerHubPassword = config.get("dockerHubPassword"); + var multiPlatform = new Image("multiPlatform", ImageArgs.builder() + .push(false) + .dockerfile(DockerfileArgs.builder() + .location("./app/Dockerfile.multiPlatform") + .build()) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .platforms( + "plan9/amd64", + "plan9/386") .build()); - ctx.export("value", myRandomResource.result()); + var registryPush = new Image("registryPush", ImageArgs.builder() + .push(false) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .tags("docker.io/pulumibot/buildkit-e2e:example") + .exports(ExportArgs.builder() + .registry(ExportRegistryArgs.builder() + .ociMediaTypes(true) + .push(false) + .build()) + .build()) + .registries(RegistryArgs.builder() + .address("docker.io") + .username("pulumibot") + .password(dockerHubPassword) + .build()) + .build()); + + var cached = new Image("cached", ImageArgs.builder() + .push(false) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .cacheTo(CacheToArgs.builder() + .local(CacheToLocalArgs.builder() + .dest("tmp/cache") + .mode("max") + .build()) + .build()) + .cacheFrom(CacheFromArgs.builder() + .local(CacheFromLocalArgs.builder() + .src("tmp/cache") + .build()) + .build()) + .build()); + + var buildArgs = new Image("buildArgs", ImageArgs.builder() + .push(false) + .dockerfile(DockerfileArgs.builder() + .location("./app/Dockerfile.buildArgs") + .build()) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .buildArgs(Map.of("SET_ME_TO_TRUE", "true")) + .build()); + + var extraHosts = new Image("extraHosts", ImageArgs.builder() + .push(false) + .dockerfile(DockerfileArgs.builder() + .location("./app/Dockerfile.extraHosts") + .build()) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .addHosts("metadata.google.internal:169.254.169.254") + .build()); + + var sshMount = new Image("sshMount", ImageArgs.builder() + .push(false) + .dockerfile(DockerfileArgs.builder() + .location("./app/Dockerfile.sshMount") + .build()) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .ssh(SSHArgs.builder() + .id("default") + .build()) + .build()); + + var secrets = new Image("secrets", ImageArgs.builder() + .push(false) + .dockerfile(DockerfileArgs.builder() + .location("./app/Dockerfile.secrets") + .build()) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .secrets(Map.of("password", "hunter2")) + .build()); + + var labels = new Image("labels", ImageArgs.builder() + .push(false) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .labels(Map.of("description", "This image will get a descriptive label 👍")) + .build()); + + var target = new Image("target", ImageArgs.builder() + .push(false) + .dockerfile(DockerfileArgs.builder() + .location("./app/Dockerfile.target") + .build()) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .target("build-me") + .build()); + + var namedContexts = new Image("namedContexts", ImageArgs.builder() + .push(false) + .dockerfile(DockerfileArgs.builder() + .location("./app/Dockerfile.namedContexts") + .build()) + .context(BuildContextArgs.builder() + .location("./app") + .named(Map.of("golang:latest", Map.of("location", "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"))) + .build()) + .build()); + + var remoteContext = new Image("remoteContext", ImageArgs.builder() + .push(false) + .context(BuildContextArgs.builder() + .location("https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile") + .build()) + .build()); + + var remoteContextWithInline = new Image("remoteContextWithInline", ImageArgs.builder() + .push(false) + .dockerfile(DockerfileArgs.builder() + .inline(""" +FROM busybox +COPY hello.c ./ + """) + .build()) + .context(BuildContextArgs.builder() + .location("https://github.com/docker-library/hello-world.git") + .build()) + .build()); + + var inline = new Image("inline", ImageArgs.builder() + .push(false) + .dockerfile(DockerfileArgs.builder() + .inline(""" +FROM alpine +RUN echo "This uses an inline Dockerfile! 👍" + """) + .build()) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .build()); + + var dockerLoad = new Image("dockerLoad", ImageArgs.builder() + .push(false) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .exports(ExportArgs.builder() + .docker(ExportDockerArgs.builder() + .tar(true) + .build()) + .build()) + .build()); + + ctx.export("platforms", multiPlatform.platforms()); } } diff --git a/examples/main_test.go b/examples/main_test.go new file mode 100644 index 0000000..9d2cec4 --- /dev/null +++ b/examples/main_test.go @@ -0,0 +1,61 @@ +package examples + +import ( + "crypto/rsa" + "errors" + "io" + "math/rand" + "net" + "os" + "path/filepath" + "testing" + + "golang.org/x/crypto/ssh/agent" +) + +func TestMain(m *testing.M) { + sock := sshagent() + os.Setenv("SSH_AUTH_SOCK", sock) + + os.Exit(m.Run()) +} + +// sshagent crates an in-memory SSH agent with one identity. +func sshagent() string { + dir, err := os.MkdirTemp(os.TempDir(), "docker-test-*") + if err != nil { + panic(err) + } + + sock := filepath.Join(dir, "test.sock") + + l, err := net.Listen("unix", sock) + if err != nil { + panic(err) + } + + a := agent.NewKeyring() + //nolint:gosec + key, err := rsa.GenerateKey(rand.New(rand.NewSource(42)), 2048) + if err != nil { + panic(err) + } + err = a.Add(agent.AddedKey{PrivateKey: key}) + if err != nil { + panic(err) + } + + go func() { + for { + conn, err := l.Accept() + if err != nil { + panic(err) + } + if err := agent.ServeAgent(a, conn); err != nil && !errors.Is(err, io.EOF) { + panic(err) + } + } + }() + + return sock +} diff --git a/examples/nodejs/Pulumi.yaml b/examples/nodejs/Pulumi.yaml index 1f0d090..8317291 100644 --- a/examples/nodejs/Pulumi.yaml +++ b/examples/nodejs/Pulumi.yaml @@ -1,6 +1,10 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: nodejs +config: + dockerHubPassword: + type: string + secret: true plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin diff --git a/examples/nodejs/app/Dockerfile b/examples/nodejs/app/Dockerfile new file mode 100644 index 0000000..e17a80c --- /dev/null +++ b/examples/nodejs/app/Dockerfile @@ -0,0 +1,2 @@ +FROM alpine +RUN echo 👍 diff --git a/examples/nodejs/app/Dockerfile.buildArgs b/examples/nodejs/app/Dockerfile.buildArgs new file mode 100644 index 0000000..438ee01 --- /dev/null +++ b/examples/nodejs/app/Dockerfile.buildArgs @@ -0,0 +1,5 @@ +FROM alpine + +ARG SET_ME_TO_TRUE +RUN [ "$SET_ME_TO_TRUE" = "true" ] +RUN echo "That's the correct build arg, thanks! 👍" diff --git a/examples/nodejs/app/Dockerfile.emptyContext b/examples/nodejs/app/Dockerfile.emptyContext new file mode 100644 index 0000000..769593b --- /dev/null +++ b/examples/nodejs/app/Dockerfile.emptyContext @@ -0,0 +1,2 @@ +FROM alpine +RUN echo "This image doesn't use any local files, so it doesn't need a context parameter 👍" diff --git a/examples/nodejs/app/Dockerfile.extraHosts b/examples/nodejs/app/Dockerfile.extraHosts new file mode 100644 index 0000000..35b15f4 --- /dev/null +++ b/examples/nodejs/app/Dockerfile.extraHosts @@ -0,0 +1,3 @@ +FROM bash AS base + +RUN getent hosts metadata.google.internal diff --git a/examples/nodejs/app/Dockerfile.multiPlatform b/examples/nodejs/app/Dockerfile.multiPlatform new file mode 100644 index 0000000..49d3c83 --- /dev/null +++ b/examples/nodejs/app/Dockerfile.multiPlatform @@ -0,0 +1,7 @@ +FROM --platform=$BUILDPLATFORM alpine as build +RUN echo ${BUILDPLATFORM} > buildplatform +RUN echo ${TARGETPLATFORM} > targetplatform + +FROM build +RUN cat buildplatform +RUN cat targetplatform diff --git a/examples/nodejs/app/Dockerfile.namedContexts b/examples/nodejs/app/Dockerfile.namedContexts new file mode 100644 index 0000000..6e53dba --- /dev/null +++ b/examples/nodejs/app/Dockerfile.namedContexts @@ -0,0 +1,5 @@ +# syntax=docker/dockerfile:1.4 +FROM golang:latest + +RUN version="$(go version)" && echo $version && [ "$version" = "go version go1.21.7 linux/amd64" ] +RUN echo "This image uses named contexts to pin golang:latest to a specific SHA 👍" diff --git a/examples/nodejs/app/Dockerfile.secrets b/examples/nodejs/app/Dockerfile.secrets new file mode 100644 index 0000000..513bbd2 --- /dev/null +++ b/examples/nodejs/app/Dockerfile.secrets @@ -0,0 +1,4 @@ +FROM alpine + +RUN --mount=type=secret,id=password [ "$(cat /run/secrets/password)" = "hunter2" ] + diff --git a/examples/nodejs/app/Dockerfile.sshMount b/examples/nodejs/app/Dockerfile.sshMount new file mode 100644 index 0000000..055cb78 --- /dev/null +++ b/examples/nodejs/app/Dockerfile.sshMount @@ -0,0 +1,5 @@ +FROM alpine + +RUN apk add openssh-client + +RUN --mount=type=ssh ssh-add -l diff --git a/examples/nodejs/app/Dockerfile.target b/examples/nodejs/app/Dockerfile.target new file mode 100644 index 0000000..7cddec7 --- /dev/null +++ b/examples/nodejs/app/Dockerfile.target @@ -0,0 +1,8 @@ +FROM alpine as build-me +RUN echo 👍 + +FROM build-me as also-build-me +RUN echo 🤙 + +FROM build-me as dont-build-me +RUN [ "true" = "false" ] diff --git a/examples/nodejs/index.ts b/examples/nodejs/index.ts index 28ab40b..4a87b30 100644 --- a/examples/nodejs/index.ts +++ b/examples/nodejs/index.ts @@ -1,5 +1,172 @@ import * as pulumi from "@pulumi/pulumi"; -import * as dockerbuild from "@pulumi/dockerbuild"; +import * as docker_build from "@pulumi/docker-build"; -const myRandomResource = new dockerbuild.Random("myRandomResource", {length: 24}); -export const value = myRandomResource.result; +const config = new pulumi.Config(); +const dockerHubPassword = config.require("dockerHubPassword"); +const multiPlatform = new docker_build.Image("multiPlatform", { + push: false, + dockerfile: { + location: "./app/Dockerfile.multiPlatform", + }, + context: { + location: "./app", + }, + platforms: [ + docker_build.Platform.Plan9_amd64, + docker_build.Platform.Plan9_386, + ], +}); +const registryPush = new docker_build.Image("registryPush", { + push: false, + context: { + location: "./app", + }, + tags: ["docker.io/pulumibot/buildkit-e2e:example"], + exports: [{ + registry: { + ociMediaTypes: true, + push: false, + }, + }], + registries: [{ + address: "docker.io", + username: "pulumibot", + password: dockerHubPassword, + }], +}); +const cached = new docker_build.Image("cached", { + push: false, + context: { + location: "./app", + }, + cacheTo: [{ + local: { + dest: "tmp/cache", + mode: docker_build.CacheMode.Max, + }, + }], + cacheFrom: [{ + local: { + src: "tmp/cache", + }, + }], +}); +const buildArgs = new docker_build.Image("buildArgs", { + push: false, + dockerfile: { + location: "./app/Dockerfile.buildArgs", + }, + context: { + location: "./app", + }, + buildArgs: { + SET_ME_TO_TRUE: "true", + }, +}); +const extraHosts = new docker_build.Image("extraHosts", { + push: false, + dockerfile: { + location: "./app/Dockerfile.extraHosts", + }, + context: { + location: "./app", + }, + addHosts: ["metadata.google.internal:169.254.169.254"], +}); +const sshMount = new docker_build.Image("sshMount", { + push: false, + dockerfile: { + location: "./app/Dockerfile.sshMount", + }, + context: { + location: "./app", + }, + ssh: [{ + id: "default", + }], +}); +const secrets = new docker_build.Image("secrets", { + push: false, + dockerfile: { + location: "./app/Dockerfile.secrets", + }, + context: { + location: "./app", + }, + secrets: { + password: "hunter2", + }, +}); +const labels = new docker_build.Image("labels", { + push: false, + context: { + location: "./app", + }, + labels: { + description: "This image will get a descriptive label 👍", + }, +}); +const target = new docker_build.Image("target", { + push: false, + dockerfile: { + location: "./app/Dockerfile.target", + }, + context: { + location: "./app", + }, + target: "build-me", +}); +const namedContexts = new docker_build.Image("namedContexts", { + push: false, + dockerfile: { + location: "./app/Dockerfile.namedContexts", + }, + context: { + location: "./app", + named: { + "golang:latest": { + location: "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", + }, + }, + }, +}); +const remoteContext = new docker_build.Image("remoteContext", { + push: false, + context: { + location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + }, +}); +const remoteContextWithInline = new docker_build.Image("remoteContextWithInline", { + push: false, + dockerfile: { + inline: `FROM busybox +COPY hello.c ./ +`, + }, + context: { + location: "https://github.com/docker-library/hello-world.git", + }, +}); +const inline = new docker_build.Image("inline", { + push: false, + dockerfile: { + inline: `FROM alpine +RUN echo "This uses an inline Dockerfile! 👍" +`, + }, + context: { + location: "./app", + }, +}); +const dockerLoad = new docker_build.Image("dockerLoad", { + push: false, + context: { + location: "./app", + }, + exports: [{ + docker: { + tar: true, + }, + }], +}); +export const platforms = multiPlatform.platforms; diff --git a/examples/nodejs/package.json b/examples/nodejs/package.json index a03ec7e..32f47f1 100644 --- a/examples/nodejs/package.json +++ b/examples/nodejs/package.json @@ -1,5 +1,5 @@ { - "name": "provider-dockerbuild", + "name": "provider-docker-build", "devDependencies": { "@types/node": "^18" }, @@ -8,4 +8,3 @@ "@pulumi/pulumi": "^3.0.0" } } - diff --git a/examples/nodejs_test.go b/examples/nodejs_test.go index e06d117..32baa4e 100644 --- a/examples/nodejs_test.go +++ b/examples/nodejs_test.go @@ -18,7 +18,7 @@ func TestNodeExample(t *testing.T) { test := integration.ProgramTestOptions{ Dir: path.Join(cwd, "nodejs"), - Dependencies: []string{"@pulumi/dockerbuild"}, + Dependencies: []string{"@pulumi/docker-build"}, Secrets: map[string]string{ "dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"), }, diff --git a/examples/python/Pulumi.yaml b/examples/python/Pulumi.yaml index 3a9e5a0..44da823 100644 --- a/examples/python/Pulumi.yaml +++ b/examples/python/Pulumi.yaml @@ -1,6 +1,10 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: python +config: + dockerHubPassword: + type: string + secret: true plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin diff --git a/examples/python/__main__.py b/examples/python/__main__.py index f0a765d..8f1d0ae 100644 --- a/examples/python/__main__.py +++ b/examples/python/__main__.py @@ -1,5 +1,158 @@ import pulumi -import pulumi_dockerbuild as dockerbuild +import pulumi_docker_build as docker_build -my_random_resource = dockerbuild.Random("myRandomResource", length=24) -pulumi.export("value", my_random_resource.result) +config = pulumi.Config() +docker_hub_password = config.require("dockerHubPassword") +multi_platform = docker_build.Image("multiPlatform", + push=False, + dockerfile=docker_build.DockerfileArgs( + location="./app/Dockerfile.multiPlatform", + ), + context=docker_build.BuildContextArgs( + location="./app", + ), + platforms=[ + docker_build.Platform.PLAN9_AMD64, + docker_build.Platform.PLAN9_386, + ]) +registry_push = docker_build.Image("registryPush", + push=False, + context=docker_build.BuildContextArgs( + location="./app", + ), + tags=["docker.io/pulumibot/buildkit-e2e:example"], + exports=[docker_build.ExportArgs( + registry=docker_build.ExportRegistryArgs( + oci_media_types=True, + push=False, + ), + )], + registries=[docker_build.RegistryArgs( + address="docker.io", + username="pulumibot", + password=docker_hub_password, + )]) +cached = docker_build.Image("cached", + push=False, + context=docker_build.BuildContextArgs( + location="./app", + ), + cache_to=[docker_build.CacheToArgs( + local=docker_build.CacheToLocalArgs( + dest="tmp/cache", + mode=docker_build.CacheMode.MAX, + ), + )], + cache_from=[docker_build.CacheFromArgs( + local=docker_build.CacheFromLocalArgs( + src="tmp/cache", + ), + )]) +build_args = docker_build.Image("buildArgs", + push=False, + dockerfile=docker_build.DockerfileArgs( + location="./app/Dockerfile.buildArgs", + ), + context=docker_build.BuildContextArgs( + location="./app", + ), + build_args={ + "SET_ME_TO_TRUE": "true", + }) +extra_hosts = docker_build.Image("extraHosts", + push=False, + dockerfile=docker_build.DockerfileArgs( + location="./app/Dockerfile.extraHosts", + ), + context=docker_build.BuildContextArgs( + location="./app", + ), + add_hosts=["metadata.google.internal:169.254.169.254"]) +ssh_mount = docker_build.Image("sshMount", + push=False, + dockerfile=docker_build.DockerfileArgs( + location="./app/Dockerfile.sshMount", + ), + context=docker_build.BuildContextArgs( + location="./app", + ), + ssh=[docker_build.SSHArgs( + id="default", + )]) +secrets = docker_build.Image("secrets", + push=False, + dockerfile=docker_build.DockerfileArgs( + location="./app/Dockerfile.secrets", + ), + context=docker_build.BuildContextArgs( + location="./app", + ), + secrets={ + "password": "hunter2", + }) +labels = docker_build.Image("labels", + push=False, + context=docker_build.BuildContextArgs( + location="./app", + ), + labels={ + "description": "This image will get a descriptive label 👍", + }) +target = docker_build.Image("target", + push=False, + dockerfile=docker_build.DockerfileArgs( + location="./app/Dockerfile.target", + ), + context=docker_build.BuildContextArgs( + location="./app", + ), + target="build-me") +named_contexts = docker_build.Image("namedContexts", + push=False, + dockerfile=docker_build.DockerfileArgs( + location="./app/Dockerfile.namedContexts", + ), + context=docker_build.BuildContextArgs( + location="./app", + named={ + "golang:latest": docker_build.ContextArgs( + location="docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", + ), + }, + )) +remote_context = docker_build.Image("remoteContext", + push=False, + context=docker_build.BuildContextArgs( + location="https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + )) +remote_context_with_inline = docker_build.Image("remoteContextWithInline", + push=False, + dockerfile=docker_build.DockerfileArgs( + inline="""FROM busybox +COPY hello.c ./ +""", + ), + context=docker_build.BuildContextArgs( + location="https://github.com/docker-library/hello-world.git", + )) +inline = docker_build.Image("inline", + push=False, + dockerfile=docker_build.DockerfileArgs( + inline="""FROM alpine +RUN echo "This uses an inline Dockerfile! 👍" +""", + ), + context=docker_build.BuildContextArgs( + location="./app", + )) +docker_load = docker_build.Image("dockerLoad", + push=False, + context=docker_build.BuildContextArgs( + location="./app", + ), + exports=[docker_build.ExportArgs( + docker=docker_build.ExportDockerArgs( + tar=True, + ), + )]) +pulumi.export("platforms", multi_platform.platforms) diff --git a/examples/python/app/Dockerfile b/examples/python/app/Dockerfile new file mode 100644 index 0000000..e17a80c --- /dev/null +++ b/examples/python/app/Dockerfile @@ -0,0 +1,2 @@ +FROM alpine +RUN echo 👍 diff --git a/examples/python/app/Dockerfile.buildArgs b/examples/python/app/Dockerfile.buildArgs new file mode 100644 index 0000000..438ee01 --- /dev/null +++ b/examples/python/app/Dockerfile.buildArgs @@ -0,0 +1,5 @@ +FROM alpine + +ARG SET_ME_TO_TRUE +RUN [ "$SET_ME_TO_TRUE" = "true" ] +RUN echo "That's the correct build arg, thanks! 👍" diff --git a/examples/python/app/Dockerfile.emptyContext b/examples/python/app/Dockerfile.emptyContext new file mode 100644 index 0000000..769593b --- /dev/null +++ b/examples/python/app/Dockerfile.emptyContext @@ -0,0 +1,2 @@ +FROM alpine +RUN echo "This image doesn't use any local files, so it doesn't need a context parameter 👍" diff --git a/examples/python/app/Dockerfile.extraHosts b/examples/python/app/Dockerfile.extraHosts new file mode 100644 index 0000000..35b15f4 --- /dev/null +++ b/examples/python/app/Dockerfile.extraHosts @@ -0,0 +1,3 @@ +FROM bash AS base + +RUN getent hosts metadata.google.internal diff --git a/examples/python/app/Dockerfile.multiPlatform b/examples/python/app/Dockerfile.multiPlatform new file mode 100644 index 0000000..49d3c83 --- /dev/null +++ b/examples/python/app/Dockerfile.multiPlatform @@ -0,0 +1,7 @@ +FROM --platform=$BUILDPLATFORM alpine as build +RUN echo ${BUILDPLATFORM} > buildplatform +RUN echo ${TARGETPLATFORM} > targetplatform + +FROM build +RUN cat buildplatform +RUN cat targetplatform diff --git a/examples/python/app/Dockerfile.namedContexts b/examples/python/app/Dockerfile.namedContexts new file mode 100644 index 0000000..6e53dba --- /dev/null +++ b/examples/python/app/Dockerfile.namedContexts @@ -0,0 +1,5 @@ +# syntax=docker/dockerfile:1.4 +FROM golang:latest + +RUN version="$(go version)" && echo $version && [ "$version" = "go version go1.21.7 linux/amd64" ] +RUN echo "This image uses named contexts to pin golang:latest to a specific SHA 👍" diff --git a/examples/python/app/Dockerfile.secrets b/examples/python/app/Dockerfile.secrets new file mode 100644 index 0000000..513bbd2 --- /dev/null +++ b/examples/python/app/Dockerfile.secrets @@ -0,0 +1,4 @@ +FROM alpine + +RUN --mount=type=secret,id=password [ "$(cat /run/secrets/password)" = "hunter2" ] + diff --git a/examples/python/app/Dockerfile.sshMount b/examples/python/app/Dockerfile.sshMount new file mode 100644 index 0000000..055cb78 --- /dev/null +++ b/examples/python/app/Dockerfile.sshMount @@ -0,0 +1,5 @@ +FROM alpine + +RUN apk add openssh-client + +RUN --mount=type=ssh ssh-add -l diff --git a/examples/python/app/Dockerfile.target b/examples/python/app/Dockerfile.target new file mode 100644 index 0000000..7cddec7 --- /dev/null +++ b/examples/python/app/Dockerfile.target @@ -0,0 +1,8 @@ +FROM alpine as build-me +RUN echo 👍 + +FROM build-me as also-build-me +RUN echo 🤙 + +FROM build-me as dont-build-me +RUN [ "true" = "false" ] diff --git a/examples/python_test.go b/examples/python_test.go index 27b0337..0ff6310 100644 --- a/examples/python_test.go +++ b/examples/python_test.go @@ -17,7 +17,8 @@ func TestPythonExample(t *testing.T) { require.NoError(t, err) test := integration.ProgramTestOptions{ - Dir: path.Join(cwd, "python"), + Dir: path.Join(cwd, "python"), + RelativeWorkDir: ".", Dependencies: []string{ path.Join("..", "sdk", "python", "bin"), }, diff --git a/examples/testdata/recorded/TestProviderUpgrade/upgrade/0.0.1/grpc.json b/examples/testdata/recorded/TestProviderUpgrade/upgrade/0.0.1/grpc.json new file mode 100644 index 0000000..383bea1 --- /dev/null +++ b/examples/testdata/recorded/TestProviderUpgrade/upgrade/0.0.1/grpc.json @@ -0,0 +1,238 @@ +{"method":"/pulumirpc.LanguageRuntime/GetPluginInfo","request":{},"response":{},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.LanguageRuntime/GetRequiredPlugins","request":{"project":"deprecated","pwd":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","program":".","info":{"rootDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","programDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","entryPoint":".","options":{}}},"response":{"plugins":[{"name":"docker-build","kind":"resource"}]},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"resourceReferences"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"outputValues"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"deletedWith"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"aliasSpecs"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"transforms"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"pulumi:pulumi:Stack","name":"provider-docker-build-p-it-bryces-wor-upgrade-e061461f","object":{},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fgo%2Fpkg%2Fmod%2Fgithub.com%2Fpulumi%2Fpulumi%2Fsdk%2Fv3@v3.109.0%2Fgo%2Fpulumi%2Frun.go","line":113}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","object":{}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/GetPluginInfo","request":{},"response":{"version":"0.0.2-alpha.1713828576+f5e57ab7.dirty"},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/CheckConfig","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default","olds":{},"news":{}},"response":{"inputs":{"host":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Configure","request":{"variables":{"docker-build:config:host":""},"args":{"host":""},"acceptSecrets":true,"acceptResources":true,"sendsOldInputs":true,"sendsOldInputsToDelete":true},"response":{"acceptSecrets":true,"supportsPreview":true,"acceptResources":true,"acceptOutputs":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","olds":{},"news":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.buildArgs"}},"randomSeed":"Zpop9M+JmIOwQmpumbecUCsV/ks1h9w6l2kNF3lHjtY="},"response":{"inputs":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","olds":{},"news":{"cacheFrom":[{"local":{"src":"tmp/cache"}}],"cacheTo":[{"local":{"dest":"tmp/cache","mode":"max"}}],"context":{"location":"./app"}},"randomSeed":"dazhCjb2uC3lg762/5M8fHXC64y7VpteYy88EbBvYRk="},"response":{"inputs":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","olds":{},"news":{"context":{"location":"./app"},"exports":[{"docker":{"tar":true}}]},"randomSeed":"k/yAQzkpHW8a2lT12qIMuQfWrQ6sxi52a7UTd31LbD4="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","olds":{},"news":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.extraHosts"}},"randomSeed":"NEWS/2SobJBiSZclKMV4daNb9w/gZpL9pcnSEjW15fY="},"response":{"inputs":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","olds":{},"news":{"context":{"location":"./app"},"labels":{"description":"This image will get a descriptive label 👍"}},"randomSeed":"w9MW3AkZK+TS8c5c+uX+fP+Vt8poZV/PUbderi6/3dE="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","olds":{},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n"}},"randomSeed":"mV9MJBEc699p8wXnrZvEsyefqhUZDd3HxcbOcnUAdO0="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","olds":{},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.multiPlatform"},"platforms":["plan9/amd64","plan9/386"]},"randomSeed":"SPsY4RQylcrhPetcrwIr7G+BibJW0+09naCR6cJSJGg="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","olds":{},"news":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"location":"./app/Dockerfile.namedContexts"}},"randomSeed":"6nH/HyMcjBzTIyOjPbXERsM0mAuEXlIBKB24F1Gsa80="},"response":{"inputs":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","olds":{},"news":{"context":{"location":"./app"},"exports":[{"registry":{"ociMediaTypes":true,"push":false}}],"tags":["docker.io/pulumibot/buildkit-e2e:example"]},"randomSeed":"fMySvdt7mS2bvuQkC+8ICtuDrqf6d8R/cNdjP+iii6w="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","olds":{},"news":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"}},"randomSeed":"pXjbeSMAG78wM0O3cgoHerpS38bRyXVDCXAXHVmkeXA="},"response":{"inputs":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","olds":{},"news":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n"}},"randomSeed":"hU23n1oCU57Ug9cijDs3BOi/NUF0CsL2DRpU9QXayJU="},"response":{"inputs":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","olds":{},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.secrets"},"secrets":{"password":"hunter2"}},"randomSeed":"9oO+TJ0chIeCLZuHJV29ILCIQ6XWA9HcT34B8nt7lI8="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","olds":{},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.sshMount"},"ssh":[{"id":"default"}]},"randomSeed":"kWpnWR43XXn09f6NoRg3J1ahweFpu+Ki90I2VetJ8SM="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","olds":{},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.target"},"target":"build-me"},"randomSeed":"VXrvj73695AeVkkB+YfN35qaeyIUVEvBOVHVxSSfaIw="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""},"preview":true},"response":{"id":"sshMount","properties":{"context":{"location":"./app"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","ssh":[{"id":"default"}],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""},"preview":true},"response":{"id":"labels","properties":{"context":{"location":"./app"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"sshMount","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.sshMount"},"ssh":[{"id":"default"}]},"propertyDependencies":{"context":{},"dockerfile":{},"ssh":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","id":"sshMount","object":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"preview":true},"response":{"id":"inline","properties":{"context":{"location":"./app"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""},"preview":true},"response":{"id":"secrets","properties":{"context":{"location":"./app"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","secrets":{"password":"hunter2"},"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"inline","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","id":"inline","object":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"labels","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"labels":{"description":"This image will get a descriptive label 👍"}},"propertyDependencies":{"context":{},"labels":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","id":"labels","object":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"secrets","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.secrets"},"secrets":{"password":"hunter2"}},"propertyDependencies":{"context":{},"dockerfile":{},"secrets":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","id":"secrets","object":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""},"preview":true},"response":{"id":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","properties":{"context":{"location":"./app"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"registryPush","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"exports":[{"registry":{"ociMediaTypes":true,"push":false}}],"tags":["docker.io/pulumibot/buildkit-e2e:example"]},"propertyDependencies":{"context":{},"exports":{},"tags":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","id":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","object":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"},"preview":true},"response":{"id":"target","properties":{"context":{"location":"./app"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","target":"build-me"}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"target","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.target"},"target":"build-me"},"propertyDependencies":{"context":{},"dockerfile":{},"target":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","id":"target","object":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","properties":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"preview":true},"response":{"id":"buildArgs","properties":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"buildArgs","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.buildArgs"}},"propertyDependencies":{"buildArgs":{},"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","id":"buildArgs","object":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""},"preview":true},"response":{"id":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","properties":{"context":{"location":"./app"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"dockerLoad","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"exports":[{"docker":{"tar":true}}]},"propertyDependencies":{"context":{},"exports":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","id":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","object":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","properties":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"preview":true},"response":{"id":"cached","properties":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"cached","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"cacheFrom":[{"local":{"src":"tmp/cache"}}],"cacheTo":[{"local":{"dest":"tmp/cache","mode":"max"}}],"context":{"location":"./app"}},"propertyDependencies":{"cacheFrom":{},"cacheTo":{},"context":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","id":"cached","object":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""},"preview":true},"response":{"id":"multiPlatform","properties":{"context":{"location":"./app"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"multiPlatform","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.multiPlatform"},"platforms":["plan9/amd64","plan9/386"]},"propertyDependencies":{"context":{},"dockerfile":{},"platforms":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","id":"multiPlatform","object":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResourceOutputs","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","outputs":{"platforms":["plan9/amd64","plan9/386"]}},"response":{},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","properties":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"preview":true},"response":{"id":"remoteContext","properties":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"remoteContext","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"}},"propertyDependencies":{"context":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","id":"remoteContext","object":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","properties":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"preview":true},"response":{"id":"extraHosts","properties":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"extraHosts","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.extraHosts"}},"propertyDependencies":{"addHosts":{},"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","id":"extraHosts","object":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","properties":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"preview":true},"response":{"id":"remoteContextWithInline","properties":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"remoteContextWithInline","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","id":"remoteContextWithInline","object":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","properties":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"preview":true},"response":{"id":"namedContexts","properties":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"contextHash":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","digest":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"04da6b54-80e4-46f7-96ec-b56ff0331ba9","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"namedContexts","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"location":"./app/Dockerfile.namedContexts"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","id":"namedContexts","object":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.LanguageRuntime/Run","request":{"project":"provider-docker-build","stack":"p-it-bryces-wor-upgrade-e061461f","pwd":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","program":".","dryRun":true,"parallel":40,"monitorAddress":"127.0.0.1:60753","organization":"organization","configPropertyMap":{},"info":{"rootDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","programDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","entryPoint":".","options":{}}},"response":{},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.LanguageRuntime/GetPluginInfo","request":{},"response":{},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.LanguageRuntime/GetRequiredPlugins","request":{"project":"deprecated","pwd":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","program":".","info":{"rootDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","programDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","entryPoint":".","options":{}}},"response":{"plugins":[{"name":"docker-build","kind":"resource"}]},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"resourceReferences"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"outputValues"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"deletedWith"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"aliasSpecs"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"transforms"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"pulumi:pulumi:Stack","name":"provider-docker-build-p-it-bryces-wor-upgrade-e061461f","object":{},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fgo%2Fpkg%2Fmod%2Fgithub.com%2Fpulumi%2Fpulumi%2Fsdk%2Fv3@v3.109.0%2Fgo%2Fpulumi%2Frun.go","line":113}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","object":{}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/GetPluginInfo","request":{},"response":{"version":"0.0.2-alpha.1713828576+f5e57ab7.dirty"},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/CheckConfig","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default","olds":{},"news":{}},"response":{"inputs":{"host":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Configure","request":{"variables":{"docker-build:config:host":""},"args":{"host":""},"acceptSecrets":true,"acceptResources":true,"sendsOldInputs":true,"sendsOldInputsToDelete":true},"response":{"acceptSecrets":true,"supportsPreview":true,"acceptResources":true,"acceptOutputs":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","olds":{},"news":{"cacheFrom":[{"local":{"src":"tmp/cache"}}],"cacheTo":[{"local":{"dest":"tmp/cache","mode":"max"}}],"context":{"location":"./app"}},"randomSeed":"c+JQMdFhF6DOlV8hBuEsf76TrMLc6uX0cKSx/rvuQcc="},"response":{"inputs":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","olds":{},"news":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.buildArgs"}},"randomSeed":"iPranfQEDhU2tBPuJ2P7Q3/OHjdBPVHK9/IzM11zxfk="},"response":{"inputs":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","olds":{},"news":{"context":{"location":"./app"},"exports":[{"docker":{"tar":true}}]},"randomSeed":"nIXHrGklHMSwivplBfBucdtH4wJ7A5eo7bjj4ZxL8QE="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","olds":{},"news":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.extraHosts"}},"randomSeed":"hd2D8/SmwfN3kSVt2mzNB6K7p8wSD24qhpQ+kH+6Kxk="},"response":{"inputs":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","olds":{},"news":{"context":{"location":"./app"},"labels":{"description":"This image will get a descriptive label 👍"}},"randomSeed":"i/5eV6MV38Hjst81A4OlJF42udbJ9Asyz/r3P+1NTZ0="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","olds":{},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n"}},"randomSeed":"spb/oBaOJEb8pwkhwRwVY/swPtN8qOE65qm/r+WENhM="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","olds":{},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.multiPlatform"},"platforms":["plan9/amd64","plan9/386"]},"randomSeed":"VAIZ261e1K5SdjJGxUK4lFZZ81lVX9uLZNaMJZSaSgc="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","olds":{},"news":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"location":"./app/Dockerfile.namedContexts"}},"randomSeed":"ckcraHsDcgQy8Xfc5GCkEctolkFoPJuQBchIjgaIy5o="},"response":{"inputs":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","olds":{},"news":{"context":{"location":"./app"},"exports":[{"registry":{"ociMediaTypes":true,"push":false}}],"tags":["docker.io/pulumibot/buildkit-e2e:example"]},"randomSeed":"qLetBHXWUUbd1nzRKwb+4Q3vMS1U992mEpsIV3aWY68="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","olds":{},"news":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"}},"randomSeed":"1Z8ESqA4tOmwRrcM6D0q+ipiiHXwTJ9qgw9HT7+WaWo="},"response":{"inputs":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","olds":{},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.secrets"},"secrets":{"password":"hunter2"}},"randomSeed":"jVeY5oCFxhbO0PQM/yzT/j5sqyKRIiswQOHMkXQy1cw="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","olds":{},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.sshMount"},"ssh":[{"id":"default"}]},"randomSeed":"DhxVd/uvzafm07NfEWe2OBqp3t/o9IR6AT18EKLmEuU="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","olds":{},"news":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n"}},"randomSeed":"I0Y9+u4kHEsYQsS6cmtW6TOL8Bagud98ZK8PBzHAKOU="},"response":{"inputs":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","olds":{},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.target"},"target":"build-me"},"randomSeed":"T9HnfRgKDfZ+iBd2a68qPmyp8eGs0f+K2xsnjj0ISWE="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","properties":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"id":"remoteContext","properties":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"remoteContext","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"}},"propertyDependencies":{"context":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","id":"remoteContext","object":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"id":"inline","properties":{"context":{"location":"./app"},"contextHash":"36c67969e6700e87bde75fcf604a7db1fa9593194718fc0ae1c498df43228aec","digest":"","dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"inline","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","id":"inline","object":{"context":{"location":"./app"},"contextHash":"36c67969e6700e87bde75fcf604a7db1fa9593194718fc0ae1c498df43228aec","digest":"","dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"}},"response":{"id":"target","properties":{"context":{"location":"./app"},"contextHash":"fefadf795b6b4b119e97a87067a25f52a16cc3375223acad7b3f642fdcd413fc","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":"build-me"}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"target","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.target"},"target":"build-me"},"propertyDependencies":{"context":{},"dockerfile":{},"target":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","id":"target","object":{"context":{"location":"./app"},"contextHash":"fefadf795b6b4b119e97a87067a25f52a16cc3375223acad7b3f642fdcd413fc","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":"build-me"}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""}},"response":{"id":"secrets","properties":{"context":{"location":"./app"},"contextHash":"5c1561571a60aa3b5a234a9c26f69e2ba5d9a18624f426109d36a1d729b23a21","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","secrets":{"password":"hunter2"},"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"secrets","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.secrets"},"secrets":{"password":"hunter2"}},"propertyDependencies":{"context":{},"dockerfile":{},"secrets":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","id":"secrets","object":{"context":{"location":"./app"},"contextHash":"5c1561571a60aa3b5a234a9c26f69e2ba5d9a18624f426109d36a1d729b23a21","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","secrets":{"password":"hunter2"},"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""}},"response":{"id":"sshMount","properties":{"context":{"location":"./app"},"contextHash":"71d21b382ab9ee0324ad820ce57a0a4318342a0a244931f51fc46b791f1b37e9","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","ssh":[{"id":"default"}],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"sshMount","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.sshMount"},"ssh":[{"id":"default"}]},"propertyDependencies":{"context":{},"dockerfile":{},"ssh":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","id":"sshMount","object":{"context":{"location":"./app"},"contextHash":"71d21b382ab9ee0324ad820ce57a0a4318342a0a244931f51fc46b791f1b37e9","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","ssh":[{"id":"default"}],"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"response":{"id":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","properties":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"docker.io/pulumibot/buildkit-e2e:example@sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"registryPush","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"exports":[{"registry":{"ociMediaTypes":true,"push":false}}],"tags":["docker.io/pulumibot/buildkit-e2e:example"]},"propertyDependencies":{"context":{},"exports":{},"tags":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","id":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","object":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"docker.io/pulumibot/buildkit-e2e:example@sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","properties":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"id":"cached","properties":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"cached","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"cacheFrom":[{"local":{"src":"tmp/cache"}}],"cacheTo":[{"local":{"dest":"tmp/cache","mode":"max"}}],"context":{"location":"./app"}},"propertyDependencies":{"cacheFrom":{},"cacheTo":{},"context":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","id":"cached","object":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"id":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","properties":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"dockerLoad","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"exports":[{"docker":{"tar":true}}]},"propertyDependencies":{"context":{},"exports":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","id":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","object":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","properties":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"id":"extraHosts","properties":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"contextHash":"e5d510d9ce39d91260e3aa7f8c81d7517a76165eb35e7134cae2f3e4e9fcb712","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"extraHosts","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.extraHosts"}},"propertyDependencies":{"addHosts":{},"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","id":"extraHosts","object":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"contextHash":"e5d510d9ce39d91260e3aa7f8c81d7517a76165eb35e7134cae2f3e4e9fcb712","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"id":"labels","properties":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"labels","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"labels":{"description":"This image will get a descriptive label 👍"}},"propertyDependencies":{"context":{},"labels":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","id":"labels","object":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","properties":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"id":"buildArgs","properties":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"contextHash":"55695ddcfb4d08a0d78d1a74c7b0141dada73ed05bc4b056ba29a51e42c83381","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"buildArgs","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.buildArgs"}},"propertyDependencies":{"buildArgs":{},"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","id":"buildArgs","object":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"contextHash":"55695ddcfb4d08a0d78d1a74c7b0141dada73ed05bc4b056ba29a51e42c83381","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","properties":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""}},"response":{"id":"multiPlatform","properties":{"context":{"location":"./app"},"contextHash":"c7ecf546ed2402de04f2dfa56ca4adb6fd490eed4219d7f1b2e559cd475f1755","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"ref":"","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"multiPlatform","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.multiPlatform"},"platforms":["plan9/amd64","plan9/386"]},"propertyDependencies":{"context":{},"dockerfile":{},"platforms":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","id":"multiPlatform","object":{"context":{"location":"./app"},"contextHash":"c7ecf546ed2402de04f2dfa56ca4adb6fd490eed4219d7f1b2e559cd475f1755","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResourceOutputs","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","outputs":{"platforms":["plan9/amd64","plan9/386"]}},"response":{},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","properties":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"id":"namedContexts","properties":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"contextHash":"3adfaaf17fbb548f06310e76d2826bccb223b49463504d0cc4fe86b0eef5d47d","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"namedContexts","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"location":"./app/Dockerfile.namedContexts"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","id":"namedContexts","object":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"contextHash":"3adfaaf17fbb548f06310e76d2826bccb223b49463504d0cc4fe86b0eef5d47d","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Create","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","properties":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"id":"remoteContextWithInline","properties":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"remoteContextWithInline","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","id":"remoteContextWithInline","object":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.LanguageRuntime/Run","request":{"project":"provider-docker-build","stack":"p-it-bryces-wor-upgrade-e061461f","pwd":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","program":".","parallel":40,"monitorAddress":"127.0.0.1:60794","organization":"organization","configPropertyMap":{},"info":{"rootDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","programDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","entryPoint":".","options":{}}},"response":{},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.LanguageRuntime/GetPluginInfo","request":{},"response":{},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.LanguageRuntime/GetRequiredPlugins","request":{"project":"deprecated","pwd":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","program":".","info":{"rootDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","programDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","entryPoint":".","options":{}}},"response":{"plugins":[{"name":"docker-build","kind":"resource"}]},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"resourceReferences"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"outputValues"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"deletedWith"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"aliasSpecs"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"transforms"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"pulumi:pulumi:Stack","name":"provider-docker-build-p-it-bryces-wor-upgrade-e061461f","object":{},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fgo%2Fpkg%2Fmod%2Fgithub.com%2Fpulumi%2Fpulumi%2Fsdk%2Fv3@v3.109.0%2Fgo%2Fpulumi%2Frun.go","line":113}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","object":{}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/GetPluginInfo","request":{},"response":{"version":"0.0.2-alpha.1713828576+f5e57ab7.dirty"},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/CheckConfig","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default","olds":{"host":""},"news":{}},"response":{"inputs":{"host":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/DiffConfig","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default","olds":{"host":""},"news":{"host":""},"oldInputs":{"host":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Configure","request":{"variables":{"docker-build:config:host":""},"args":{"host":""},"acceptSecrets":true,"acceptResources":true,"sendsOldInputs":true,"sendsOldInputsToDelete":true},"response":{"acceptSecrets":true,"supportsPreview":true,"acceptResources":true,"acceptOutputs":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","olds":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.buildArgs"}},"randomSeed":"tMXM48V491BYs4k3nOqa+BUpCpy8mkFXc1Jyngtv2ks="},"response":{"inputs":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"buildArgs","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","olds":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"contextHash":"55695ddcfb4d08a0d78d1a74c7b0141dada73ed05bc4b056ba29a51e42c83381","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"buildArgs","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.buildArgs"}},"propertyDependencies":{"buildArgs":{},"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","id":"buildArgs","object":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"contextHash":"55695ddcfb4d08a0d78d1a74c7b0141dada73ed05bc4b056ba29a51e42c83381","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","olds":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"cacheFrom":[{"local":{"src":"tmp/cache"}}],"cacheTo":[{"local":{"dest":"tmp/cache","mode":"max"}}],"context":{"location":"./app"}},"randomSeed":"DcWNEJg0Y5LZ6MCTk5H8k58+T7cr/GbT3jb4gNz5zNc="},"response":{"inputs":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"cached","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","olds":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"cached","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"cacheFrom":[{"local":{"src":"tmp/cache"}}],"cacheTo":[{"local":{"dest":"tmp/cache","mode":"max"}}],"context":{"location":"./app"}},"propertyDependencies":{"cacheFrom":{},"cacheTo":{},"context":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","id":"cached","object":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"./app"},"exports":[{"docker":{"tar":true}}]},"randomSeed":"H71/WG0tiWTMF269z3kMD9zBX9Ln0uXis2MuCV/A1NQ="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","olds":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"dockerLoad","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"exports":[{"docker":{"tar":true}}]},"propertyDependencies":{"context":{},"exports":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","id":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","object":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","olds":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.extraHosts"}},"randomSeed":"HMPS/w4UZY/QwMCrYxUJnzTrLqe3q5V/LmY6nKTB484="},"response":{"inputs":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"extraHosts","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","olds":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"contextHash":"e5d510d9ce39d91260e3aa7f8c81d7517a76165eb35e7134cae2f3e4e9fcb712","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"extraHosts","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.extraHosts"}},"propertyDependencies":{"addHosts":{},"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","id":"extraHosts","object":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"contextHash":"e5d510d9ce39d91260e3aa7f8c81d7517a76165eb35e7134cae2f3e4e9fcb712","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n"}},"randomSeed":"agoXAuKdGsp1d8fTJ9q9+zEZCYWyZTuS2p3bvSUHOyA="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"inline","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","olds":{"context":{"location":"./app"},"contextHash":"36c67969e6700e87bde75fcf604a7db1fa9593194718fc0ae1c498df43228aec","digest":"","dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"inline","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","id":"inline","object":{"context":{"location":"./app"},"contextHash":"36c67969e6700e87bde75fcf604a7db1fa9593194718fc0ae1c498df43228aec","digest":"","dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"./app"},"labels":{"description":"This image will get a descriptive label 👍"}},"randomSeed":"9dw+AeJcDZPN4zirq4fWzncjMehMUqGP+reeeUwWhBY="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"labels","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","olds":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"labels","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"labels":{"description":"This image will get a descriptive label 👍"}},"propertyDependencies":{"context":{},"labels":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","id":"labels","object":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.multiPlatform"},"platforms":["plan9/amd64","plan9/386"]},"randomSeed":"eisHaeSJgr13Hz+Y+OW0HajMWGInl2AdIdvYKhaiYM8="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"multiPlatform","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","olds":{"context":{"location":"./app"},"contextHash":"c7ecf546ed2402de04f2dfa56ca4adb6fd490eed4219d7f1b2e559cd475f1755","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"multiPlatform","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.multiPlatform"},"platforms":["plan9/amd64","plan9/386"]},"propertyDependencies":{"context":{},"dockerfile":{},"platforms":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","id":"multiPlatform","object":{"context":{"location":"./app"},"contextHash":"c7ecf546ed2402de04f2dfa56ca4adb6fd490eed4219d7f1b2e559cd475f1755","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","olds":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"location":"./app/Dockerfile.namedContexts"}},"randomSeed":"dozyePo0yXgy++Qeg4zKJgYgteXPg9nDONDS38XVAWc="},"response":{"inputs":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"namedContexts","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","olds":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"contextHash":"3adfaaf17fbb548f06310e76d2826bccb223b49463504d0cc4fe86b0eef5d47d","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"namedContexts","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"location":"./app/Dockerfile.namedContexts"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","id":"namedContexts","object":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"contextHash":"3adfaaf17fbb548f06310e76d2826bccb223b49463504d0cc4fe86b0eef5d47d","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","olds":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"}},"randomSeed":"GeqkcC4hzoLB0IuMuSrn0UluNtAKnAwskinrZUpwQHY="},"response":{"inputs":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"remoteContext","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","olds":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"remoteContext","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"}},"propertyDependencies":{"context":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","id":"remoteContext","object":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""},"news":{"context":{"location":"./app"},"exports":[{"registry":{"ociMediaTypes":true,"push":false}}],"tags":["docker.io/pulumibot/buildkit-e2e:example"]},"randomSeed":"dJuBcpYybxF+YavduppyVIwRmNtwxnfbY/QvUOcVEkU="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","olds":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"docker.io/pulumibot/buildkit-e2e:example@sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"registryPush","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"exports":[{"registry":{"ociMediaTypes":true,"push":false}}],"tags":["docker.io/pulumibot/buildkit-e2e:example"]},"propertyDependencies":{"context":{},"exports":{},"tags":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","id":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","object":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"docker.io/pulumibot/buildkit-e2e:example@sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.secrets"},"secrets":{"password":"hunter2"}},"randomSeed":"DQv3cDSC/jY0j+m+Uuxz4NGr+SPwkxRd0NQEcjXKjFU="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"secrets","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","olds":{"context":{"location":"./app"},"contextHash":"5c1561571a60aa3b5a234a9c26f69e2ba5d9a18624f426109d36a1d729b23a21","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","secrets":{"password":"hunter2"},"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResourceOutputs","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","outputs":{"platforms":["plan9/amd64","plan9/386"]}},"response":{},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"secrets","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.secrets"},"secrets":{"password":"hunter2"}},"propertyDependencies":{"context":{},"dockerfile":{},"secrets":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","id":"secrets","object":{"context":{"location":"./app"},"contextHash":"5c1561571a60aa3b5a234a9c26f69e2ba5d9a18624f426109d36a1d729b23a21","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","secrets":{"password":"hunter2"},"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","olds":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n"}},"randomSeed":"LUCJNdWcMwcGg8+RC4Ps+WrX65B8InJWTsWzq/7tadw="},"response":{"inputs":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"remoteContextWithInline","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","olds":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"remoteContextWithInline","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","id":"remoteContextWithInline","object":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.sshMount"},"ssh":[{"id":"default"}]},"randomSeed":"XvWY+fKcYQGtROjT+EFktlT4gOcDqR5hl3ICvkGeEDE="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"sshMount","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","olds":{"context":{"location":"./app"},"contextHash":"71d21b382ab9ee0324ad820ce57a0a4318342a0a244931f51fc46b791f1b37e9","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","ssh":[{"id":"default"}],"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"sshMount","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.sshMount"},"ssh":[{"id":"default"}]},"propertyDependencies":{"context":{},"dockerfile":{},"ssh":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","id":"sshMount","object":{"context":{"location":"./app"},"contextHash":"71d21b382ab9ee0324ad820ce57a0a4318342a0a244931f51fc46b791f1b37e9","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","ssh":[{"id":"default"}],"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.target"},"target":"build-me"},"randomSeed":"H0mPGShL53nYNHWweNJpfa/pyS3//KbQRVxI9hsRdqM="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"target","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","olds":{"context":{"location":"./app"},"contextHash":"fefadf795b6b4b119e97a87067a25f52a16cc3375223acad7b3f642fdcd413fc","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":"build-me"},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"target","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.target"},"target":"build-me"},"propertyDependencies":{"context":{},"dockerfile":{},"target":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","id":"target","object":{"context":{"location":"./app"},"contextHash":"fefadf795b6b4b119e97a87067a25f52a16cc3375223acad7b3f642fdcd413fc","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":"build-me"}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.LanguageRuntime/Run","request":{"project":"provider-docker-build","stack":"p-it-bryces-wor-upgrade-e061461f","pwd":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","program":".","dryRun":true,"parallel":40,"monitorAddress":"127.0.0.1:60813","organization":"organization","configPropertyMap":{},"info":{"rootDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","programDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","entryPoint":".","options":{}}},"response":{},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.LanguageRuntime/GetPluginInfo","request":{},"response":{},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.LanguageRuntime/GetRequiredPlugins","request":{"project":"deprecated","pwd":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","program":".","info":{"rootDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","programDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","entryPoint":".","options":{}}},"response":{"plugins":[{"name":"docker-build","kind":"resource"}]},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"resourceReferences"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"outputValues"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"deletedWith"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"aliasSpecs"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/SupportsFeature","request":{"id":"transforms"},"response":{"hasSupport":true},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"pulumi:pulumi:Stack","name":"provider-docker-build-p-it-bryces-wor-upgrade-e061461f","object":{},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fgo%2Fpkg%2Fmod%2Fgithub.com%2Fpulumi%2Fpulumi%2Fsdk%2Fv3@v3.109.0%2Fgo%2Fpulumi%2Frun.go","line":113}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","object":{}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/GetPluginInfo","request":{},"response":{"version":"0.0.2-alpha.1713828576+f5e57ab7.dirty"},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/CheckConfig","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default","olds":{"host":""},"news":{}},"response":{"inputs":{"host":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/DiffConfig","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default","olds":{"host":""},"news":{"host":""},"oldInputs":{"host":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Configure","request":{"variables":{"docker-build:config:host":""},"args":{"host":""},"acceptSecrets":true,"acceptResources":true,"sendsOldInputs":true,"sendsOldInputsToDelete":true},"response":{"acceptSecrets":true,"supportsPreview":true,"acceptResources":true,"acceptOutputs":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","olds":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"cacheFrom":[{"local":{"src":"tmp/cache"}}],"cacheTo":[{"local":{"dest":"tmp/cache","mode":"max"}}],"context":{"location":"./app"}},"randomSeed":"0R8XzurAkZVBVo5Ak3rdfLsdkT4+q95F/3DhfHyWma8="},"response":{"inputs":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"cached","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","olds":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"cached","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"cacheFrom":[{"local":{"src":"tmp/cache"}}],"cacheTo":[{"local":{"dest":"tmp/cache","mode":"max"}}],"context":{"location":"./app"}},"propertyDependencies":{"cacheFrom":{},"cacheTo":{},"context":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","id":"cached","object":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","olds":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.buildArgs"}},"randomSeed":"y7SP2cfhyxX/xTtxfJbroa9/iXEXVW6Eaci4JXJTNxQ="},"response":{"inputs":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"buildArgs","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","olds":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"contextHash":"55695ddcfb4d08a0d78d1a74c7b0141dada73ed05bc4b056ba29a51e42c83381","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"buildArgs","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.buildArgs"}},"propertyDependencies":{"buildArgs":{},"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","id":"buildArgs","object":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"contextHash":"55695ddcfb4d08a0d78d1a74c7b0141dada73ed05bc4b056ba29a51e42c83381","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"./app"},"exports":[{"docker":{"tar":true}}]},"randomSeed":"cz62E7jO5yWlw9mkJj9Ez4cpdYBF2dgh7E0FUuzLxl8="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","olds":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"dockerLoad","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"exports":[{"docker":{"tar":true}}]},"propertyDependencies":{"context":{},"exports":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","id":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","object":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","olds":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.extraHosts"}},"randomSeed":"7y6D1J226DjAjOcjiIkhaRj6CTPNcN4M2H70xK/eCVE="},"response":{"inputs":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"extraHosts","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","olds":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"contextHash":"e5d510d9ce39d91260e3aa7f8c81d7517a76165eb35e7134cae2f3e4e9fcb712","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"extraHosts","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.extraHosts"}},"propertyDependencies":{"addHosts":{},"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","id":"extraHosts","object":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"contextHash":"e5d510d9ce39d91260e3aa7f8c81d7517a76165eb35e7134cae2f3e4e9fcb712","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n"}},"randomSeed":"YY7uODwIoO2TN3U21WRsr19e/afGYYMZhvFEdWfsi4g="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"inline","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","olds":{"context":{"location":"./app"},"contextHash":"36c67969e6700e87bde75fcf604a7db1fa9593194718fc0ae1c498df43228aec","digest":"","dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"inline","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","id":"inline","object":{"context":{"location":"./app"},"contextHash":"36c67969e6700e87bde75fcf604a7db1fa9593194718fc0ae1c498df43228aec","digest":"","dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"./app"},"labels":{"description":"This image will get a descriptive label 👍"}},"randomSeed":"w3KBpsGE5S0Y+m/1J+0/lClLXfM53bkQwrs6RHl3xlE="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"labels","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","olds":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"labels","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"labels":{"description":"This image will get a descriptive label 👍"}},"propertyDependencies":{"context":{},"labels":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","id":"labels","object":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.multiPlatform"},"platforms":["plan9/amd64","plan9/386"]},"randomSeed":"Ty0cOel4m07ZkB3A+9oMsoZbmI2Q+HUb8UsAbfy/QvU="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"multiPlatform","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","olds":{"context":{"location":"./app"},"contextHash":"c7ecf546ed2402de04f2dfa56ca4adb6fd490eed4219d7f1b2e559cd475f1755","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"multiPlatform","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.multiPlatform"},"platforms":["plan9/amd64","plan9/386"]},"propertyDependencies":{"context":{},"dockerfile":{},"platforms":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","id":"multiPlatform","object":{"context":{"location":"./app"},"contextHash":"c7ecf546ed2402de04f2dfa56ca4adb6fd490eed4219d7f1b2e559cd475f1755","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","olds":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"location":"./app/Dockerfile.namedContexts"}},"randomSeed":"zIZQ9y9Yx+mkkcVMVreEF0oSRj3raIAxkTQxi9rr18E="},"response":{"inputs":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"namedContexts","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","olds":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"contextHash":"3adfaaf17fbb548f06310e76d2826bccb223b49463504d0cc4fe86b0eef5d47d","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"namedContexts","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"location":"./app/Dockerfile.namedContexts"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","id":"namedContexts","object":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"contextHash":"3adfaaf17fbb548f06310e76d2826bccb223b49463504d0cc4fe86b0eef5d47d","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""},"news":{"context":{"location":"./app"},"exports":[{"registry":{"ociMediaTypes":true,"push":false}}],"tags":["docker.io/pulumibot/buildkit-e2e:example"]},"randomSeed":"+e5XWIeDD3dvxfeCWWouOUkymanKzu57dKusbE3L9Zg="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","olds":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"docker.io/pulumibot/buildkit-e2e:example@sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResourceOutputs","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","outputs":{"platforms":["plan9/amd64","plan9/386"]}},"response":{},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"registryPush","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"exports":[{"registry":{"ociMediaTypes":true,"push":false}}],"tags":["docker.io/pulumibot/buildkit-e2e:example"]},"propertyDependencies":{"context":{},"exports":{},"tags":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","id":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","object":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"docker.io/pulumibot/buildkit-e2e:example@sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","olds":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"}},"randomSeed":"uB8WQMUAsec6AH38scYXxeWFx+nAhZp+rUm2WGgrYxk="},"response":{"inputs":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"remoteContext","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","olds":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"remoteContext","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"}},"propertyDependencies":{"context":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","id":"remoteContext","object":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","olds":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"news":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n"}},"randomSeed":"1V9l2UKAV9cHSJcJTKt0ymI0WMMLUnIr+8qPkP6XqGc="},"response":{"inputs":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"remoteContextWithInline","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","olds":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"news":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""},"oldInputs":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"remoteContextWithInline","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n"}},"propertyDependencies":{"context":{},"dockerfile":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","id":"remoteContextWithInline","object":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.secrets"},"secrets":{"password":"hunter2"}},"randomSeed":"+icqSaPIIvsMlPWlo6cwzRCAeYedBVcz625lO/zhkio="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"secrets","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","olds":{"context":{"location":"./app"},"contextHash":"5c1561571a60aa3b5a234a9c26f69e2ba5d9a18624f426109d36a1d729b23a21","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","secrets":{"password":"hunter2"},"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"secrets","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.secrets"},"secrets":{"password":"hunter2"}},"propertyDependencies":{"context":{},"dockerfile":{},"secrets":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","id":"secrets","object":{"context":{"location":"./app"},"contextHash":"5c1561571a60aa3b5a234a9c26f69e2ba5d9a18624f426109d36a1d729b23a21","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","secrets":{"password":"hunter2"},"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.sshMount"},"ssh":[{"id":"default"}]},"randomSeed":"rK2kTpMkTSvZwJOL04Qni9QGC/C92dnGNNjTxCKtSO8="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"sshMount","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","olds":{"context":{"location":"./app"},"contextHash":"71d21b382ab9ee0324ad820ce57a0a4318342a0a244931f51fc46b791f1b37e9","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","ssh":[{"id":"default"}],"target":""},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"sshMount","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.sshMount"},"ssh":[{"id":"default"}]},"propertyDependencies":{"context":{},"dockerfile":{},"ssh":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","id":"sshMount","object":{"context":{"location":"./app"},"contextHash":"71d21b382ab9ee0324ad820ce57a0a4318342a0a244931f51fc46b791f1b37e9","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","ssh":[{"id":"default"}],"target":""}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.ResourceProvider/Check","request":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","olds":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"},"news":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.target"},"target":"build-me"},"randomSeed":"qrvpFrYtistuCpd/I8Dq63WU/hRxec5tndtlGxorgoY="},"response":{"inputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"}},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Diff","request":{"id":"target","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","olds":{"context":{"location":"./app"},"contextHash":"fefadf795b6b4b119e97a87067a25f52a16cc3375223acad7b3f642fdcd413fc","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":"build-me"},"news":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"}},"response":{"changes":"DIFF_NONE","hasDetailedDiff":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceMonitor/RegisterResource","request":{"type":"docker-build:index:Image","name":"target","parent":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f","custom":true,"object":{"context":{"location":"./app"},"dockerfile":{"location":"./app/Dockerfile.target"},"target":"build-me"},"propertyDependencies":{"context":{},"dockerfile":{},"target":{}},"acceptSecrets":true,"customTimeouts":{},"acceptResources":true,"sourcePosition":{"uri":"project://%2FUsers%2Frunner%2Fwork%2Fpulumi-yaml%2Fpulumi-yaml%2Fpkg%2Fpulumiyaml%2Frun.go","line":1330}},"response":{"urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","id":"target","object":{"context":{"location":"./app"},"contextHash":"fefadf795b6b4b119e97a87067a25f52a16cc3375223acad7b3f642fdcd413fc","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":"build-me"}},"metadata":{"mode":"server"}} +{"method":"/pulumirpc.LanguageRuntime/Run","request":{"project":"provider-docker-build","stack":"p-it-bryces-wor-upgrade-e061461f","pwd":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","program":".","parallel":40,"monitorAddress":"127.0.0.1:60829","organization":"organization","configPropertyMap":{},"info":{"rootDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","programDirectory":"/private/var/folders/kq/zdlx0fn57yl66gxktcyzylv40000gn/T/p-it-bryces-wor-upgrade-e061461f-4146250643","entryPoint":".","options":{}}},"response":{},"metadata":{"kind":"language","mode":"client","runtime":"yaml"}} +{"method":"/pulumirpc.ResourceProvider/GetPluginInfo","request":{},"response":{"version":"0.0.2-alpha.1713828576+f5e57ab7.dirty"},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Configure","request":{"variables":{"docker-build:config:host":""},"args":{"host":""},"acceptSecrets":true,"acceptResources":true,"sendsOldInputs":true,"sendsOldInputsToDelete":true},"response":{"acceptSecrets":true,"supportsPreview":true,"acceptResources":true,"acceptOutputs":true},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad","properties":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"docker":{"compressionLevel":0,"dest":"","tar":true},"raw":""}],"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"multiPlatform","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform","properties":{"context":{"location":"./app"},"contextHash":"c7ecf546ed2402de04f2dfa56ca4adb6fd490eed4219d7f1b2e559cd475f1755","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"ref":"","target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.multiPlatform"},"exec":false,"load":false,"noCache":false,"platforms":["plan9/amd64","plan9/386"],"pull":false,"push":false,"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"inline","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline","properties":{"context":{"location":"./app"},"contextHash":"36c67969e6700e87bde75fcf604a7db1fa9593194718fc0ae1c498df43228aec","digest":"","dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"buildArgs","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs","properties":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"contextHash":"55695ddcfb4d08a0d78d1a74c7b0141dada73ed05bc4b056ba29a51e42c83381","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"oldInputs":{"buildArgs":{"SET_ME_TO_TRUE":"true"},"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.buildArgs"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"target","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target","properties":{"context":{"location":"./app"},"contextHash":"fefadf795b6b4b119e97a87067a25f52a16cc3375223acad7b3f642fdcd413fc","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":"build-me"},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.target"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":"build-me"}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"labels","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels","properties":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"labels":{"description":"This image will get a descriptive label 👍"},"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"sshMount","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount","properties":{"context":{"location":"./app"},"contextHash":"71d21b382ab9ee0324ad820ce57a0a4318342a0a244931f51fc46b791f1b37e9","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","ssh":[{"id":"default"}],"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.sshMount"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ssh":[{"id":"default"}],"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"namedContexts","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts","properties":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"contextHash":"3adfaaf17fbb548f06310e76d2826bccb223b49463504d0cc4fe86b0eef5d47d","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"oldInputs":{"context":{"location":"./app","named":{"golang:latest":{"location":"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"}}},"dockerfile":{"inline":"","location":"./app/Dockerfile.namedContexts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"cached","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached","properties":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"oldInputs":{"cacheFrom":[{"disabled":false,"local":{"digest":"","src":"tmp/cache"},"raw":""}],"cacheTo":[{"disabled":false,"local":{"compressionLevel":0,"dest":"tmp/cache","mode":"max"},"raw":""}],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"remoteContextWithInline","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline","properties":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"oldInputs":{"context":{"location":"https://github.com/docker-library/hello-world.git"},"dockerfile":{"inline":"FROM busybox\nCOPY hello.c ./\n","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"extraHosts","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts","properties":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"contextHash":"e5d510d9ce39d91260e3aa7f8c81d7517a76165eb35e7134cae2f3e4e9fcb712","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"oldInputs":{"addHosts":["metadata.google.internal:169.254.169.254"],"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.extraHosts"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"secrets","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets","properties":{"context":{"location":"./app"},"contextHash":"5c1561571a60aa3b5a234a9c26f69e2ba5d9a18624f426109d36a1d729b23a21","digest":"","dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","secrets":{"password":"hunter2"},"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"./app/Dockerfile.secrets"},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"secrets":{"password":"hunter2"},"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"remoteContext","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext","properties":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"contextHash":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","digest":"","dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"ref":"","target":""},"oldInputs":{"context":{"location":"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"},"dockerfile":{"inline":"","location":""},"exec":false,"load":false,"noCache":false,"pull":false,"push":false,"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} +{"method":"/pulumirpc.ResourceProvider/Delete","request":{"id":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","urn":"urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush","properties":{"context":{"location":"./app"},"contextHash":"e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5","digest":"sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"ref":"docker.io/pulumibot/buildkit-e2e:example@sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e","tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""},"oldInputs":{"context":{"location":"./app"},"dockerfile":{"inline":"","location":"app/Dockerfile"},"exec":false,"exports":[{"disabled":false,"raw":"","registry":{"compressionLevel":0,"danglingNamePrefix":"","ociMediaTypes":true,"push":false}}],"load":false,"noCache":false,"pull":false,"push":false,"tags":["docker.io/pulumibot/buildkit-e2e:example"],"target":""}},"response":{},"metadata":{"kind":"resource","mode":"client","name":"docker-build"}} diff --git a/examples/testdata/recorded/TestProviderUpgrade/upgrade/0.0.1/state.json b/examples/testdata/recorded/TestProviderUpgrade/upgrade/0.0.1/state.json new file mode 100755 index 0000000..7a87482 --- /dev/null +++ b/examples/testdata/recorded/TestProviderUpgrade/upgrade/0.0.1/state.json @@ -0,0 +1,856 @@ +{ + "version": 3, + "deployment": { + "manifest": { + "time": "2024-04-25T08:48:01.267863-07:00", + "magic": "", + "version": "" + }, + "secrets_providers": { + "type": "passphrase", + "state": { + "salt": "v1:VL+kccbv65M=:v1:rRAfrl2TUFiFVdMv:sqpTiKP4J8mt05CfZp3bhu9Zqp4UsA==" + } + }, + "resources": [ + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "custom": false, + "type": "pulumi:pulumi:Stack", + "outputs": { + "platforms": [ + "plan9/amd64", + "plan9/386" + ] + }, + "created": "2024-04-25T15:47:59.523578Z", + "modified": "2024-04-25T15:47:59.523578Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default", + "custom": true, + "id": "1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "type": "pulumi:providers:docker-build", + "inputs": { + "host": "" + }, + "outputs": { + "host": "" + }, + "created": "2024-04-25T15:47:59.664483Z", + "modified": "2024-04-25T15:47:59.664483Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContext", + "custom": true, + "id": "remoteContext", + "type": "docker-build:index:Image", + "inputs": { + "context": { + "location": "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile" + }, + "dockerfile": { + "inline": "", + "location": "" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "target": "" + }, + "outputs": { + "context": { + "location": "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile" + }, + "contextHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "digest": "", + "dockerfile": { + "inline": "", + "location": "" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "context": [] + }, + "created": "2024-04-25T15:48:00.520476Z", + "modified": "2024-04-25T15:48:00.520476Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::inline", + "custom": true, + "id": "inline", + "type": "docker-build:index:Image", + "inputs": { + "context": { + "location": "./app" + }, + "dockerfile": { + "inline": "FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n", + "location": "" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "target": "" + }, + "outputs": { + "context": { + "location": "./app" + }, + "contextHash": "36c67969e6700e87bde75fcf604a7db1fa9593194718fc0ae1c498df43228aec", + "digest": "", + "dockerfile": { + "inline": "FROM alpine\nRUN echo \"This uses an inline Dockerfile! 👍\"\n", + "location": "" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "context": [], + "dockerfile": [] + }, + "created": "2024-04-25T15:48:00.542164Z", + "modified": "2024-04-25T15:48:00.542164Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::target", + "custom": true, + "id": "target", + "type": "docker-build:index:Image", + "inputs": { + "context": { + "location": "./app" + }, + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.target" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "target": "build-me" + }, + "outputs": { + "context": { + "location": "./app" + }, + "contextHash": "fefadf795b6b4b119e97a87067a25f52a16cc3375223acad7b3f642fdcd413fc", + "digest": "", + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.target" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "target": "build-me" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "context": [], + "dockerfile": [], + "target": [] + }, + "created": "2024-04-25T15:48:00.568397Z", + "modified": "2024-04-25T15:48:00.568397Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::secrets", + "custom": true, + "id": "secrets", + "type": "docker-build:index:Image", + "inputs": { + "context": { + "location": "./app" + }, + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.secrets" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "secrets": { + "password": "hunter2" + }, + "target": "" + }, + "outputs": { + "context": { + "location": "./app" + }, + "contextHash": "5c1561571a60aa3b5a234a9c26f69e2ba5d9a18624f426109d36a1d729b23a21", + "digest": "", + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.secrets" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "secrets": { + "password": "hunter2" + }, + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "context": [], + "dockerfile": [], + "secrets": [] + }, + "created": "2024-04-25T15:48:00.578273Z", + "modified": "2024-04-25T15:48:00.578273Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::sshMount", + "custom": true, + "id": "sshMount", + "type": "docker-build:index:Image", + "inputs": { + "context": { + "location": "./app" + }, + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.sshMount" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ssh": [ + { + "id": "default" + } + ], + "target": "" + }, + "outputs": { + "context": { + "location": "./app" + }, + "contextHash": "71d21b382ab9ee0324ad820ce57a0a4318342a0a244931f51fc46b791f1b37e9", + "digest": "", + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.sshMount" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "ssh": [ + { + "id": "default" + } + ], + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "context": [], + "dockerfile": [], + "ssh": [] + }, + "created": "2024-04-25T15:48:00.590119Z", + "modified": "2024-04-25T15:48:00.590119Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::registryPush", + "custom": true, + "id": "sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e", + "type": "docker-build:index:Image", + "inputs": { + "context": { + "location": "./app" + }, + "dockerfile": { + "inline": "", + "location": "app/Dockerfile" + }, + "exec": false, + "exports": [ + { + "disabled": false, + "raw": "", + "registry": { + "compressionLevel": 0, + "danglingNamePrefix": "", + "ociMediaTypes": true, + "push": false + } + } + ], + "load": false, + "noCache": false, + "pull": false, + "push": false, + "tags": [ + "docker.io/pulumibot/buildkit-e2e:example" + ], + "target": "" + }, + "outputs": { + "context": { + "location": "./app" + }, + "contextHash": "e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5", + "digest": "sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e", + "dockerfile": { + "inline": "", + "location": "app/Dockerfile" + }, + "exec": false, + "exports": [ + { + "disabled": false, + "raw": "", + "registry": { + "compressionLevel": 0, + "danglingNamePrefix": "", + "ociMediaTypes": true, + "push": false + } + } + ], + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "docker.io/pulumibot/buildkit-e2e:example@sha256:daf363fb4e814674f8e3e542e3dc1dbb9f7fb21f83c1956ddc948f20c1f9553e", + "tags": [ + "docker.io/pulumibot/buildkit-e2e:example" + ], + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "context": [], + "exports": [], + "tags": [] + }, + "created": "2024-04-25T15:48:00.59945Z", + "modified": "2024-04-25T15:48:00.59945Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::cached", + "custom": true, + "id": "cached", + "type": "docker-build:index:Image", + "inputs": { + "cacheFrom": [ + { + "disabled": false, + "local": { + "digest": "", + "src": "tmp/cache" + }, + "raw": "" + } + ], + "cacheTo": [ + { + "disabled": false, + "local": { + "compressionLevel": 0, + "dest": "tmp/cache", + "mode": "max" + }, + "raw": "" + } + ], + "context": { + "location": "./app" + }, + "dockerfile": { + "inline": "", + "location": "app/Dockerfile" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "target": "" + }, + "outputs": { + "cacheFrom": [ + { + "disabled": false, + "local": { + "digest": "", + "src": "tmp/cache" + }, + "raw": "" + } + ], + "cacheTo": [ + { + "disabled": false, + "local": { + "compressionLevel": 0, + "dest": "tmp/cache", + "mode": "max" + }, + "raw": "" + } + ], + "context": { + "location": "./app" + }, + "contextHash": "e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5", + "digest": "", + "dockerfile": { + "inline": "", + "location": "app/Dockerfile" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "cacheFrom": [], + "cacheTo": [], + "context": [] + }, + "created": "2024-04-25T15:48:00.616567Z", + "modified": "2024-04-25T15:48:00.616567Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::dockerLoad", + "custom": true, + "id": "sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040", + "type": "docker-build:index:Image", + "inputs": { + "context": { + "location": "./app" + }, + "dockerfile": { + "inline": "", + "location": "app/Dockerfile" + }, + "exec": false, + "exports": [ + { + "disabled": false, + "docker": { + "compressionLevel": 0, + "dest": "", + "tar": true + }, + "raw": "" + } + ], + "load": false, + "noCache": false, + "pull": false, + "push": false, + "target": "" + }, + "outputs": { + "context": { + "location": "./app" + }, + "contextHash": "e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5", + "digest": "sha256:af0f1b830122444f250e8f6d50ceea71b6f485cfc0f7a9cc828390c2f0647040", + "dockerfile": { + "inline": "", + "location": "app/Dockerfile" + }, + "exec": false, + "exports": [ + { + "disabled": false, + "docker": { + "compressionLevel": 0, + "dest": "", + "tar": true + }, + "raw": "" + } + ], + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "context": [], + "exports": [] + }, + "created": "2024-04-25T15:48:00.629463Z", + "modified": "2024-04-25T15:48:00.629463Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::extraHosts", + "custom": true, + "id": "extraHosts", + "type": "docker-build:index:Image", + "inputs": { + "addHosts": [ + "metadata.google.internal:169.254.169.254" + ], + "context": { + "location": "./app" + }, + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.extraHosts" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "target": "" + }, + "outputs": { + "addHosts": [ + "metadata.google.internal:169.254.169.254" + ], + "context": { + "location": "./app" + }, + "contextHash": "e5d510d9ce39d91260e3aa7f8c81d7517a76165eb35e7134cae2f3e4e9fcb712", + "digest": "", + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.extraHosts" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "addHosts": [], + "context": [], + "dockerfile": [] + }, + "created": "2024-04-25T15:48:00.639744Z", + "modified": "2024-04-25T15:48:00.639744Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::labels", + "custom": true, + "id": "labels", + "type": "docker-build:index:Image", + "inputs": { + "context": { + "location": "./app" + }, + "dockerfile": { + "inline": "", + "location": "app/Dockerfile" + }, + "exec": false, + "labels": { + "description": "This image will get a descriptive label 👍" + }, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "target": "" + }, + "outputs": { + "context": { + "location": "./app" + }, + "contextHash": "e569495ad1cfde07d0e769ab9b5ed56b889508f299d2e7a90400caf9e12795d5", + "digest": "", + "dockerfile": { + "inline": "", + "location": "app/Dockerfile" + }, + "exec": false, + "labels": { + "description": "This image will get a descriptive label 👍" + }, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "context": [], + "labels": [] + }, + "created": "2024-04-25T15:48:00.707146Z", + "modified": "2024-04-25T15:48:00.707146Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::buildArgs", + "custom": true, + "id": "buildArgs", + "type": "docker-build:index:Image", + "inputs": { + "buildArgs": { + "SET_ME_TO_TRUE": "true" + }, + "context": { + "location": "./app" + }, + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.buildArgs" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "target": "" + }, + "outputs": { + "buildArgs": { + "SET_ME_TO_TRUE": "true" + }, + "context": { + "location": "./app" + }, + "contextHash": "55695ddcfb4d08a0d78d1a74c7b0141dada73ed05bc4b056ba29a51e42c83381", + "digest": "", + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.buildArgs" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "buildArgs": [], + "context": [], + "dockerfile": [] + }, + "created": "2024-04-25T15:48:00.713219Z", + "modified": "2024-04-25T15:48:00.713219Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::multiPlatform", + "custom": true, + "id": "multiPlatform", + "type": "docker-build:index:Image", + "inputs": { + "context": { + "location": "./app" + }, + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.multiPlatform" + }, + "exec": false, + "load": false, + "noCache": false, + "platforms": [ + "plan9/amd64", + "plan9/386" + ], + "pull": false, + "push": false, + "target": "" + }, + "outputs": { + "context": { + "location": "./app" + }, + "contextHash": "c7ecf546ed2402de04f2dfa56ca4adb6fd490eed4219d7f1b2e559cd475f1755", + "digest": "", + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.multiPlatform" + }, + "exec": false, + "load": false, + "noCache": false, + "platforms": [ + "plan9/amd64", + "plan9/386" + ], + "pull": false, + "push": false, + "ref": "", + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "context": [], + "dockerfile": [], + "platforms": [] + }, + "created": "2024-04-25T15:48:00.802952Z", + "modified": "2024-04-25T15:48:00.802952Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::namedContexts", + "custom": true, + "id": "namedContexts", + "type": "docker-build:index:Image", + "inputs": { + "context": { + "location": "./app", + "named": { + "golang:latest": { + "location": "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984" + } + } + }, + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.namedContexts" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "target": "" + }, + "outputs": { + "context": { + "location": "./app", + "named": { + "golang:latest": { + "location": "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984" + } + } + }, + "contextHash": "3adfaaf17fbb548f06310e76d2826bccb223b49463504d0cc4fe86b0eef5d47d", + "digest": "", + "dockerfile": { + "inline": "", + "location": "./app/Dockerfile.namedContexts" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "context": [], + "dockerfile": [] + }, + "created": "2024-04-25T15:48:00.82495Z", + "modified": "2024-04-25T15:48:00.82495Z" + }, + { + "urn": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::docker-build:index:Image::remoteContextWithInline", + "custom": true, + "id": "remoteContextWithInline", + "type": "docker-build:index:Image", + "inputs": { + "context": { + "location": "https://github.com/docker-library/hello-world.git" + }, + "dockerfile": { + "inline": "FROM busybox\nCOPY hello.c ./\n", + "location": "" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "target": "" + }, + "outputs": { + "context": { + "location": "https://github.com/docker-library/hello-world.git" + }, + "contextHash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "digest": "", + "dockerfile": { + "inline": "FROM busybox\nCOPY hello.c ./\n", + "location": "" + }, + "exec": false, + "load": false, + "noCache": false, + "pull": false, + "push": false, + "ref": "", + "target": "" + }, + "parent": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:pulumi:Stack::provider-docker-build-p-it-bryces-wor-upgrade-e061461f", + "provider": "urn:pulumi:p-it-bryces-wor-upgrade-e061461f::provider-docker-build::pulumi:providers:docker-build::default::1262d75a-1f92-4f7b-8b32-6b5246d188f0", + "propertyDependencies": { + "context": [], + "dockerfile": [] + }, + "created": "2024-04-25T15:48:01.263124Z", + "modified": "2024-04-25T15:48:01.263124Z" + } + ] + } +} diff --git a/examples/tests/dockerhub/.dockerignore b/examples/tests/dockerhub/.dockerignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/examples/tests/dockerhub/.dockerignore @@ -0,0 +1 @@ +* diff --git a/examples/tests/dockerhub/Pulumi.yaml b/examples/tests/dockerhub/Pulumi.yaml new file mode 100644 index 0000000..1670a8b --- /dev/null +++ b/examples/tests/dockerhub/Pulumi.yaml @@ -0,0 +1,34 @@ +name: dockerhub +description: Push to DockerHub with caching +runtime: yaml +plugins: + providers: + - name: docker-build + path: ../../../bin +outputs: + ref: ${my-image.ref} +resources: + my-image: + type: docker-build:Image + properties: + tags: + - docker.io/pulumibot/buildkit-e2e + push: true + context: + location: . + dockerfile: + inline: FROM alpine + cacheFrom: + - registry: + ref: docker.io/pulumibot/buildkit-e2e:cache + cacheTo: + - registry: + ref: docker.io/pulumibot/buildkit-e2e:cache + registries: + - username: pulumibot + address: docker.io + password: ${dockerHubPassword} +config: + dockerHubPassword: + type: string + secret: true diff --git a/examples/tests/ecr/.dockerignore b/examples/tests/ecr/.dockerignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/examples/tests/ecr/.dockerignore @@ -0,0 +1 @@ +* diff --git a/examples/tests/ecr/Pulumi.yaml b/examples/tests/ecr/Pulumi.yaml new file mode 100644 index 0000000..5499c2e --- /dev/null +++ b/examples/tests/ecr/Pulumi.yaml @@ -0,0 +1,40 @@ +name: ecr +description: Push to AWS ECR with caching +runtime: yaml +plugins: + providers: + - name: docker-build + path: ../../../bin +outputs: + ref: ${my-image.ref} +resources: + ecr-repository: + type: aws:ecr:Repository + properties: + forceDelete: true + my-image: + type: docker-build:Image + properties: + tags: + - ${ecr-repository.repositoryUrl}:latest + push: true + context: + location: . + dockerfile: + inline: FROM alpine + cacheFrom: + - registry: + ref: ${ecr-repository.repositoryUrl}:cache + cacheTo: + - registry: + ref: ${ecr-repository.repositoryUrl}:cache + imageManifest: true + ociMediaTypes: true + registries: + - username: ${auth-token.userName} + password: ${auth-token.password} + address: ${ecr-repository.repositoryUrl} +variables: + auth-token: + fn::aws:ecr:getAuthorizationToken: + registryId: ${ecr-repository.registryId} diff --git a/examples/tests/unauthenticated/.dockerignore b/examples/tests/unauthenticated/.dockerignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/examples/tests/unauthenticated/.dockerignore @@ -0,0 +1 @@ +* diff --git a/examples/tests/unauthenticated/Pulumi.yaml b/examples/tests/unauthenticated/Pulumi.yaml new file mode 100644 index 0000000..024f5a0 --- /dev/null +++ b/examples/tests/unauthenticated/Pulumi.yaml @@ -0,0 +1,19 @@ +name: dockerhub-unauthenticated +description: Pull an image from Dockerhub without credentials +runtime: yaml +plugins: + providers: + - name: docker-build + path: ../../../bin +resources: + my-image: + type: docker-build:Image + properties: + tags: + - alpine-local + load: true + push: false + context: + location: . + dockerfile: + inline: FROM alpine diff --git a/examples/upgrade/Pulumi.yaml b/examples/upgrade/Pulumi.yaml new file mode 100644 index 0000000..e37d898 --- /dev/null +++ b/examples/upgrade/Pulumi.yaml @@ -0,0 +1,187 @@ +name: provider-docker-build +runtime: yaml +plugins: + providers: + - name: docker-build + path: ../../bin + +resources: + # docker buildx build -f app/Dockerfile.multiPlatform --platform plan9/amd64,plan9/386 app + multiPlatform: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.multiPlatform" + context: + location: "./app" + platforms: + - plan9/amd64 + - plan9/386 + + # docker buildx build --output=type=registry app + registryPush: + type: docker-build:Image + properties: + push: false + context: + location: "./app" + tags: ["docker.io/pulumibot/buildkit-e2e:example"] + exports: + - registry: + ociMediaTypes: true + push: false # Omit this to actually push images. + + # docker buildx build --cache-to=type=local,dest=tmp/cache,mode=max --cache-from=type=local,src=tmp/cache app + cached: + type: docker-build:Image + properties: + push: false + context: + location: "./app" + cacheTo: + - local: + dest: tmp/cache + mode: max + cacheFrom: + - local: + src: tmp/cache + + # docker buildx build -f app/Dockerfile.buildArgs --build-arg SET_ME_TO_TRUE=true app + buildArgs: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.buildArgs" + context: + location: "./app" + buildArgs: + SET_ME_TO_TRUE: "true" + + # docker buildx build -f app/Dockerfile.extraHosts --add-host metadata.google.internal:169.254.169.254 app + extraHosts: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.extraHosts" + context: + location: "./app" + addHosts: + - "metadata.google.internal:169.254.169.254" + + # docker buildx build -f app/Dockerfile.sshMount --ssh default app + sshMount: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.sshMount" + context: + location: "./app" + ssh: + - id: default + + # PASSWORD=hunter2 docker buildx build -f app/Dockerfile.secrets --secret id=password,env=PASSWORD app + secrets: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.secrets" + context: + location: "./app" + secrets: + password: hunter2 + + # docker buildx build --label "description=This image will get a descriptive label 👍" app + labels: + type: docker-build:Image + properties: + push: false + context: + location: "./app" + labels: + description: "This image will get a descriptive label 👍" + + # docker buildx build -f app/Dockerfile.target --target build-me app + target: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.target" + context: + location: "./app" + target: "build-me" + + # docker buildx build -f app/Dockerfile.namedContexts \ + # --build-context golang:latest=docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984 app + namedContexts: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.namedContexts" + context: + location: "./app" + named: + "golang:latest": + location: "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984" + + # docker buildx build https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile + remoteContext: + type: docker-build:Image + properties: + push: false + context: + location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile" + + # docker buildx build -f - https://github.com/docker-library/hello-world.git < buildplatform +RUN echo ${TARGETPLATFORM} > targetplatform + +FROM build +RUN cat buildplatform +RUN cat targetplatform diff --git a/examples/upgrade/app/Dockerfile.namedContexts b/examples/upgrade/app/Dockerfile.namedContexts new file mode 100644 index 0000000..6e53dba --- /dev/null +++ b/examples/upgrade/app/Dockerfile.namedContexts @@ -0,0 +1,5 @@ +# syntax=docker/dockerfile:1.4 +FROM golang:latest + +RUN version="$(go version)" && echo $version && [ "$version" = "go version go1.21.7 linux/amd64" ] +RUN echo "This image uses named contexts to pin golang:latest to a specific SHA 👍" diff --git a/examples/upgrade/app/Dockerfile.secrets b/examples/upgrade/app/Dockerfile.secrets new file mode 100644 index 0000000..513bbd2 --- /dev/null +++ b/examples/upgrade/app/Dockerfile.secrets @@ -0,0 +1,4 @@ +FROM alpine + +RUN --mount=type=secret,id=password [ "$(cat /run/secrets/password)" = "hunter2" ] + diff --git a/examples/upgrade/app/Dockerfile.sshMount b/examples/upgrade/app/Dockerfile.sshMount new file mode 100644 index 0000000..055cb78 --- /dev/null +++ b/examples/upgrade/app/Dockerfile.sshMount @@ -0,0 +1,5 @@ +FROM alpine + +RUN apk add openssh-client + +RUN --mount=type=ssh ssh-add -l diff --git a/examples/upgrade/app/Dockerfile.target b/examples/upgrade/app/Dockerfile.target new file mode 100644 index 0000000..7cddec7 --- /dev/null +++ b/examples/upgrade/app/Dockerfile.target @@ -0,0 +1,8 @@ +FROM alpine as build-me +RUN echo 👍 + +FROM build-me as also-build-me +RUN echo 🤙 + +FROM build-me as dont-build-me +RUN [ "true" = "false" ] diff --git a/examples/yaml/Pulumi.yaml b/examples/yaml/Pulumi.yaml index e0796d6..5a0f0f2 100644 --- a/examples/yaml/Pulumi.yaml +++ b/examples/yaml/Pulumi.yaml @@ -1,15 +1,195 @@ -name: provider-dockerbuild +name: provider-docker-build runtime: yaml plugins: providers: - - name: dockerbuild + - name: docker-build path: ../../bin resources: - myRandomResource: - type: dockerbuild:Random + # docker buildx build -f app/Dockerfile.multiPlatform --platform plan9/amd64,plan9/386 app + multiPlatform: + type: docker-build:Image properties: - length: 24 + push: false + dockerfile: + location: "./app/Dockerfile.multiPlatform" + context: + location: "./app" + platforms: + - plan9/amd64 + - plan9/386 + + # docker buildx build --output=type=registry app + registryPush: + type: docker-build:Image + properties: + push: false + context: + location: "./app" + tags: ["docker.io/pulumibot/buildkit-e2e:example"] + exports: + - registry: + ociMediaTypes: true + push: false # Omit this to actually push images. + registries: + - address: docker.io + username: pulumibot + password: ${dockerHubPassword} + + # docker buildx build --cache-to=type=local,dest=tmp/cache,mode=max --cache-from=type=local,src=tmp/cache app + cached: + type: docker-build:Image + properties: + push: false + context: + location: "./app" + cacheTo: + - local: + dest: tmp/cache + mode: max + cacheFrom: + - local: + src: tmp/cache + + # docker buildx build -f app/Dockerfile.buildArgs --build-arg SET_ME_TO_TRUE=true app + buildArgs: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.buildArgs" + context: + location: "./app" + buildArgs: + SET_ME_TO_TRUE: "true" + + # docker buildx build -f app/Dockerfile.extraHosts --add-host metadata.google.internal:169.254.169.254 app + extraHosts: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.extraHosts" + context: + location: "./app" + addHosts: + - "metadata.google.internal:169.254.169.254" + + # docker buildx build -f app/Dockerfile.sshMount --ssh default app + sshMount: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.sshMount" + context: + location: "./app" + ssh: + - id: default + + # PASSWORD=hunter2 docker buildx build -f app/Dockerfile.secrets --secret id=password,env=PASSWORD app + secrets: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.secrets" + context: + location: "./app" + secrets: + password: hunter2 + + # docker buildx build --label "description=This image will get a descriptive label 👍" app + labels: + type: docker-build:Image + properties: + push: false + context: + location: "./app" + labels: + description: "This image will get a descriptive label 👍" + + # docker buildx build -f app/Dockerfile.target --target build-me app + target: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.target" + context: + location: "./app" + target: "build-me" + + # docker buildx build -f app/Dockerfile.namedContexts \ + # --build-context golang:latest=docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984 app + namedContexts: + type: docker-build:Image + properties: + push: false + dockerfile: + location: "./app/Dockerfile.namedContexts" + context: + location: "./app" + named: + "golang:latest": + location: "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984" + + # docker buildx build https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile + remoteContext: + type: docker-build:Image + properties: + push: false + context: + location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile" + + # docker buildx build -f - https://github.com/docker-library/hello-world.git < buildplatform +RUN echo ${TARGETPLATFORM} > targetplatform + +FROM build +RUN cat buildplatform +RUN cat targetplatform diff --git a/examples/yaml/app/Dockerfile.namedContexts b/examples/yaml/app/Dockerfile.namedContexts new file mode 100644 index 0000000..6e53dba --- /dev/null +++ b/examples/yaml/app/Dockerfile.namedContexts @@ -0,0 +1,5 @@ +# syntax=docker/dockerfile:1.4 +FROM golang:latest + +RUN version="$(go version)" && echo $version && [ "$version" = "go version go1.21.7 linux/amd64" ] +RUN echo "This image uses named contexts to pin golang:latest to a specific SHA 👍" diff --git a/examples/yaml/app/Dockerfile.secrets b/examples/yaml/app/Dockerfile.secrets new file mode 100644 index 0000000..513bbd2 --- /dev/null +++ b/examples/yaml/app/Dockerfile.secrets @@ -0,0 +1,4 @@ +FROM alpine + +RUN --mount=type=secret,id=password [ "$(cat /run/secrets/password)" = "hunter2" ] + diff --git a/examples/yaml/app/Dockerfile.sshMount b/examples/yaml/app/Dockerfile.sshMount new file mode 100644 index 0000000..055cb78 --- /dev/null +++ b/examples/yaml/app/Dockerfile.sshMount @@ -0,0 +1,5 @@ +FROM alpine + +RUN apk add openssh-client + +RUN --mount=type=ssh ssh-add -l diff --git a/examples/yaml/app/Dockerfile.target b/examples/yaml/app/Dockerfile.target new file mode 100644 index 0000000..7cddec7 --- /dev/null +++ b/examples/yaml/app/Dockerfile.target @@ -0,0 +1,8 @@ +FROM alpine as build-me +RUN echo 👍 + +FROM build-me as also-build-me +RUN echo 🤙 + +FROM build-me as dont-build-me +RUN [ "true" = "false" ] diff --git a/examples/yaml_test.go b/examples/yaml_test.go index 23dc623..9264d76 100644 --- a/examples/yaml_test.go +++ b/examples/yaml_test.go @@ -6,8 +6,11 @@ package examples import ( "os" "path" + "path/filepath" "testing" + "github.com/pulumi/providertest" + "github.com/pulumi/pulumi-docker-build/provider" "github.com/pulumi/pulumi/pkg/v3/testing/integration" "github.com/stretchr/testify/require" ) @@ -25,3 +28,69 @@ func TestYAMLExample(t *testing.T) { integration.ProgramTest(t, &test) } + +func TestYAMLExampleUpgrade(t *testing.T) { + // t.Setenv("PULUMI_PROVIDER_TEST_MODE", "snapshot") + + cwd, err := os.Getwd() + require.NoError(t, err) + + bin, err := filepath.Abs("../bin") + require.NoError(t, err) + + t.Setenv("PATH", bin+":"+os.Getenv("PATH")) + p, err := provider.New(nil) + require.NoError(t, err) + + test := providertest.NewProviderTest(path.Join(cwd, "upgrade"), + providertest.WithProviderName("docker-build"), + providertest.WithBaselineVersion("0.0.1"), + providertest.WithResourceProviderServer(p), + // providertest.WithConfig("dockerHubPassword", os.Getenv("DOCKER_HUB_PASSWORD")), // Doesn't support secrets yet. + ) + test.Run(t) +} + +func TestECR(t *testing.T) { + if os.Getenv("AWS_SESSION_TOKEN") == "" { + t.Skip("Missing AWS credentials") + } + + cwd, err := os.Getwd() + require.NoError(t, err) + + test := integration.ProgramTestOptions{ + Dir: path.Join(cwd, "tests/ecr"), + } + + integration.ProgramTest(t, &test) +} + +func TestDockerHub(t *testing.T) { + if os.Getenv("DOCKER_HUB_PASSWORD") == "" { + t.Skip("Missing DockerHub credentials") + } + + cwd, err := os.Getwd() + require.NoError(t, err) + + test := integration.ProgramTestOptions{ + Dir: path.Join(cwd, "tests/dockerhub"), + Secrets: map[string]string{ + "dockerHubPassword": os.Getenv("DOCKER_HUB_PASSWORD"), + }, + } + + integration.ProgramTest(t, &test) +} + +func TestDockerHubUnauthenticated(t *testing.T) { + cwd, err := os.Getwd() + require.NoError(t, err) + + test := integration.ProgramTestOptions{ + Dir: path.Join(cwd, "tests/unauthenticated"), + } + + integration.ProgramTest(t, &test) +} diff --git a/go.mod b/go.mod index 72350d2..892a913 100644 --- a/go.mod +++ b/go.mod @@ -1,157 +1,296 @@ -module github.com/pulumi/pulumi-dockerbuild +module github.com/pulumi/pulumi-docker-build go 1.21.7 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi-go-provider v0.14.1-0.20240301190400-aeddefa8dc54 - github.com/pulumi/pulumi-go-provider/integration v0.10.0 - github.com/pulumi/pulumi-java/pkg v0.9.9 - github.com/pulumi/pulumi/pkg/v3 v3.111.1 - github.com/pulumi/pulumi/sdk/v3 v3.111.1 - github.com/stretchr/testify v1.8.4 + github.com/distribution/reference v0.5.0 + github.com/docker/buildx v0.13.1 + github.com/docker/cli v26.0.0-rc1+incompatible + github.com/docker/distribution v2.8.2+incompatible + github.com/docker/docker v26.0.0-rc1+incompatible + github.com/golangci/golangci-lint v1.57.1 + github.com/moby/buildkit v0.13.0 + github.com/moby/patternmatcher v0.6.0 + github.com/muesli/reflow v0.3.0 + github.com/otiai10/copy v1.14.0 + github.com/pulumi/pulumi-go-provider v0.16.0 + github.com/pulumi/pulumi-go-provider/integration v0.10.1-0.20240314105842-9fbffb634faf + github.com/pulumi/pulumi-java/pkg v0.10.0 + github.com/pulumi/pulumi/pkg/v3 v3.113.0 + github.com/pulumi/pulumi/sdk/go/pulumi-language-go/v3 v3.0.0-20240415162817-44c8de53d5d2 + github.com/pulumi/pulumi/sdk/v3 v3.113.0 + github.com/regclient/regclient v0.0.0-20240308005156-a7434cff9c6b + github.com/sirupsen/logrus v1.9.3 + github.com/spf13/afero v1.11.0 + github.com/stretchr/testify v1.9.0 + github.com/theupdateframework/notary v0.7.0 + github.com/tonistiigi/fsutil v0.0.0-20240301111122-7525a1af2bb5 + go.uber.org/mock v0.3.0 + golang.org/x/crypto v0.21.0 + google.golang.org/protobuf v1.33.0 + gopkg.in/yaml.v3 v3.0.1 ) require ( - cloud.google.com/go v0.110.10 // indirect - cloud.google.com/go/compute v1.23.3 // indirect + 4d63.com/gocheckcompilerdirectives v1.2.1 // indirect + 4d63.com/gochecknoglobals v0.2.1 // indirect + cloud.google.com/go v0.112.1 // indirect + cloud.google.com/go/compute v1.25.0 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.5 // indirect - cloud.google.com/go/kms v1.15.5 // indirect - cloud.google.com/go/logging v1.8.1 // indirect - cloud.google.com/go/longrunning v0.5.4 // indirect - cloud.google.com/go/storage v1.35.1 // indirect + cloud.google.com/go/iam v1.1.6 // indirect + cloud.google.com/go/kms v1.15.7 // indirect + cloud.google.com/go/logging v1.9.0 // indirect + cloud.google.com/go/longrunning v0.5.5 // indirect + cloud.google.com/go/storage v1.39.1 // indirect dario.cat/mergo v1.0.0 // indirect + github.com/4meepo/tagalign v1.3.3 // indirect + github.com/Abirdcfly/dupword v0.0.14 // indirect + github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect github.com/AlecAivazis/survey/v2 v2.3.7 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 // indirect - github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 // indirect + github.com/Antonboom/errname v0.1.12 // indirect + github.com/Antonboom/nilnil v0.1.7 // indirect + github.com/Antonboom/testifylint v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 // indirect - github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 // indirect github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest/to v0.4.0 // indirect - github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 // indirect - github.com/BurntSushi/toml v1.2.1 // indirect + github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect + github.com/BurntSushi/toml v1.3.2 // indirect + github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect + github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 // indirect + github.com/Masterminds/semver v1.5.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/alecthomas/chroma v0.10.0 // indirect + github.com/alecthomas/go-check-sumtype v0.1.4 // indirect + github.com/alexkohler/nakedret/v2 v2.0.4 // indirect + github.com/alexkohler/prealloc v1.0.0 // indirect + github.com/alingse/asasalint v0.0.11 // indirect + github.com/apparentlymart/go-cidr v1.1.0 // indirect github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect - github.com/armon/go-metrics v0.4.0 // indirect + github.com/armon/go-metrics v0.4.1 // indirect github.com/armon/go-radix v1.0.0 // indirect + github.com/ashanbrown/forbidigo v1.6.0 // indirect + github.com/ashanbrown/makezero v1.1.1 // indirect github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go v1.49.0 // indirect - github.com/aws/aws-sdk-go-v2 v1.24.0 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 // indirect - github.com/aws/aws-sdk-go-v2/config v1.26.1 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.16.12 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 // indirect - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 // indirect - github.com/aws/aws-sdk-go-v2/service/kms v1.27.5 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 // indirect - github.com/aws/smithy-go v1.19.0 // indirect + github.com/aws/aws-sdk-go v1.50.36 // indirect + github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.11 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 // indirect + github.com/aws/aws-sdk-go-v2/service/kms v1.30.1 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect + github.com/aws/smithy-go v1.20.2 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect - github.com/ccojocar/zxcvbn-go v1.0.1 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bkielbasa/cyclop v1.2.1 // indirect + github.com/blizzy78/varnamelen v0.8.0 // indirect + github.com/bombsimon/wsl/v4 v4.2.1 // indirect + github.com/breml/bidichk v0.2.7 // indirect + github.com/breml/errchkjson v0.3.6 // indirect + github.com/butuzov/ireturn v0.3.0 // indirect + github.com/butuzov/mirror v1.1.0 // indirect + github.com/catenacyber/perfsprint v0.7.1 // indirect + github.com/ccojocar/zxcvbn-go v1.0.2 // indirect github.com/cenkalti/backoff/v3 v3.2.2 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/charithe/durationcheck v0.0.10 // indirect github.com/charmbracelet/bubbles v0.16.1 // indirect github.com/charmbracelet/bubbletea v0.24.2 // indirect github.com/charmbracelet/glamour v0.6.0 // indirect github.com/charmbracelet/lipgloss v0.7.1 // indirect + github.com/chavacava/garif v0.1.0 // indirect github.com/cheggaaa/pb v1.0.29 // indirect + github.com/ckaznocha/intrange v0.1.0 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect + github.com/compose-spec/compose-go/v2 v2.0.0-rc.8 // indirect + github.com/containerd/console v1.0.4 // indirect + github.com/containerd/containerd v1.7.13 // indirect + github.com/containerd/continuity v0.4.3 // indirect + github.com/containerd/log v0.1.0 // indirect + github.com/containerd/ttrpc v1.2.2 // indirect + github.com/containerd/typeurl/v2 v2.1.1 // indirect + github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect + github.com/curioswitch/go-reassign v0.2.0 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect + github.com/daixiang0/gci v0.12.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/deckarep/golang-set/v2 v2.5.0 // indirect + github.com/denis-tingaikin/go-header v0.5.0 // indirect github.com/djherbis/times v1.5.0 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect + github.com/docker/cli-docs-tool v0.7.0 // indirect + github.com/docker/docker-credential-helpers v0.8.0 // indirect + github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c // indirect + github.com/docker/go-connections v0.5.0 // indirect + github.com/docker/go-metrics v0.0.1 // indirect + github.com/docker/go-units v0.5.0 // indirect + github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/erikgeiser/promptkit v0.9.0 // indirect - github.com/ettle/strcase v0.1.1 // indirect - github.com/fatih/color v1.13.0 // indirect + github.com/ettle/strcase v0.2.0 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/fatih/structtag v1.2.0 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/firefart/nonamedreturns v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fvbommel/sortorder v1.1.0 // indirect + github.com/fzipp/gocyclo v0.6.0 // indirect github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 // indirect + github.com/ghostiam/protogetter v0.3.5 // indirect + github.com/go-critic/go-critic v0.11.2 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-git/go-git/v5 v5.11.0 // indirect - github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect - github.com/gofrs/uuid v4.3.1+incompatible // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect + github.com/go-toolsmith/astcast v1.1.0 // indirect + github.com/go-toolsmith/astcopy v1.1.0 // indirect + github.com/go-toolsmith/astequal v1.2.0 // indirect + github.com/go-toolsmith/astfmt v1.1.0 // indirect + github.com/go-toolsmith/astp v1.1.0 // indirect + github.com/go-toolsmith/strparse v1.1.0 // indirect + github.com/go-toolsmith/typep v1.1.0 // indirect + github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 // indirect + github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect + github.com/gobwas/glob v0.2.3 // indirect + github.com/gofrs/flock v0.8.1 // indirect + github.com/gofrs/uuid v4.2.0+incompatible // indirect + github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v5 v5.1.0 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang-jwt/jwt/v5 v5.2.1 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect + github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e // indirect + github.com/golangci/misspell v0.4.1 // indirect + github.com/golangci/plugin-module-register v0.1.1 // indirect + github.com/golangci/revgrep v0.5.2 // indirect + github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/go-querystring v1.1.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect github.com/google/pprof v0.0.0-20230406165453-00490a63f317 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/google/uuid v1.4.0 // indirect - github.com/google/wire v0.5.0 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/google/wire v0.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect - github.com/googleapis/gax-go/v2 v2.12.0 // indirect + github.com/googleapis/gax-go/v2 v2.12.2 // indirect + github.com/gordonklaus/ineffassign v0.1.0 // indirect github.com/gorilla/css v1.0.0 // indirect github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/websocket v1.5.0 // indirect + github.com/gostaticanalysis/analysisutil v0.7.1 // indirect + github.com/gostaticanalysis/comment v1.4.2 // indirect + github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect + github.com/gostaticanalysis/nilerr v0.1.1 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-hclog v1.2.2 // indirect + github.com/hashicorp/go-cty-funcs v0.0.0-20230405223818-a090f58aa992 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.4.6 // indirect - github.com/hashicorp/go-retryablehttp v0.7.1 // indirect + github.com/hashicorp/go-plugin v1.6.0 // indirect + github.com/hashicorp/go-retryablehttp v0.7.5 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-secure-stdlib/mlock v0.1.2 // indirect - github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect + github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 // indirect github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect - github.com/hashicorp/hcl/v2 v2.18.0 // indirect + github.com/hashicorp/hcl/v2 v2.19.1 // indirect github.com/hashicorp/vault/api v1.8.2 // indirect github.com/hashicorp/vault/sdk v0.6.1 // indirect github.com/hashicorp/yamux v0.1.1 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/iancoleman/strcase v0.2.0 // indirect github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd // indirect + github.com/imdario/mergo v0.3.16 // indirect + github.com/in-toto/in-toto-golang v0.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/jgautheron/goconst v1.7.0 // indirect + github.com/jingyugao/rowserrcheck v1.1.1 // indirect + github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect + github.com/jjti/go-spancheck v0.5.3 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/julz/importas v0.1.0 // indirect + github.com/karamaru-alpha/copyloopvar v1.0.8 // indirect github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect + github.com/kisielk/errcheck v1.7.0 // indirect + github.com/kkHAIKE/contextcheck v1.1.4 // indirect + github.com/klauspost/compress v1.17.4 // indirect + github.com/kulti/thelper v0.6.3 // indirect + github.com/kunwardeep/paralleltest v1.0.10 // indirect github.com/kylelemons/godebug v1.1.0 // indirect + github.com/kyoh86/exportloopref v0.1.11 // indirect + github.com/ldez/gomoddirectives v0.2.3 // indirect + github.com/ldez/tagliatelle v0.5.0 // indirect + github.com/leonklingele/grouper v1.1.1 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/lufeee/execinquery v1.2.1 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/macabu/inamedparam v0.1.3 // indirect + github.com/magiconair/properties v1.8.6 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/maratori/testableexamples v1.0.0 // indirect + github.com/maratori/testpackage v1.1.1 // indirect + github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/mattn/go-shellwords v1.0.12 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mgechev/revive v1.3.7 // indirect github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect github.com/microcosm-cc/bluemonday v1.0.21 // indirect + github.com/miekg/pkcs11 v1.1.1 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-ps v1.0.0 // indirect @@ -159,20 +298,39 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/moby/moby v23.0.3+incompatible // indirect - github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect + github.com/moby/locker v1.0.1 // indirect + github.com/moby/moby v25.0.4+incompatible // indirect + github.com/moby/spdystream v0.2.0 // indirect + github.com/moby/sys/mountinfo v0.7.1 // indirect + github.com/moby/sys/sequential v0.5.0 // indirect + github.com/moby/sys/signal v0.7.0 // indirect + github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/moricho/tparallel v0.3.1 // indirect + github.com/morikuni/aec v1.0.0 // indirect github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect - github.com/muesli/reflow v0.3.0 // indirect github.com/muesli/termenv v0.15.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect + github.com/nakabonne/nestif v0.3.1 // indirect github.com/natefinch/atomic v1.0.1 // indirect github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d // indirect + github.com/nishanths/exhaustive v0.12.0 // indirect + github.com/nishanths/predeclared v0.2.2 // indirect + github.com/nunnatsa/ginkgolinter v0.16.1 // indirect + github.com/nxadm/tail v1.4.11 // indirect github.com/oklog/run v1.1.0 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.1.0-rc5 // indirect github.com/opentracing/basictracer-go v1.1.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petar-dambovaliev/aho-corasick v0.0.0-20230725210150-fb29fc3c913e // indirect github.com/pgavlin/diff v0.0.0-20230503175810-113847418e2e // indirect github.com/pgavlin/fx v0.1.6 // indirect @@ -180,79 +338,156 @@ require ( github.com/pgavlin/text v0.0.0-20230428184845-84c285f11d2f // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect - github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pkg/term v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/polyfloyd/go-errorlint v1.4.8 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect + github.com/prometheus/client_golang v1.17.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.6.2 // indirect + github.com/pulumi/providertest v0.0.12 // indirect github.com/pulumi/pulumi-yaml v1.6.0 // indirect + github.com/quasilyte/go-ruleguard v0.4.2 // indirect + github.com/quasilyte/gogrep v0.5.0 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect + github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/ryancurrah/gomodguard v1.3.1 // indirect + github.com/ryanrolds/sqlclosecheck v0.5.1 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect + github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect - github.com/segmentio/asm v1.2.0 // indirect - github.com/segmentio/encoding v0.3.6 // indirect + github.com/sashamelentyev/interfacebloat v1.1.0 // indirect + github.com/sashamelentyev/usestdlibvars v1.25.0 // indirect + github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect + github.com/securego/gosec/v2 v2.19.0 // indirect + github.com/segmentio/asm v1.1.3 // indirect + github.com/segmentio/encoding v0.3.5 // indirect github.com/sergi/go-diff v1.3.1 // indirect - github.com/shirou/gopsutil/v3 v3.22.3 // indirect + github.com/serialx/hashring v0.0.0-20200727003509-22c0c7ab6b1b // indirect + github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect + github.com/shibumi/go-pathspec v1.3.0 // indirect + github.com/shirou/gopsutil/v3 v3.24.2 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect + github.com/sivchari/containedctx v1.0.3 // indirect + github.com/sivchari/tenv v1.7.1 // indirect github.com/skeema/knownhosts v1.2.1 // indirect + github.com/sonatard/noctx v0.0.2 // indirect github.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67 // indirect - github.com/spf13/afero v1.9.5 // indirect - github.com/spf13/cast v1.4.1 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/sourcegraph/go-diff v0.7.0 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.12.0 // indirect + github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect + github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect + github.com/stretchr/objx v0.5.2 // indirect + github.com/subosito/gotenv v1.4.1 // indirect + github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c // indirect + github.com/tdakkota/asciicheck v0.2.0 // indirect + github.com/tetafro/godot v1.4.16 // indirect github.com/texttheater/golang-levenshtein v1.0.1 // indirect - github.com/tklauser/go-sysconf v0.3.10 // indirect - github.com/tklauser/numcpus v0.4.0 // indirect + github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 // indirect + github.com/timonwong/loggercheck v0.9.4 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/tomarrell/wrapcheck/v2 v2.8.3 // indirect + github.com/tommy-muehle/go-mnd/v2 v2.5.1 // indirect + github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea // indirect + github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 // indirect github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect + github.com/ulikunitz/xz v0.5.11 // indirect + github.com/ultraware/funlen v0.1.0 // indirect + github.com/ultraware/whitespace v0.1.0 // indirect + github.com/uudashr/gocognit v1.1.2 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect + github.com/xen0n/gosmopolitan v1.2.2 // indirect + github.com/yagipy/maintidx v1.0.0 // indirect + github.com/yeya24/promlinter v0.2.0 // indirect + github.com/ykadowak/zerologlint v0.1.5 // indirect github.com/yuin/goldmark v1.5.2 // indirect github.com/yuin/goldmark-emoji v1.0.1 // indirect - github.com/yusufpapurcu/wmi v1.2.2 // indirect - github.com/zclconf/go-cty v1.14.0 // indirect + github.com/yusufpapurcu/wmi v1.2.4 // indirect + github.com/zclconf/go-cty v1.14.1 // indirect + gitlab.com/bosi/decorder v0.4.1 // indirect + go-simpler.org/musttag v0.9.0 // indirect + go-simpler.org/sloglint v0.5.0 // indirect go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/otel v1.19.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 // indirect - go.opentelemetry.io/otel/metric v1.19.0 // indirect - go.opentelemetry.io/otel/sdk v1.19.0 // indirect - go.opentelemetry.io/otel/trace v1.19.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.1 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect + go.opentelemetry.io/otel v1.24.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.42.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.42.0 // indirect + go.opentelemetry.io/otel/metric v1.24.0 // indirect + go.opentelemetry.io/otel/sdk v1.22.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.21.0 // indirect + go.opentelemetry.io/otel/trace v1.24.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.pennock.tech/tabular v1.1.3 // indirect - go.uber.org/atomic v1.11.0 // indirect - gocloud.dev v0.36.0 // indirect - gocloud.dev/secrets/hashivault v0.27.0 // indirect - golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/oauth2 v0.14.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + go.uber.org/atomic v1.10.0 // indirect + go.uber.org/automaxprocs v1.5.3 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + gocloud.dev v0.37.0 // indirect + gocloud.dev/secrets/hashivault v0.28.0 // indirect + golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect + golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/oauth2 v0.18.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.4.0 // indirect - golang.org/x/tools v0.15.0 // indirect + golang.org/x/time v0.5.0 // indirect + golang.org/x/tools v0.19.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - google.golang.org/api v0.151.0 // indirect + google.golang.org/api v0.169.0 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + google.golang.org/genproto v0.0.0-20240311173647-c811ad7063a7 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240311173647-c811ad7063a7 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7 // indirect + google.golang.org/grpc v1.62.1 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect + gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect + honnef.co/go/tools v0.4.7 // indirect + k8s.io/api v0.29.2 // indirect + k8s.io/apimachinery v0.29.2 // indirect + k8s.io/apiserver v0.29.2 // indirect + k8s.io/client-go v0.29.2 // indirect + k8s.io/klog/v2 v2.110.1 // indirect + k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect lukechampine.com/frand v1.4.2 // indirect + mvdan.cc/gofumpt v0.6.0 // indirect + mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index ba05abb..5808ef7 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,7 @@ +4d63.com/gocheckcompilerdirectives v1.2.1 h1:AHcMYuw56NPjq/2y615IGg2kYkBdTvOaojYCBcRE7MA= +4d63.com/gocheckcompilerdirectives v1.2.1/go.mod h1:yjDJSxmDTtIHHCqX0ufRYZDL6vQtMG7tJdKVeWwsqvs= +4d63.com/gochecknoglobals v0.2.1 h1:1eiorGsgHOFOuoOiJDy2psSrQbRdIHrlge0IJIkUgDc= +4d63.com/gochecknoglobals v0.2.1/go.mod h1:KRE8wtJB3CXCsb1xy421JfTHIIbmT3U5ruxw2Qu8fSU= bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= @@ -31,52 +35,316 @@ cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+Y cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= -cloud.google.com/go v0.103.0/go.mod h1:vwLx1nqLrzLX/fpwSMOXmFIqBOyHsvHbnAdbGSJ+mKk= -cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= +cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM= +cloud.google.com/go v0.112.1/go.mod h1:+Vbu+Y1UU+I1rjmzeMOb/8RfkKJK2Gyxi1X6jJCZLo4= +cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= +cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= +cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= +cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= +cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= +cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= +cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= +cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= +cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= +cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= +cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= +cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= +cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= +cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= +cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= +cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= +cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= +cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= +cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= +cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= +cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= +cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= +cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= +cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= +cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= +cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= +cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= +cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= +cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= +cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= +cloud.google.com/go/compute v1.25.0 h1:H1/4SqSUhjPFE7L5ddzHOfY2bCAvjwNRZPNl6Ni5oYU= +cloud.google.com/go/compute v1.25.0/go.mod h1:GR7F0ZPZH8EhChlMo9FkLd7eUTwEymjqQagxzilIxIE= +cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/compute/metadata v0.2.2/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= +cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= +cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= +cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= +cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= +cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= +cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= +cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= +cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= +cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= +cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= +cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= +cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= +cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= +cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= +cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= +cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= +cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= +cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= +cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= +cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= +cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= -cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= +cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= +cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= +cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= +cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= +cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= +cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= +cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= -cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= -cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= -cloud.google.com/go/kms v1.15.5 h1:pj1sRfut2eRbD9pFRjNnPNg/CzJPuQAzUujMIM1vVeM= -cloud.google.com/go/kms v1.15.5/go.mod h1:cU2H5jnp6G2TDpUGZyqTCoy1n16fbubHZjmVXSMtwDI= -cloud.google.com/go/logging v1.8.1 h1:26skQWPeYhvIasWKm48+Eq7oUqdcdbwsCVwz5Ys0FvU= -cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= -cloud.google.com/go/longrunning v0.5.4 h1:w8xEcbZodnA2BbW6sVirkkoC+1gP8wS57EUUgGS0GVg= -cloud.google.com/go/longrunning v0.5.4/go.mod h1:zqNVncI0BOP8ST6XQD1+VcvuShMmq7+xFSzOL++V0dI= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= +cloud.google.com/go/iam v1.1.6 h1:bEa06k05IO4f4uJonbB5iAgKTPpABy1ayxaIZV/GHVc= +cloud.google.com/go/iam v1.1.6/go.mod h1:O0zxdPeGBoFdWW3HWmBxJsk0pfvNM/p/qa82rWOGTwI= +cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= +cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= +cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= +cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= +cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= +cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= +cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= +cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= +cloud.google.com/go/kms v1.7.0/go.mod h1:k2UdVoNIHLJi/Rnng6dN0vlq7lS3jHSDiZasft+gmYE= +cloud.google.com/go/kms v1.15.7 h1:7caV9K3yIxvlQPAcaFffhlT7d1qpxjB1wHBtjWa13SM= +cloud.google.com/go/kms v1.15.7/go.mod h1:ub54lbsa6tDkUwnu4W7Yt1aAIFLnspgh0kPGToDukeI= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= +cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/logging v1.9.0 h1:iEIOXFO9EmSiTjDmfpbRjOxECO7R8C7b8IXUGOj7xZw= +cloud.google.com/go/logging v1.9.0/go.mod h1:1Io0vnZv4onoUnsVUQY3HZ3Igb1nBchky0A0y7BBBhE= +cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= +cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= +cloud.google.com/go/longrunning v0.5.5 h1:GOE6pZFdSrTb4KAiKnXsJBtlE6mEyaW44oKyMILWnOg= +cloud.google.com/go/longrunning v0.5.5/go.mod h1:WV2LAxD8/rg5Z1cNW6FJ/ZpX4E4VnDnoTk0yawPBB7s= +cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= +cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= +cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= +cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= cloud.google.com/go/monitoring v1.1.0/go.mod h1:L81pzz7HKn14QCMaCs6NTQkdBnE87TElyanS95vIcl4= -cloud.google.com/go/monitoring v1.5.0/go.mod h1:/o9y8NYX5j91JjD/JvGLYbi86kL11OjyJXq2XziLJu4= +cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= +cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= +cloud.google.com/go/monitoring v1.9.0/go.mod h1:/FsTS0gkEFUc4cgB16s6jYDnyjzRBkRJNRzBn5Zx+wA= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= +cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= +cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= +cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= +cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= +cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= +cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= +cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= +cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= +cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= +cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= +cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= +cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= +cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= -cloud.google.com/go/pubsub v1.24.0/go.mod h1:rWv09Te1SsRpRGPiWOMDKraMQTJyJps4MkUCoMGUgqw= -cloud.google.com/go/secretmanager v1.5.0/go.mod h1:5C9kM+RwSpkURNovKySkNvGQLUaOgyoR5W0RUx2SyHQ= +cloud.google.com/go/pubsub v1.27.0/go.mod h1:BgkDyjrFNV8c7txDxPrlQkM/XtbJQVEeAWmt56lVVf8= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= +cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= +cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= +cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= +cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= +cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= +cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= +cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= +cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= +cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= +cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= +cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= +cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= +cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= +cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= +cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= +cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= +cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= +cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= +cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= +cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= +cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= +cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= +cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= +cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= @@ -85,50 +353,110 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= -cloud.google.com/go/storage v1.24.0/go.mod h1:3xrJEFMXBsQLgxwThyjuD3aYlroL0TMRec1ypGUQ0KE= -cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= -cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storage v1.28.0/go.mod h1:qlgZML35PXA3zoEnIkiPLY4/TOkUleufRlu6qmcf7sI= +cloud.google.com/go/storage v1.39.1 h1:MvraqHKhogCOTXTlct/9C3K3+Uy2jBmFYb3/Sp6dVtY= +cloud.google.com/go/storage v1.39.1/go.mod h1:xK6xZmxZmo+fyP7+DEF6FhNc24/JAe95OLyOHCXFH1o= +cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= +cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= +cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= +cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= +cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= +cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= +cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= cloud.google.com/go/trace v1.0.0/go.mod h1:4iErSByzxkyHWzzlAj63/Gmjz0NH1ASqhJguHpGcr6A= -cloud.google.com/go/trace v1.2.0/go.mod h1:Wc8y/uYyOhPy12KEnXG9XGrvfMz5F5SrYecQlbW1rwM= +cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= +cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= +cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= +cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= +cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= +cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= +cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= +cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= +cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= +cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= +cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= +cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= +cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= +cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= +cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= +cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c/go.mod h1:QD9Lzhd/ux6eNQVUDVRJX/RKTigpewimNYBi7ivZKY8= contrib.go.opencensus.io/exporter/aws v0.0.0-20200617204711-c478e41e60e9/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= -contrib.go.opencensus.io/exporter/stackdriver v0.13.13/go.mod h1:5pSSGY0Bhuk7waTHuDf4aQ8D2DrhgETRo9fy6k3Xlzc= +contrib.go.opencensus.io/exporter/stackdriver v0.13.14/go.mod h1:5pSSGY0Bhuk7waTHuDf4aQ8D2DrhgETRo9fy6k3Xlzc= contrib.go.opencensus.io/integrations/ocsql v0.1.7/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= +filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= +github.com/4meepo/tagalign v1.3.3 h1:ZsOxcwGD/jP4U/aw7qeWu58i7dwYemfy5Y+IF1ACoNw= +github.com/4meepo/tagalign v1.3.3/go.mod h1:Q9c1rYMZJc9dPRkbQPpcBNCLEmY2njbAsXhQOZFE2dE= +github.com/Abirdcfly/dupword v0.0.14 h1:3U4ulkc8EUo+CaT105/GJ1BQwtgyj6+VaBVbAX11Ba8= +github.com/Abirdcfly/dupword v0.0.14/go.mod h1:VKDAbxdY8YbKUByLGg8EETzYSuC4crm9WwI6Y3S0cLI= github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 h1:bvDV9vkmnHYOMsOr4WLk+Vo07yKIzd94sVoIqshQ4bU= +github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24/go.mod h1:8o94RPi1/7XTJvwPpRSzSUedZrtlirdB3r9Z20bi2f8= +github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0 h1:59MxjQVfjXsBpLy+dbd2/ELV5ofnUkUZBvWSC85sheA= +github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20230306123547-8075edf89bb0/go.mod h1:OahwfttHWG6eJ0clwcfBAHoDI6X/LV/15hx/wlMZSrU= github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= +github.com/Antonboom/errname v0.1.12 h1:oh9ak2zUtsLp5oaEd/erjB4GPu9w19NyoIskZClDcQY= +github.com/Antonboom/errname v0.1.12/go.mod h1:bK7todrzvlaZoQagP1orKzWXv59X/x0W0Io2XT1Ssro= +github.com/Antonboom/nilnil v0.1.7 h1:ofgL+BA7vlA1K2wNQOsHzLJ2Pw5B5DpWRLdDAVvvTow= +github.com/Antonboom/nilnil v0.1.7/go.mod h1:TP+ScQWVEq0eSIxqU8CbdT5DFWoHp0MbP+KMUO1BKYQ= +github.com/Antonboom/testifylint v1.2.0 h1:015bxD8zc5iY8QwTp4+RG9I4kIbqwvGX9TrBbb7jGdM= +github.com/Antonboom/testifylint v1.2.0/go.mod h1:rkmEqjqVnHDRNsinyN6fPSLnoajzFwsCcguJgwADBkw= github.com/Azure/azure-amqp-common-go/v3 v3.2.3/go.mod h1:7rPmbSfszeovxGfc5fSAXE4ehlXQZHpMja2OtxC2Tas= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v63.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v66.0.0+incompatible h1:bmmC38SlE8/E81nNADlgmVGurPWMHDX2YNXVQMrBpEE= github.com/Azure/azure-sdk-for-go v66.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.19.0/go.mod h1:h6H6c8enJmmocHUbLiiGY6sx7f9i+X3m1CHdd5c6Rdw= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.0.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.1/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0 h1:fb8kj/Dh4CSwgsOzHeZY4Xh68cFVbzXx+ONXGMY//4w= -github.com/Azure/azure-sdk-for-go/sdk/azcore v1.9.0/go.mod h1:uReU2sSxZExRPBAg3qKzmAucSi51+SP1OhohieR821Q= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.11.0/go.mod h1:HcM1YX14R7CJcghJGOYCgdezslRSVzqwLf/q+4Y2r/0= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.4/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.2.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0 h1:n1DH8TPV4qqPTje2RcUBYwtrTWlabVp4n46+74X2pn4= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.10.0/go.mod h1:HDcZnuGbiyppErN6lB+idp4CKhjbc8gwjto6OPpyggM= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.0.0/go.mod h1:+6sju8gk8FRmSajX3Oz4G5Gm7P+mbqE9FVaXXFYTkCM= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0 h1:BMAjVKJM0U/CYF27gA0ZMmXGkOcvfFtD0oHVZ1TIPRI= -github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.4.0/go.mod h1:1fXstnBMas5kzG+S3q8UoJcmyU6nUeunJcMDHcRYHhs= -github.com/Azure/azure-sdk-for-go/sdk/internal v0.7.0/go.mod h1:yqy467j36fJxcRV2TzfVZ1pCb5vxm4BtZPUdYWe/Xo8= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.2.0/go.mod h1:NBanQUfSWiWn3QEpWDTCU0IjBECKOYvl2R8xdRtMtiM= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1 h1:sO0/P7g68FrryJzljemN+6GTssUXdANk6aJ7T1ZxnsQ= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.5.1/go.mod h1:h8hyGFDsU5HMivxiS2iYFZsgDbU9OnnJ163x5UGVKYo= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0 h1:d81/ng9rET2YqdVkVwkb6EXeRrLJIwyGnJcAlAWKwhs= -github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.0/go.mod h1:s4kgfzA0covAXNicZHDMN58jExvcng2mC/DepXiF1EI= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.1/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2 h1:LqbJ/WzJUwBf8UiaSzgX7aMclParm9/5Vgp+TY51uBQ= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.5.2/go.mod h1:yInRyqWXAuaPrgI7p70+lDDgh3mlBohis29jGMISnmc= +github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.9.0/go.mod h1:EAyXOW1F6BTJPiK2pDvmnvxOHPxoTYWoqBeIlql+QhI= github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0 h1:m/sWOGCREuSBqg2htVQTBY8nOZpyajYztF0vUvSZTuM= github.com/Azure/azure-sdk-for-go/sdk/keyvault/azkeys v0.10.0/go.mod h1:Pu5Zksi2KrU7LPbZbNINx6fuVrUp/ffvpxdDj+i8LeE= +github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.0/go.mod h1:9V2j0jn9jDEkCkv8w/bKTNppX/d0FVA1ud77xCIP4KA= github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1 h1:FbH3BbSb4bvGluTesZZ+ttN/MDsnMmQP36OSnDuSXqw= github.com/Azure/azure-sdk-for-go/sdk/keyvault/internal v0.7.1/go.mod h1:9V2j0jn9jDEkCkv8w/bKTNppX/d0FVA1ud77xCIP4KA= -github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.0.2/go.mod h1:LH9XQnMr2ZYxQdVdCrzLO9mxeDyrDFa6wbSI3x5zCZk= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0 h1:Ma67P/GGprNwsslzEH6+Kb8nybI8jpDTm4Wmzu2ReK8= -github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.2.0/go.mod h1:c+Lifp3EDEamAkPVzMooRNOK6CZjNSdEnf1A7jsI9u4= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1/go.mod h1:eZ4g6GUvXiGulfIbbhh1Xr4XwUYaYaWMqzGD/284wCA= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0 h1:gggzg0SUMs6SQbEw+3LoSsYf9YMjkupeAnHMX8O9mmY= -github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.2.0/go.mod h1:+6KLcKIVgxoBDMqMO/Nvy7bZ9a0nbU3I1DtFQK3YvB4= +github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus v1.1.3/go.mod h1:Eo6WMP/iw9sp06+v8y030eReUwX6sULn5i3fxCDWPag= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0 h1:AifHbc4mg0x9zW52WOpKbsHaDKuRhlI7TVl47thgQ70= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v1.5.0/go.mod h1:T5RfihdXtBDxt1Ch2wobif3TvzTdumDy29kahv6AV9A= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.6.1/go.mod h1:c6WvOhtmjNUWbLfOG1qxM/q0SPvQNSVJvolm+C52dIU= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1 h1:fXPMAmuh0gDuRDey0atC8cXBuKIlqCzCkL8sm1n9Ov0= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.3.1/go.mod h1:SUZc9YRRHfx2+FAQKNDGrssXehqLpxmwRv2mC/5ntj4= github.com/Azure/go-amqp v0.17.0/go.mod h1:9YJ3RhxRT1gquYnzpZO1vcYMMpAdJT+QEg6fwmw9Zlg= github.com/Azure/go-amqp v0.17.5/go.mod h1:9YJ3RhxRT1gquYnzpZO1vcYMMpAdJT+QEg6fwmw9Zlg= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= @@ -140,7 +468,6 @@ github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.24/go.mod h1:G6kyRlFnTuSbEYkQGawPfsCswgme4iYf6rfSKUDzbCc= github.com/Azure/go-autorest/autorest v0.11.25/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= github.com/Azure/go-autorest/autorest v0.11.27/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= @@ -150,9 +477,6 @@ github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4Uw github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/adal v0.9.20/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= github.com/Azure/go-autorest/autorest/adal v0.9.21/go.mod h1:zua7mBUaCc5YnSLKYgGJR/w5ePdMDA6H56upLsHzA9U= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.11/go.mod h1:84w/uV8E37feW2NCJ08uT9VBfjfUHpgLVnG2InYD6cg= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.5/go.mod h1:ADQAXrkgm7acgWVUNamOgh8YNrv4p27l3Wc55oVfpzg= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.6/go.mod h1:piCfgPho7BiIDdEQ1+g4VmKyD5y+p/XtSNqE6Hc4QD0= github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= @@ -164,17 +488,25 @@ github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZ github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0 h1:hVeq+yCyUi+MsoO/CU95yqCIcdzra5ovzk8Q2BBpV2M= -github.com/AzureAD/microsoft-authentication-library-for-go v1.2.0/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= +github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1/go.mod h1:Vt9sXTKwMyGcOxSmLDMnGPgqsUg7m8pe215qMLrDXw4= +github.com/AzureAD/microsoft-authentication-library-for-go v0.7.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 h1:XHOnouVk1mxXfQidrMEnLlPk9UMeRtyBTnEFtxkV0kU= +github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2/go.mod h1:wP83P5OoQ5p6ip3ScPr0BAq0BvuPAvacpEuSzyouqAI= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= -github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= +github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= +github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/GoogleCloudPlatform/cloudsql-proxy v1.31.2/go.mod h1:qR6jVnZTKDCW3j+fC9mOEPHm++1nKDMkqbbkD6KNsfo= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM= +github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 h1:sATXp1x6/axKxz2Gjxv8MALP0bXaNRfQinEwyfMcx8c= +github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0/go.mod h1:Nl76DrGNJTA1KJ0LePKBw/vznBX1EHbAZX8mwjR82nI= +github.com/GoogleCloudPlatform/cloudsql-proxy v1.33.1/go.mod h1:n3KDPrdaY2p9Nr0B1allAdjYArwIpXQcitNbsS/Qiok= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= +github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= @@ -199,6 +531,8 @@ github.com/Microsoft/hcsshim v0.8.20/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwT github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= github.com/Microsoft/hcsshim v0.9.2/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= +github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= +github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= @@ -206,12 +540,16 @@ github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMo github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA= +github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/logrus-bugsnag v0.0.0-20170309145241-6dbc35f2c30d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= @@ -223,8 +561,14 @@ github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSi github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= +github.com/alecthomas/assert/v2 v2.2.2 h1:Z/iVC0xZfWTaFNE6bA3z07T86hd45Xe2eLt6WVy2bbk= +github.com/alecthomas/assert/v2 v2.2.2/go.mod h1:pXcQ2Asjp247dahGEmsZ6ru0UVwnkhktn7S0bBDLxvQ= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= +github.com/alecthomas/go-check-sumtype v0.1.4 h1:WCvlB3l5Vq5dZQTFmodqL2g68uHiSwwlWcT5a2FGK0c= +github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ= +github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= +github.com/alecthomas/repr v0.2.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -233,11 +577,23 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk= +github.com/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg= +github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU= +github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw= +github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE= +github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw= +github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqrSP7t/cW5+I= +github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc= +github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= +github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= +github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= +github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= +github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= @@ -245,8 +601,9 @@ github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5 github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= -github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= +github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= @@ -256,6 +613,10 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/ashanbrown/forbidigo v1.6.0 h1:D3aewfM37Yb3pxHujIPSpTf6oQk9sc9WZi8gerOIVIY= +github.com/ashanbrown/forbidigo v1.6.0/go.mod h1:Y8j9jy9ZYAEHXdu723cUlraTqbzjKF1MUyfOKL+AjcU= +github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= +github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= @@ -265,76 +626,77 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.43.11/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go v1.43.31/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.45/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.68/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.49.0 h1:g9BkW1fo9GqKfwg2+zCD+TW/D36Ux+vtfJ8guF4AYmY= -github.com/aws/aws-sdk-go v1.49.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.44.128/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.151/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.50.36 h1:PjWXHwZPuTLMR1NIb8nEjLucZBMzmf84TLoLbD8BZqk= +github.com/aws/aws-sdk-go v1.50.36/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aws/aws-sdk-go-v2 v1.16.8/go.mod h1:6CpKuLXg2w7If3ABZCl/qZ6rEgwtjZTn4eAf4RcEyuw= -github.com/aws/aws-sdk-go-v2 v1.24.0 h1:890+mqQ+hTpNuw0gGP6/4akolQkSToDJgHfQE7AwGuk= -github.com/aws/aws-sdk-go-v2 v1.24.0/go.mod h1:LNh45Br1YAkEKaAqvmE1m8FUx6a5b/V0oAKV7of29b4= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.3/go.mod h1:gNsR5CaXKmQSSzrmGxmwmct/r+ZBfbxorAuXYsj/M5Y= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4 h1:OCs21ST2LrepDfD3lwlQiOqIGp6JiEUqG84GzTDoyJs= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.4/go.mod h1:usURWEKSNNAcAZuzRn/9ZYPT8aZQkR7xcCtunK/LkJo= -github.com/aws/aws-sdk-go-v2/config v1.15.15/go.mod h1:A1Lzyy/o21I5/s2FbyX5AevQfSVXpvvIDCoVFD0BC4E= -github.com/aws/aws-sdk-go-v2/config v1.26.1 h1:z6DqMxclFGL3Zfo+4Q0rLnAZ6yVkzCRxhRMsiRQnD1o= -github.com/aws/aws-sdk-go-v2/config v1.26.1/go.mod h1:ZB+CuKHRbb5v5F0oJtGdhFTelmrxd4iWO1lf0rQwSAg= -github.com/aws/aws-sdk-go-v2/credentials v1.12.10/go.mod h1:g5eIM5XRs/OzIIK81QMBl+dAuDyoLN0VYaLP+tBqEOk= -github.com/aws/aws-sdk-go-v2/credentials v1.16.12 h1:v/WgB8NxprNvr5inKIiVVrXPuuTegM+K8nncFkr1usU= -github.com/aws/aws-sdk-go-v2/credentials v1.16.12/go.mod h1:X21k0FjEJe+/pauud82HYiQbEr9jRKY3kXEIQ4hXeTQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.9/go.mod h1:KDCCm4ONIdHtUloDcFvK2+vshZvx4Zmj7UMDfusuz5s= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10 h1:w98BT5w+ao1/r5sUuiH6JkVzjowOKeOJRHERyy1vh58= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.10/go.mod h1:K2WGI7vUvkIv1HoNbfBA1bvIZ+9kL3YVmWxeKuLQsiw= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.21/go.mod h1:iIYPrQ2rYfZiB/iADYlhj9HHZ9TTi6PqKQPAqygohbE= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7 h1:FnLf60PtjXp8ZOzQfhJVsqF0OtYKQZWQfqOLshh8YXg= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.15.7/go.mod h1:tDVvl8hyU6E9B8TrnNrZQEVkQlB8hjJwcgpPhgtlnNg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.15/go.mod h1:pWrr2OoHlT7M/Pd2y4HV3gJyPb3qj5qMmnPkKSNPYK4= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9 h1:v+HbZaCGmOwnTTVS86Fleq0vPzOd7tnJGbFhP0stNLs= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.9/go.mod h1:Xjqy+Nyj7VDLBtCMkQYOw1QYfAEZCVLrfI0ezve8wd4= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.9/go.mod h1:08tUpeSGN33QKSO7fwxXczNfiwCpbj+GxK6XKwqWVv0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9 h1:N94sVhRACtXyVcjXxrwK1SKFIJrA9pOJ5yu2eSHnmls= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.9/go.mod h1:hqamLz7g1/4EJP+GH5NBhcUMLjW+gKLQabgyz6/7WAU= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.16/go.mod h1:CYmI+7x03jjJih8kBEEFKRQc40UjUokT0k7GbvrhhTc= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2 h1:GrSw8s0Gs/5zZ0SX+gX4zQjRnRsMJDJ2sLur1gRBhEM= -github.com/aws/aws-sdk-go-v2/internal/ini v1.7.2/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.6/go.mod h1:O7Oc4peGZDEKlddivslfYFvAbgzvl/GH3J8j3JIGBXc= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9 h1:ugD6qzjYtB7zM5PN/ZIeaAIyefPaD82G8+SJopgvUpw= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.9/go.mod h1:YD0aYBWCrPENpHolhKw2XDlTIWae2GKXT1T4o6N6hiM= -github.com/aws/aws-sdk-go-v2/service/iam v1.19.0 h1:9vCynoqC+dgxZKrsjvAniyIopsv3RZFsZ6wkQ+yxtj8= -github.com/aws/aws-sdk-go-v2/service/iam v1.19.0/go.mod h1:OyAuvpFeSVNppcSsp1hFOVQcaTRc1LE24YIR7pMbbAA= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.3/go.mod h1:gkb2qADY+OHaGLKNTYxMaQNacfeyQpZ4csDTQMeFmcw= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4 h1:/b31bi3YVNlkzkBrm9LfpaKoaYZUxIAj4sHfOTmLfqw= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.4/go.mod h1:2aGXHFmbInwgP9ZfpmdIfOELL79zhdNYNmReK8qDfdQ= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.10/go.mod h1:Qks+dxK3O+Z2deAhNo6cJ8ls1bam3tUGUAcgxQP1c70= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9 h1:/90OR2XbSYfXucBMJ4U14wrjlfleq/0SB6dZDPncgmo= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.9/go.mod h1:dN/Of9/fNZet7UrQQ6kTDo/VSwKPIq94vjlU16bRARc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.9/go.mod h1:yQowTpvdZkFVuHrLBXmczat4W+WJKg/PafBZnGBLga0= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9 h1:Nf2sHxjMJR8CSImIVCONRi4g0Su3J+TSTbS7G0pUeMU= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.9/go.mod h1:idky4TER38YIjr2cADF1/ugFMKvZV7p//pVeV5LZbF0= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.9/go.mod h1:Rc5+wn2k8gFSi3V1Ch4mhxOzjMh+bYSXVFfVaqowQOY= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9 h1:iEAeF6YC3l4FzlJPP9H3Ko1TXpdjdqWffxXjp8SY6uk= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.9/go.mod h1:kjsXoK23q9Z/tLBrckZLLyvjhZoS+AGrzqzUfEClvMM= -github.com/aws/aws-sdk-go-v2/service/kms v1.18.1/go.mod h1:4PZMUkc9rXHWGVB5J9vKaZy3D7Nai79ORworQ3ASMiM= -github.com/aws/aws-sdk-go-v2/service/kms v1.27.5 h1:7lKTr8zJ2nVaVgyII+7hUayTi7xWedMuANiNVXiD2S8= -github.com/aws/aws-sdk-go-v2/service/kms v1.27.5/go.mod h1:D9FVDkZjkZnnFHymJ3fPVz0zOUlNSd0xcIIVmmrAac8= -github.com/aws/aws-sdk-go-v2/service/s3 v1.27.2/go.mod h1:u+566cosFI+d+motIz3USXEh6sN8Nq4GrNXSg2RXVMo= -github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5 h1:Keso8lIOS+IzI2MkPZyK6G0LYcK3My2LQ+T5bxghEAY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.47.5/go.mod h1:vADO6Jn+Rq4nDtfwNjhgR84qkZwiC6FqCaXdw/kYwjA= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.15.14/go.mod h1:xakbH8KMsQQKqzX87uyyzTHshc/0/Df8bsTneTS5pFU= -github.com/aws/aws-sdk-go-v2/service/sns v1.17.10/go.mod h1:uITsRNVMeCB3MkWpXxXw0eDz8pW4TYLzj+eyQtbhSxM= -github.com/aws/aws-sdk-go-v2/service/sqs v1.19.1/go.mod h1:A94o564Gj+Yn+7QO1eLFeI7UVv3riy/YBFOfICVqFvU= -github.com/aws/aws-sdk-go-v2/service/ssm v1.27.6/go.mod h1:fiFzQgj4xNOg4/wqmAiPvzgDMXPD+cUEplX/CYn+0j0= -github.com/aws/aws-sdk-go-v2/service/sso v1.11.13/go.mod h1:d7ptRksDDgvXaUvxyHZ9SYh+iMDymm94JbVcgvSYSzU= -github.com/aws/aws-sdk-go-v2/service/sso v1.18.5 h1:ldSFWz9tEHAwHNmjx2Cvy1MjP5/L9kNoR0skc6wyOOM= -github.com/aws/aws-sdk-go-v2/service/sso v1.18.5/go.mod h1:CaFfXLYL376jgbP7VKC96uFcU8Rlavak0UlAwk1Dlhc= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5 h1:2k9KmFawS63euAkY4/ixVNsYYwrwnd5fIvgEKkfZFNM= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.5/go.mod h1:W+nd4wWDVkSUIox9bacmkBP5NMFQeTJ/xqNabpzSR38= -github.com/aws/aws-sdk-go-v2/service/sts v1.16.10/go.mod h1:cftkHYN6tCDNfkSasAmclSfl4l7cySoay8vz7p/ce0E= -github.com/aws/aws-sdk-go-v2/service/sts v1.26.5 h1:5UYvv8JUvllZsRnfrcMQ+hJ9jNICmcgKPAO1CER25Wg= -github.com/aws/aws-sdk-go-v2/service/sts v1.26.5/go.mod h1:XX5gh4CB7wAs4KhcF46G6C8a2i7eupU19dcAAE+EydU= -github.com/aws/smithy-go v1.12.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.19.0 h1:KWFKQV80DpP3vJrrA9sVAHQ5gc2z8i4EzrLhLlWXcBM= -github.com/aws/smithy-go v1.19.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/aws-sdk-go-v2 v1.17.1/go.mod h1:JLnGeGONAyi2lWXI1p0PCIOIy333JMVK1U7Hf0aRFLw= +github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA= +github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.9/go.mod h1:vCmV1q1VK8eoQJ5+aYE7PkK1K6v41qJ5pJdK3ggCDvg= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2 h1:x6xsQXGSmW6frevwDA+vi/wqhp1ct18mVXYN08/93to= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.2/go.mod h1:lPprDr1e6cJdyYeGXnRaJoP4Md+cDBvi2eOj00BlGmg= +github.com/aws/aws-sdk-go-v2/config v1.18.3/go.mod h1:BYdrbeCse3ZnOD5+2/VE/nATOK8fEUpBtmPMdKSyhMU= +github.com/aws/aws-sdk-go-v2/config v1.27.11 h1:f47rANd2LQEYHda2ddSCKYId18/8BhSRM4BULGmfgNA= +github.com/aws/aws-sdk-go-v2/config v1.27.11/go.mod h1:SMsV78RIOYdve1vf36z8LmnszlRWkwMQtomCAI0/mIE= +github.com/aws/aws-sdk-go-v2/credentials v1.13.3/go.mod h1:/rOMmqYBcFfNbRPU0iN9IgGqD5+V2yp3iWNmIlz0wI4= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11 h1:YuIB1dJNf1Re822rriUOTxopaHHvIq0l/pX3fwO+Tzs= +github.com/aws/aws-sdk-go-v2/credentials v1.17.11/go.mod h1:AQtFPsDH9bI2O+71anW6EKL+NcD7LG3dpKGMV4SShgo= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.19/go.mod h1:VihW95zQpeKQWVPGkwT+2+WJNQV8UXFfMTWdU6VErL8= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.42/go.mod h1:LHOsygMiW/14CkFxdXxvzKyMh3jbk/QfZVaDtCbLkl8= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 h1:7Zwtt/lP3KNRkeZre7soMELMGNoBrutx8nobg1jKWmo= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15/go.mod h1:436h2adoHb57yd+8W+gYPrrA9U/R/SuAuOO42Ushzhw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.25/go.mod h1:Zb29PYkf42vVYQY6pvSyJCJcFHlPIiY+YKdPtwnvMkY= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.19/go.mod h1:6Q0546uHDp421okhmmGfbxzq2hBqbXFNpi4k+Q1JnQA= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.26/go.mod h1:Y2OJ+P+MC1u1VKnavT+PshiEuGPyh/7DqxoDNij4/bg= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.16/go.mod h1:XH+3h395e3WVdd6T2Z3mPxuI+x/HVtdqVOREkTiyubs= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5 h1:81KE7vaZzrl7yHBYHVEzYB8sypz11NMOZ40YlWvPxsU= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.5/go.mod h1:LIt2rg7Mcgn09Ygbdh/RdIm0rQ+3BNkbP1gyVMFtRK0= +github.com/aws/aws-sdk-go-v2/service/iam v1.31.4 h1:eVm30ZIDv//r6Aogat9I88b5YX1xASSLcEDqHYRPVl0= +github.com/aws/aws-sdk-go-v2/service/iam v1.31.4/go.mod h1:aXWImQV0uTW35LM0A/T4wEg6R1/ReXUu4SM6/lUHYK0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.10/go.mod h1:9cBNUHI2aW4ho0A5T87O294iPDuuUOSIEDjnd1Lq/z0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.20/go.mod h1:Mp4XI/CkWGD79AQxZ5lIFlgvC0A+gl+4BmyG1F+SfNc= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7 h1:ZMeFZ5yk+Ek+jNr1+uwCd2tG89t6oTS5yVWpa6yy2es= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.7/go.mod h1:mxV05U+4JiHqIpGqqYXOHLPKUC6bDXC44bsUhNjOEwY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.19/go.mod h1:02CP6iuYP+IVnBX5HULVdSAku/85eHB2Y9EsFhrkEwU= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.13.19/go.mod h1:BmQWRVkLTmyNzYPFAZgon53qKLWBNSvonugD1MrSWUs= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5 h1:f9RyWNtS8oH7cZlbn+/JNPpjUk5+5fLd5lM9M0i49Ys= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.5/go.mod h1:h5CoMZV2VF297/VLhRhO1WF+XYWOzXo+4HsObA4HjBQ= +github.com/aws/aws-sdk-go-v2/service/kms v1.19.0/go.mod h1:kZodDPTQjSH/qM6/OvyTfM5mms5JHB/EKYp5dhn/vI4= +github.com/aws/aws-sdk-go-v2/service/kms v1.30.1 h1:SBn4I0fJXF9FYOVRSVMWuhvEKoAHDikjGpS3wlmw5DE= +github.com/aws/aws-sdk-go-v2/service/kms v1.30.1/go.mod h1:2snWQJQUKsbN66vAawJuOGX7dr37pfOq9hb0tZDGIqQ= +github.com/aws/aws-sdk-go-v2/service/s3 v1.29.4/go.mod h1:/NHbqPRiwxSPVOB2Xr+StDEH+GWV/64WwnUjv4KYzV0= +github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1 h1:6cnno47Me9bRykw9AEv9zkXE+5or7jz8TsskTTccbgc= +github.com/aws/aws-sdk-go-v2/service/s3 v1.53.1/go.mod h1:qmdkIIAC+GCLASF7R2whgNrJADz0QZPX+Seiw/i4S3o= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.16.8/go.mod h1:k6CPuxyzO247nYEM1baEwHH1kRtosRCvgahAepaaShw= +github.com/aws/aws-sdk-go-v2/service/sns v1.18.6/go.mod h1:2cPUjR63iE9MPMPJtSyzYmsTFCNrN/Xi9j0v9BL5OU0= +github.com/aws/aws-sdk-go-v2/service/sqs v1.19.15/go.mod h1:DKX/7/ZiAzHO6p6AhArnGdrV4r+d461weby8KeVtvC4= +github.com/aws/aws-sdk-go-v2/service/ssm v1.33.1/go.mod h1:rEsqsZrOp9YvSGPOrcL3pR9+i/QJaWRkAYbuxMa7yCU= +github.com/aws/aws-sdk-go-v2/service/sso v1.11.25/go.mod h1:IARHuzTXmj1C0KS35vboR0FeJ89OkEy1M9mWbK2ifCI= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 h1:vN8hEbpRnL7+Hopy9dzmRle1xmDc7o8tmY0klsr175w= +github.com/aws/aws-sdk-go-v2/service/sso v1.20.5/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.13.8/go.mod h1:er2JHN+kBY6FcMfcBBKNGCT3CarImmdFzishsqBmSRI= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 h1:Jux+gDDyi1Lruk+KHF91tK2KCuY61kzoCpvtvJJBtOE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak= +github.com/aws/aws-sdk-go-v2/service/sts v1.17.5/go.mod h1:bXcN3koeVYiJcdDU89n3kCYILob7Y34AeLopUbZgLT4= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 h1:cwIxeBttqPN3qkaAjcEcsh8NYr8n2HZPkcKgPAi1phU= +github.com/aws/aws-sdk-go-v2/service/sts v1.28.6/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw= +github.com/aws/smithy-go v1.13.4/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q= +github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E= github.com/aymanbagabas/go-osc52 v1.0.3/go.mod h1:zT8H+Rk4VSabYN90pWyugflM3ZhpTZNC7cASDfUCdT4= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= @@ -342,28 +704,54 @@ github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuP github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/beorn7/perks v0.0.0-20150223135152-b965b613227f/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-hostpool v0.1.0/go.mod h1:4gOCgp6+NZnVqlKyZ/iBZFTAJKembaVENUpMkpg42fw= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= +github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY= +github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M= +github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k= +github.com/bmatcuk/doublestar v1.1.5/go.mod h1:wiQtGV+rzVYxB7WIlirSN++5HPtPlXEo9MEoZQC/PmE= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bombsimon/wsl/v4 v4.2.1 h1:Cxg6u+XDWff75SIFFmNsqnIOgob+Q9hG6y/ioKbRFiM= +github.com/bombsimon/wsl/v4 v4.2.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo= +github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY= +github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ= +github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA= +github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= +github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/bugsnag-go v1.0.5-0.20150529004307-13fd6b8acda0 h1:s7+5BfS4WFJoVF9pnB8kBk03S7pZXRdKamnV0FOl5Sc= +github.com/bugsnag/bugsnag-go v1.0.5-0.20150529004307-13fd6b8acda0/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0 h1:nvj0OLI3YqYXer/kZD8Ri1aaunCxIEsOst1BVJswV0o= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0= +github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA= +github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI= +github.com/butuzov/mirror v1.1.0/go.mod h1:8Q0BdQU6rC6WILDiBM60DBfvV78OLJmMmixe7GF45AE= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= -github.com/ccojocar/zxcvbn-go v1.0.1 h1:+sxrANSCj6CdadkcMnvde/GWU1vZiiXRbqYSCalV4/4= -github.com/ccojocar/zxcvbn-go v1.0.1/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= +github.com/catenacyber/perfsprint v0.7.1 h1:PGW5G/Kxn+YrN04cRAZKC+ZuvlVwolYMrIyyTJ/rMmc= +github.com/catenacyber/perfsprint v0.7.1/go.mod h1:/wclWYompEyjUD2FuIIDVKNkqz7IgBIWXIH3V0Zol50= +github.com/ccojocar/zxcvbn-go v1.0.2 h1:na/czXU8RrhXO4EZme6eQJLR4PzcGsahsBOAwU6I3Vg= +github.com/ccojocar/zxcvbn-go v1.0.2/go.mod h1:g1qkXtUSvHP8lhHp5GrSmTz6uWALGRMQdw6Qnz/hi60= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v3 v3.2.2 h1:cfUAAO3yvKMYKPrvhDuHSwQnhZNk/RMHKdZqKTxfm6M= @@ -375,11 +763,16 @@ github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqy github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/charithe/durationcheck v0.0.10 h1:wgw73BiocdBDQPik+zcEoBG/ob8uyBHf2iyoHGPf5w4= +github.com/charithe/durationcheck v0.0.10/go.mod h1:bCWXb7gYRysD1CU3C+u4ceO49LoGOY1C1L6uouGNreQ= github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= github.com/charmbracelet/bubbletea v0.24.2 h1:uaQIKx9Ai6Gdh5zpTbGiWpytMU+CfsPp06RaW2cx/SY= @@ -388,6 +781,8 @@ github.com/charmbracelet/glamour v0.6.0 h1:wi8fse3Y7nfcabbbDuwolqTqMQPMnVPeZhDM2 github.com/charmbracelet/glamour v0.6.0/go.mod h1:taqWV4swIMMbWALc0m7AfE9JkPSU8om2538k9ITBxOc= github.com/charmbracelet/lipgloss v0.7.1 h1:17WMwi7N1b1rVWOjMT+rCh7sQkvDU75B2hbZpc5Kc1E= github.com/charmbracelet/lipgloss v0.7.1/go.mod h1:yG0k3giv8Qj8edTCbbg6AlQ5e8KNWpFujkNawKNhE2c= +github.com/chavacava/garif v0.1.0 h1:2JHa3hbYf5D9dsgseMKAmc/MZ109otzgNFk5s87H9Pc= +github.com/chavacava/garif v0.1.0/go.mod h1:XMyYCkEL58DF0oyW4qDjjnPWONs2HBqYKI+UIPD+Gww= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= @@ -407,8 +802,12 @@ github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJ github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= +github.com/ckaznocha/intrange v0.1.0 h1:ZiGBhvrdsKpoEfzh9CjBfDSZof6QB0ORY5tXasUtiew= +github.com/ckaznocha/intrange v0.1.0/go.mod h1:Vwa9Ekex2BrEQMg6zlrWwbs/FtYw7eS5838Q7UjK7TQ= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004 h1:lkAMpLVBDaj17e85keuznYcH5rqI438v41pKcBl4ZxQ= +github.com/cloudflare/cfssl v0.0.0-20180223231731-4e2dcbde5004/go.mod h1:yMWuSON2oQp+43nFtAV/uvKQIFpSPerB57DCt9t8sSA= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= @@ -428,6 +827,10 @@ github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= +github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE= +github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb/go.mod h1:ZjrT6AXHbDs86ZSdt/osfBi5qfexBrKUdONk989Wnk4= +github.com/compose-spec/compose-go/v2 v2.0.0-rc.8 h1:b7l+GqFF+2W4M4kLQUDRTGhqmTiRwT3bYd9X7xrxp5Q= +github.com/compose-spec/compose-go/v2 v2.0.0-rc.8/go.mod h1:bEPizBkIojlQ20pi2vNluBa58tevvj0Y18oUSHPyfdc= github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= @@ -443,14 +846,16 @@ github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4S github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= github.com/containerd/cgroups v1.0.3/go.mod h1:/ofk34relqNjSGyqPrmEULrO4Sc8LJhvJmWbUCUKqj8= +github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= +github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= -github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= +github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn4ro= +github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -468,6 +873,8 @@ github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTV github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= github.com/containerd/containerd v1.6.1/go.mod h1:1nJz5xCZPusx6jJU8Frfct988y0NpumIq9ODB0kLtoE= +github.com/containerd/containerd v1.7.13 h1:wPYKIeGMN8vaggSKuV1X0wZulpMz4CrgEsZdaCyB6Is= +github.com/containerd/containerd v1.7.13/go.mod h1:zT3up6yTRfEUa6+GsITYIJNgSVL9NQ4x4h1RPzk0Wu4= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= @@ -476,12 +883,16 @@ github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= github.com/containerd/continuity v0.2.2/go.mod h1:pWygW9u7LtS1o4N/Tn0FoCFDIXZ7rxcMX7HX1Dmibvk= +github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8= +github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= +github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= github.com/containerd/go-cni v1.1.0/go.mod h1:Rflh2EJ/++BA2/vY5ao3K6WJRR/bZKsX123aPk+kUtA= @@ -496,20 +907,31 @@ github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6T github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= github.com/containerd/imgcrypt v1.1.3/go.mod h1:/TPA1GIDXMzbj01yd8pIbQiLdQxed5ue1wb8bP7PQu4= +github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= +github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/nydus-snapshotter v0.13.7 h1:x7DHvGnzJOu1ZPwPYkeOPk5MjZZYbdddygEjaSDoFTk= +github.com/containerd/nydus-snapshotter v0.13.7/go.mod h1:VPVKQ3jmHFIcUIV2yiQ1kImZuBFS3GXDohKs9mRABVE= +github.com/containerd/stargz-snapshotter v0.15.1 h1:fpsP4kf/Z4n2EYnU0WT8ZCE3eiKDwikDhL6VwxIlgeA= github.com/containerd/stargz-snapshotter/estargz v0.4.1/go.mod h1:x7Q9dg9QYb4+ELgxmo4gBUeJB0tl5dqH1Sdz0nJU1QM= +github.com/containerd/stargz-snapshotter/estargz v0.15.1 h1:eXJjw9RbkLFgioVaTG+G/ZW/0kEe2oEKCdS/ZxIyoCU= +github.com/containerd/stargz-snapshotter/estargz v0.15.1/go.mod h1:gr2RNwukQ/S9Nv33Lt6UC7xEx58C+LHRdoqbEKjz1Kk= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= +github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs= +github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= +github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= @@ -542,17 +964,22 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7 github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI= github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= +github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= +github.com/curioswitch/go-reassign v0.2.0 h1:G9UZyOcpk/d7Gd6mqYgd8XYWFMw/znxwGDUstnC9DIo= +github.com/curioswitch/go-reassign v0.2.0/go.mod h1:x6OpXuWvgfQaMGks2BZybTngWjT84hqJfKoO8Tt/Roc= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= @@ -561,12 +988,16 @@ github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1S github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= +github.com/daixiang0/gci v0.12.3 h1:yOZI7VAxAGPQmkb1eqt5g/11SUlwoat1fSblGLmdiQc= +github.com/daixiang0/gci v0.12.3/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/deckarep/golang-set/v2 v2.5.0 h1:hn6cEZtQ0h3J8kFrHR/NrzyOoTnjgW1+FmNJzQ7y/sA= github.com/deckarep/golang-set/v2 v2.5.0/go.mod h1:VAky9rY/yGXJOLEDv3OMci+7wtDpOF4IN+y82NBOac4= -github.com/denisenkom/go-mssqldb v0.12.2/go.mod h1:lnIw1mZukFRZDJYQ0Pb833QS2IaC3l5HkEfra2LJ+sk= +github.com/denis-tingaikin/go-header v0.5.0 h1:SRdnP5ZKvcO9KKRP1KJrhFR3RrlGuD+42t4429eC9k8= +github.com/denis-tingaikin/go-header v0.5.0/go.mod h1:mMenU5bWrok6Wl2UsZjy+1okegmwQ3UgWl4V1D8gjlY= +github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= @@ -575,8 +1006,9 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/digitalocean/godo v1.78.0/go.mod h1:GBmu8MkjZmNARE7IXRPmkbbnocNN8+uBm0xbEVw2LCs= -github.com/digitalocean/godo v1.81.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5fwvIkWo+ew= -github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= +github.com/digitalocean/godo v1.88.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzKqFL4R60dmA= +github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= +github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/djherbis/times v1.5.0 h1:79myA211VwPhFTqUk8xehWrsEO+zcIZj0zT8mXPVARU= github.com/djherbis/times v1.5.0/go.mod h1:5q7FDLvbNg1L/KaBmPcWlVR9NmoKo3+ucqUA3ijQhA0= github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= @@ -585,28 +1017,50 @@ github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyG github.com/dnaeon/go-vcr v1.1.0/go.mod h1:M7tiix8f0r6mKKJ3Yq/kqU1OYf3MnfmBWVbPx/yU9ko= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= +github.com/docker/buildx v0.13.1 h1:uZjBcb477zh02tnHk0rqNV/DZOxbf/OiHw6Mc8OhDYU= +github.com/docker/buildx v0.13.1/go.mod h1:f2n6vggoX4sNNZ0XoRZ0Wtv6J1/rbDTabgdHtpW9NNM= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v26.0.0-rc1+incompatible h1:PVxv2ySd8iZHoNfoAoKcnWSC/hKP2qMb806PWM34v50= +github.com/docker/cli v26.0.0-rc1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli-docs-tool v0.7.0 h1:M2Da98Unz2kz3A5d4yeSGbhyOge2mfYSNjAFt01Rw0M= +github.com/docker/cli-docs-tool v0.7.0/go.mod h1:zMjqTFCU361PRh8apiXzeAZ1Q/xupbIwTusYpzCXS/o= github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= +github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.14+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.21+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v26.0.0-rc1+incompatible h1:8Q4f+KSdA4hFc5SXcxthv1vR9HIoRwwjhBnMZL6IpkU= +github.com/docker/docker v26.0.0-rc1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= +github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8= +github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40= +github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= +github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c/go.mod h1:CADgU4DSXK5QUlFslkQu2yW2TKzFZcXq/leZfM0UH5Q= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= +github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= +github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= +github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 h1:UhxFibDNY/bfvqU5CAUmr9zpesgbU6SWc8/B4mflAE4= +github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dvsekhvalnov/jose2go v0.0.0-20170216131308-f21a8cedbbae/go.mod h1:7BvyPhdbLxMXIYTFPLsyJRFMsKmOZnQmzh6Gb+uquuM= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= @@ -618,6 +1072,9 @@ github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcej github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= @@ -634,10 +1091,12 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= +github.com/envoyproxy/protoc-gen-validate v0.6.13/go.mod h1:qEySVqXrEugbHKvmhI8ZqtQi75/RHSSRNpffvB4I6Bw= github.com/erikgeiser/promptkit v0.9.0 h1:3qL1mS/ntCrXdb8sTP/ka82CJ9kEQaGuYXNrYJkWYBc= github.com/erikgeiser/promptkit v0.9.0/go.mod h1:pU9dtogSe3Jlc2AY77EP7R4WFP/vgD4v+iImC83KsCo= -github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw= -github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY= +github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= +github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= +github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -645,13 +1104,20 @@ github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2Vvl github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= +github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y= +github.com/firefart/nonamedreturns v1.0.4/go.mod h1:TDhe/tjI1BXo48CmYbUduTV7BdIga8MAO/xbKdcVsGI= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -659,13 +1125,20 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/frankban/quicktest v1.13.0 h1:yNZif1OkDfNoDfb9zZa9aXIpejNR4F23Wely0c+Qdqk= github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/fvbommel/sortorder v1.1.0 h1:fUmoe+HLsBTctBDoaBwpQo5N+nrCp8g/BjKb/6ZQmYw= +github.com/fvbommel/sortorder v1.1.0/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui720w+kxuqRs0= +github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= +github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813 h1:Uc+IZ7gYqAf/rSGFplbWBSHaGolEQlNLgMgSE3ccnIQ= github.com/gedex/inflector v0.0.0-20170307190818-16278e9db813/go.mod h1:P+oSoE9yhSRvsmYyZsshflcR6ePWYLql6UU1amW13IM= @@ -673,12 +1146,16 @@ github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSy github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/ghostiam/protogetter v0.3.5 h1:+f7UiF8XNd4w3a//4DnusQ2SZjPkUjxkMEfjbxOK4Ug= +github.com/ghostiam/protogetter v0.3.5/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= github.com/gin-gonic/gin v1.7.7/go.mod h1:axIBovoeJpVj8S3BwE0uPMTeReE4+AfFtqpqaZ1qq1U= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/go-critic/go-critic v0.11.2 h1:81xH/2muBphEgPtcwH1p6QD+KzXl2tMSi3hXjBSxDnM= +github.com/go-critic/go-critic v0.11.2/go.mod h1:OePaicfjsf+KPy33yq4gzv6CO7TEQ9Rom6ns1KsJnl8= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= @@ -709,8 +1186,9 @@ github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbV github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= -github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.3.0/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= @@ -724,11 +1202,15 @@ github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+ github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= github.com/go-openapi/runtime v0.23.1/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= @@ -737,12 +1219,15 @@ github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7 github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= github.com/go-openapi/strfmt v0.21.2/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= +github.com/go-openapi/strfmt v0.21.3/go.mod h1:k+RzNO0Da+k3FrrynSNN8F7n/peCmQQqbbXjtDfvmGg= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= @@ -750,15 +1235,44 @@ github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+ github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= +github.com/go-sql-driver/mysql v1.3.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.8.0 h1:UtktXaU2Nb64z/pLiGIxY4431SJ4/dR5cjMmlVHgnT4= +github.com/go-sql-driver/mysql v1.8.0/go.mod h1:wEBSXgmK//2ZFJyE+qWnIsVGmvmEKlqwuVSjsCm7DZg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-toolsmith/astcast v1.1.0 h1:+JN9xZV1A+Re+95pgnMgDboWNVnIMMQXwfBwLRPgSC8= +github.com/go-toolsmith/astcast v1.1.0/go.mod h1:qdcuFWeGGS2xX5bLM/c3U9lewg7+Zu4mr+xPwZIB4ZU= +github.com/go-toolsmith/astcopy v1.1.0 h1:YGwBN0WM+ekI/6SS6+52zLDEf8Yvp3n2seZITCUBt5s= +github.com/go-toolsmith/astcopy v1.1.0/go.mod h1:hXM6gan18VA1T/daUEHCFcYiW8Ai1tIwIzHY6srfEAw= +github.com/go-toolsmith/astequal v1.0.3/go.mod h1:9Ai4UglvtR+4up+bAD4+hCj7iTo4m/OXVTSLnCyTAx4= +github.com/go-toolsmith/astequal v1.1.0/go.mod h1:sedf7VIdCL22LD8qIvv7Nn9MuWJruQA/ysswh64lffQ= +github.com/go-toolsmith/astequal v1.2.0 h1:3Fs3CYZ1k9Vo4FzFhwwewC3CHISHDnVUPC4x0bI2+Cw= +github.com/go-toolsmith/astequal v1.2.0/go.mod h1:c8NZ3+kSFtFY/8lPso4v8LuJjdJiUFVnSuU3s0qrrDY= +github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsOmcco= +github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= +github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= +github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= +github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= +github.com/go-toolsmith/pkgload v1.2.2/go.mod h1:R2hxLNRKuAsiXCo2i5J6ZQPhnPMOVtU+f0arbFPWCus= +github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= +github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= +github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= +github.com/go-toolsmith/typep v1.1.0 h1:fIRYDyF+JywLfqzyhdiHzRop/GQDxxNhLGQ6gFUNHus= +github.com/go-toolsmith/typep v1.1.0/go.mod h1:fVIw+7zjdsMxDA3ITWnH1yOiw1rnTQKCsF/sk2H/qig= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsMBaUOKXq6HSv655U1c= +github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U= +github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= +github.com/go-zookeeper/zk v1.0.3/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= @@ -783,6 +1297,8 @@ github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWe github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= +github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= +github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= @@ -793,14 +1309,18 @@ github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6 github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI= -github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= +github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= +github.com/gogo/protobuf v1.0.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= @@ -810,17 +1330,19 @@ github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXP github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v5 v5.1.0 h1:UGKbA/IPjtS6zLcdB7i5TyACMgSbOTiR8qzXgw8HWQU= -github.com/golang-jwt/jwt/v5 v5.1.0/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= +github.com/golang-jwt/jwt/v4 v4.4.3/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= +github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= +github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -837,6 +1359,7 @@ github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -854,17 +1377,35 @@ github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM= +github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= +github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g= +github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM= +github.com/golangci/golangci-lint v1.57.1 h1:cqhpzkzjDwdN12rfMf1SUyyKyp88a1SltNqEYGS0nJw= +github.com/golangci/golangci-lint v1.57.1/go.mod h1:zLcHhz3NHc88T5zV2j75lyc0zH3LdOPOybblYa4p0oI= +github.com/golangci/misspell v0.4.1 h1:+y73iSicVy2PqyX7kmUefHusENlrP9YwuHZHPLGQj/g= +github.com/golangci/misspell v0.4.1/go.mod h1:9mAN1quEo3DlpbaIKKyEvRxK1pwqR9s/Sea1bJCtlNI= +github.com/golangci/plugin-module-register v0.1.1 h1:TCmesur25LnyJkpsVrupv1Cdzo+2f7zX0H6Jkw1Ol6c= +github.com/golangci/plugin-module-register v0.1.1/go.mod h1:TTpqoB6KkwOJMV8u7+NyXMrkwwESJLOkfl9TxR1DGFc= +github.com/golangci/revgrep v0.5.2 h1:EndcWoRhcnfj2NHQ+28hyuXpLMF+dQmCN+YaeeIl4FU= +github.com/golangci/revgrep v0.5.2/go.mod h1:bjAMA+Sh/QUfTDcHzxfyHxr4xKvllVr/0sCv2e7jJHA= +github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed h1:IURFTjxeTfNFP0hTEi1YKjB/ub8zkpaOqFFMApi2EAs= +github.com/golangci/unconvert v0.0.0-20240309020433-c5143eacb3ed/go.mod h1:XLXN8bNw4CGRPaqgl3bv/lhz7bsGPh4/xSaMTbo2vkQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93 h1:jc2UWq7CbdszqeH6qu1ougXMIUBfSy8Pbh/anURYbGI= +github.com/google/certificate-transparency-go v1.0.10-0.20180222191210-5ab67e519c93/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -879,6 +1420,7 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= @@ -892,6 +1434,7 @@ github.com/google/go-replayers/httpreplay v1.2.0 h1:VM1wEyyjaoU53BwrOnaf9VhAyQQE github.com/google/go-replayers/httpreplay v1.2.0/go.mod h1:WahEFFZZ7a1P4VM1qEeHy+tME4bwyqPcwWbNlUI1Mcg= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible h1:xmapqc1AyLoB+ddYT6r04bD9lIjlOqGaREovi0SzFaE= @@ -913,12 +1456,13 @@ github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210506205249-923b5ab0fc1a/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20220318212150-b2ab0324ddda/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= -github.com/google/pprof v0.0.0-20220608213341-c488b8fa1db3/go.mod h1:gSuNB+gJaOiQKLEZ+q+PK9Mq3SOzhRcw2GsGS/FhYDk= +github.com/google/pprof v0.0.0-20221102093814-76f304f74e5e/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/pprof v0.0.0-20230406165453-00490a63f317 h1:hFhpt7CTmR3DX+b4R19ydQFtofxT0Sv3QsKNMVQYTMQ= github.com/google/pprof v0.0.0-20230406165453-00490a63f317/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= @@ -927,17 +1471,20 @@ github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/wire v0.5.0 h1:I7ELFeVBr3yfPIcc8+MWvrjk+3VjbcSzoXm3JVa+jD8= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.5.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= +github.com/google/wire v0.6.0 h1:HBkoIh4BdSxoyo9PveV8giw7ZsaBOvzWKfcg/6MrVwI= +github.com/google/wire v0.6.0/go.mod h1:F4QhpQ9EDIdJ1Mbop/NZBRB+5yrR6qg3BnctaoUk6NA= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -947,21 +1494,27 @@ github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0 github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= -github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= +github.com/googleapis/gax-go/v2 v2.12.2 h1:mhN09QQW1jEWeMF74zGR81R30z4VJzjZsfkUhuHF+DA= +github.com/googleapis/gax-go/v2 v2.12.2/go.mod h1:61M8vcyyXR2kqKFxKrfA22jaA8JGF7Dc8App1U3H6jc= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud v0.24.0/go.mod h1:Q8fZtyi5zZxPS/j9aj3sSxtvj41AdQMDwyo1myduD5c= -github.com/gophercloud/gophercloud v0.25.0/go.mod h1:Q8fZtyi5zZxPS/j9aj3sSxtvj41AdQMDwyo1myduD5c= +github.com/gophercloud/gophercloud v1.0.0/go.mod h1:Q8fZtyi5zZxPS/j9aj3sSxtvj41AdQMDwyo1myduD5c= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gordonklaus/ineffassign v0.1.0 h1:y2Gd/9I7MdY1oEIt+n+rowjBNDcLQq3RsH5hwJd0f9s= +github.com/gordonklaus/ineffassign v0.1.0/go.mod h1:Qcp2HIAYhR7mNUVSIxZww3Guk4it82ghYcEXIAk+QT0= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.7.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= @@ -970,30 +1523,50 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= +github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gostaticanalysis/analysisutil v0.7.1 h1:ZMCjoue3DtDWQ5WyU16YbjbQEQ3VuzwxALrpYd+HeKk= +github.com/gostaticanalysis/analysisutil v0.7.1/go.mod h1:v21E3hY37WKMGSnbsw2S/ojApNWb6C1//mXO48CXbVc= +github.com/gostaticanalysis/comment v1.4.1/go.mod h1:ih6ZxzTHLdadaiSnF5WY3dxUoXfXAlTaRzuaNDlSado= +github.com/gostaticanalysis/comment v1.4.2 h1:hlnx5+S2fY9Zo9ePo4AhgYsYHbM2+eAv8m/s1JiCd6Q= +github.com/gostaticanalysis/comment v1.4.2/go.mod h1:KLUTGDv6HOCotCH8h2erHKmpci2ZoR8VPu34YA2uzdM= +github.com/gostaticanalysis/forcetypeassert v0.1.0 h1:6eUflI3DiGusXGK6X7cCcIgVCpZ2CiZ1Q7jl6ZxNV70= +github.com/gostaticanalysis/forcetypeassert v0.1.0/go.mod h1:qZEedyP/sY1lTGV1uJ3VhWZ2mqag3IkWsDHVbplHXak= +github.com/gostaticanalysis/nilerr v0.1.1 h1:ThE+hJP0fEp4zWLkWHWcRyI2Od0p7DlgYG3Uqrmrcpk= +github.com/gostaticanalysis/nilerr v0.1.1/go.mod h1:wZYb6YI5YAxxq0i1+VJbY0s2YONW0HU0GPE3+5PWN4A= +github.com/gostaticanalysis/testutil v0.3.1-0.20210208050101-bfb5c8eec0e4/go.mod h1:D+FIZ+7OahH3ePw/izIEeH5I06eKs1IKI4Xr64/Am3M= +github.com/gostaticanalysis/testutil v0.4.0 h1:nhdCmubdmDF6VEatUNjgUZBJKWRqugoISdUv3PPQgHY= +github.com/gostaticanalysis/testutil v0.4.0/go.mod h1:bLIoPefWXrRi/ssLFWX1dx7Repi5x3CuviD3dgAZaBU= github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= +github.com/grafana/regexp v0.0.0-20221005093135-b4c2bcb0a4b6/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.10.2/go.mod h1:chrfS3YoLAlKTRE5cFWvCbt8uGAjshktT4PveTUpsFQ= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1/go.mod h1:G+WkljZi4mflcqVxYSgvt8MNctRQHjEH8ubKtt1Ka3w= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= +github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed h1:5upAirOpQc1Q53c0bnx2ufif5kANL7bfZWcc6VJWJd8= +github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed/go.mod h1:tMWxXQ9wFIaZeTI9F+hmhFiGpFmhOHzyShyFUhRm0H4= github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok= github.com/hanwen/go-fuse/v2 v2.1.0/go.mod h1:oRyA5eK+pvJyv5otpO/DgccS8y/RvYMaO00GgRLGryc= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= -github.com/hashicorp/consul/api v1.13.0/go.mod h1:ZlVrynguJKcYr54zGaDbaL3fOvKC9m72FhPvA8T35KQ= +github.com/hashicorp/consul/api v1.15.3/go.mod h1:/g/qgcoBcEXALCNZgRRisyTW0nY86++L0KbeAMXYCeY= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/consul/sdk v0.11.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= github.com/hashicorp/cronexpr v1.1.1/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -1003,32 +1576,39 @@ github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtng github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= +github.com/hashicorp/go-cty-funcs v0.0.0-20230405223818-a090f58aa992 h1:fYOrSfO5C9PmFGtmRWSYGqq52SOoE2dXMtAn2Xzh1LQ= +github.com/hashicorp/go-cty-funcs v0.0.0-20230405223818-a090f58aa992/go.mod h1:Abjk0jbRkDaNCzsRhOv2iDCofYpX1eVsjozoiK63qLA= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.2.2 h1:ihRI7YFwcZdiSD7SIenIhHfQH3OuDvWerAUBZbeQS3M= -github.com/hashicorp/go-hclog v1.2.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.3.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.2.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= +github.com/hashicorp/go-kms-wrapping/entropy/v2 v2.0.0/go.mod h1:xvb32K2keAc+R8DSFG2IwDcydK9DBQE+fGA5fsw6hSk= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= -github.com/hashicorp/go-plugin v1.4.4/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= -github.com/hashicorp/go-plugin v1.4.6 h1:MDV3UrKQBM3du3G7MApDGvOsMYy3JQJ4exhSoKBAeVA= +github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/go-plugin v1.4.6/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-plugin v1.6.0 h1:wgd4KxHJTVGGqWBq4QPB1i5BZNEx9BR8+OFmHDmTk8A= +github.com/hashicorp/go-plugin v1.6.0/go.mod h1:lBS5MtSSBZk0SHc66KACcjjlU6WzEVP/8pwz68aMkCI= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= github.com/hashicorp/go-retryablehttp v0.7.1/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= +github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M= +github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= @@ -1037,13 +1617,15 @@ github.com/hashicorp/go-secure-stdlib/mlock v0.1.1/go.mod h1:zq93CJChV6L9QTfGKtf github.com/hashicorp/go-secure-stdlib/mlock v0.1.2 h1:p4AKXPPS24tO8Wc8i1gLvSKdmkiSY5xuju57czJ/IJQ= github.com/hashicorp/go-secure-stdlib/mlock v0.1.2/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I= github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 h1:om4Al8Oy7kCm/B86rLCLah4Dt5Aa0Fr5rYBG60OzwHQ= github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 h1:UpiO20jno/eV1eVZcxqWnUohyKRe1g8FPV/xH1s/2qs= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= github.com/hashicorp/go-secure-stdlib/password v0.1.1/go.mod h1:9hH302QllNwu1o2TGYtSk8I8kTAN0ca1EHpwhm5Mmzo= github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.1/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs= +github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.2/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= @@ -1054,6 +1636,7 @@ github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.1/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= @@ -1063,35 +1646,34 @@ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+l github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.18.0 h1:wYnG7Lt31t2zYkcquwgKo6MWXzRUDIeIVU5naZwHLl8= -github.com/hashicorp/hcl/v2 v2.18.0/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= +github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= +github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/nomad/api v0.0.0-20220629141207-c2428e1673ec/go.mod h1:jP79oXjopTyH6E8LF0CEMq67STgrlmBRIyijA0tuR5o= +github.com/hashicorp/nomad/api v0.0.0-20221102143410-8a95f1239005/go.mod h1:vgJmrz4Bz9E1cR/uy70oP9udUJKFRkcEYHlHTp4nFwI= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hashicorp/vault/api v1.7.2/go.mod h1:xbfA+1AvxFseDzxxdWaL0uO99n1+tndus4GCrtouy0M= +github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/vault/api v1.8.2 h1:C7OL9YtOtwQbTKI9ogB0A1wffRbCN+rH/LLCHO3d8HM= github.com/hashicorp/vault/api v1.8.2/go.mod h1:ML8aYzBIhY5m1MD1B2Q0JV89cC85YVH4t5kBaZiyVaE= -github.com/hashicorp/vault/sdk v0.5.1/go.mod h1:DoGraE9kKGNcVgPmTuX357Fm6WAx1Okvde8Vp3dPDoU= -github.com/hashicorp/vault/sdk v0.5.3/go.mod h1:DoGraE9kKGNcVgPmTuX357Fm6WAx1Okvde8Vp3dPDoU= +github.com/hashicorp/vault/sdk v0.6.0/go.mod h1:+DRpzoXIdMvKc88R4qxr+edwy/RvH5QK8itmxLiDHLc= github.com/hashicorp/vault/sdk v0.6.1 h1:sjZC1z4j5Rh2GXYbkxn5BLK05S1p7+MhW4AgdUmgRUA= github.com/hashicorp/vault/sdk v0.6.1/go.mod h1:Ck4JuAC6usTphfrrRJCRH+7/N7O2ozZzkm/fzQFt4uM= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hetznercloud/hcloud-go v1.33.1/go.mod h1:XX/TQub3ge0yWR2yHWmnDVIrB+MQbda1pHxkUmDlUME= -github.com/hetznercloud/hcloud-go v1.35.0/go.mod h1:mepQwR6va27S3UQthaEPGS86jtzSY9xWL1e9dyxXpgA= +github.com/hetznercloud/hcloud-go v1.35.3/go.mod h1:mepQwR6va27S3UQthaEPGS86jtzSY9xWL1e9dyxXpgA= github.com/hexops/autogold v1.3.0 h1:IEtGNPxBeBu8RMn8eKWh/Ll9dVNgSnJ7bp/qHgMQ14o= github.com/hexops/autogold v1.3.0/go.mod h1:d4hwi2rid66Sag+BVuHgwakW/EmaFr8vdTSbWDbrDRI= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= -github.com/hexops/valast v1.4.0 h1:sFzyxPDP0riFQUzSBXTCCrAbbIndHPWMndxuEjXdZlc= -github.com/hexops/valast v1.4.0/go.mod h1:uVjKZ0smVuYlgCSPz9NRi5A04sl7lp6GtFWsROKDgEs= +github.com/hexops/valast v1.4.4 h1:rETyycw+/L2ZVJHHNxEBgh8KUn+87WugH9MxcEv9PGs= +github.com/hexops/valast v1.4.4/go.mod h1:Jcy1pNH7LNraVaAZDLyv21hHg2WBv9Nf9FL6fGxU7o4= github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02 h1:AgcIVYPa6XJnU3phs104wLj8l5GEththEw6+F79YsIY= github.com/hinshun/vt10x v0.0.0-20220301184237-5011da428d02/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68= @@ -1106,16 +1688,21 @@ github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1: github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd h1:anPrsicrIi2ColgWTVPk+TrN42hJIWlfPHSBP9S0ZkM= github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd/go.mod h1:3LVOLeyx9XVvwPgrt2be44XgSqndprz1G18rSk8KD84= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/in-toto/in-toto-golang v0.5.0 h1:hb8bgwr0M2hGdDsLjkJ3ZqJ8JFLL/tgYdAxF/XEFBbY= +github.com/in-toto/in-toto-golang v0.5.0/go.mod h1:/Rq0IZHLV7Ku5gielPT4wPHJfH1GdHMCq8+WPxw8/BE= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= -github.com/ionos-cloud/sdk-go/v6 v6.1.0/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME= +github.com/ionos-cloud/sdk-go/v6 v6.1.3/go.mod h1:Ox3W0iiEz0GHnfY9e5LmAxwklsxguuNFEUSu0gVRTME= github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/j-keck/arping v1.0.2/go.mod h1:aJbELhR92bSk7tp79AWM/ftfc90EfEi2bQJrbBFOsPw= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= @@ -1127,7 +1714,7 @@ github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsU github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.12.1/go.mod h1:ZkhRC59Llhrq3oSfrikvwQ5NaxYExr6twkdkMLaKono= +github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= @@ -1140,28 +1727,42 @@ github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvW github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.11.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.16.1/go.mod h1:SIhx0D5hoADaiXZVyv+3gSm3LCIIINTVO0PficsvWGQ= +github.com/jackc/pgx/v4 v4.17.2/go.mod h1:lcxIZN44yMIrWI78a5CpucdD14hX0SBDbNRvjDBItsw= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.2.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.3.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= +github.com/jgautheron/goconst v1.7.0 h1:cEqH+YBKLsECnRSd4F4TK5ri8t/aXtt/qoL0Ft252B0= +github.com/jgautheron/goconst v1.7.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= +github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= +github.com/jingyugao/rowserrcheck v1.1.1 h1:zibz55j/MJtLsjP1OF4bSdgXxwL1b+Vn7Tjzq7gFzUs= +github.com/jingyugao/rowserrcheck v1.1.1/go.mod h1:4yvlZSDb3IyDTUZJUmpZfm2Hwok+Dtp+nu2qOq+er9c= +github.com/jinzhu/gorm v0.0.0-20170222002820-5409931a1bb8 h1:CZkYfurY6KGhVtlalI4QwQ6T0Cu6iuY3e0x5RLu96WE= +github.com/jinzhu/gorm v0.0.0-20170222002820-5409931a1bb8/go.mod h1:Vla75njaFJ8clLU1W44h34PjIkijhjHIYnZxMqCdxqo= +github.com/jinzhu/inflection v0.0.0-20170102125226-1c35d901db3d h1:jRQLvyVGL+iVtDElaEIDdKwpPqUIZJfzkNLV34htpEc= +github.com/jinzhu/inflection v0.0.0-20170102125226-1c35d901db3d/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af h1:KA9BjwUk7KlCh6S9EAGWBt1oExIUv9WyNCiRz5amv48= +github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= +github.com/jjti/go-spancheck v0.5.3 h1:vfq4s2IB8T3HvbpiwDTYgVPj1Ze/ZSXrTtaZRTc7CuM= +github.com/jjti/go-spancheck v0.5.3/go.mod h1:eQdOX1k3T+nAKvZDyLC3Eby0La4dZ+I19iOl5NzSPFE= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -1173,6 +1774,7 @@ github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52Cu github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= @@ -1186,8 +1788,13 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/loggo v0.0.0-20190526231331-6e530bcce5d8/go.mod h1:vgyd7OREkbtVEN/8IXZe5Ooef3LQePvuBm9UWj6ZL8U= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/julz/importas v0.1.0 h1:F78HnrsjY3cR7j0etXy5+TU1Zuy7Xt08X/1aJnH5xXY= +github.com/julz/importas v0.1.0/go.mod h1:oSFU2R4XK/P7kNBrnL/FEQlDGN1/6WoxXEjSSXO0DV0= +github.com/karamaru-alpha/copyloopvar v1.0.8 h1:gieLARwuByhEMxRwM3GRS/juJqFbLraftXIKDDNJ50Q= +github.com/karamaru-alpha/copyloopvar v1.0.8/go.mod h1:u7CIfztblY0jZLOQZgH3oYsJzpC2A7S6u/lfgSXHy0k= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= @@ -1197,13 +1804,20 @@ github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/errcheck v1.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV0= +github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8= +github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg= github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= +github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -1212,7 +1826,6 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -1221,39 +1834,69 @@ github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs= +github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I= +github.com/kunwardeep/paralleltest v1.0.10 h1:wrodoaKYzS2mdNVnc4/w31YaXFtsc21PCTdvWJ/lDDs= +github.com/kunwardeep/paralleltest v1.0.10/go.mod h1:2C7s65hONVqY7Q5Efj5aLzRCNLjw2h4eMc9EcypGjcY= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= +github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ymEyhQ= +github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= +github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA= +github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0= +github.com/ldez/tagliatelle v0.5.0 h1:epgfuYt9v0CG3fms0pEgIMNPuFf/LpPIfjk4kyqSioo= +github.com/ldez/tagliatelle v0.5.0/go.mod h1:rj1HmWiL1MiKQuOONhd09iySTEkUuE/8+5jtPYz9xa4= github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= +github.com/leonklingele/grouper v1.1.1 h1:suWXRU57D4/Enn6pXR0QVqqWWrnJ9Osrz+5rjt8ivzU= +github.com/leonklingele/grouper v1.1.1/go.mod h1:uk3I3uDfi9B6PeUjsCKi6ndcf63Uy7snXgR4yDYQVDY= +github.com/lib/pq v0.0.0-20150723085316-0dad96c0b94f/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.10.6/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linode/linodego v1.4.0/go.mod h1:PVsRxSlOiJyvG4/scTszpmZDTdgS+to3X6eS8pRrWI8= -github.com/linode/linodego v1.8.0/go.mod h1:heqhl91D8QTPVm2k9qZHP78zzbOdTFLXE9NJc3bcc50= +github.com/linode/linodego v1.9.3/go.mod h1:h6AuFR/JpqwwM/vkj7s8KV3iGN8/jxn+zc437F8SZ8w= github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= github.com/liquidgecka/testlib v0.0.0-20180123051607-561e6b271c63 h1:E1gsAMD4TysLS1Vt2CGR1EK/RtNPIT7YkiVOy9PS1IM= github.com/liquidgecka/testlib v0.0.0-20180123051607-561e6b271c63/go.mod h1:vwMPvLIhXhkJaBfsk/6l+eDuiQaIVHC0b6eCvUVBsB0= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= +github.com/lufeee/execinquery v1.2.1 h1:hf0Ems4SHcUGBxpGN7Jz78z1ppVkP/837ZlETPCEtOM= +github.com/lufeee/execinquery v1.2.1/go.mod h1:EC7DrEKView09ocscGHC+apXMIaorh4xqSxS/dy8SbM= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= +github.com/macabu/inamedparam v0.1.3 h1:2tk/phHkMlEL/1GNe/Yf6kkR/hkcUdAEY3L0hjYV1Mk= +github.com/macabu/inamedparam v0.1.3/go.mod h1:93FLICAIk/quk7eaPPQvbzihUdn/QkGDwIZEoLtpH6I= +github.com/magiconair/properties v1.5.3/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/maratori/testableexamples v1.0.0 h1:dU5alXRrD8WKSjOUnmJZuzdxWOEQ57+7s93SLMxb2vI= +github.com/maratori/testableexamples v1.0.0/go.mod h1:4rhjL1n20TUTT4vdh3RDqSizKLyXp7K2u6HgraZCGzE= +github.com/maratori/testpackage v1.1.1 h1:S58XVV5AD7HADMmD0fNnziNHqKvSdDuEKdPD1rNTU04= +github.com/maratori/testpackage v1.1.1/go.mod h1:s4gRK/ym6AMrqpOa/kEbQTV4Q4jb7WeLZzVhVVVOQMc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= +github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26 h1:gWg6ZQ4JhDfJPqlo2srm/LN17lpybq15AryXIRcWYLE= +github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= +github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -1261,8 +1904,9 @@ github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVc github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= @@ -1273,8 +1917,8 @@ github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOA github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -1287,21 +1931,31 @@ github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZ github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/mattn/go-shellwords v1.0.12 h1:M2zGm7EW6UQJvDeQxo4T51eKPurbeFbe8WtebGE2xrk= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= +github.com/mattn/go-sqlite3 v1.6.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= +github.com/mgechev/revive v1.3.7 h1:502QY0vQGe9KtYJ9FpxMz9rL+Fc/P13CI5POL4uHCcE= +github.com/mgechev/revive v1.3.7/go.mod h1:RJ16jUbF0OWC3co/+XTxmFNgEpUPwnnA0BRllX2aDNA= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/microcosm-cc/bluemonday v1.0.21 h1:dNH3e4PSyE4vNX+KlRGHT5KrSvjeUkoNPwEORjffHJg= github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= github.com/microsoft/ApplicationInsights-Go v0.4.4/go.mod h1:fKRUseBqkw6bDiXTs3ESTiU/4YTIHsQS4W3fP2ieF4U= +github.com/microsoft/go-mssqldb v0.17.0/go.mod h1:OkoNGhGEs8EZqchVTtochlXruEhEOaO4S0d2sB5aeGQ= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.48/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= github.com/miekg/dns v1.1.50/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= +github.com/miekg/pkcs11 v1.0.2/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/miekg/pkcs11 v1.1.1 h1:Ugu9pdy6vAYku5DEpVWVFPYnzV+bxB+iRdbuFSu7TvU= +github.com/miekg/pkcs11 v1.1.1/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= @@ -1322,6 +1976,7 @@ github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQ github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= +github.com/mitchellh/mapstructure v0.0.0-20150613213606-2caf8efc9366/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= @@ -1333,20 +1988,37 @@ github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQ github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/buildkit v0.13.0 h1:reVR1Y+rbNIUQ9jf0Q1YZVH5a/nhOixZsl+HJ9qQEGI= +github.com/moby/buildkit v0.13.0/go.mod h1:aNmNQKLBFYAOFuzQjR3VA27/FijlvtBD1pjNwTSN37k= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= +github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/moby v23.0.3+incompatible h1:g+qvdrXfskgMXiq6DQMo5EdEIp8mo/9befVIddWstGI= -github.com/moby/moby v23.0.3+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= +github.com/moby/moby v25.0.4+incompatible h1:vea1J80wDM5x5geaZSaywFkfFxLABJIQ3mmR4ewZGbU= +github.com/moby/moby v25.0.4+incompatible/go.mod h1:fDXVQ6+S340veQPv35CzDahGBmHsiclFwfEygB/TWMc= +github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= +github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= +github.com/moby/spdystream v0.2.0 h1:cjW1zVyyoiM0T7b6UoySUFqzXMoqRckQtXwGPiBhOM8= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/sys/mountinfo v0.7.1 h1:/tTvQaSJRr2FshkhXiIpux6fQ2Zvc4j7tAhMTStAG2g= +github.com/moby/sys/mountinfo v0.7.1/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= +github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= +github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= github.com/moby/sys/signal v0.6.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= +github.com/moby/sys/signal v0.7.0 h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI= +github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= +github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= +github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= +github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= +github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -1357,6 +2029,9 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/montanaflynn/stats v0.6.6/go.mod h1:etXPPgVO6n31NxCd9KQUMvCM+ve0ruNzt6R8Bnaayow= +github.com/moricho/tparallel v0.3.1 h1:fQKD4U1wRMAYNngDonW5XupoB/ZGJHdpzrWqgyg9krA= +github.com/moricho/tparallel v0.3.1/go.mod h1:leENX2cUv7Sv2qDgdi0D0fCftN8fRC67Bcn8pqzeYNI= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= @@ -1369,10 +2044,14 @@ github.com/muesli/termenv v0.13.0/go.mod h1:sP1+uffeLaEYpyOTb8pLCUctGcGLnoFjSn4Y github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/nakabonne/nestif v0.3.1 h1:wm28nZjhQY5HyYPx+weN3Q65k6ilSBxDb8v5S81B81U= +github.com/nakabonne/nestif v0.3.1/go.mod h1:9EtoZochLn5iUprVDmDjqGKPofoUEBL8U4Ngq6aY7OE= github.com/natefinch/atomic v1.0.1 h1:ZPYKxkqQOx3KZ+RsbnP/YsgvxWQPGxjC0oBt2AhwV0A= github.com/natefinch/atomic v1.0.1/go.mod h1:N/D/ELrljoqDyT3rZrsUmtsuzvHkeB/wWjHV22AZRbM= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -1388,13 +2067,23 @@ github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nightlyone/lockfile v1.0.0 h1:RHep2cFKK4PonZJDdEl4GmkabuhbsRMgk/k3uAmxBiA= github.com/nightlyone/lockfile v1.0.0/go.mod h1:rywoIealpdNse2r832aiD9jRk8ErCatROs6LzC841CI= +github.com/nishanths/exhaustive v0.12.0 h1:vIY9sALmw6T/yxiASewa4TQcFsVYZQQRUQJhKRf3Swg= +github.com/nishanths/exhaustive v0.12.0/go.mod h1:mEZ95wPIZW+x8kC4TgC+9YCUgiST7ecevsVDTgc2obs= +github.com/nishanths/predeclared v0.2.2 h1:V2EPdZPliZymNAn79T8RkNApBjMmVKh5XRpLm/w98Vk= +github.com/nishanths/predeclared v0.2.2/go.mod h1:RROzoN6TnGQupbC+lqggsOlcgysk3LMK/HI84Mp280c= +github.com/nunnatsa/ginkgolinter v0.16.1 h1:uDIPSxgVHZ7PgbJElRDGzymkXH+JaF7mjew+Thjnt6Q= +github.com/nunnatsa/ginkgolinter v0.16.1/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= +github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olareg/olareg v0.0.0-20240302205147-6696de4cd016 h1:KtIP9r/gbJ9nHMaAKiuFdYC0CCQ8VYhOpVgdVfarHzU= +github.com/olareg/olareg v0.0.0-20240302205147-6696de4cd016/go.mod h1:RBuU7JW7SoIIxZKzLRhq8sVtQeAHzCAtRrXEBx2KlM4= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= @@ -1410,7 +2099,13 @@ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0 github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= +github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= +github.com/onsi/ginkgo/v2 v2.15.0 h1:79HwNRBAZHOEwrczrgSOPy+eFTTlIGELKy5as+ClttY= +github.com/onsi/ginkgo/v2 v2.15.0/go.mod h1:HlxMHtYF57y6Dpf+mc5529KKmSq9h2FpCF+/ZkwUxKM= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -1421,18 +2116,24 @@ github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoT github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= +github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= +github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= @@ -1446,11 +2147,15 @@ github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.m github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.1.0 h1:HHUyrt9mwHUjtasSbXSMvs4cyFxh+Bll4AjJ9odEGpg= +github.com/opencontainers/runtime-spec v1.1.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= +github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= +github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0= @@ -1463,6 +2168,16 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= +github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= +github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= +github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE= +github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs= +github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo= +github.com/otiai10/mint v1.3.1/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc= +github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= +github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= +github.com/ovh/go-ovh v1.1.0/go.mod h1:AxitLZ5HBRPyUd+Zl60Ajaag+rNTdVXWIkzfrVuTXWA= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -1472,6 +2187,10 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petar-dambovaliev/aho-corasick v0.0.0-20230725210150-fb29fc3c913e h1:POJco99aNgosh92lGqmx7L1ei+kCymivB/419SD15PQ= github.com/petar-dambovaliev/aho-corasick v0.0.0-20230725210150-fb29fc3c913e/go.mod h1:EHPiTAKtiFmrMldLUNswFwfZ2eJIYBHktdaUTZxYWRw= @@ -1491,10 +2210,11 @@ github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9F github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -1507,14 +2227,18 @@ github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk= github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/polyfloyd/go-errorlint v1.4.8 h1:jiEjKDH33ouFktyez7sckv6pHWif9B7SuS8cutDXFHw= +github.com/polyfloyd/go-errorlint v1.4.8/go.mod h1:NNCxFcFjZcw3xNjVdCchERkEM6Oz7wta2XJVxRftwO4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/alertmanager v0.24.0/go.mod h1:r6fy/D7FRuZh5YbnX6J3MBY0eI4Pb5yPYS7/bPSXXqI= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.0-pre1.0.20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -1525,7 +2249,10 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_golang v1.13.1/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= @@ -1533,6 +2260,9 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1548,10 +2278,13 @@ github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+ github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= github.com/prometheus/common/assets v0.1.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI= github.com/prometheus/common/assets v0.2.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/exporter-toolkit v0.7.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= +github.com/prometheus/exporter-toolkit v0.8.2/go.mod h1:00shzmJL7KxcsabLWcONwpyNEuWhREOnFqZW7vadFS0= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1565,27 +2298,44 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/prometheus v0.35.0/go.mod h1:7HaLx5kEPKJ0GDgbODG0fZgXbQ8K/XjZNJXQmbmgQlY= -github.com/prometheus/prometheus v0.37.0/go.mod h1:egARUgz+K93zwqsVIAneFlLZefyGOON44WyAp4Xqbbk= +github.com/prometheus/prometheus v0.40.5/go.mod h1:bxgdmtoSNLmmIVPGmeTJ3OiP67VmuY4yalE4ZP6L/j8= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435cARxCW6q9gc0S/Yxz7Mkd38pOb0= github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= -github.com/pulumi/pulumi-go-provider v0.14.1-0.20240301190400-aeddefa8dc54 h1:ajfW0p4tM1BLYoZRuy+CJoEcT3US6KXmAfCNNzi1Has= -github.com/pulumi/pulumi-go-provider v0.14.1-0.20240301190400-aeddefa8dc54/go.mod h1:fpmTbPgwdzd4OtUcgE0wYRNzqEY5r88T/c3J1UM/lpA= -github.com/pulumi/pulumi-go-provider/integration v0.10.0 h1:GHesnrrvkboSjkZpC+qRwjkXBp5d+fSXqlIO92zQxvc= -github.com/pulumi/pulumi-go-provider/integration v0.10.0/go.mod h1:qAbKHpPzANFKOyjiQ0CzdgJh4DtM0gtujKhO7+l3/+w= -github.com/pulumi/pulumi-java/pkg v0.9.9 h1:F3xJUtMFDVrTGCxb7Rh2Q8s6tj7gMfM5pcoUthz7vFY= -github.com/pulumi/pulumi-java/pkg v0.9.9/go.mod h1:LVF1zeg3UkToHWxb67V+zEIxQc3EdMnlot5NWSt+FpA= +github.com/pulumi/providertest v0.0.12 h1:UjcFQHHs4AGJyJqxhvC2q8yVQ7Li+UyCyP95HZcK03U= +github.com/pulumi/providertest v0.0.12/go.mod h1:REAoaN+hGOtdWJGirfWYqcSjCejlbGfzyVTUuemJTuE= +github.com/pulumi/pulumi-go-provider v0.16.0 h1:vLAiECprIoLdTPd0UFs9Vv/HgSw7l/SBAurRBm3vpSU= +github.com/pulumi/pulumi-go-provider v0.16.0/go.mod h1:2yjjeyMSmsb/o/BRJeWk+kcXrJWF5U2EulJKnN7qVLs= +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/go.mod h1:sf87soow+4JkV361vHI0W04hpJmWiWajzJytFMNonCE= +github.com/pulumi/pulumi-java/pkg v0.10.0 h1:D1i5MiiNrxYr2uJ1szcj1aQwF9DYv7TTsPmajB9dKSw= +github.com/pulumi/pulumi-java/pkg v0.10.0/go.mod h1:xu6UgYtQm+xXOo1/DZNa2CWVPytu+RMkZVTtI7w7ffY= github.com/pulumi/pulumi-yaml v1.6.0 h1:mb/QkebWXTa1fR+P3ZkCCHGXOYC6iTN8X8By9eNz8xM= github.com/pulumi/pulumi-yaml v1.6.0/go.mod h1:RyEPo4MhL363sbAiFMVKRsQmXpQPDCY1S8pGv3E6Ij0= -github.com/pulumi/pulumi/pkg/v3 v3.111.1 h1:SrVgQE96T7YlZx/AZoFSlXYwur7ZmQUHyjbPI8sH96Q= -github.com/pulumi/pulumi/pkg/v3 v3.111.1/go.mod h1:ZWsq8Y0EMHZ5E2ju92jC+POz97TEXs3BbQ6r2o0U4SA= -github.com/pulumi/pulumi/sdk/v3 v3.111.1 h1:uOeG/b6YxBuL59xHtmFPspMa8BB6ovjHelL7sVCGJZw= -github.com/pulumi/pulumi/sdk/v3 v3.111.1/go.mod h1:5A6GHUwAJlRY1SSLZh84aDIbsBShcrfcmHzI50ecSBg= +github.com/pulumi/pulumi/pkg/v3 v3.113.0 h1:fo63QR2nB5ksqq0fxg5uPm/zbXW7eJVRdYpAawIda7I= +github.com/pulumi/pulumi/pkg/v3 v3.113.0/go.mod h1:i5hGDlTN59giiXHfrigWEo30x51FPUj8GllAlVkUcQA= +github.com/pulumi/pulumi/sdk/go/pulumi-language-go/v3 v3.0.0-20240415162817-44c8de53d5d2 h1:HVBduxIfM/MFBdkOrxUD3oJjz22MPE+8ZbeGGz8sJsA= +github.com/pulumi/pulumi/sdk/go/pulumi-language-go/v3 v3.0.0-20240415162817-44c8de53d5d2/go.mod h1:tVLWi2SXi6Cr1u/vzFqWOV+Kzb3MrXJUoSMoqg+pr0g= +github.com/pulumi/pulumi/sdk/v3 v3.113.0 h1:CIlmxJZdjxpPPoFe/rrP1dWTwh3CB7ahs/dA6SHcbuE= +github.com/pulumi/pulumi/sdk/v3 v3.113.0/go.mod h1:JWSzKBoHd8rlncC1DhXLf7YdV+Bk/Qf+hSZOOQh0WwQ= +github.com/quasilyte/go-ruleguard v0.4.2 h1:htXcXDK6/rO12kiTHKfHuqR4kr3Y4M0J0rOL6CH/BYs= +github.com/quasilyte/go-ruleguard v0.4.2/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI= +github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= +github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= +github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rakyll/embedmd v0.0.0-20171029212350-c8060a0752a2/go.mod h1:7jOTMgqac46PZcF54q6l2hkLEG8op93fZu61KmxWDV4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/regclient/regclient v0.0.0-20240308005156-a7434cff9c6b h1:31EMKgHu3RSDs3nbszNvjMc7uKgEgJbrWX6Zx5uxvZQ= +github.com/regclient/regclient v0.0.0-20240308005156-a7434cff9c6b/go.mod h1:3/ZAfhZbMysH4KOUmZ7aRYMZzoyDtT2MUbe9RufH/80= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= @@ -1595,9 +2345,9 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= @@ -1605,6 +2355,10 @@ github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThC github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/ryancurrah/gomodguard v1.3.1 h1:fH+fUg+ngsQO0ruZXXHnA/2aNllWA1whly4a6UvyzGE= +github.com/ryancurrah/gomodguard v1.3.1/go.mod h1:DGFHzEhi6iJ0oIDfMuo3TgrS+L9gZvrEfmjjuelnRU0= +github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU= +github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= @@ -1614,8 +2368,14 @@ github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+e github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= +github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= +github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1/go.mod h1:uToXkOrWAZ6/Oc07xWQrPOhJotwFIyu2bBVN41fcDUY= +github.com/sashamelentyev/interfacebloat v1.1.0 h1:xdRdJp0irL086OyW1H/RTZTr1h/tMEOsumirXcOJqAw= +github.com/sashamelentyev/interfacebloat v1.1.0/go.mod h1:+Y9yU5YdTkrNvoX0xHc84dxiN1iBi9+G8zZIhPVoNjQ= +github.com/sashamelentyev/usestdlibvars v1.25.0 h1:IK8SI2QyFzy/2OD2PYnhy84dpfNo9qADrRt6LH8vSzU= +github.com/sashamelentyev/usestdlibvars v1.25.0/go.mod h1:9nl0jgOfHKWNFS43Ojw0i7aRoS4j6EBye3YBhmAIRF8= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= @@ -1623,19 +2383,33 @@ github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24 github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= +github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= +github.com/secure-systems-lab/go-securesystemslib v0.4.0/go.mod h1:FGBZgq2tXWICsxWQW1msNf49F0Pf2Op5Htayx335Qbs= +github.com/securego/gosec/v2 v2.19.0 h1:gl5xMkOI0/E6Hxx0XCY2XujA3V7SNSefA8sC+3f1gnk= +github.com/securego/gosec/v2 v2.19.0/go.mod h1:hOkDcHz9J/XIgIlPDXalxjeVYsHxoWUc5zJSHxcB8YM= +github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= -github.com/segmentio/asm v1.2.0 h1:9BQrFxC+YOHJlTlHGkTrFWf59nbL3XnCoFLTwDCI7ys= -github.com/segmentio/asm v1.2.0/go.mod h1:BqMnlJP91P8d+4ibuonYZw9mfnzI9HfxselHZr5aAcs= -github.com/segmentio/encoding v0.3.6 h1:E6lVLyDPseWEulBmCmAKPanDd3jiyGDo5gMcugCRwZQ= -github.com/segmentio/encoding v0.3.6/go.mod h1:n0JeuIqEQrQoPDGsjo8UNd1iA0U8d8+oHAA4E3G3OxM= +github.com/segmentio/encoding v0.3.5 h1:UZEiaZ55nlXGDL92scoVuw00RmiRCazIEmvPSbSvt8Y= +github.com/segmentio/encoding v0.3.5/go.mod h1:n0JeuIqEQrQoPDGsjo8UNd1iA0U8d8+oHAA4E3G3OxM= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= -github.com/shirou/gopsutil/v3 v3.22.3 h1:UebRzEomgMpv61e3hgD1tGooqX5trFbdU/ehphbHd00= -github.com/shirou/gopsutil/v3 v3.22.3/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM= +github.com/serialx/hashring v0.0.0-20200727003509-22c0c7ab6b1b h1:h+3JX2VoWTFuyQEo87pStk/a99dzIO1mM9KxIyLPGTU= +github.com/serialx/hashring v0.0.0-20200727003509-22c0c7ab6b1b/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= +github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= +github.com/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI= +github.com/shibumi/go-pathspec v1.3.0/go.mod h1:Xutfslp817l2I1cZvgcfeMQJG5QnU2lh5tVaaMCl3jE= +github.com/shirou/gopsutil/v3 v3.24.2 h1:kcR0erMbLg5/3LcInpw0X/rrPSqq4CDPyI6A6ZRC18Y= +github.com/shirou/gopsutil/v3 v3.24.2/go.mod h1:tSg/594BcA+8UdQU2XcW803GWYgdtauFFPgJCJKZlVk= +github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.4.3/go.mod h1:xYtyGBC5Q3kzCNyJg/SjgNpfAa2kvmgA0i5+lQso8x0= +github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/go-goon v0.0.0-20210110234559-7585751d9a17 h1:lRAUE0dIvigSSFAmaM2dfg7OH8T+a8zJ5smEh09a/GI= -github.com/shurcooL/go-goon v0.0.0-20210110234559-7585751d9a17/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= +github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= +github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -1650,6 +2424,12 @@ github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6Mwd github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/sivchari/containedctx v1.0.3 h1:x+etemjbsh2fB5ewm5FeLNi5bUjK0V8n0RB+Wwfd0XE= +github.com/sivchari/containedctx v1.0.3/go.mod h1:c1RDvCbnJLtH4lLcYD/GqwiBSSf4F5Qk0xld2rBqzJ4= +github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak= +github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg= github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1657,35 +2437,55 @@ github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:s github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= +github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00= +github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo= github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67 h1:8ZnTA26bBOoPkAbbitKPgNlpw0Bwt7ZlpYgZWHWJR/w= github.com/sourcegraph/appdash-data v0.0.0-20151005221446-73f23eafcf67/go.mod h1:tNZjgbYncKL5HxvDULAr/mWDmFz4B7H8yrXEDlnoIiw= +github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0= +github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spdx/tools-golang v0.5.3 h1:ialnHeEYUC4+hkm5vJm4qz2x+oEJbS0mAMFrNXdQraY= +github.com/spdx/tools-golang v0.5.3/go.mod h1:/ETOahiAo96Ob0/RAIBmFZw6XN0yTnyr/uFZm2NTMhI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.9.5 h1:stMpOSZFs//0Lv29HduCmli3GUfpFoF3Y1Q/aXj/wVM= -github.com/spf13/afero v1.9.5/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8= +github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNoBjkY= +github.com/spf13/cast v0.0.0-20150508191742-4d07383ffe94/go.mod h1:r2rcYCSwa1IExKTDiTfzaxqT2FNHs8hODu4LnUfgKEg= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/jwalterweatherman v0.0.0-20141219030609-3d60171a6431/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= +github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v0.0.0-20150530192845-be5ff3e4840c/go.mod h1:A8kyI5cUJhb8N+3pkfONlcEcZbueH6nhAm0Fq7SrnBM= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= +github.com/ssgreg/nlreturn/v2 v2.2.1 h1:X4XDI7jstt3ySqGU86YGAURbxw3oTDPK9sPEi6YEwQ0= +github.com/ssgreg/nlreturn/v2 v2.2.1/go.mod h1:E/iiPB78hV7Szg2YfRgyIrk1AD6JVMTRkkxBiELzh2I= +github.com/stbenjam/no-sprintf-host-port v0.1.1 h1:tYugd/yrm1O0dV+ThCbaKZh195Dfm07ysF0U6JQXczc= +github.com/stbenjam/no-sprintf-host-port v0.1.1/go.mod h1:TLhvtIvONRzdmkFiio4O8LHsN9N74I+PhRquPsxpL0I= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1696,8 +2496,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -1707,27 +2508,55 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= +github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c h1:+aPplBwWcHBo6q9xrfWdMrT9o4kltkmmvpemgIjep/8= +github.com/t-yuki/gocover-cobertura v0.0.0-20180217150009-aaee18c8195c/go.mod h1:SbErYREK7xXdsRiigaQiQkI9McGRzYMvlKYaP3Nimdk= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tdakkota/asciicheck v0.2.0 h1:o8jvnUANo0qXtnslk2d3nMKTFNlOnJjRrNcj0j9qkHM= +github.com/tdakkota/asciicheck v0.2.0/go.mod h1:Qb7Y9EgjCLJGup51gDHFzbI08/gbGhL/UVhYIPWG2rg= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= +github.com/tenntenn/modver v1.0.1 h1:2klLppGhDgzJrScMpkj9Ujy3rXPUspSjAcev9tSEBgA= +github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg6SAMGH0= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3 h1:f+jULpRQGxTSkNYKJ51yaw6ChIqO+Je8UqsTKN/cDag= +github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY= +github.com/tetafro/godot v1.4.16 h1:4ChfhveiNLk4NveAZ9Pu2AN8QZ2nkUGFuadM9lrr5D0= +github.com/tetafro/godot v1.4.16/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio= github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= +github.com/theupdateframework/notary v0.7.0 h1:QyagRZ7wlSpjT5N2qQAh/pN+DVqgekv4DzbAiAiEL3c= +github.com/theupdateframework/notary v0.7.0/go.mod h1:c9DRxcmhHmVLDay4/2fUYdISnHqbFDGRSlXPO0AhYWw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw= -github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk= -github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o= -github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ= +github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M= +github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ= +github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4= +github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg= +github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= +github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tomarrell/wrapcheck/v2 v2.8.3 h1:5ov+Cbhlgi7s/a42BprYoxsr73CbdMUTzE3bRDFASUs= +github.com/tomarrell/wrapcheck/v2 v2.8.3/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo= +github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw= +github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= +github.com/tonistiigi/fsutil v0.0.0-20240301111122-7525a1af2bb5 h1:oZS8KCqAg62sxJkEq/Ppzqrb6EooqzWtL8Oaex7bc5c= +github.com/tonistiigi/fsutil v0.0.0-20240301111122-7525a1af2bb5/go.mod h1:vbbYqJlnswsbJqWUcJN8fKtBhnEgldDrcagTgnBVKKM= +github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= +github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= +github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 h1:Y/M5lygoNPKwVNLMPXgVfsRT40CSFKXCxuU8LoHySjs= +github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= @@ -1739,10 +2568,20 @@ github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= +github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= +github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI= +github.com/ultraware/funlen v0.1.0/go.mod h1:XJqmOQja6DpxarLj6Jj1U7JuoS8PvL4nEqDaQhy22p4= +github.com/ultraware/whitespace v0.1.0 h1:O1HKYoh0kIeqE8sFqZf1o0qbORXUCOQFrlaQyZsczZw= +github.com/ultraware/whitespace v0.1.0/go.mod h1:/se4r3beMFNmewJ4Xmz0nMQ941GJt+qmSHGP9emHYe0= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvniI= +github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k= +github.com/vbatts/tar-split v0.11.5 h1:3bHCTIheBm1qFTcgh9oPu+nNBtX+XJIupG/vacinCts= +github.com/vbatts/tar-split v0.11.5/go.mod h1:yZbwRsSeGjusneWgA781EKej9HF8vme8okylkAeNKLk= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= @@ -1751,6 +2590,7 @@ github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmF github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= @@ -1758,17 +2598,28 @@ github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= +github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU= +github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM= +github.com/yagipy/maintidx v1.0.0/go.mod h1:0qNf/I/CCZXSMhsRsrEPDZ+DkekpKLXAJfsTACwgXLk= +github.com/yeya24/promlinter v0.2.0 h1:xFKDQ82orCU5jQujdaD8stOHiv8UN68BSdn2a8u8Y3o= +github.com/yeya24/promlinter v0.2.0/go.mod h1:u54lkmBOZrpEbQQ6gox2zWKKLKu2SGe+2KOiextY+IA= +github.com/ykadowak/zerologlint v0.1.5 h1:Gy/fMz1dFQN9JZTPjv1hxEk+sRWm05row04Yoolgdiw= +github.com/ykadowak/zerologlint v0.1.5/go.mod h1:KaUskqF3e/v59oPmdq1U1DnKcuHokl2/K1U4pmIELKg= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1781,14 +2632,23 @@ github.com/yuin/goldmark v1.5.2 h1:ALmeCk/px5FSm1MAcFBAsVKZjDuMVj8Tm7FFIlMJnqU= github.com/yuin/goldmark v1.5.2/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark-emoji v1.0.1 h1:ctuWEyzGBwiucEqxzwe0SOYDXPAucOrE9NQC18Wa1os= github.com/yuin/goldmark-emoji v1.0.1/go.mod h1:2w1E6FEWLcDQkoTE+7HU6QF1F6SLlNGjRIBbIZQFqkQ= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= +github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= -github.com/zclconf/go-cty v1.14.0 h1:/Xrd39K7DXbHzlisFP9c4pHao4yyf+/Ug9LEz+Y/yhc= -github.com/zclconf/go-cty v1.14.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +github.com/zclconf/go-cty v1.4.0/go.mod h1:nHzOclRkoj++EU9ZjSrZvRG0BXIWt8c7loYc0qXAFGQ= +github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA= +github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= +gitlab.com/bosi/decorder v0.4.1 h1:VdsdfxhstabyhZovHafFw+9eJ6eU0d2CkFNJcZz/NU4= +gitlab.com/bosi/decorder v0.4.1/go.mod h1:jecSqWUew6Yle1pCr2eLWTensJMmsxHsBwt+PVbkAqA= +go-simpler.org/assert v0.7.0 h1:OzWWZqfNxt8cLS+MlUp6Tgk1HjPkmgdKBq9qvy8lZsA= +go-simpler.org/assert v0.7.0/go.mod h1:74Eqh5eI6vCK6Y5l3PI8ZYFXG4Sa+tkr70OIPJAUr28= +go-simpler.org/musttag v0.9.0 h1:Dzt6/tyP9ONr5g9h9P3cnYWCxeBFRkd0uJL/w+1Mxos= +go-simpler.org/musttag v0.9.0/go.mod h1:gA9nThnalvNSKpEoyp3Ko4/vCX2xTpqKoUtNqXOnVR4= +go-simpler.org/sloglint v0.5.0 h1:2YCcd+YMuYpuqthCgubcF5lBSjb6berc5VMOYUHKrpY= +go-simpler.org/sloglint v0.5.0/go.mod h1:EUknX5s8iXqf18KQxKnaBHUPVriiPnOrPjjJcsaTcSQ= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= @@ -1805,6 +2665,8 @@ go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVd go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= +go.mongodb.org/mongo-driver v1.10.0/go.mod h1:wsihk0Kdgv8Kqu1Anit4sfK+22vSFbUrAVEYRhCXrA8= +go.mongodb.org/mongo-driver v1.10.2/go.mod h1:z4XpeoU6w+9Vht+jAFyLgVrD+jGSQQe0+CBWFHNiHt8= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= @@ -1821,59 +2683,77 @@ go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.1 h1:gbhw/u49SS3gkPWiYweQNJGm/uJN5GkI/FrosxSHT7A= +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.46.1/go.mod h1:GnOaBaFQ2we3b9AGWJpsBa7v1S5RlQzlC3O7dRMxZhM= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.31.0/go.mod h1:PFmBsWbldL1kiWZk9+0LBZz2brhByaGsvp6pRICMlPE= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4/go.mod h1:l2MdsbKTocpPS5nQZscqTR9jd8u96VYZdcpF8Sye7mA= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 h1:jq9TW8u3so/bN+JPT166wjOI6/vQPF6Xe7nMNIltagk= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0/go.mod h1:p8pYQP+m5XfbZm9fxtSKAbM6oIllS7s2AfxrChvc7iw= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= go.opentelemetry.io/otel v1.6.0/go.mod h1:bfJD2DZVw0LBxghOTlgnlI0CV3hLDu9XF/QKOUXMTQQ= go.opentelemetry.io/otel v1.6.1/go.mod h1:blzUabWHkX6LJewxvadmzafgh/wnvBSDBdOuwkAtrWQ= -go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= -go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= -go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= +go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= +go.opentelemetry.io/otel v1.24.0 h1:0LAOdjNmQeSTzGBzduGe/rU4tZhMwL5rWgtp9Ku5Jfo= +go.opentelemetry.io/otel v1.24.0/go.mod h1:W7b9Ozg4nkF5tWI5zsXkaKKDjdVjpD4oAt9Qi/MArHo= go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.6.1/go.mod h1:NEu79Xo32iVb+0gVNV8PMd7GoWqnyDXRlj04yFjqz40= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.7.0/go.mod h1:M1hVZHNxcbkAlcvrOMlpQ4YOO3Awf+4N2dxkZL3xm04= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1/go.mod h1:i8vjiSzbiUC7wOQplijSXMYUpNM93DtlS5CbUT+C6oQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0 h1:ZtfnDL+tUrs1F0Pzfwbg2d59Gru9NCH3bgSHBM6LDwU= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric v0.42.0/go.mod h1:hG4Fj/y8TR/tlEDREo8tWstl9fO9gcFkn4xrx0Io8xU= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.42.0 h1:NmnYCiR0qNufkldjVvyQfZTHSdzeHoZ41zggMsdMcLM= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.42.0/go.mod h1:UVAO61+umUsHLtYb8KXXRoHtxUkdOPkYidzW3gipRLQ= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0 h1:wNMDy/LVGLj2h3p6zg4d0gypKfWKSWI14E1C4smOgl8= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.42.0/go.mod h1:YfbDdXAAkemWJK3H/DshvlrxqFB2rtW4rY6ky/3x/H0= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.3.0/go.mod h1:hO1KLR7jcKaDDKDkvI9dP/FIhpmna5lkqPUQdEjFAM8= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.6.1/go.mod h1:YJ/JbY5ag/tSQFXzH3mtDmHqzF3aFn3DI/aB1n7pt4w= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.7.0/go.mod h1:ceUgdyfNv4h4gLxHR0WNfDiiVmZFodZhZSbOLhpxqXE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1/go.mod h1:19O5I2U5iys38SsmT2uDJja/300woyzE1KPIQxEUBUc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0 h1:cl5P5/GIfFh4t6xyruOgJP5QiA1pw4fYYdv6nc6CBWw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.21.0/go.mod h1:zgBdWWAu7oEEMC06MMKc5NLbA/1YDXV1sMpSqEeLQLg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0/go.mod h1:keUU7UfnwWTWpJ+FWnyqmogPa82nuU5VUANFq49hlMY= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.6.1/go.mod h1:UJJXJj0rltNIemDMwkOJyggsvyMG9QHfJeFH0HS5JjM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.7.0/go.mod h1:E+/KKhwOSw8yoPxSSuUHG6vKppkvhN+S1Jc7Nib3k3o= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.1/go.mod h1:QrRRQiY3kzAoYPNLP0W/Ikg0gR6V3LMc+ODSxr7yyvg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0 h1:tIqheXEFWAZ7O8A7m+J0aPTmpJN3YQ7qetUAdkkkKpk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.21.0/go.mod h1:nUeKExfxAQVbiVFn32YXpXZZHZ61Cc3s3Rn1pDBGAb0= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.3.0/go.mod h1:QNX1aly8ehqqX1LEa6YniTU7VY9I6R3X/oPxhGdTceE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.6.1/go.mod h1:DAKwdo06hFLc0U88O10x4xnb5sc7dDRDqRuiN+io8JE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.7.0/go.mod h1:aFXT9Ng2seM9eizF+LfKiyPBGy8xIZKwhusC1gIu3hA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.1/go.mod h1:X620Jww3RajCJXw/unA+8IRTgxkdS7pi+ZwK9b7KUJk= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0 h1:digkEZCJWobwBqMwC0cwCq8/wkkRy/OowZg5OArWZrM= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.21.0/go.mod h1:/OpE/y70qVkndM0TrxT4KBoN3RsFZP0QaofcfYrj76I= +go.opentelemetry.io/otel/exporters/prometheus v0.42.0 h1:jwV9iQdvp38fxXi8ZC+lNpxjK16MRcZlpDYvbuO1FiA= +go.opentelemetry.io/otel/exporters/prometheus v0.42.0/go.mod h1:f3bYiqNqhoPxkvI2LrXqQVC546K7BuRDL/kKuxkujhA= go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= go.opentelemetry.io/otel/metric v0.28.0/go.mod h1:TrzsfQAmQaB1PDcdhBauLMk7nyyg9hm+GoQq/ekE9Iw= -go.opentelemetry.io/otel/metric v0.30.0/go.mod h1:/ShZ7+TS4dHzDFmfi1kSXMhMVubNoP0oIaBp70J6UXU= -go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= -go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= +go.opentelemetry.io/otel/metric v0.33.0/go.mod h1:QlTYc+EnYNq/M2mNk1qDDMRLpqCOj2f/r5c7Fd5FYaI= +go.opentelemetry.io/otel/metric v1.24.0 h1:6EhoGWWK28x1fbpA4tYTOWBkPefTDQnb8WSGXlc88kI= +go.opentelemetry.io/otel/metric v1.24.0/go.mod h1:VYhLe1rFfxuTXLgj4CBiyz+9WYBA8pNGJgDcSFRKBco= go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= go.opentelemetry.io/otel/sdk v1.6.1/go.mod h1:IVYrddmFZ+eJqu2k38qD3WezFR2pymCzm8tdxyh3R4E= -go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU= -go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= -go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= +go.opentelemetry.io/otel/sdk v1.11.1/go.mod h1:/l3FE4SupHJ12TduVjUkZtlfFqDCQJlOlithYrdktys= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= +go.opentelemetry.io/otel/sdk/metric v1.21.0 h1:smhI5oD714d6jHE6Tie36fPx4WDFIg+Y6RfAY4ICcR0= +go.opentelemetry.io/otel/sdk/metric v1.21.0/go.mod h1:FJ8RAsoPGv/wYMgBdUJXOm+6pzFY3YdljnXtv1SBE8Q= go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= go.opentelemetry.io/otel/trace v1.6.0/go.mod h1:qs7BrU5cZ8dXQHBGxHMOxwME/27YH2qEp4/+tZLLwJE= go.opentelemetry.io/otel/trace v1.6.1/go.mod h1:RkFRM1m0puWIq10oxImnGEduNBzxiN7TXluRBtE+5j0= -go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= -go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= -go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= +go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= +go.opentelemetry.io/otel/trace v1.24.0 h1:CsKnnL4dUAr/0llH9FKuc698G04IrpWV0MQA/Y1YELI= +go.opentelemetry.io/otel/trace v1.24.0/go.mod h1:HPc3Xr/cOApsBI154IU0OI0HJexz+aw5uPdbs3UCjNU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.11.0/go.mod h1:QpEjXPrNQzrFDZgoTo49dgHR9RYRSrg3NAKnUGl9YpQ= go.opentelemetry.io/proto/otlp v0.12.1/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.opentelemetry.io/proto/otlp v0.16.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.pennock.tech/tabular v1.1.3 h1:JYN3TdVkTjOWdZz2FwKcW7f69vRhPl4NAQqJ8RZAsmY= @@ -1884,35 +2764,46 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= +go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= +go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= -go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= +go.uber.org/goleak v1.2.0/go.mod h1:XJYK+MuIchqpmGmUSAzotztawfKvYLUIgg7guXrwVUo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.uber.org/mock v0.3.0 h1:3mUxI1No2/60yUYax92Pt8eNOEecx2D3lcXZh2NEZJo= +go.uber.org/mock v0.3.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -gocloud.dev v0.27.0/go.mod h1:YlYKhYsY5/1JdHGWQDkAuqkezVKowu7qbe9aIeUF6p0= -gocloud.dev v0.36.0 h1:q5zoXux4xkOZP473e1EZbG8Gq9f0vlg1VNH5Du/ybus= -gocloud.dev v0.36.0/go.mod h1:bLxah6JQVKBaIxzsr5BQLYB4IYdWHkMZdzCXlo6F0gg= -gocloud.dev/secrets/hashivault v0.27.0 h1:AAeGJXr0tiHHJgg5tL8atOGktB4eK9EJAqkZbPKAcOo= -gocloud.dev/secrets/hashivault v0.27.0/go.mod h1:offqsI5oj0B0bVHZdfk/88uIb3NnN93ia8py0yvRlHY= +go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= +go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= +gocloud.dev v0.28.0/go.mod h1:nzSs01FpRYyIb/OqXLNNa+NMPZG9CdTUY/pGLgSpIN0= +gocloud.dev v0.37.0 h1:XF1rN6R0qZI/9DYjN16Uy0durAmSlf58DHOcb28GPro= +gocloud.dev v0.37.0/go.mod h1:7/O4kqdInCNsc6LqgmuFnS0GRew4XNNYWpA44yQnwco= +gocloud.dev/secrets/hashivault v0.28.0 h1:Aaeuv1DnwZ2rTSb1h5mkdmPLUMrIcBLpOjVlOPGLmNI= +gocloud.dev/secrets/hashivault v0.28.0/go.mod h1:HOcM3K+i2KXpfCTg49ctroScJvS1LaZCcpwMmKUZxyw= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1923,10 +2814,11 @@ golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200422194213-44a606286825/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= @@ -1936,16 +2828,22 @@ golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.3.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1956,8 +2854,13 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20221031165847-c99f073a8326/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= +golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8= +golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1987,9 +2890,13 @@ golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2051,7 +2958,6 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -2068,13 +2974,23 @@ golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20220907135653-1e95f45603a7/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20220921155015-db77216a4ee9/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2091,17 +3007,21 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220628200809-02e64fa58f26/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= +golang.org/x/oauth2 v0.2.0/go.mod h1:Cwn6afJ8jrQwYMxQDTpISoXmXW9I6qF6vDeuuoX3Ibs= +golang.org/x/oauth2 v0.18.0 h1:09qnuIAgzdx1XplqJvW6CQqMCtGZykZWcXzPMPUusvI= +golang.org/x/oauth2 v0.18.0/go.mod h1:Wf7knwG0MPoWIMMBgFlEaSUDaKskp0dCfrlJRJXbBi8= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2116,9 +3036,11 @@ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2241,6 +3163,7 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211105183446-c75c47738b0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -2249,39 +3172,57 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220224120231-95c6836cb0e7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908150016-7ac13a9a928d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2293,8 +3234,12 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2307,10 +3252,11 @@ golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220224211638-0e9765cccd65/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.4.0 h1:Z81tqI5ddIoXDPvVQ7/7CC9TnLM7ubaFG2qXYd5BbYY= -golang.org/x/time v0.4.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2321,6 +3267,7 @@ golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3 golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190321232350-e250d351ecad/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -2340,6 +3287,7 @@ golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDq golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -2364,6 +3312,8 @@ golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200329025819-fd4102a86c65/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -2372,11 +3322,14 @@ golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200724022722-7017fd6b1305/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200820010801-b793a1359eac/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/tools v0.0.0-20201023174141-c8cfbd0f21e6/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -2385,6 +3338,8 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1-0.20210205202024-ef80cdb6ec6d/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= +golang.org/x/tools v0.1.1-0.20210302220138-2ac05c832e1a/go.mod h1:9bzcO0MWcOuT0tm1iBGzDVPshzfwoVvREIui8C+MHqU= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -2395,9 +3350,14 @@ golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.11/go.mod h1:SgwaegtQh8clINPpECJMqnxLv9I09HLqnW3RMqW0CA4= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/tools v0.5.0/go.mod h1:N+Kgy78s5I24c24dU8OfWNEotWjutIs8SnJvn5IDq+k= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2407,6 +3367,7 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= @@ -2442,7 +3403,6 @@ google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqiv google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.58.0/go.mod h1:cAbP2FsxoGVNwtgNAmmn3y5G1TWAiVYRmg4yku3lv+E= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= @@ -2450,15 +3410,23 @@ google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/S google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= -google.golang.org/api v0.86.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.91.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= -google.golang.org/api v0.151.0 h1:FhfXLO/NFdJIzQtCqjpysWwqKk8AzGWBUhMIx67cVDU= -google.golang.org/api v0.151.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= +google.golang.org/api v0.169.0 h1:QwWPy71FgMWqJN/l6jVlFHUa29a7dcUy02I8o799nPY= +google.golang.org/api v0.169.0/go.mod h1:gpNOiMA2tZ4mf5R9Iwf4rK/Dcz0fbdIgWYWVoxmsyLg= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2541,9 +3509,7 @@ google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211018162055-cf77aa76bad2/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= @@ -2561,23 +3527,49 @@ google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= -google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f h1:Vn+VyHU5guc9KjB5KrjI2q0wCOWEOIh0OEsleqakHJg= -google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f/go.mod h1:nWSwAFPb+qfNJXsoeO3Io7zf4tMSfN8EA8RlDA04GhY= -google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f h1:2yNACc1O40tTnrsbk9Cv6oxiW8pxI/pXj0wRtdlYmgY= -google.golang.org/genproto/googleapis/api v0.0.0-20231120223509-83a465c0220f/go.mod h1:Uy9bTZJqmfrw2rIBxgGLnamc78euZULUBrLZ9XTITKI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220728213248-dd149ef739b9/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20221109142239-94d6d90a7d66/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201204527-e3fa12d562f3/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20240311173647-c811ad7063a7 h1:ImUcDPHjTrAqNhlOkSocDLfG9rrNHH7w7uoKWPaWZ8s= +google.golang.org/genproto v0.0.0-20240311173647-c811ad7063a7/go.mod h1:/3XmxOjePkvmKrHuBy4zNFw7IzxJXtAgdpXi8Ll990U= +google.golang.org/genproto/googleapis/api v0.0.0-20240311173647-c811ad7063a7 h1:oqta3O3AnlWbmIE3bFnWbu4bRxZjfbWCp0cKSuZh01E= +google.golang.org/genproto/googleapis/api v0.0.0-20240311173647-c811ad7063a7/go.mod h1:VQW3tUculP/D4B+xVCo+VgSq8As6wA9ZjHl//pmk+6s= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7 h1:8EeVk1VKMD+GD/neyEHGmz7pFblqPjHoi+PGQIlLx2s= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.0.5/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -2620,8 +3612,12 @@ google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -2638,10 +3634,12 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/cenkalti/backoff.v2 v2.2.1 h1:eJ9UAg01/HIHG987TwxvnzK2MgxXq97YY6rYDpY9aII= +gopkg.in/cenkalti/backoff.v2 v2.2.1/go.mod h1:S0QdOvT2AlerfSBkp0O+dk+bbIMaNbEmVk876gPCthU= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -2655,17 +3653,24 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.66.4/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 h1:d4KQkxAaAiRY2h5Zqis161Pv91A37uZyJOx73duwUwM= +gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1/go.mod h1:WbjuEoo1oadwzQ4apSDU+JTvmllEHtsNHS6y7vFc7iw= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.6.0 h1:NGk74WTnPKBNUhNzQX7PYcTLUjoq7mzKk2OKbvwk2iI= gopkg.in/square/go-jose.v2 v2.6.0/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/telebot.v3 v3.0.0/go.mod h1:7rExV8/0mDDNu9epSrDm/8j22KLaActH1Tbee6YjzWg= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= @@ -2688,8 +3693,9 @@ gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= +gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= +gotest.tools/v3 v3.4.0/go.mod h1:CtbdzLSsqVhDgMtKsx03ird5YTGB3ar27v0u/yKBW5g= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2698,29 +3704,39 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs= +honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0= k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= k8s.io/api v0.22.5/go.mod h1:mEhXyLaSD1qTOf40rRiKXkc+2iCem09rWLlFwhCEiAs= k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= -k8s.io/api v0.24.2/go.mod h1:AHqbSkTm6YrQ0ObxjO3Pmp/ubFF/KuM7jU+3khoBsOg= +k8s.io/api v0.25.3/go.mod h1:o42gKscFrEVjHdQnyRenACrMtbuJsVdP+WVjqejfzmI= +k8s.io/api v0.29.2 h1:hBC7B9+MU+ptchxEqTNW2DkUosJpp1P+Wn6YncZ474A= +k8s.io/api v0.29.2/go.mod h1:sdIaaKuU7P44aoyyLlikSLayT6Vb7bvJNCX105xZXY0= k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= k8s.io/apimachinery v0.22.5/go.mod h1:xziclGKwuuJ2RM5/rSFQSYAj0zdbci3DH8kj+WvyN0U= k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/apimachinery v0.24.2/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= +k8s.io/apimachinery v0.25.3/go.mod h1:jaF9C/iPNM1FuLl7Zuy5b9v+n35HGSh6AQ4HYRkCqwo= +k8s.io/apimachinery v0.29.2 h1:EWGpfJ856oj11C52NRCHuU7rFDwxev48z+6DSlGNsV8= +k8s.io/apimachinery v0.29.2/go.mod h1:6HVkd1FwxIagpYrHSwJlQqZI3G9LfYWRPAkUvLnXTKU= k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= k8s.io/apiserver v0.22.5/go.mod h1:s2WbtgZAkTKt679sYtSudEQrTGWUSQAPe6MupLnlmaQ= +k8s.io/apiserver v0.29.2 h1:+Z9S0dSNr+CjnVXQePG8TcBWHr3Q7BmAr7NraHvsMiQ= +k8s.io/apiserver v0.29.2/go.mod h1:B0LieKVoyU7ykQvPFm7XSdIHaCHSzCzQWPFa5bqbeMQ= k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= k8s.io/client-go v0.22.5/go.mod h1:cs6yf/61q2T1SdQL5Rdcjg9J1ElXSwbjSrW2vFImM4Y= k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= -k8s.io/client-go v0.24.2/go.mod h1:zg4Xaoo+umDsfCWr4fCnmLEtQXyCNXCvJuSsglNcV30= +k8s.io/client-go v0.25.3/go.mod h1:t39LPczAIMwycjcXkVc+CB+PZV69jQuNx4um5ORDjQA= +k8s.io/client-go v0.29.2 h1:FEg85el1TeZp+/vYJM7hkDlSTFZ+c5nnK44DJ4FyoRg= +k8s.io/client-go v0.29.2/go.mod h1:knlvFZE58VpqbQpJNbCbctTVXcd35mMyAAwBdpt4jrA= k8s.io/code-generator v0.19.7/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= @@ -2742,27 +3758,35 @@ k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.70.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.80.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/klog/v2 v2.110.1 h1:U/Af64HJf7FcwMcXyKm2RPM22WZzyR7OSpYj5tg3cL0= +k8s.io/klog/v2 v2.110.1/go.mod h1:YGtd1984u+GgbuZ7e08/yBuAfKLSO0+uR1Fhi6ExXjo= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= +k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00 h1:aVUu9fTY98ivBPKR9Y5w/AuzbMm96cd3YHRTU83I780= +k8s.io/kube-openapi v0.0.0-20231010175941-2dd684a91f00/go.mod h1:AsvuZPBlUDVuCdzJ87iajxtXuR9oktsTctW/R9wwouA= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= lukechampine.com/frand v1.4.2 h1:RzFIpOvkMXuPMBb9maa4ND4wjBn71E1Jpf8BzJHMaVw= lukechampine.com/frand v1.4.2/go.mod h1:4S/TM2ZgrKejMcKMbeLjISpJMO+/eZ1zu3vYX9dtj3s= -mvdan.cc/gofumpt v0.1.0 h1:hsVv+Y9UsZ/mFZTxJZuHVI6shSQCtzZ11h1JEFPAZLw= -mvdan.cc/gofumpt v0.1.0/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48= +mvdan.cc/gofumpt v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo= +mvdan.cc/gofumpt v0.6.0/go.mod h1:4L0wf+kgIPZtcCWXynNS2e6bhmj73umwnuXSZarixzA= mvdan.cc/sh/v3 v3.7.0 h1:lSTjdP/1xsddtaKfGg7Myu7DnlHItd3/M2tomOcNNBg= mvdan.cc/sh/v3 v3.7.0/go.mod h1:K2gwkaesF/D7av7Kxl0HbF5kGOd2ArupNTX3X44+8l8= +mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 h1:zCr3iRRgdk5eIikZNDphGcM6KGVTx3Yu+/Uu9Es254w= +mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14/go.mod h1:ZzZjEpJDOmx8TdVU6umamY3Xy0UAQUI2DHbf05USVbI= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= @@ -2773,13 +3797,19 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyz sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= +sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= +sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= +sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/provider/cmd/pulumi-resource-docker-build/main.go b/provider/cmd/pulumi-resource-docker-build/main.go index 332e2f9..e6dfaed 100644 --- a/provider/cmd/pulumi-resource-docker-build/main.go +++ b/provider/cmd/pulumi-resource-docker-build/main.go @@ -1,4 +1,4 @@ -// Copyright 2016-2023, Pulumi Corporation. +// Copyright 2024, Pulumi Corporation. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,13 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package main invokes the provider as a gRPC server and runs forever. package main import ( - p "github.com/pulumi/pulumi-go-provider" - - xyz "github.com/pulumi/pulumi-dockerbuild/provider" + "github.com/pulumi/pulumi-docker-build/provider" + "github.com/pulumi/pulumi/sdk/v3/go/common/util/cmdutil" ) -// Serve the provider against Pulumi's Provider protocol. -func main() { _ = p.RunProvider(xyz.Name, xyz.Version, xyz.Provider()) } +func main() { + err := provider.Serve() + if err != nil { + cmdutil.ExitError(err.Error()) + } +} diff --git a/provider/cmd/pulumi-resource-docker-build/schema.json b/provider/cmd/pulumi-resource-docker-build/schema.json index ecfd0e1..13141c9 100644 --- a/provider/cmd/pulumi-resource-docker-build/schema.json +++ b/provider/cmd/pulumi-resource-docker-build/schema.json @@ -1,14 +1,17 @@ { - "name": "dockerbuild", - "displayName": "docker", - "version": "0.0.1-alpha.1710805517+1af3a9ed.dirty", - "description": "Description", + "name": "docker-build", + "displayName": "docker-build", + "version": "0.0.2-alpha.1714063884+13fb5b61", + "description": "A Pulumi provider for building modern Docker images with buildx and BuildKit.", "keywords": [ - "keywords" + "docker", + "buildkit", + "buildx", + "kind/native" ], - "homepage": "pulumi.com", - "repository": "https://github.com/pulumi/pulumi-dockerbuild", - "pluginDownloadURL": "github.com/pulumi/pulumi-dockerbuild", + "homepage": "https://pulumi.com", + "license": "Apache-2.0", + "repository": "https://github.com/pulumi/pulumi-docker-build", "publisher": "pulumi", "meta": { "moduleFormat": "(.*)" @@ -20,12 +23,11 @@ } }, "go": { - "importBasePath": "github.com/pulumi/pulumi-dockerbuild/sdk/go/docker", + "importBasePath": "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild", "packageImportAliases": { - "github.com/pulumi/pulumi-dockerbuild/sdk/go/docker": "docker" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild": "dockerbuild" }, - "generateResourceContainerTypes": true, - "generics": "generics-only" + "generics": "side-by-side" }, "java": { "basePackage": "", @@ -52,32 +54,1406 @@ } } }, - "config": {}, - "provider": { - "type": "object" + "config": { + "variables": { + "host": { + "type": "string", + "description": "The build daemon's address.", + "default": "", + "defaultInfo": { + "environment": [ + "DOCKER_HOST" + ] + } + }, + "registries": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:Registry" + } + } + } }, - "resources": { - "dockerbuild:index:Random": { + "types": { + "docker-build:index:BuildContext": { "properties": { - "length": { - "type": "integer" + "location": { + "type": "string", + "description": "Resources to use for build context.\n\nThe location can be:\n* A relative or absolute path to a local directory (`.`, `./app`,\n `/app`, etc.).\n* A remote URL of a Git repository, tarball, or plain text file\n (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,\n etc.)." }, - "result": { - "type": "string" + "named": { + "type": "object", + "additionalProperties": { + "$ref": "#/types/docker-build:index:Context" + }, + "description": "Additional build contexts to use.\n\nThese contexts are accessed with `FROM name` or `--from=name`\nstatements when using Dockerfile 1.4+ syntax.\n\nValues can be local paths, HTTP URLs, or `docker-image://` images." } }, "type": "object", "required": [ - "length", - "result" + "location" + ] + }, + "docker-build:index:BuilderConfig": { + "properties": { + "name": { + "type": "string", + "description": "Name of an existing buildx builder to use.\n\nOnly `docker-container`, `kubernetes`, or `remote` drivers are\nsupported. The legacy `docker` driver is not supported.\n\nEquivalent to Docker's `--builder` flag." + } + }, + "type": "object" + }, + "docker-build:index:CacheFrom": { + "properties": { + "azblob": { + "$ref": "#/types/docker-build:index:CacheFromAzureBlob", + "description": "Upload build caches to Azure's blob storage service." + }, + "disabled": { + "type": "boolean", + "description": "When `true` this entry will be excluded. Defaults to `false`." + }, + "gha": { + "$ref": "#/types/docker-build:index:CacheFromGitHubActions", + "description": "Recommended for use with GitHub Actions workflows.\n\nAn action like `crazy-max/ghaction-github-runtime` is recommended to\nexpose appropriate credentials to your GitHub workflow." + }, + "local": { + "$ref": "#/types/docker-build:index:CacheFromLocal", + "description": "A simple backend which caches images on your local filesystem." + }, + "raw": { + "type": "string", + "description": "A raw string as you would provide it to the Docker CLI (e.g.,\n`type=inline`)." + }, + "registry": { + "$ref": "#/types/docker-build:index:CacheFromRegistry", + "description": "Upload build caches to remote registries." + }, + "s3": { + "$ref": "#/types/docker-build:index:CacheFromS3", + "description": "Upload build caches to AWS S3 or an S3-compatible services such as\nMinIO." + } + }, + "type": "object" + }, + "docker-build:index:CacheFromAzureBlob": { + "properties": { + "accountUrl": { + "type": "string", + "description": "Base URL of the storage account." + }, + "name": { + "type": "string", + "description": "The name of the cache image." + }, + "secretAccessKey": { + "type": "string", + "description": "Blob storage account key.", + "secret": true + } + }, + "type": "object", + "required": [ + "name" + ] + }, + "docker-build:index:CacheFromGitHubActions": { + "properties": { + "scope": { + "type": "string", + "description": "The scope to use for cache keys. Defaults to `buildkit`.\n\nThis should be set if building and caching multiple images in one\nworkflow, otherwise caches will overwrite each other.", + "default": "", + "defaultInfo": { + "environment": [ + "buildkit" + ] + } + }, + "token": { + "type": "string", + "description": "The GitHub Actions token to use. This is not a personal access tokens\nand is typically generated automatically as part of each job.\n\nDefaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like\n`crazy-max/ghaction-github-runtime` is recommended to expose this\nenvironment variable to your jobs.", + "default": "", + "defaultInfo": { + "environment": [ + "ACTIONS_RUNTIME_TOKEN" + ] + }, + "secret": true + }, + "url": { + "type": "string", + "description": "The cache server URL to use for artifacts.\n\nDefaults to `$ACTIONS_RUNTIME_URL`, although a separate action like\n`crazy-max/ghaction-github-runtime` is recommended to expose this\nenvironment variable to your jobs.", + "default": "", + "defaultInfo": { + "environment": [ + "ACTIONS_RUNTIME_URL" + ] + } + } + }, + "type": "object" + }, + "docker-build:index:CacheFromLocal": { + "properties": { + "digest": { + "type": "string", + "description": "Digest of manifest to import." + }, + "src": { + "type": "string", + "description": "Path of the local directory where cache gets imported from." + } + }, + "type": "object", + "required": [ + "src" + ] + }, + "docker-build:index:CacheFromRegistry": { + "properties": { + "ref": { + "type": "string", + "description": "Fully qualified name of the cache image to import." + } + }, + "type": "object", + "required": [ + "ref" + ] + }, + "docker-build:index:CacheFromS3": { + "properties": { + "accessKeyId": { + "type": "string", + "description": "Defaults to `$AWS_ACCESS_KEY_ID`.", + "default": "", + "defaultInfo": { + "environment": [ + "AWS_ACCESS_KEY_ID" + ] + } + }, + "blobsPrefix": { + "type": "string", + "description": "Prefix to prepend to blob filenames." + }, + "bucket": { + "type": "string", + "description": "Name of the S3 bucket." + }, + "endpointUrl": { + "type": "string", + "description": "Endpoint of the S3 bucket." + }, + "manifestsPrefix": { + "type": "string", + "description": "Prefix to prepend on manifest filenames." + }, + "name": { + "type": "string", + "description": "Name of the cache image." + }, + "region": { + "type": "string", + "description": "The geographic location of the bucket. Defaults to `$AWS_REGION`.", + "default": "", + "defaultInfo": { + "environment": [ + "AWS_REGION" + ] + } + }, + "secretAccessKey": { + "type": "string", + "description": "Defaults to `$AWS_SECRET_ACCESS_KEY`.", + "default": "", + "defaultInfo": { + "environment": [ + "AWS_SECRET_ACCESS_KEY" + ] + }, + "secret": true + }, + "sessionToken": { + "type": "string", + "description": "Defaults to `$AWS_SESSION_TOKEN`.", + "default": "", + "defaultInfo": { + "environment": [ + "AWS_SESSION_TOKEN" + ] + }, + "secret": true + }, + "usePathStyle": { + "type": "boolean", + "description": "Uses `bucket` in the URL instead of hostname when `true`." + } + }, + "type": "object", + "required": [ + "bucket", + "region" + ] + }, + "docker-build:index:CacheMode": { + "type": "string", + "enum": [ + { + "description": "Only layers that are exported into the resulting image are cached.", + "value": "min" + }, + { + "description": "All layers are cached, even those of intermediate steps.", + "value": "max" + } + ] + }, + "docker-build:index:CacheTo": { + "properties": { + "azblob": { + "$ref": "#/types/docker-build:index:CacheToAzureBlob", + "description": "Push cache to Azure's blob storage service." + }, + "disabled": { + "type": "boolean", + "description": "When `true` this entry will be excluded. Defaults to `false`." + }, + "gha": { + "$ref": "#/types/docker-build:index:CacheToGitHubActions", + "description": "Recommended for use with GitHub Actions workflows.\n\nAn action like `crazy-max/ghaction-github-runtime` is recommended to\nexpose appropriate credentials to your GitHub workflow." + }, + "inline": { + "$ref": "#/types/docker-build:index:CacheToInline", + "description": "The inline cache storage backend is the simplest implementation to get\nstarted with, but it does not handle multi-stage builds. Consider the\n`registry` cache backend instead." + }, + "local": { + "$ref": "#/types/docker-build:index:CacheToLocal", + "description": "A simple backend which caches imagines on your local filesystem." + }, + "raw": { + "type": "string", + "description": "A raw string as you would provide it to the Docker CLI (e.g.,\n`type=inline`)" + }, + "registry": { + "$ref": "#/types/docker-build:index:CacheToRegistry", + "description": "Push caches to remote registries. Incompatible with the `docker` build\ndriver." + }, + "s3": { + "$ref": "#/types/docker-build:index:CacheToS3", + "description": "Push cache to AWS S3 or S3-compatible services such as MinIO." + } + }, + "type": "object" + }, + "docker-build:index:CacheToAzureBlob": { + "properties": { + "accountUrl": { + "type": "string", + "description": "Base URL of the storage account." + }, + "ignoreError": { + "type": "boolean", + "description": "Ignore errors caused by failed cache exports.", + "default": false + }, + "mode": { + "$ref": "#/types/docker-build:index:CacheMode", + "description": "The cache mode to use. Defaults to `min`.", + "default": "min" + }, + "name": { + "type": "string", + "description": "The name of the cache image." + }, + "secretAccessKey": { + "type": "string", + "description": "Blob storage account key.", + "secret": true + } + }, + "type": "object", + "required": [ + "name" + ] + }, + "docker-build:index:CacheToGitHubActions": { + "properties": { + "ignoreError": { + "type": "boolean", + "description": "Ignore errors caused by failed cache exports.", + "default": false + }, + "mode": { + "$ref": "#/types/docker-build:index:CacheMode", + "description": "The cache mode to use. Defaults to `min`.", + "default": "min" + }, + "scope": { + "type": "string", + "description": "The scope to use for cache keys. Defaults to `buildkit`.\n\nThis should be set if building and caching multiple images in one\nworkflow, otherwise caches will overwrite each other.", + "default": "", + "defaultInfo": { + "environment": [ + "buildkit" + ] + } + }, + "token": { + "type": "string", + "description": "The GitHub Actions token to use. This is not a personal access tokens\nand is typically generated automatically as part of each job.\n\nDefaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like\n`crazy-max/ghaction-github-runtime` is recommended to expose this\nenvironment variable to your jobs.", + "default": "", + "defaultInfo": { + "environment": [ + "ACTIONS_RUNTIME_TOKEN" + ] + }, + "secret": true + }, + "url": { + "type": "string", + "description": "The cache server URL to use for artifacts.\n\nDefaults to `$ACTIONS_RUNTIME_URL`, although a separate action like\n`crazy-max/ghaction-github-runtime` is recommended to expose this\nenvironment variable to your jobs.", + "default": "", + "defaultInfo": { + "environment": [ + "ACTIONS_RUNTIME_URL" + ] + } + } + }, + "type": "object" + }, + "docker-build:index:CacheToInline": { + "description": "Include an inline cache with the exported image.", + "type": "object" + }, + "docker-build:index:CacheToLocal": { + "properties": { + "compression": { + "$ref": "#/types/docker-build:index:CompressionType", + "description": "The compression type to use.", + "default": "gzip" + }, + "compressionLevel": { + "type": "integer", + "description": "Compression level from 0 to 22.", + "default": 0 + }, + "dest": { + "type": "string", + "description": "Path of the local directory to export the cache." + }, + "forceCompression": { + "type": "boolean", + "description": "Forcefully apply compression.", + "default": false + }, + "ignoreError": { + "type": "boolean", + "description": "Ignore errors caused by failed cache exports.", + "default": false + }, + "mode": { + "$ref": "#/types/docker-build:index:CacheMode", + "description": "The cache mode to use. Defaults to `min`.", + "default": "min" + } + }, + "type": "object", + "required": [ + "dest" + ] + }, + "docker-build:index:CacheToRegistry": { + "properties": { + "compression": { + "$ref": "#/types/docker-build:index:CompressionType", + "description": "The compression type to use.", + "default": "gzip" + }, + "compressionLevel": { + "type": "integer", + "description": "Compression level from 0 to 22.", + "default": 0 + }, + "forceCompression": { + "type": "boolean", + "description": "Forcefully apply compression.", + "default": false + }, + "ignoreError": { + "type": "boolean", + "description": "Ignore errors caused by failed cache exports.", + "default": false + }, + "imageManifest": { + "type": "boolean", + "description": "Export cache manifest as an OCI-compatible image manifest instead of a\nmanifest list. Requires `ociMediaTypes` to also be `true`.\n\nSome registries like AWS ECR will not work with caching if this is\n`false`.\n\nDefaults to `false` to match Docker's default behavior.", + "default": false + }, + "mode": { + "$ref": "#/types/docker-build:index:CacheMode", + "description": "The cache mode to use. Defaults to `min`.", + "default": "min" + }, + "ociMediaTypes": { + "type": "boolean", + "description": "Whether to use OCI media types in exported manifests. Defaults to\n`true`.", + "default": true + }, + "ref": { + "type": "string", + "description": "Fully qualified name of the cache image to import." + } + }, + "type": "object", + "required": [ + "ref" + ] + }, + "docker-build:index:CacheToS3": { + "properties": { + "accessKeyId": { + "type": "string", + "description": "Defaults to `$AWS_ACCESS_KEY_ID`.", + "default": "", + "defaultInfo": { + "environment": [ + "AWS_ACCESS_KEY_ID" + ] + } + }, + "blobsPrefix": { + "type": "string", + "description": "Prefix to prepend to blob filenames." + }, + "bucket": { + "type": "string", + "description": "Name of the S3 bucket." + }, + "endpointUrl": { + "type": "string", + "description": "Endpoint of the S3 bucket." + }, + "ignoreError": { + "type": "boolean", + "description": "Ignore errors caused by failed cache exports.", + "default": false + }, + "manifestsPrefix": { + "type": "string", + "description": "Prefix to prepend on manifest filenames." + }, + "mode": { + "$ref": "#/types/docker-build:index:CacheMode", + "description": "The cache mode to use. Defaults to `min`.", + "default": "min" + }, + "name": { + "type": "string", + "description": "Name of the cache image." + }, + "region": { + "type": "string", + "description": "The geographic location of the bucket. Defaults to `$AWS_REGION`.", + "default": "", + "defaultInfo": { + "environment": [ + "AWS_REGION" + ] + } + }, + "secretAccessKey": { + "type": "string", + "description": "Defaults to `$AWS_SECRET_ACCESS_KEY`.", + "default": "", + "defaultInfo": { + "environment": [ + "AWS_SECRET_ACCESS_KEY" + ] + }, + "secret": true + }, + "sessionToken": { + "type": "string", + "description": "Defaults to `$AWS_SESSION_TOKEN`.", + "default": "", + "defaultInfo": { + "environment": [ + "AWS_SESSION_TOKEN" + ] + }, + "secret": true + }, + "usePathStyle": { + "type": "boolean", + "description": "Uses `bucket` in the URL instead of hostname when `true`." + } + }, + "type": "object", + "required": [ + "bucket", + "region" + ] + }, + "docker-build:index:CompressionType": { + "type": "string", + "enum": [ + { + "description": "Use `gzip` for compression.", + "value": "gzip" + }, + { + "description": "Use `estargz` for compression.", + "value": "estargz" + }, + { + "description": "Use `zstd` for compression.", + "value": "zstd" + } + ] + }, + "docker-build:index:Context": { + "properties": { + "location": { + "type": "string", + "description": "Resources to use for build context.\n\nThe location can be:\n* A relative or absolute path to a local directory (`.`, `./app`,\n `/app`, etc.).\n* A remote URL of a Git repository, tarball, or plain text file\n (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`,\n etc.)." + } + }, + "type": "object", + "required": [ + "location" + ] + }, + "docker-build:index:Dockerfile": { + "properties": { + "inline": { + "type": "string", + "description": "Raw Dockerfile contents.\n\nConflicts with `location`.\n\nEquivalent to invoking Docker with `-f -`." + }, + "location": { + "type": "string", + "description": "Location of the Dockerfile to use.\n\nCan be a relative or absolute path to a local file, or a remote URL.\n\nDefaults to `${context.location}/Dockerfile` if context is on-disk.\n\nConflicts with `inline`." + } + }, + "type": "object" + }, + "docker-build:index:Export": { + "properties": { + "cacheonly": { + "$ref": "#/types/docker-build:index:ExportCacheOnly", + "description": "A no-op export. Helpful for silencing the 'no exports' warning if you\njust want to populate caches." + }, + "disabled": { + "type": "boolean", + "description": "When `true` this entry will be excluded. Defaults to `false`." + }, + "docker": { + "$ref": "#/types/docker-build:index:ExportDocker", + "description": "Export as a Docker image layout." + }, + "image": { + "$ref": "#/types/docker-build:index:ExportImage", + "description": "Outputs the build result into a container image format." + }, + "local": { + "$ref": "#/types/docker-build:index:ExportLocal", + "description": "Export to a local directory as files and directories." + }, + "oci": { + "$ref": "#/types/docker-build:index:ExportOCI", + "description": "Identical to the Docker exporter but uses OCI media types by default." + }, + "raw": { + "type": "string", + "description": "A raw string as you would provide it to the Docker CLI (e.g.,\n`type=docker`)" + }, + "registry": { + "$ref": "#/types/docker-build:index:ExportRegistry", + "description": "Identical to the Image exporter, but pushes by default." + }, + "tar": { + "$ref": "#/types/docker-build:index:ExportTar", + "description": "Export to a local directory as a tarball." + } + }, + "type": "object" + }, + "docker-build:index:ExportCacheOnly": { + "type": "object" + }, + "docker-build:index:ExportDocker": { + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Attach an arbitrary key/value annotation to the image." + }, + "compression": { + "$ref": "#/types/docker-build:index:CompressionType", + "description": "The compression type to use.", + "default": "gzip" + }, + "compressionLevel": { + "type": "integer", + "description": "Compression level from 0 to 22.", + "default": 0 + }, + "dest": { + "type": "string", + "description": "The local export path." + }, + "forceCompression": { + "type": "boolean", + "description": "Forcefully apply compression.", + "default": false + }, + "names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specify images names to export. This is overridden if tags are already specified." + }, + "ociMediaTypes": { + "type": "boolean", + "description": "Use OCI media types in exporter manifests.", + "default": false + }, + "tar": { + "type": "boolean", + "description": "Bundle the output into a tarball layout.", + "default": true + } + }, + "type": "object" + }, + "docker-build:index:ExportImage": { + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Attach an arbitrary key/value annotation to the image." + }, + "compression": { + "$ref": "#/types/docker-build:index:CompressionType", + "description": "The compression type to use.", + "default": "gzip" + }, + "compressionLevel": { + "type": "integer", + "description": "Compression level from 0 to 22.", + "default": 0 + }, + "danglingNamePrefix": { + "type": "string", + "description": "Name image with `prefix@\u003cdigest\u003e`, used for anonymous images." + }, + "forceCompression": { + "type": "boolean", + "description": "Forcefully apply compression.", + "default": false + }, + "insecure": { + "type": "boolean", + "description": "Allow pushing to an insecure registry." + }, + "nameCanonical": { + "type": "boolean", + "description": "Add additional canonical name (`name@\u003cdigest\u003e`)." + }, + "names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specify images names to export. This is overridden if tags are already specified." + }, + "ociMediaTypes": { + "type": "boolean", + "description": "Use OCI media types in exporter manifests.", + "default": false + }, + "push": { + "type": "boolean", + "description": "Push after creating the image. Defaults to `false`." + }, + "pushByDigest": { + "type": "boolean", + "description": "Push image without name." + }, + "store": { + "type": "boolean", + "description": "Store resulting images to the worker's image store and ensure all of\nits blobs are in the content store.\n\nDefaults to `true`.\n\nIgnored if the worker doesn't have image store (when using OCI workers,\nfor example).", + "default": true + }, + "unpack": { + "type": "boolean", + "description": "Unpack image after creation (for use with containerd). Defaults to\n`false`." + } + }, + "type": "object" + }, + "docker-build:index:ExportLocal": { + "properties": { + "dest": { + "type": "string", + "description": "Output path." + } + }, + "type": "object", + "required": [ + "dest" + ] + }, + "docker-build:index:ExportOCI": { + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Attach an arbitrary key/value annotation to the image." + }, + "compression": { + "$ref": "#/types/docker-build:index:CompressionType", + "description": "The compression type to use.", + "default": "gzip" + }, + "compressionLevel": { + "type": "integer", + "description": "Compression level from 0 to 22.", + "default": 0 + }, + "dest": { + "type": "string", + "description": "The local export path." + }, + "forceCompression": { + "type": "boolean", + "description": "Forcefully apply compression.", + "default": false + }, + "names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specify images names to export. This is overridden if tags are already specified." + }, + "ociMediaTypes": { + "type": "boolean", + "description": "Use OCI media types in exporter manifests.", + "default": true + }, + "tar": { + "type": "boolean", + "description": "Bundle the output into a tarball layout.", + "default": true + } + }, + "type": "object" + }, + "docker-build:index:ExportRegistry": { + "properties": { + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Attach an arbitrary key/value annotation to the image." + }, + "compression": { + "$ref": "#/types/docker-build:index:CompressionType", + "description": "The compression type to use.", + "default": "gzip" + }, + "compressionLevel": { + "type": "integer", + "description": "Compression level from 0 to 22.", + "default": 0 + }, + "danglingNamePrefix": { + "type": "string", + "description": "Name image with `prefix@\u003cdigest\u003e`, used for anonymous images." + }, + "forceCompression": { + "type": "boolean", + "description": "Forcefully apply compression.", + "default": false + }, + "insecure": { + "type": "boolean", + "description": "Allow pushing to an insecure registry." + }, + "nameCanonical": { + "type": "boolean", + "description": "Add additional canonical name (`name@\u003cdigest\u003e`)." + }, + "names": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Specify images names to export. This is overridden if tags are already specified." + }, + "ociMediaTypes": { + "type": "boolean", + "description": "Use OCI media types in exporter manifests.", + "default": false + }, + "push": { + "type": "boolean", + "description": "Push after creating the image. Defaults to `true`.", + "default": true + }, + "pushByDigest": { + "type": "boolean", + "description": "Push image without name." + }, + "store": { + "type": "boolean", + "description": "Store resulting images to the worker's image store and ensure all of\nits blobs are in the content store.\n\nDefaults to `true`.\n\nIgnored if the worker doesn't have image store (when using OCI workers,\nfor example).", + "default": true + }, + "unpack": { + "type": "boolean", + "description": "Unpack image after creation (for use with containerd). Defaults to\n`false`." + } + }, + "type": "object" + }, + "docker-build:index:ExportTar": { + "properties": { + "dest": { + "type": "string", + "description": "Output path." + } + }, + "type": "object", + "required": [ + "dest" + ] + }, + "docker-build:index:NetworkMode": { + "type": "string", + "enum": [ + { + "description": "The default sandbox network mode.", + "value": "default" + }, + { + "description": "Host network mode.", + "value": "host" + }, + { + "description": "Disable network access.", + "value": "none" + } + ] + }, + "docker-build:index:Platform": { + "type": "string", + "enum": [ + { + "value": "darwin/386" + }, + { + "value": "darwin/amd64" + }, + { + "value": "darwin/arm" + }, + { + "value": "darwin/arm64" + }, + { + "value": "dragonfly/amd64" + }, + { + "value": "freebsd/386" + }, + { + "value": "freebsd/amd64" + }, + { + "value": "freebsd/arm" + }, + { + "value": "linux/386" + }, + { + "value": "linux/amd64" + }, + { + "value": "linux/arm" + }, + { + "value": "linux/arm64" + }, + { + "value": "linux/mips64" + }, + { + "value": "linux/mips64le" + }, + { + "value": "linux/ppc64le" + }, + { + "value": "linux/riscv64" + }, + { + "value": "linux/s390x" + }, + { + "value": "netbsd/386" + }, + { + "value": "netbsd/amd64" + }, + { + "value": "netbsd/arm" + }, + { + "value": "openbsd/386" + }, + { + "value": "openbsd/amd64" + }, + { + "value": "openbsd/arm" + }, + { + "value": "plan9/386" + }, + { + "value": "plan9/amd64" + }, + { + "value": "solaris/amd64" + }, + { + "value": "windows/386" + }, + { + "value": "windows/amd64" + } + ] + }, + "docker-build:index:Registry": { + "properties": { + "address": { + "type": "string", + "description": "The registry's address (e.g. \"docker.io\")." + }, + "password": { + "type": "string", + "description": "Password or token for the registry.", + "secret": true + }, + "username": { + "type": "string", + "description": "Username for the registry." + } + }, + "type": "object", + "required": [ + "address" + ] + }, + "docker-build:index:SSH": { + "properties": { + "id": { + "type": "string", + "description": "Useful for distinguishing different servers that are part of the same\nbuild.\n\nA value of `default` is appropriate if only dealing with a single host." + }, + "paths": { + "type": "array", + "items": { + "type": "string" + }, + "description": "SSH agent socket or private keys to expose to the build under the given\nidentifier.\n\nDefaults to `[$SSH_AUTH_SOCK]`.\n\nNote that your keys are **not** automatically added when using an\nagent. Run `ssh-add -l` locally to confirm which public keys are\nvisible to the agent; these will be exposed to your build." + } + }, + "type": "object", + "required": [ + "id" + ] + } + }, + "provider": { + "properties": { + "host": { + "type": "string", + "description": "The build daemon's address.", + "default": "", + "defaultInfo": { + "environment": [ + "DOCKER_HOST" + ] + } + } + }, + "type": "object", + "inputProperties": { + "host": { + "type": "string", + "description": "The build daemon's address.", + "default": "", + "defaultInfo": { + "environment": [ + "DOCKER_HOST" + ] + } + }, + "registries": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:Registry" + } + } + } + }, + "resources": { + "docker-build:index:Image": { + "description": "A Docker image built using buildx -- Docker's interface to the improved\nBuildKit backend.\n\n## Stability\n\n**This resource is pre-1.0 and in public preview.**\n\nWe will strive to keep APIs and behavior as stable as possible, but we\ncannot guarantee stability until version 1.0.\n\n## Migrating Pulumi Docker v3 and v4 Image resources\n\nThis provider's `Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider.\nExisting `Image` resources can be converted to the docker-build `Image` resources with minor modifications.\n\n### Behavioral differences\n\nThere are several key behavioral differences to keep in mind when transitioning images to the new `Image` resource.\n\n#### Previews\n\nVersion `3.x` of the Pulumi Docker provider always builds images during preview operations.\nThis is helpful as a safeguard to prevent \"broken\" images from merging, but users found the behavior unnecessarily redundant when running previews and updates locally.\n\nVersion `4.x` changed build-on-preview behavior to be opt-in.\nBy default, `v4.x` `Image` resources do _not_ build during previews, but this behavior can be toggled with the `buildOnPreview` option.\nSeveral users reported outages due to the default behavior allowing bad images to accidentally sneak through CI.\n\nThe default behavior of this provider's `Image` resource is similar to `3.x` and will build images during previews.\nThis behavior can be changed by specifying `buildOnPreview`.\n\n#### Push behavior\n\nVersions `3.x` and `4.x` of the Pulumi Docker provider attempt to push images to remote registries by default.\nThey expose a `skipPush: true` option to disable pushing.\n\nThis provider's `Image` resource matches the Docker CLI's behavior and does not push images anywhere by default.\n\nTo push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`).\nLike Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally.\n\n#### Secrets\n\nVersion `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field.\n\nVersion `4.x` of the Pulumi Docker provider does not support secrets.\n\nThe `Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables.\nInstead, they should be passed directly as values.\n(Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).)\nPulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments.\n\n#### Caching\n\nVersion `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`.\nIt builds targets individually and pushes them to separate images for caching.\n\nVersion `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches.\n\nBoth versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior.\nThis can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc.\n\nThe `Image` resource delegates all caching behavior to Docker.\n`cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc.\n\n#### Outputs\n\nVersions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest.\nIn `4.x` this could also be a single sha256 hash if the image wasn't pushed.\n\nUnlike earlier providers the `Image` resource can push multiple tags.\nAs a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed.\nIf multiple tags were pushed this uses one at random.\n\nIf you need more control over tag references you can use the `digest` output, which is always a single sha256 hash as long as the image was exported somewhere.\n\n#### Tag deletion and refreshes\n\nVersions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` resource is deleted, nor do they confirm expected tags exist during `refresh` operations.\n\nThe `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist.\nIf any are missing a subsequent `update` will push them.\n\nWhen a `Image` is deleted, it will _attempt_ to also delete any pushed tags.\nDeletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular).\nManifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace.\n\nUse the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted.\n\n### Example migration\n\nExamples of \"fully-featured\" `v3` and `v4` `Image` resources are shown below, along with an example `Image` resource showing how they would look after migration.\n\nThe `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`.\nAfter migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`.\nIn almost all cases, properties of `Image` are named after the Docker CLI flag they correspond to.\n\nThe `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`.\nIt it is shown with parameters similar to the `v3` example for completeness.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### v3/v4 migration\n\n```typescript\n\n// v3 Image\nconst v3 = new docker.Image(\"v3-image\", {\n imageName: \"myregistry.com/user/repo:latest\",\n localImageName: \"local-tag\",\n skipPush: false,\n build: {\n dockerfile: \"./Dockerfile\",\n context: \"../app\",\n target: \"mytarget\",\n args: {\n MY_BUILD_ARG: \"foo\",\n },\n env: {\n DOCKER_BUILDKIT: \"1\",\n },\n extraOptions: [\n \"--cache-from\",\n \"type=registry,myregistry.com/user/repo:cache\",\n \"--cache-to\",\n \"type=registry,myregistry.com/user/repo:cache\",\n \"--add-host\",\n \"metadata.google.internal:169.254.169.254\",\n \"--secret\",\n \"id=mysecret,src=/local/secret\",\n \"--ssh\",\n \"default=/home/runner/.ssh/id_ed25519\",\n \"--network\",\n \"host\",\n \"--platform\",\n \"linux/amd64\",\n ],\n },\n registry: {\n server: \"myregistry.com\",\n username: \"username\",\n password: pulumi.secret(\"password\"),\n },\n});\n\n// v3 Image after migrating to docker-build.Image\nconst v3Migrated = new dockerbuild.Image(\"v3-to-buildx\", {\n tags: [\"myregistry.com/user/repo:latest\", \"local-tag\"],\n push: true,\n dockerfile: {\n location: \"./Dockerfile\",\n },\n context: {\n location: \"../app\",\n },\n target: \"mytarget\",\n buildArgs: {\n MY_BUILD_ARG: \"foo\",\n },\n cacheFrom: [{ registry: { ref: \"myregistry.com/user/repo:cache\" } }],\n cacheTo: [{ registry: { ref: \"myregistry.com/user/repo:cache\" } }],\n secrets: {\n mysecret: \"value\",\n },\n addHosts: [\"metadata.google.internal:169.254.169.254\"],\n ssh: {\n default: [\"/home/runner/.ssh/id_ed25519\"],\n },\n network: \"host\",\n platforms: [\"linux/amd64\"],\n registries: [{\n address: \"myregistry.com\",\n username: \"username\",\n password: pulumi.secret(\"password\"),\n }],\n});\n\n\n// v4 Image\nconst v4 = new docker.Image(\"v4-image\", {\n imageName: \"myregistry.com/user/repo:latest\",\n skipPush: false,\n build: {\n dockerfile: \"./Dockerfile\",\n context: \"../app\",\n target: \"mytarget\",\n args: {\n MY_BUILD_ARG: \"foo\",\n },\n cacheFrom: {\n images: [\"myregistry.com/user/repo:cache\"],\n },\n addHosts: [\"metadata.google.internal:169.254.169.254\"],\n network: \"host\",\n platform: \"linux/amd64\",\n },\n buildOnPreview: true,\n registry: {\n server: \"myregistry.com\",\n username: \"username\",\n password: pulumi.secret(\"password\"),\n },\n});\n\n// v4 Image after migrating to docker-build.Image\nconst v4Migrated = new dockerbuild.Image(\"v4-to-buildx\", {\n tags: [\"myregistry.com/user/repo:latest\"],\n push: true,\n dockerfile: {\n location: \"./Dockerfile\",\n },\n context: {\n location: \"../app\",\n },\n target: \"mytarget\",\n buildArgs: {\n MY_BUILD_ARG: \"foo\",\n },\n cacheFrom: [{ registry: { ref: \"myregistry.com/user/repo:cache\" } }],\n cacheTo: [{ registry: { ref: \"myregistry.com/user/repo:cache\" } }],\n addHosts: [\"metadata.google.internal:169.254.169.254\"],\n network: \"host\",\n platforms: [\"linux/amd64\"],\n registries: [{\n address: \"myregistry.com\",\n username: \"username\",\n password: pulumi.secret(\"password\"),\n }],\n});\n\n```\n\n{{% /example %}}\n\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Push to AWS ECR with caching\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst ecrRepository = new aws.ecr.Repository(\"ecr-repository\", {});\nconst authToken = aws.ecr.getAuthorizationTokenOutput({\n registryId: ecrRepository.registryId,\n});\nconst myImage = new docker_build.Image(\"my-image\", {\n cacheFrom: [{\n registry: {\n ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`,\n },\n }],\n cacheTo: [{\n registry: {\n imageManifest: true,\n ociMediaTypes: true,\n ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`,\n },\n }],\n context: {\n location: \"./app\",\n },\n push: true,\n registries: [{\n address: ecrRepository.repositoryUrl,\n password: authToken.apply(authToken =\u003e authToken.password),\n username: authToken.apply(authToken =\u003e authToken.userName),\n }],\n tags: [pulumi.interpolate`${ecrRepository.repositoryUrl}:latest`],\n});\nexport const ref = myImage.ref;\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_docker_build as docker_build\n\necr_repository = aws.ecr.Repository(\"ecr-repository\")\nauth_token = aws.ecr.get_authorization_token_output(registry_id=ecr_repository.registry_id)\nmy_image = docker_build.Image(\"my-image\",\n cache_from=[docker_build.CacheFromArgs(\n registry=docker_build.CacheFromRegistryArgs(\n ref=ecr_repository.repository_url.apply(lambda repository_url: f\"{repository_url}:cache\"),\n ),\n )],\n cache_to=[docker_build.CacheToArgs(\n registry=docker_build.CacheToRegistryArgs(\n image_manifest=True,\n oci_media_types=True,\n ref=ecr_repository.repository_url.apply(lambda repository_url: f\"{repository_url}:cache\"),\n ),\n )],\n context=docker_build.BuildContextArgs(\n location=\"./app\",\n ),\n push=True,\n registries=[docker_build.RegistryArgs(\n address=ecr_repository.repository_url,\n password=auth_token.password,\n username=auth_token.user_name,\n )],\n tags=[ecr_repository.repository_url.apply(lambda repository_url: f\"{repository_url}:latest\")])\npulumi.export(\"ref\", my_image.ref)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ecrRepository = new Aws.Ecr.Repository(\"ecr-repository\");\n\n var authToken = Aws.Ecr.GetAuthorizationToken.Invoke(new()\n {\n RegistryId = ecrRepository.RegistryId,\n });\n\n var myImage = new DockerBuild.Image(\"my-image\", new()\n {\n CacheFrom = new[]\n {\n new DockerBuild.Inputs.CacheFromArgs\n {\n Registry = new DockerBuild.Inputs.CacheFromRegistryArgs\n {\n Ref = ecrRepository.RepositoryUrl.Apply(repositoryUrl =\u003e $\"{repositoryUrl}:cache\"),\n },\n },\n },\n CacheTo = new[]\n {\n new DockerBuild.Inputs.CacheToArgs\n {\n Registry = new DockerBuild.Inputs.CacheToRegistryArgs\n {\n ImageManifest = true,\n OciMediaTypes = true,\n Ref = ecrRepository.RepositoryUrl.Apply(repositoryUrl =\u003e $\"{repositoryUrl}:cache\"),\n },\n },\n },\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"./app\",\n },\n Push = true,\n Registries = new[]\n {\n new DockerBuild.Inputs.RegistryArgs\n {\n Address = ecrRepository.RepositoryUrl,\n Password = authToken.Apply(getAuthorizationTokenResult =\u003e getAuthorizationTokenResult.Password),\n Username = authToken.Apply(getAuthorizationTokenResult =\u003e getAuthorizationTokenResult.UserName),\n },\n },\n Tags = new[]\n {\n ecrRepository.RepositoryUrl.Apply(repositoryUrl =\u003e $\"{repositoryUrl}:latest\"),\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"ref\"] = myImage.Ref,\n };\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr\"\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tecrRepository, err := ecr.NewRepository(ctx, \"ecr-repository\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tauthToken := ecr.GetAuthorizationTokenOutput(ctx, ecr.GetAuthorizationTokenOutputArgs{\n\t\t\tRegistryId: ecrRepository.RegistryId,\n\t\t}, nil)\n\t\tmyImage, err := dockerbuild.NewImage(ctx, \"my-image\", \u0026dockerbuild.ImageArgs{\n\t\t\tCacheFrom: dockerbuild.CacheFromArray{\n\t\t\t\t\u0026dockerbuild.CacheFromArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheFromRegistryArgs{\n\t\t\t\t\t\tRef: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v:cache\", repositoryUrl), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCacheTo: dockerbuild.CacheToArray{\n\t\t\t\t\u0026dockerbuild.CacheToArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheToRegistryArgs{\n\t\t\t\t\t\tImageManifest: pulumi.Bool(true),\n\t\t\t\t\t\tOciMediaTypes: pulumi.Bool(true),\n\t\t\t\t\t\tRef: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) {\n\t\t\t\t\t\t\treturn fmt.Sprintf(\"%v:cache\", repositoryUrl), nil\n\t\t\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"./app\"),\n\t\t\t},\n\t\t\tPush: pulumi.Bool(true),\n\t\t\tRegistries: dockerbuild.RegistryArray{\n\t\t\t\t\u0026dockerbuild.RegistryArgs{\n\t\t\t\t\tAddress: ecrRepository.RepositoryUrl,\n\t\t\t\t\tPassword: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) {\n\t\t\t\t\t\treturn \u0026authToken.Password, nil\n\t\t\t\t\t}).(pulumi.StringPtrOutput),\n\t\t\t\t\tUsername: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) {\n\t\t\t\t\t\treturn \u0026authToken.UserName, nil\n\t\t\t\t\t}).(pulumi.StringPtrOutput),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) {\n\t\t\t\t\treturn fmt.Sprintf(\"%v:latest\", repositoryUrl), nil\n\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"ref\", myImage.Ref)\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Push to AWS ECR with caching\nname: ecr\noutputs:\n ref: ${my-image.ref}\nresources:\n ecr-repository:\n type: aws:ecr:Repository\n my-image:\n properties:\n cacheFrom:\n - registry:\n ref: ${ecr-repository.repositoryUrl}:cache\n cacheTo:\n - registry:\n imageManifest: true\n ociMediaTypes: true\n ref: ${ecr-repository.repositoryUrl}:cache\n context:\n location: ./app\n push: true\n registries:\n - address: ${ecr-repository.repositoryUrl}\n password: ${auth-token.password}\n username: ${auth-token.userName}\n tags:\n - ${ecr-repository.repositoryUrl}:latest\n type: docker-build:Image\nruntime: yaml\nvariables:\n auth-token:\n fn::aws:ecr:getAuthorizationToken:\n registryId: ${ecr-repository.registryId}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.aws.ecr.Repository;\nimport com.pulumi.aws.ecr.EcrFunctions;\nimport com.pulumi.aws.ecr.inputs.GetAuthorizationTokenArgs;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromRegistryArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToRegistryArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.inputs.RegistryArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var ecrRepository = new Repository(\"ecrRepository\");\n\n final var authToken = EcrFunctions.getAuthorizationToken(GetAuthorizationTokenArgs.builder()\n .registryId(ecrRepository.registryId())\n .build());\n\n var myImage = new Image(\"myImage\", ImageArgs.builder() \n .cacheFrom(CacheFromArgs.builder()\n .registry(CacheFromRegistryArgs.builder()\n .ref(ecrRepository.repositoryUrl().applyValue(repositoryUrl -\u003e String.format(\"%s:cache\", repositoryUrl)))\n .build())\n .build())\n .cacheTo(CacheToArgs.builder()\n .registry(CacheToRegistryArgs.builder()\n .imageManifest(true)\n .ociMediaTypes(true)\n .ref(ecrRepository.repositoryUrl().applyValue(repositoryUrl -\u003e String.format(\"%s:cache\", repositoryUrl)))\n .build())\n .build())\n .context(BuildContextArgs.builder()\n .location(\"./app\")\n .build())\n .push(true)\n .registries(RegistryArgs.builder()\n .address(ecrRepository.repositoryUrl())\n .password(authToken.applyValue(getAuthorizationTokenResult -\u003e getAuthorizationTokenResult).applyValue(authToken -\u003e authToken.applyValue(getAuthorizationTokenResult -\u003e getAuthorizationTokenResult.password())))\n .username(authToken.applyValue(getAuthorizationTokenResult -\u003e getAuthorizationTokenResult).applyValue(authToken -\u003e authToken.applyValue(getAuthorizationTokenResult -\u003e getAuthorizationTokenResult.userName())))\n .build())\n .tags(ecrRepository.repositoryUrl().applyValue(repositoryUrl -\u003e String.format(\"%s:latest\", repositoryUrl)))\n .build());\n\n ctx.export(\"ref\", myImage.ref());\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Multi-platform image\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst image = new docker_build.Image(\"image\", {\n context: {\n location: \"app\",\n },\n platforms: [\n docker_build.Platform.Plan9_amd64,\n docker_build.Platform.Plan9_386,\n ],\n push: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\nimage = docker_build.Image(\"image\",\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n platforms=[\n docker_build.Platform.PLAN9_AMD64,\n docker_build.Platform.PLAN9_386,\n ],\n push=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new DockerBuild.Image(\"image\", new()\n {\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Platforms = new[]\n {\n DockerBuild.Platform.Plan9_amd64,\n DockerBuild.Platform.Plan9_386,\n },\n Push = false,\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPlatforms: docker - build.PlatformArray{\n\t\t\t\tdockerbuild.Platform_Plan9_amd64,\n\t\t\t\tdockerbuild.Platform_Plan9_386,\n\t\t\t},\n\t\t\tPush: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Multi-platform image\nname: multi-platform\nresources:\n image:\n properties:\n context:\n location: app\n platforms:\n - plan9/amd64\n - plan9/386\n push: false\n type: docker-build:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .platforms( \n \"plan9/amd64\",\n \"plan9/386\")\n .push(false)\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Registry export\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst image = new docker_build.Image(\"image\", {\n context: {\n location: \"app\",\n },\n push: true,\n registries: [{\n address: \"docker.io\",\n password: dockerHubPassword,\n username: \"pulumibot\",\n }],\n tags: [\"docker.io/pulumi/pulumi:3.107.0\"],\n});\nexport const ref = myImage.ref;\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\nimage = docker_build.Image(\"image\",\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n push=True,\n registries=[docker_build.RegistryArgs(\n address=\"docker.io\",\n password=docker_hub_password,\n username=\"pulumibot\",\n )],\n tags=[\"docker.io/pulumi/pulumi:3.107.0\"])\npulumi.export(\"ref\", my_image[\"ref\"])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new DockerBuild.Image(\"image\", new()\n {\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Push = true,\n Registries = new[]\n {\n new DockerBuild.Inputs.RegistryArgs\n {\n Address = \"docker.io\",\n Password = dockerHubPassword,\n Username = \"pulumibot\",\n },\n },\n Tags = new[]\n {\n \"docker.io/pulumi/pulumi:3.107.0\",\n },\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"ref\"] = myImage.Ref,\n };\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPush: pulumi.Bool(true),\n\t\t\tRegistries: dockerbuild.RegistryArray{\n\t\t\t\t\u0026dockerbuild.RegistryArgs{\n\t\t\t\t\tAddress: pulumi.String(\"docker.io\"),\n\t\t\t\t\tPassword: pulumi.Any(dockerHubPassword),\n\t\t\t\t\tUsername: pulumi.String(\"pulumibot\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"docker.io/pulumi/pulumi:3.107.0\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"ref\", myImage.Ref)\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Registry export\nname: registry\noutputs:\n ref: ${my-image.ref}\nresources:\n image:\n properties:\n context:\n location: app\n push: true\n registries:\n - address: docker.io\n password: ${dockerHubPassword}\n username: pulumibot\n tags:\n - docker.io/pulumi/pulumi:3.107.0\n type: docker-build:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.inputs.RegistryArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .push(true)\n .registries(RegistryArgs.builder()\n .address(\"docker.io\")\n .password(dockerHubPassword)\n .username(\"pulumibot\")\n .build())\n .tags(\"docker.io/pulumi/pulumi:3.107.0\")\n .build());\n\n ctx.export(\"ref\", myImage.ref());\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Caching\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst image = new docker_build.Image(\"image\", {\n cacheFrom: [{\n local: {\n src: \"tmp/cache\",\n },\n }],\n cacheTo: [{\n local: {\n dest: \"tmp/cache\",\n mode: docker_build.CacheMode.Max,\n },\n }],\n context: {\n location: \"app\",\n },\n push: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\nimage = docker_build.Image(\"image\",\n cache_from=[docker_build.CacheFromArgs(\n local=docker_build.CacheFromLocalArgs(\n src=\"tmp/cache\",\n ),\n )],\n cache_to=[docker_build.CacheToArgs(\n local=docker_build.CacheToLocalArgs(\n dest=\"tmp/cache\",\n mode=docker_build.CacheMode.MAX,\n ),\n )],\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n push=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new DockerBuild.Image(\"image\", new()\n {\n CacheFrom = new[]\n {\n new DockerBuild.Inputs.CacheFromArgs\n {\n Local = new DockerBuild.Inputs.CacheFromLocalArgs\n {\n Src = \"tmp/cache\",\n },\n },\n },\n CacheTo = new[]\n {\n new DockerBuild.Inputs.CacheToArgs\n {\n Local = new DockerBuild.Inputs.CacheToLocalArgs\n {\n Dest = \"tmp/cache\",\n Mode = DockerBuild.CacheMode.Max,\n },\n },\n },\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Push = false,\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tCacheFrom: dockerbuild.CacheFromArray{\n\t\t\t\t\u0026dockerbuild.CacheFromArgs{\n\t\t\t\t\tLocal: \u0026dockerbuild.CacheFromLocalArgs{\n\t\t\t\t\t\tSrc: pulumi.String(\"tmp/cache\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCacheTo: dockerbuild.CacheToArray{\n\t\t\t\t\u0026dockerbuild.CacheToArgs{\n\t\t\t\t\tLocal: \u0026dockerbuild.CacheToLocalArgs{\n\t\t\t\t\t\tDest: pulumi.String(\"tmp/cache\"),\n\t\t\t\t\t\tMode: dockerbuild.CacheModeMax,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPush: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Caching\nname: caching\nresources:\n image:\n properties:\n cacheFrom:\n - local:\n src: tmp/cache\n cacheTo:\n - local:\n dest: tmp/cache\n mode: max\n context:\n location: app\n push: false\n type: docker-build:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromLocalArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToLocalArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .cacheFrom(CacheFromArgs.builder()\n .local(CacheFromLocalArgs.builder()\n .src(\"tmp/cache\")\n .build())\n .build())\n .cacheTo(CacheToArgs.builder()\n .local(CacheToLocalArgs.builder()\n .dest(\"tmp/cache\")\n .mode(\"max\")\n .build())\n .build())\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .push(false)\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Docker Build Cloud\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst image = new docker_build.Image(\"image\", {\n builder: {\n name: \"cloud-builder-name\",\n },\n context: {\n location: \"app\",\n },\n exec: true,\n push: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\nimage = docker_build.Image(\"image\",\n builder=docker_build.BuilderConfigArgs(\n name=\"cloud-builder-name\",\n ),\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n exec_=True,\n push=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new DockerBuild.Image(\"image\", new()\n {\n Builder = new DockerBuild.Inputs.BuilderConfigArgs\n {\n Name = \"cloud-builder-name\",\n },\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Exec = true,\n Push = false,\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tBuilder: \u0026dockerbuild.BuilderConfigArgs{\n\t\t\t\tName: pulumi.String(\"cloud-builder-name\"),\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tExec: pulumi.Bool(true),\n\t\t\tPush: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Docker Build Cloud\nname: dbc\nresources:\n image:\n properties:\n builder:\n name: cloud-builder-name\n context:\n location: app\n exec: true\n push: false\n type: docker-build:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuilderConfigArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .builder(BuilderConfigArgs.builder()\n .name(\"cloud-builder-name\")\n .build())\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .exec(true)\n .push(false)\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Build arguments\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst image = new docker_build.Image(\"image\", {\n buildArgs: {\n SET_ME_TO_TRUE: \"true\",\n },\n context: {\n location: \"app\",\n },\n push: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\nimage = docker_build.Image(\"image\",\n build_args={\n \"SET_ME_TO_TRUE\": \"true\",\n },\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n push=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new DockerBuild.Image(\"image\", new()\n {\n BuildArgs = \n {\n { \"SET_ME_TO_TRUE\", \"true\" },\n },\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Push = false,\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tBuildArgs: pulumi.StringMap{\n\t\t\t\t\"SET_ME_TO_TRUE\": pulumi.String(\"true\"),\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPush: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Build arguments\nname: build-args\nresources:\n image:\n properties:\n buildArgs:\n SET_ME_TO_TRUE: \"true\"\n context:\n location: app\n push: false\n type: docker-build:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .buildArgs(Map.of(\"SET_ME_TO_TRUE\", \"true\"))\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .push(false)\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Build target\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst image = new docker_build.Image(\"image\", {\n context: {\n location: \"app\",\n },\n push: false,\n target: \"build-me\",\n});\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\nimage = docker_build.Image(\"image\",\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n push=False,\n target=\"build-me\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new DockerBuild.Image(\"image\", new()\n {\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Push = false,\n Target = \"build-me\",\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPush: pulumi.Bool(false),\n\t\t\tTarget: pulumi.String(\"build-me\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Build target\nname: build-target\nresources:\n image:\n properties:\n context:\n location: app\n push: false\n target: build-me\n type: docker-build:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .push(false)\n .target(\"build-me\")\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Named contexts\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst image = new docker_build.Image(\"image\", {\n context: {\n location: \"app\",\n named: {\n \"golang:latest\": {\n location: \"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\",\n },\n },\n },\n push: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\nimage = docker_build.Image(\"image\",\n context=docker_build.BuildContextArgs(\n location=\"app\",\n named={\n \"golang:latest\": docker_build.ContextArgs(\n location=\"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\",\n ),\n },\n ),\n push=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new DockerBuild.Image(\"image\", new()\n {\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n Named = \n {\n { \"golang:latest\", new DockerBuild.Inputs.ContextArgs\n {\n Location = \"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\",\n } },\n },\n },\n Push = false,\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t\tNamed: dockerbuild.ContextMap{\n\t\t\t\t\t\"golang:latest\": \u0026dockerbuild.ContextArgs{\n\t\t\t\t\t\tLocation: pulumi.String(\"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tPush: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Named contexts\nname: named-contexts\nresources:\n image:\n properties:\n context:\n location: app\n named:\n golang:latest:\n location: docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\n push: false\n type: docker-build:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .named(Map.of(\"golang:latest\", Map.of(\"location\", \"docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984\")))\n .build())\n .push(false)\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Remote context\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst image = new docker_build.Image(\"image\", {\n context: {\n location: \"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\",\n },\n push: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\nimage = docker_build.Image(\"image\",\n context=docker_build.BuildContextArgs(\n location=\"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\",\n ),\n push=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new DockerBuild.Image(\"image\", new()\n {\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\",\n },\n Push = false,\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\"),\n\t\t\t},\n\t\t\tPush: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Remote context\nname: remote-context\nresources:\n image:\n properties:\n context:\n location: https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\n push: false\n type: docker-build:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile\")\n .build())\n .push(false)\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Inline Dockerfile\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst image = new docker_build.Image(\"image\", {\n context: {\n location: \"app\",\n },\n dockerfile: {\n inline: `FROM busybox\nCOPY hello.c ./\n`,\n },\n push: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\nimage = docker_build.Image(\"image\",\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n dockerfile=docker_build.DockerfileArgs(\n inline=\"\"\"FROM busybox\nCOPY hello.c ./\n\"\"\",\n ),\n push=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new DockerBuild.Image(\"image\", new()\n {\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Dockerfile = new DockerBuild.Inputs.DockerfileArgs\n {\n Inline = @\"FROM busybox\nCOPY hello.c ./\n\",\n },\n Push = false,\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tDockerfile: \u0026dockerbuild.DockerfileArgs{\n\t\t\t\tInline: pulumi.String(\"FROM busybox\\nCOPY hello.c ./\\n\"),\n\t\t\t},\n\t\t\tPush: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Inline Dockerfile\nname: inline\nresources:\n image:\n properties:\n context:\n location: app\n dockerfile:\n inline: |\n FROM busybox\n COPY hello.c ./\n push: false\n type: docker-build:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.inputs.DockerfileArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .dockerfile(DockerfileArgs.builder()\n .inline(\"\"\"\nFROM busybox\nCOPY hello.c ./\n \"\"\")\n .build())\n .push(false)\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Remote context\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst image = new docker_build.Image(\"image\", {\n context: {\n location: \"https://github.com/docker-library/hello-world.git\",\n },\n dockerfile: {\n location: \"app/Dockerfile\",\n },\n push: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\nimage = docker_build.Image(\"image\",\n context=docker_build.BuildContextArgs(\n location=\"https://github.com/docker-library/hello-world.git\",\n ),\n dockerfile=docker_build.DockerfileArgs(\n location=\"app/Dockerfile\",\n ),\n push=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new DockerBuild.Image(\"image\", new()\n {\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"https://github.com/docker-library/hello-world.git\",\n },\n Dockerfile = new DockerBuild.Inputs.DockerfileArgs\n {\n Location = \"app/Dockerfile\",\n },\n Push = false,\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"https://github.com/docker-library/hello-world.git\"),\n\t\t\t},\n\t\t\tDockerfile: \u0026dockerbuild.DockerfileArgs{\n\t\t\t\tLocation: pulumi.String(\"app/Dockerfile\"),\n\t\t\t},\n\t\t\tPush: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Remote context\nname: remote-context\nresources:\n image:\n properties:\n context:\n location: https://github.com/docker-library/hello-world.git\n dockerfile:\n location: app/Dockerfile\n push: false\n type: docker-build:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.inputs.DockerfileArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"https://github.com/docker-library/hello-world.git\")\n .build())\n .dockerfile(DockerfileArgs.builder()\n .location(\"app/Dockerfile\")\n .build())\n .push(false)\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% example %}}\n### Local export\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst image = new docker_build.Image(\"image\", {\n context: {\n location: \"app\",\n },\n exports: [{\n docker: {\n tar: true,\n },\n }],\n push: false,\n});\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\nimage = docker_build.Image(\"image\",\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n exports=[docker_build.ExportArgs(\n docker=docker_build.ExportDockerArgs(\n tar=True,\n ),\n )],\n push=False)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var image = new DockerBuild.Image(\"image\", new()\n {\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Exports = new[]\n {\n new DockerBuild.Inputs.ExportArgs\n {\n Docker = new DockerBuild.Inputs.ExportDockerArgs\n {\n Tar = true,\n },\n },\n },\n Push = false,\n });\n\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := dockerbuild.NewImage(ctx, \"image\", \u0026dockerbuild.ImageArgs{\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tExports: dockerbuild.ExportArray{\n\t\t\t\t\u0026dockerbuild.ExportArgs{\n\t\t\t\t\tDocker: \u0026dockerbuild.ExportDockerArgs{\n\t\t\t\t\t\tTar: pulumi.Bool(true),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tPush: pulumi.Bool(false),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Local export\nname: docker-load\nresources:\n image:\n properties:\n context:\n location: app\n exports:\n - docker:\n tar: true\n push: false\n type: docker-build:Image\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.inputs.ExportArgs;\nimport com.pulumi.dockerbuild.inputs.ExportDockerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var image = new Image(\"image\", ImageArgs.builder() \n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .exports(ExportArgs.builder()\n .docker(ExportDockerArgs.builder()\n .tar(true)\n .build())\n .build())\n .push(false)\n .build());\n\n }\n}\n```\n{{% /example %}}\n{{% /examples %}}", + "properties": { + "addHosts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom `host:ip` mappings to use during the build.\n\nEquivalent to Docker's `--add-host` flag." + }, + "buildArgs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "`ARG` names and values to set during the build.\n\nThese variables are accessed like environment variables inside `RUN`\ninstructions.\n\nBuild arguments are persisted in the image, so you should use `secrets`\nif these arguments are sensitive.\n\nEquivalent to Docker's `--build-arg` flag." + }, + "buildOnPreview": { + "type": "boolean", + "description": "Setting this to `false` will always skip image builds during previews,\nand setting it to `true` will always build images during previews.\n\nImages built during previews are never exported to registries, however\ncache manifests are still exported.\n\nOn-disk Dockerfiles are always validated for syntactic correctness\nregardless of this setting.\n\nDefaults to `true` as a safeguard against broken images merging as part\nof CI pipelines.", + "default": true + }, + "builder": { + "$ref": "#/types/docker-build:index:BuilderConfig", + "description": "Builder configuration." + }, + "cacheFrom": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:CacheFrom" + }, + "description": "Cache export configuration.\n\nEquivalent to Docker's `--cache-from` flag." + }, + "cacheTo": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:CacheTo" + }, + "description": "Cache import configuration.\n\nEquivalent to Docker's `--cache-to` flag." + }, + "context": { + "$ref": "#/types/docker-build:index:BuildContext", + "description": "Build context settings.\n\nEquivalent to Docker's `PATH | URL | -` positional argument." + }, + "contextHash": { + "type": "string", + "description": "A preliminary hash of the image's build context.\n\nPulumi uses this to determine if an image _may_ need to be re-built." + }, + "digest": { + "type": "string", + "description": "A SHA256 digest of the image if it was exported to a registry or\nelsewhere.\n\nEmpty if the image was not exported.\n\nRegistry images can be referenced precisely as `\u003ctag\u003e@\u003cdigest\u003e`. The\n`ref` output provides one such reference as a convenience." + }, + "dockerfile": { + "$ref": "#/types/docker-build:index:Dockerfile", + "description": "Dockerfile settings.\n\nEquivalent to Docker's `--file` flag." + }, + "exec": { + "type": "boolean", + "description": "Use `exec` mode to build this image.\n\nBy default the provider embeds a v25 Docker client with v0.12 buildx\nsupport. This helps ensure consistent behavior across environments and\nis compatible with alternative build backends (e.g. `buildkitd`), but\nit may not be desirable if you require a specific version of buildx.\nFor example you may want to run a custom `docker-buildx` binary with\nsupport for [Docker Build\nCloud](https://docs.docker.com/build/cloud/setup/) (DBC).\n\nWhen this is set to `true` the provider will instead execute the\n`docker-buildx` binary directly to perform its operations. The user is\nresponsible for ensuring this binary exists, with correct permissions\nand pre-configured builders, at a path Docker expects (e.g.\n`~/.docker/cli-plugins`).\n\nDebugging `exec` mode may be more difficult as Pulumi will not be able\nto surface fine-grained errors and warnings. Additionally credentials\nare temporarily written to disk in order to provide them to the\n`docker-buildx` binary." + }, + "exports": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:Export" + }, + "description": "Controls where images are persisted after building.\n\nImages are only stored in the local cache unless `exports` are\nexplicitly configured.\n\nExporting to multiple destinations requires a daemon running BuildKit\n0.13 or later.\n\nEquivalent to Docker's `--output` flag." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Attach arbitrary key/value metadata to the image.\n\nEquivalent to Docker's `--label` flag." + }, + "load": { + "type": "boolean", + "description": "When `true` the build will automatically include a `docker` export.\n\nDefaults to `false`.\n\nEquivalent to Docker's `--load` flag." + }, + "network": { + "$ref": "#/types/docker-build:index:NetworkMode", + "description": "Set the network mode for `RUN` instructions. Defaults to `default`.\n\nFor custom networks, configure your builder with `--driver-opt network=...`.\n\nEquivalent to Docker's `--network` flag.", + "default": "default" + }, + "noCache": { + "type": "boolean", + "description": "Do not import cache manifests when building the image.\n\nEquivalent to Docker's `--no-cache` flag." + }, + "platforms": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:Platform" + }, + "description": "Set target platform(s) for the build. Defaults to the host's platform.\n\nEquivalent to Docker's `--platform` flag." + }, + "pull": { + "type": "boolean", + "description": "Always pull referenced images.\n\nEquivalent to Docker's `--pull` flag." + }, + "push": { + "type": "boolean", + "description": "When `true` the build will automatically include a `registry` export.\n\nDefaults to `false`.\n\nEquivalent to Docker's `--push` flag." + }, + "ref": { + "type": "string", + "description": "If the image was pushed to any registries then this will contain a\nsingle fully-qualified tag including the build's digest.\n\nIf the image had tags but was not exported, this will take on a value\nof one of those tags.\n\nThis will be empty if the image had no exports and no tags.\n\nThis is only for convenience and may not be appropriate for situations\nwhere multiple tags or registries are involved. In those cases this\noutput is not guaranteed to be stable.\n\nFor more control over tags consumed by downstream resources you should\nuse the `digest` output." + }, + "registries": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:Registry" + }, + "description": "Registry credentials. Required if reading or exporting to private\nrepositories.\n\nCredentials are kept in-memory and do not pollute pre-existing\ncredentials on the host.\n\nSimilar to `docker login`." + }, + "secrets": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "A mapping of secret names to their corresponding values.\n\nUnlike the Docker CLI, these can be passed by value and do not need to\nexist on-disk or in environment variables.\n\nBuild arguments and environment variables are persistent in the final\nimage, so you should use this for sensitive values.\n\nSimilar to Docker's `--secret` flag." + }, + "ssh": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:SSH" + }, + "description": "SSH agent socket or keys to expose to the build.\n\nEquivalent to Docker's `--ssh` flag." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Name and optionally a tag (format: `name:tag`).\n\nIf exporting to a registry, the name should include the fully qualified\nregistry address (e.g. `docker.io/pulumi/pulumi:latest`).\n\nEquivalent to Docker's `--tag` flag." + }, + "target": { + "type": "string", + "description": "Set the target build stage(s) to build.\n\nIf not specified all targets will be built by default.\n\nEquivalent to Docker's `--target` flag." + } + }, + "type": "object", + "required": [ + "contextHash", + "digest", + "push", + "ref" ], "inputProperties": { - "length": { - "type": "integer" + "addHosts": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Custom `host:ip` mappings to use during the build.\n\nEquivalent to Docker's `--add-host` flag." + }, + "buildArgs": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "`ARG` names and values to set during the build.\n\nThese variables are accessed like environment variables inside `RUN`\ninstructions.\n\nBuild arguments are persisted in the image, so you should use `secrets`\nif these arguments are sensitive.\n\nEquivalent to Docker's `--build-arg` flag." + }, + "buildOnPreview": { + "type": "boolean", + "description": "Setting this to `false` will always skip image builds during previews,\nand setting it to `true` will always build images during previews.\n\nImages built during previews are never exported to registries, however\ncache manifests are still exported.\n\nOn-disk Dockerfiles are always validated for syntactic correctness\nregardless of this setting.\n\nDefaults to `true` as a safeguard against broken images merging as part\nof CI pipelines.", + "default": true + }, + "builder": { + "$ref": "#/types/docker-build:index:BuilderConfig", + "description": "Builder configuration." + }, + "cacheFrom": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:CacheFrom" + }, + "description": "Cache export configuration.\n\nEquivalent to Docker's `--cache-from` flag." + }, + "cacheTo": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:CacheTo" + }, + "description": "Cache import configuration.\n\nEquivalent to Docker's `--cache-to` flag." + }, + "context": { + "$ref": "#/types/docker-build:index:BuildContext", + "description": "Build context settings.\n\nEquivalent to Docker's `PATH | URL | -` positional argument." + }, + "dockerfile": { + "$ref": "#/types/docker-build:index:Dockerfile", + "description": "Dockerfile settings.\n\nEquivalent to Docker's `--file` flag." + }, + "exec": { + "type": "boolean", + "description": "Use `exec` mode to build this image.\n\nBy default the provider embeds a v25 Docker client with v0.12 buildx\nsupport. This helps ensure consistent behavior across environments and\nis compatible with alternative build backends (e.g. `buildkitd`), but\nit may not be desirable if you require a specific version of buildx.\nFor example you may want to run a custom `docker-buildx` binary with\nsupport for [Docker Build\nCloud](https://docs.docker.com/build/cloud/setup/) (DBC).\n\nWhen this is set to `true` the provider will instead execute the\n`docker-buildx` binary directly to perform its operations. The user is\nresponsible for ensuring this binary exists, with correct permissions\nand pre-configured builders, at a path Docker expects (e.g.\n`~/.docker/cli-plugins`).\n\nDebugging `exec` mode may be more difficult as Pulumi will not be able\nto surface fine-grained errors and warnings. Additionally credentials\nare temporarily written to disk in order to provide them to the\n`docker-buildx` binary." + }, + "exports": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:Export" + }, + "description": "Controls where images are persisted after building.\n\nImages are only stored in the local cache unless `exports` are\nexplicitly configured.\n\nExporting to multiple destinations requires a daemon running BuildKit\n0.13 or later.\n\nEquivalent to Docker's `--output` flag." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Attach arbitrary key/value metadata to the image.\n\nEquivalent to Docker's `--label` flag." + }, + "load": { + "type": "boolean", + "description": "When `true` the build will automatically include a `docker` export.\n\nDefaults to `false`.\n\nEquivalent to Docker's `--load` flag." + }, + "network": { + "$ref": "#/types/docker-build:index:NetworkMode", + "description": "Set the network mode for `RUN` instructions. Defaults to `default`.\n\nFor custom networks, configure your builder with `--driver-opt network=...`.\n\nEquivalent to Docker's `--network` flag.", + "default": "default" + }, + "noCache": { + "type": "boolean", + "description": "Do not import cache manifests when building the image.\n\nEquivalent to Docker's `--no-cache` flag." + }, + "platforms": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:Platform" + }, + "description": "Set target platform(s) for the build. Defaults to the host's platform.\n\nEquivalent to Docker's `--platform` flag." + }, + "pull": { + "type": "boolean", + "description": "Always pull referenced images.\n\nEquivalent to Docker's `--pull` flag." + }, + "push": { + "type": "boolean", + "description": "When `true` the build will automatically include a `registry` export.\n\nDefaults to `false`.\n\nEquivalent to Docker's `--push` flag." + }, + "registries": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:Registry" + }, + "description": "Registry credentials. Required if reading or exporting to private\nrepositories.\n\nCredentials are kept in-memory and do not pollute pre-existing\ncredentials on the host.\n\nSimilar to `docker login`." + }, + "secrets": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "A mapping of secret names to their corresponding values.\n\nUnlike the Docker CLI, these can be passed by value and do not need to\nexist on-disk or in environment variables.\n\nBuild arguments and environment variables are persistent in the final\nimage, so you should use this for sensitive values.\n\nSimilar to Docker's `--secret` flag." + }, + "ssh": { + "type": "array", + "items": { + "$ref": "#/types/docker-build:index:SSH" + }, + "description": "SSH agent socket or keys to expose to the build.\n\nEquivalent to Docker's `--ssh` flag." + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Name and optionally a tag (format: `name:tag`).\n\nIf exporting to a registry, the name should include the fully qualified\nregistry address (e.g. `docker.io/pulumi/pulumi:latest`).\n\nEquivalent to Docker's `--tag` flag." + }, + "target": { + "type": "string", + "description": "Set the target build stage(s) to build.\n\nIf not specified all targets will be built by default.\n\nEquivalent to Docker's `--target` flag." } }, "requiredInputs": [ - "length" + "push" + ] + }, + "docker-build:index:Index": { + "description": "A wrapper around `docker buildx imagetools create` to create an index\n(or manifest list) referencing one or more existing images.\n\nIn most cases you do not need an `Index` to build a multi-platform\nimage -- specifying multiple platforms on the `Image` will handle this\nfor you automatically.\n\nHowever, as of April 2024, building multi-platform images _with\ncaching_ will only export a cache for one platform at a time (see [this\ndiscussion](https://github.com/docker/buildx/discussions/1382) for more\ndetails).\n\nTherefore this resource can be helpful if you are building\nmulti-platform images with caching: each platform can be built and\ncached separately, and an `Index` can join them all together. An\nexample of this is shown below.\n\nThis resource creates an OCI image index or a Docker manifest list\ndepending on the media types of the source images.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n### Multi-platform registry caching\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker_build from \"@pulumi/docker-build\";\n\nconst amd64 = new docker_build.Image(\"amd64\", {\n cacheFrom: [{\n registry: {\n ref: \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n }],\n cacheTo: [{\n registry: {\n mode: docker_build.CacheMode.Max,\n ref: \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n }],\n context: {\n location: \"app\",\n },\n platforms: [docker_build.Platform.Linux_amd64],\n tags: [\"docker.io/pulumi/pulumi:3.107.0-amd64\"],\n});\nconst arm64 = new docker_build.Image(\"arm64\", {\n cacheFrom: [{\n registry: {\n ref: \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n }],\n cacheTo: [{\n registry: {\n mode: docker_build.CacheMode.Max,\n ref: \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n }],\n context: {\n location: \"app\",\n },\n platforms: [docker_build.Platform.Linux_arm64],\n tags: [\"docker.io/pulumi/pulumi:3.107.0-arm64\"],\n});\nconst index = new docker_build.Index(\"index\", {\n sources: [\n amd64.ref,\n arm64.ref,\n ],\n tag: \"docker.io/pulumi/pulumi:3.107.0\",\n});\nexport const ref = index.ref;\n```\n```python\nimport pulumi\nimport pulumi_docker_build as docker_build\n\namd64 = docker_build.Image(\"amd64\",\n cache_from=[docker_build.CacheFromArgs(\n registry=docker_build.CacheFromRegistryArgs(\n ref=\"docker.io/pulumi/pulumi:cache-amd64\",\n ),\n )],\n cache_to=[docker_build.CacheToArgs(\n registry=docker_build.CacheToRegistryArgs(\n mode=docker_build.CacheMode.MAX,\n ref=\"docker.io/pulumi/pulumi:cache-amd64\",\n ),\n )],\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n platforms=[docker_build.Platform.LINUX_AMD64],\n tags=[\"docker.io/pulumi/pulumi:3.107.0-amd64\"])\narm64 = docker_build.Image(\"arm64\",\n cache_from=[docker_build.CacheFromArgs(\n registry=docker_build.CacheFromRegistryArgs(\n ref=\"docker.io/pulumi/pulumi:cache-arm64\",\n ),\n )],\n cache_to=[docker_build.CacheToArgs(\n registry=docker_build.CacheToRegistryArgs(\n mode=docker_build.CacheMode.MAX,\n ref=\"docker.io/pulumi/pulumi:cache-arm64\",\n ),\n )],\n context=docker_build.BuildContextArgs(\n location=\"app\",\n ),\n platforms=[docker_build.Platform.LINUX_ARM64],\n tags=[\"docker.io/pulumi/pulumi:3.107.0-arm64\"])\nindex = docker_build.Index(\"index\",\n sources=[\n amd64.ref,\n arm64.ref,\n ],\n tag=\"docker.io/pulumi/pulumi:3.107.0\")\npulumi.export(\"ref\", index.ref)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing DockerBuild = Pulumi.DockerBuild;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var amd64 = new DockerBuild.Image(\"amd64\", new()\n {\n CacheFrom = new[]\n {\n new DockerBuild.Inputs.CacheFromArgs\n {\n Registry = new DockerBuild.Inputs.CacheFromRegistryArgs\n {\n Ref = \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n },\n },\n CacheTo = new[]\n {\n new DockerBuild.Inputs.CacheToArgs\n {\n Registry = new DockerBuild.Inputs.CacheToRegistryArgs\n {\n Mode = DockerBuild.CacheMode.Max,\n Ref = \"docker.io/pulumi/pulumi:cache-amd64\",\n },\n },\n },\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Platforms = new[]\n {\n DockerBuild.Platform.Linux_amd64,\n },\n Tags = new[]\n {\n \"docker.io/pulumi/pulumi:3.107.0-amd64\",\n },\n });\n\n var arm64 = new DockerBuild.Image(\"arm64\", new()\n {\n CacheFrom = new[]\n {\n new DockerBuild.Inputs.CacheFromArgs\n {\n Registry = new DockerBuild.Inputs.CacheFromRegistryArgs\n {\n Ref = \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n },\n },\n CacheTo = new[]\n {\n new DockerBuild.Inputs.CacheToArgs\n {\n Registry = new DockerBuild.Inputs.CacheToRegistryArgs\n {\n Mode = DockerBuild.CacheMode.Max,\n Ref = \"docker.io/pulumi/pulumi:cache-arm64\",\n },\n },\n },\n Context = new DockerBuild.Inputs.BuildContextArgs\n {\n Location = \"app\",\n },\n Platforms = new[]\n {\n DockerBuild.Platform.Linux_arm64,\n },\n Tags = new[]\n {\n \"docker.io/pulumi/pulumi:3.107.0-arm64\",\n },\n });\n\n var index = new DockerBuild.Index(\"index\", new()\n {\n Sources = new[]\n {\n amd64.Ref,\n arm64.Ref,\n },\n Tag = \"docker.io/pulumi/pulumi:3.107.0\",\n });\n\n return new Dictionary\u003cstring, object?\u003e\n {\n [\"ref\"] = index.Ref,\n };\n});\n\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tamd64, err := dockerbuild.NewImage(ctx, \"amd64\", \u0026dockerbuild.ImageArgs{\n\t\t\tCacheFrom: dockerbuild.CacheFromArray{\n\t\t\t\t\u0026dockerbuild.CacheFromArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheFromRegistryArgs{\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-amd64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCacheTo: dockerbuild.CacheToArray{\n\t\t\t\t\u0026dockerbuild.CacheToArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheToRegistryArgs{\n\t\t\t\t\t\tMode: dockerbuild.CacheModeMax,\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-amd64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPlatforms: docker - build.PlatformArray{\n\t\t\t\tdockerbuild.Platform_Linux_amd64,\n\t\t\t},\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"docker.io/pulumi/pulumi:3.107.0-amd64\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tarm64, err := dockerbuild.NewImage(ctx, \"arm64\", \u0026dockerbuild.ImageArgs{\n\t\t\tCacheFrom: dockerbuild.CacheFromArray{\n\t\t\t\t\u0026dockerbuild.CacheFromArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheFromRegistryArgs{\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-arm64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tCacheTo: dockerbuild.CacheToArray{\n\t\t\t\t\u0026dockerbuild.CacheToArgs{\n\t\t\t\t\tRegistry: \u0026dockerbuild.CacheToRegistryArgs{\n\t\t\t\t\t\tMode: dockerbuild.CacheModeMax,\n\t\t\t\t\t\tRef: pulumi.String(\"docker.io/pulumi/pulumi:cache-arm64\"),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tContext: \u0026dockerbuild.BuildContextArgs{\n\t\t\t\tLocation: pulumi.String(\"app\"),\n\t\t\t},\n\t\t\tPlatforms: docker - build.PlatformArray{\n\t\t\t\tdockerbuild.Platform_Linux_arm64,\n\t\t\t},\n\t\t\tTags: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"docker.io/pulumi/pulumi:3.107.0-arm64\"),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tindex, err := dockerbuild.NewIndex(ctx, \"index\", \u0026dockerbuild.IndexArgs{\n\t\t\tSources: pulumi.StringArray{\n\t\t\t\tamd64.Ref,\n\t\t\t\tarm64.Ref,\n\t\t\t},\n\t\t\tTag: pulumi.String(\"docker.io/pulumi/pulumi:3.107.0\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tctx.Export(\"ref\", index.Ref)\n\t\treturn nil\n\t})\n}\n```\n```yaml\ndescription: Multi-platform registry caching\nname: registry-caching\noutputs:\n ref: ${index.ref}\nresources:\n amd64:\n properties:\n cacheFrom:\n - registry:\n ref: docker.io/pulumi/pulumi:cache-amd64\n cacheTo:\n - registry:\n mode: max\n ref: docker.io/pulumi/pulumi:cache-amd64\n context:\n location: app\n platforms:\n - linux/amd64\n tags:\n - docker.io/pulumi/pulumi:3.107.0-amd64\n type: docker-build:Image\n arm64:\n properties:\n cacheFrom:\n - registry:\n ref: docker.io/pulumi/pulumi:cache-arm64\n cacheTo:\n - registry:\n mode: max\n ref: docker.io/pulumi/pulumi:cache-arm64\n context:\n location: app\n platforms:\n - linux/arm64\n tags:\n - docker.io/pulumi/pulumi:3.107.0-arm64\n type: docker-build:Image\n index:\n properties:\n sources:\n - ${amd64.ref}\n - ${arm64.ref}\n tag: docker.io/pulumi/pulumi:3.107.0\n type: docker-build:Index\nruntime: yaml\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.dockerbuild.Image;\nimport com.pulumi.dockerbuild.ImageArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromArgs;\nimport com.pulumi.dockerbuild.inputs.CacheFromRegistryArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToArgs;\nimport com.pulumi.dockerbuild.inputs.CacheToRegistryArgs;\nimport com.pulumi.dockerbuild.inputs.BuildContextArgs;\nimport com.pulumi.dockerbuild.Index;\nimport com.pulumi.dockerbuild.IndexArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var amd64 = new Image(\"amd64\", ImageArgs.builder() \n .cacheFrom(CacheFromArgs.builder()\n .registry(CacheFromRegistryArgs.builder()\n .ref(\"docker.io/pulumi/pulumi:cache-amd64\")\n .build())\n .build())\n .cacheTo(CacheToArgs.builder()\n .registry(CacheToRegistryArgs.builder()\n .mode(\"max\")\n .ref(\"docker.io/pulumi/pulumi:cache-amd64\")\n .build())\n .build())\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .platforms(\"linux/amd64\")\n .tags(\"docker.io/pulumi/pulumi:3.107.0-amd64\")\n .build());\n\n var arm64 = new Image(\"arm64\", ImageArgs.builder() \n .cacheFrom(CacheFromArgs.builder()\n .registry(CacheFromRegistryArgs.builder()\n .ref(\"docker.io/pulumi/pulumi:cache-arm64\")\n .build())\n .build())\n .cacheTo(CacheToArgs.builder()\n .registry(CacheToRegistryArgs.builder()\n .mode(\"max\")\n .ref(\"docker.io/pulumi/pulumi:cache-arm64\")\n .build())\n .build())\n .context(BuildContextArgs.builder()\n .location(\"app\")\n .build())\n .platforms(\"linux/arm64\")\n .tags(\"docker.io/pulumi/pulumi:3.107.0-arm64\")\n .build());\n\n var index = new Index(\"index\", IndexArgs.builder() \n .sources( \n amd64.ref(),\n arm64.ref())\n .tag(\"docker.io/pulumi/pulumi:3.107.0\")\n .build());\n\n ctx.export(\"ref\", index.ref());\n }\n}\n```\n{{% /example %}}\n{{% /examples %}}", + "properties": { + "push": { + "type": "boolean", + "description": "If true, push the index to the target registry.\n\nDefaults to `true`.", + "default": true + }, + "ref": { + "type": "string", + "description": "The pushed tag with digest.\n\nIdentical to the tag if the index was not pushed." + }, + "registry": { + "$ref": "#/types/docker-build:index:Registry", + "description": "Authentication for the registry where the tagged index will be pushed.\n\nCredentials can also be included with the provider's configuration." + }, + "sources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Existing images to include in the index." + }, + "tag": { + "type": "string", + "description": "The tag to apply to the index." + } + }, + "type": "object", + "required": [ + "ref", + "sources", + "tag" + ], + "inputProperties": { + "push": { + "type": "boolean", + "description": "If true, push the index to the target registry.\n\nDefaults to `true`.", + "default": true + }, + "registry": { + "$ref": "#/types/docker-build:index:Registry", + "description": "Authentication for the registry where the tagged index will be pushed.\n\nCredentials can also be included with the provider's configuration." + }, + "sources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Existing images to include in the index." + }, + "tag": { + "type": "string", + "description": "The tag to apply to the index." + } + }, + "requiredInputs": [ + "sources", + "tag" ] } } diff --git a/provider/doc.go b/provider/doc.go new file mode 100644 index 0000000..995975c --- /dev/null +++ b/provider/doc.go @@ -0,0 +1,16 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package provider serves a Docker Buildx Pulumi provider. +package provider diff --git a/provider/internal/auth.go b/provider/internal/auth.go new file mode 100644 index 0000000..01b56d8 --- /dev/null +++ b/provider/internal/auth.go @@ -0,0 +1,31 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import "github.com/pulumi/pulumi-go-provider/infer" + +// Registry contains credentials for authenticating with a remote registry. +type Registry struct { + Address string `pulumi:"address"` + Password string `pulumi:"password,optional" provider:"secret"` + Username string `pulumi:"username,optional"` +} + +// Annotate sets docstrings on Registry. +func (r *Registry) Annotate(a infer.Annotator) { + a.Describe(&r.Address, `The registry's address (e.g. "docker.io").`) + a.Describe(&r.Username, `Username for the registry.`) + a.Describe(&r.Password, `Password or token for the registry.`) +} diff --git a/provider/internal/builder.go b/provider/internal/builder.go new file mode 100644 index 0000000..406a1e6 --- /dev/null +++ b/provider/internal/builder.go @@ -0,0 +1,38 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "github.com/pulumi/pulumi-go-provider/infer" +) + +var _ infer.Annotated = (*BuilderConfig)(nil) + +// BuilderConfig configures the builder to use for an image build. +type BuilderConfig struct { + Name string `pulumi:"name,optional"` +} + +// Annotate sets docstrings on BuilderConfig. +func (b *BuilderConfig) Annotate(a infer.Annotator) { + a.Describe(&b.Name, dedent(` + Name of an existing buildx builder to use. + + Only "docker-container", "kubernetes", or "remote" drivers are + supported. The legacy "docker" driver is not supported. + + Equivalent to Docker's "--builder" flag. + `)) +} diff --git a/provider/internal/cache.go b/provider/internal/cache.go new file mode 100644 index 0000000..471d10d --- /dev/null +++ b/provider/internal/cache.go @@ -0,0 +1,746 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "errors" + "fmt" + "strings" + + controllerapi "github.com/docker/buildx/controller/pb" + "github.com/docker/buildx/util/buildflags" + + "github.com/pulumi/pulumi-go-provider/infer" +) + +var ( + _ fmt.Stringer = (*CacheFrom)(nil) + _ fmt.Stringer = (*CacheFromAzureBlob)(nil) + _ fmt.Stringer = (*CacheFromGitHubActions)(nil) + _ fmt.Stringer = (*CacheFromLocal)(nil) + _ fmt.Stringer = (*CacheFromRegistry)(nil) + _ fmt.Stringer = (*CacheFromS3)(nil) + _ fmt.Stringer = (*CacheTo)(nil) + _ fmt.Stringer = (*CacheToAzureBlob)(nil) + _ fmt.Stringer = (*CacheToGitHubActions)(nil) + _ fmt.Stringer = (*CacheToInline)(nil) + _ fmt.Stringer = (*CacheToLocal)(nil) + _ fmt.Stringer = (*CacheToRegistry)(nil) + _ fmt.Stringer = (*CacheToS3)(nil) + _ fmt.Stringer = CacheWithCompression{} + _ fmt.Stringer = CacheWithIgnoreError{} + _ fmt.Stringer = CacheWithMode{} + _ fmt.Stringer = CacheWithOCI{} + _ infer.Annotated = (*CacheFrom)(nil) + _ infer.Annotated = (*CacheFromAzureBlob)(nil) + _ infer.Annotated = (*CacheFromGitHubActions)(nil) + _ infer.Annotated = (*CacheFromLocal)(nil) + _ infer.Annotated = (*CacheFromRegistry)(nil) + _ infer.Annotated = (*CacheFromS3)(nil) + _ infer.Annotated = (*CacheTo)(nil) + _ infer.Annotated = (*CacheToInline)(nil) + _ infer.Annotated = (*CacheToLocal)(nil) + _ infer.Annotated = (*CacheWithCompression)(nil) + _ infer.Annotated = (*CacheWithIgnoreError)(nil) + _ infer.Annotated = (*CacheWithMode)(nil) + _ infer.Annotated = (*CacheWithOCI)(nil) + _ infer.Enum[CacheMode] = (*CacheMode)(nil) + _ infer.Enum[CompressionType] = (*CompressionType)(nil) +) + +// CacheFromLocal pulls cache manifests from a local directory. +type CacheFromLocal struct { + Src string `pulumi:"src"` + Digest string `pulumi:"digest,optional"` +} + +// String returns the CLI-encoded value of these cache options, or an empty +// string if the receiver is nil. +func (c *CacheFromLocal) String() string { + if c == nil { + return "" + } + parts := []string{"type=local"} + if c.Src != "" { + parts = append(parts, "src="+c.Src) + } + if c.Digest != "" { + parts = append(parts, "digest="+c.Digest) + } + return strings.Join(parts, ",") +} + +// Annotate sets docstrings on CacheFromLocal. +func (c *CacheFromLocal) Annotate(a infer.Annotator) { + a.Describe(&c.Src, "Path of the local directory where cache gets imported from.") + a.Describe(&c.Digest, "Digest of manifest to import.") +} + +// CacheFromRegistry pulls cache manifests from a registry ref. +type CacheFromRegistry struct { + Ref string `pulumi:"ref"` +} + +// Annotate sets docstrings on CacheFromRegistry. +func (c *CacheFromRegistry) Annotate(a infer.Annotator) { + a.Describe(&c.Ref, "Fully qualified name of the cache image to import.") +} + +// String returns the CLI-encoded value of these cache options, or an empty +// string if the receiver is nil. +func (c *CacheFromRegistry) String() string { + if c == nil { + return "" + } + return "type=registry,ref=" + c.Ref +} + +// CacheWithOCI exposes OCI media type options. +type CacheWithOCI struct { + OCI *bool `pulumi:"ociMediaTypes,optional"` + ImageManifest *bool `pulumi:"imageManifest,optional"` +} + +// Annotate sets docstrings on CacheWithOCI. +func (c *CacheWithOCI) Annotate(a infer.Annotator) { + a.Describe(&c.OCI, dedent(` + Whether to use OCI media types in exported manifests. Defaults to + "true". + `)) + a.Describe(&c.ImageManifest, dedent(` + Export cache manifest as an OCI-compatible image manifest instead of a + manifest list. Requires "ociMediaTypes" to also be "true". + + Some registries like AWS ECR will not work with caching if this is + "false". + + Defaults to "false" to match Docker's default behavior. + `)) + + a.SetDefault(&c.OCI, true) + a.SetDefault(&c.ImageManifest, false) +} + +// String returns the CLI-encoded value of these cache options, or an empty +// string if unknown. +func (c CacheWithOCI) String() string { + if c.OCI == nil { + return "" + } + parts := []string{fmt.Sprintf("oci-mediatypes=%t", *c.OCI)} + if c.ImageManifest != nil { + parts = append(parts, fmt.Sprintf("image-manifest=%t", *c.ImageManifest)) + } + return strings.Join(parts, ",") +} + +// CacheFromGitHubActions pulls cache manifests from the GitHub actions cache. +type CacheFromGitHubActions struct { + URL string `pulumi:"url,optional"` + Token string `pulumi:"token,optional" provider:"secret"` + Scope string `pulumi:"scope,optional"` +} + +// Annotate sets docstrings on CacheFromGitHubActions. +func (c *CacheFromGitHubActions) Annotate(a infer.Annotator) { + a.SetDefault(&c.URL, "", "ACTIONS_RUNTIME_URL") + a.SetDefault(&c.Token, "", "ACTIONS_RUNTIME_TOKEN") + a.SetDefault(&c.Scope, "", "buildkit") + + a.Describe(&c.URL, dedent(` + The cache server URL to use for artifacts. + + Defaults to "$ACTIONS_RUNTIME_URL", although a separate action like + "crazy-max/ghaction-github-runtime" is recommended to expose this + environment variable to your jobs. + `)) + a.Describe(&c.Token, dedent(` + The GitHub Actions token to use. This is not a personal access tokens + and is typically generated automatically as part of each job. + + Defaults to "$ACTIONS_RUNTIME_TOKEN", although a separate action like + "crazy-max/ghaction-github-runtime" is recommended to expose this + environment variable to your jobs. + + `)) + a.Describe(&c.Scope, dedent(` + The scope to use for cache keys. Defaults to "buildkit". + + This should be set if building and caching multiple images in one + workflow, otherwise caches will overwrite each other. + `)) +} + +func (c *CacheFromGitHubActions) String() string { + if c == nil { + return "" + } + parts := []string{"type=gha"} + if c.Scope != "" { + parts = append(parts, "scope="+c.Scope) + } + if c.Token != "" { + parts = append(parts, "token="+c.Token) + } + if c.URL != "" { + parts = append(parts, "url="+c.URL) + } + return strings.Join(parts, ",") +} + +// CacheFromAzureBlob pulls cache manifests from Azure +// blob storage. +type CacheFromAzureBlob struct { + Name string `pulumi:"name"` + AccountURL string `pulumi:"accountUrl,optional"` + SecretAccessKey string `pulumi:"secretAccessKey,optional" provider:"secret"` +} + +// String returns the CLI-encoded value of these cache options, or an empty +// string if the receiver is nil. +func (c *CacheFromAzureBlob) String() string { + if c == nil { + return "" + } + parts := []string{"type=azblob"} + if c.Name != "" { + parts = append(parts, "name="+c.Name) + } + if c.AccountURL != "" { + parts = append(parts, "account_url="+c.AccountURL) + } + if c.SecretAccessKey != "" { + parts = append(parts, "secret_access_key="+c.SecretAccessKey) + } + return strings.Join(parts, ",") +} + +// Annotate sets docstrings on CacheFromAzureBlob. +func (c *CacheFromAzureBlob) Annotate(a infer.Annotator) { + a.Describe(&c.Name, "The name of the cache image.") + a.Describe(&c.AccountURL, "Base URL of the storage account.") + a.Describe(&c.SecretAccessKey, "Blob storage account key.") +} + +// CacheToAzureBlob pushes cache manifests to Azure blob storage. +type CacheToAzureBlob struct { + CacheWithMode + CacheWithIgnoreError + + CacheFromAzureBlob +} + +func (c *CacheToAzureBlob) String() string { + if c == nil { + return "" + } + return join(&c.CacheFromAzureBlob, c.CacheWithMode, c.CacheWithIgnoreError) +} + +// CacheFromS3 pulls cache manifests from S3-compatible APIs. +type CacheFromS3 struct { + Region string `pulumi:"region"` + Bucket string `pulumi:"bucket"` + Name string `pulumi:"name,optional"` + EndpointURL string `pulumi:"endpointUrl,optional"` + BlobsPrefix string `pulumi:"blobsPrefix,optional"` + ManifestsPrefix string `pulumi:"manifestsPrefix,optional"` + UsePathStyle *bool `pulumi:"usePathStyle,optional"` + AccessKeyID string `pulumi:"accessKeyId,optional"` + SecretAccessKey string `pulumi:"secretAccessKey,optional" provider:"secret"` + SessionToken string `pulumi:"sessionToken,optional" provider:"secret"` +} + +// Annotate sets docstrings and defaults on CacheFromS3. +func (c *CacheFromS3) Annotate(a infer.Annotator) { + a.SetDefault(&c.Region, "", "AWS_REGION") + a.SetDefault(&c.AccessKeyID, "", "AWS_ACCESS_KEY_ID") + a.SetDefault(&c.SecretAccessKey, "", "AWS_SECRET_ACCESS_KEY") + a.SetDefault(&c.SessionToken, "", "AWS_SESSION_TOKEN") + + a.Describe(&c.Bucket, dedent(` + Name of the S3 bucket. + `)) + a.Describe(&c.Region, dedent(` + The geographic location of the bucket. Defaults to "$AWS_REGION". + `)) + a.Describe(&c.AccessKeyID, dedent(` + Defaults to "$AWS_ACCESS_KEY_ID". + `)) + a.Describe(&c.SecretAccessKey, dedent(` + Defaults to "$AWS_SECRET_ACCESS_KEY". + `)) + a.Describe(&c.SessionToken, dedent(` + Defaults to "$AWS_SESSION_TOKEN". + `)) + a.Describe(&c.BlobsPrefix, dedent(` + Prefix to prepend to blob filenames. + `)) + a.Describe(&c.EndpointURL, dedent(` + Endpoint of the S3 bucket. + `)) + a.Describe(&c.ManifestsPrefix, dedent(` + Prefix to prepend on manifest filenames. + `)) + a.Describe(&c.Name, dedent(` + Name of the cache image. + `)) + a.Describe(&c.UsePathStyle, dedent(` + Uses "bucket" in the URL instead of hostname when "true". + `)) +} + +// String returns the CLI-encoded value of these cache options, or an empty +// string if the receiver is nil. +func (c *CacheFromS3) String() string { + if c == nil { + return "" + } + parts := []string{"type=s3"} + if c.Bucket != "" { + parts = append(parts, "bucket="+c.Bucket) + } + if c.Name != "" { + parts = append(parts, "name="+c.Name) + } + if c.EndpointURL != "" { + parts = append(parts, "endpoint_url="+c.EndpointURL) + } + if c.BlobsPrefix != "" { + parts = append(parts, "blobs_prefix="+c.BlobsPrefix) + } + if c.ManifestsPrefix != "" { + parts = append(parts, "manifests_prefix="+c.ManifestsPrefix) + } + if c.UsePathStyle != nil { + parts = append(parts, fmt.Sprintf("use_path_type=%t", *c.UsePathStyle)) + } + if c.AccessKeyID != "" { + parts = append(parts, "access_key_id="+c.AccessKeyID) + } + if c.SecretAccessKey != "" { + parts = append(parts, "secret_access_key="+c.SecretAccessKey) + } + if c.SessionToken != "" { + parts = append(parts, "session_token="+c.SessionToken) + } + + return strings.Join(parts, ",") +} + +// CacheWithMode is a cache that can configure its mode. +type CacheWithMode struct { + Mode *CacheMode `pulumi:"mode,optional"` +} + +// Annotate sets docstrings and defaults on CacheWithMode. +func (c *CacheWithMode) Annotate(a infer.Annotator) { + m := Min + a.SetDefault(&c.Mode, &m) + a.Describe(&c.Mode, dedent(` + The cache mode to use. Defaults to "min". + `)) +} + +func (c CacheWithMode) String() string { + if c.Mode == nil { + return "" + } + return fmt.Sprintf("mode=%s", *c.Mode) +} + +// CacheWithIgnoreError exposes an option to ignore errors during caching. +type CacheWithIgnoreError struct { + IgnoreError *bool `pulumi:"ignoreError,optional"` +} + +// Annotate sets docstrings and defaults on CacheWithIgnoreError. +func (c *CacheWithIgnoreError) Annotate(a infer.Annotator) { + a.SetDefault(&c.IgnoreError, false) + a.Describe(&c.IgnoreError, "Ignore errors caused by failed cache exports.") +} + +func (c CacheWithIgnoreError) String() string { + if c.IgnoreError == nil { + return "" + } + return fmt.Sprintf("ignore-error=%t", *c.IgnoreError) +} + +// CacheToS3 pushes cache manifests to an S3-compatible API. +type CacheToS3 struct { + CacheWithMode + CacheWithIgnoreError + + CacheFromS3 +} + +// String returns the CLI-encoded value of these cache options, or an empty +// string if the receiver is nil. +func (c *CacheToS3) String() string { + if c == nil { + return "" + } + return join(&c.CacheFromS3, c.CacheWithMode, c.CacheWithIgnoreError) +} + +// Raw is a CLI-encoded cache entry appropriate for passing directly to the +// CLI. Useful if the Docker backend supports cache types not captured by our +// API, or if the user just prefers "type=..." inputs. +type Raw string + +// String return the raw string as-is. This can be empty during previews where +// the user has provided a value but it is unknown. +func (c Raw) String() string { + return string(c) +} + +// CacheFrom is a "union" type for all of our available `--cache-from` options. +type CacheFrom struct { + Local *CacheFromLocal `pulumi:"local,optional"` + Registry *CacheFromRegistry `pulumi:"registry,optional"` + GHA *CacheFromGitHubActions `pulumi:"gha,optional"` + AZBlob *CacheFromAzureBlob `pulumi:"azblob,optional"` + S3 *CacheFromS3 `pulumi:"s3,optional"` + Raw Raw `pulumi:"raw,optional"` + + Disabled bool `pulumi:"disabled,optional"` +} + +// Annotate sets docstrings and defaults on CacheFrom. +func (c *CacheFrom) Annotate(a infer.Annotator) { + a.Describe(&c.Local, dedent(` + A simple backend which caches images on your local filesystem. + `)) + a.Describe(&c.Registry, dedent(` + Upload build caches to remote registries. + `)) + a.Describe(&c.GHA, dedent(` + Recommended for use with GitHub Actions workflows. + + An action like "crazy-max/ghaction-github-runtime" is recommended to + expose appropriate credentials to your GitHub workflow. + `)) + a.Describe(&c.AZBlob, dedent(` + Upload build caches to Azure's blob storage service. + `)) + a.Describe(&c.S3, dedent(` + Upload build caches to AWS S3 or an S3-compatible services such as + MinIO. + `)) + a.Describe(&c.Raw, dedent(` + A raw string as you would provide it to the Docker CLI (e.g., + "type=inline"). + `)) + + a.Describe(&c.Disabled, dedent(` + When "true" this entry will be excluded. Defaults to "false". + `)) +} + +// String returns a CLI-encoded value for this `--cache-from` entry, or an +// empty string if disabled. `validate` should be called to ensure only one +// entry was set. +func (c CacheFrom) String() string { + if c.Disabled { + return "" + } + return join(c.Local, c.Registry, c.GHA, c.AZBlob, c.S3, c.Raw) +} + +func (c CacheFrom) validate(preview bool) (*controllerapi.CacheOptionsEntry, error) { + if strings.Count(c.String(), "type=") > 1 { + return nil, errors.New("cacheFrom should only specify one cache type") + } + parsed, err := buildflags.ParseCacheEntry([]string{c.String()}) + if err != nil { + return nil, err + } + if len(parsed) == 0 { + // This can happen for example if we have a GHA cache but no GitHub + // environment variables set. + // Shouldn't happen... + return nil, nil + } + return parsed[0], nil +} + +// CacheToInline embeds cache information directly into an image. +type CacheToInline struct{} + +// String returns the CLI-encoded value of these cache options, or an empty +// string if unknown. +func (c *CacheToInline) String() string { + if c == nil { + return "" + } + return "type=inline" +} + +// Annotate sets docstrings on CacheToInline. +func (c *CacheToInline) Annotate(a infer.Annotator) { + a.Describe(&c, dedent(` + Include an inline cache with the exported image. + `)) +} + +// CacheToLocal writes cache manifests to a local directory. +type CacheToLocal struct { + CacheWithCompression + CacheWithIgnoreError + CacheWithMode + + Dest string `pulumi:"dest"` +} + +// Annotate sets docstrings on CacheToLocal. +func (c *CacheToLocal) Annotate(a infer.Annotator) { + a.Describe(&c.Dest, dedent(` + Path of the local directory to export the cache. + `)) +} + +// String returns the CLI-encoded value of these cache options, or an empty +// string if the receiver is nil. +func (c *CacheToLocal) String() string { + if c == nil { + return "" + } + return join( + Raw("type=local,dest="+c.Dest), + c.CacheWithCompression, + c.CacheWithIgnoreError, + ) +} + +// CacheToRegistry pushes cache manifests to a remote registry. +type CacheToRegistry struct { + CacheWithMode + CacheWithIgnoreError + CacheWithOCI + CacheWithCompression + + CacheFromRegistry +} + +// String returns the CLI-encoded value of these cache options, or an empty +// string if the receiver is nil. +func (c *CacheToRegistry) String() string { + if c == nil { + return "" + } + return join( + &c.CacheFromRegistry, + c.CacheWithMode, + c.CacheWithIgnoreError, + c.CacheWithOCI, + c.CacheWithCompression, + ) +} + +// CacheWithCompression is a cache with options to configure compression +// settings. +type CacheWithCompression struct { + Compression *CompressionType `pulumi:"compression,optional"` + CompressionLevel int `pulumi:"compressionLevel,optional"` + ForceCompression *bool `pulumi:"forceCompression,optional"` +} + +// Annotate sets docstrings and defaults on CacheWithCompression. +func (c *CacheWithCompression) Annotate(a infer.Annotator) { + gz := Gzip + a.SetDefault(&c.Compression, &gz) + a.SetDefault(&c.CompressionLevel, 0) + a.SetDefault(&c.ForceCompression, false) + + a.Describe(&c.Compression, "The compression type to use.") + a.Describe(&c.CompressionLevel, "Compression level from 0 to 22.") + a.Describe(&c.ForceCompression, "Forcefully apply compression.") +} + +// String returns the CLI-encoded value of these cache options, or an empty +// string if the receiver is nil. +func (c CacheWithCompression) String() string { + if c.CompressionLevel == 0 { + return "" + } + parts := []string{} + if c.Compression != nil { + parts = append(parts, fmt.Sprintf("compression=%s", *c.Compression)) + } + if c.CompressionLevel > 0 { + cl := c.CompressionLevel + if cl > 22 { + cl = 22 + } + parts = append(parts, fmt.Sprintf("compression-level=%d", cl)) + } + if c.ForceCompression != nil { + parts = append(parts, fmt.Sprintf("force-compression=%t", *c.ForceCompression)) + } + return strings.Join(parts, ",") +} + +// CacheToGitHubActions pushes cache manifests to the GitHub Actions cache +// backend. +type CacheToGitHubActions struct { + CacheWithMode + CacheWithIgnoreError + + CacheFromGitHubActions +} + +// String returns the CLI-encoded value of these cache options, or an empty +// string if the receiver is nil. +func (c *CacheToGitHubActions) String() string { + if c == nil { + return "" + } + return join(&c.CacheFromGitHubActions, c.CacheWithMode, c.CacheWithIgnoreError) +} + +// CacheTo is a "union" type for all of our available `--cache-to` options. +type CacheTo struct { + Inline *CacheToInline `pulumi:"inline,optional"` + Local *CacheToLocal `pulumi:"local,optional"` + Registry *CacheToRegistry `pulumi:"registry,optional"` + GHA *CacheToGitHubActions `pulumi:"gha,optional"` + AZBlob *CacheToAzureBlob `pulumi:"azblob,optional"` + S3 *CacheToS3 `pulumi:"s3,optional"` + Raw Raw `pulumi:"raw,optional"` + + Disabled bool `pulumi:"disabled,optional"` +} + +// Annotate sets docstrings and defaults on CacheTo. +func (c *CacheTo) Annotate(a infer.Annotator) { + a.Describe(&c.Inline, dedent(` + The inline cache storage backend is the simplest implementation to get + started with, but it does not handle multi-stage builds. Consider the + "registry" cache backend instead. + `)) + a.Describe(&c.Local, dedent(` + A simple backend which caches imagines on your local filesystem. + `)) + a.Describe(&c.Registry, dedent(` + Push caches to remote registries. Incompatible with the "docker" build + driver. + `)) + a.Describe(&c.GHA, dedent(` + Recommended for use with GitHub Actions workflows. + + An action like "crazy-max/ghaction-github-runtime" is recommended to + expose appropriate credentials to your GitHub workflow. + `)) + a.Describe(&c.AZBlob, dedent(` + Push cache to Azure's blob storage service. + `)) + a.Describe(&c.S3, dedent(` + Push cache to AWS S3 or S3-compatible services such as MinIO. + `)) + a.Describe(&c.Raw, dedent(` + A raw string as you would provide it to the Docker CLI (e.g., + "type=inline")`, + )) + + a.Describe(&c.Disabled, dedent(` + When "true" this entry will be excluded. Defaults to "false". + `)) +} + +// String returns a CLI-encoded value for this `--cache-to` entry, or an +// empty string if disabled. `validate` should be called to ensure only one +// entry was set. +func (c CacheTo) String() string { + if c.Disabled { + return "" + } + return join(c.Inline, c.Local, c.Registry, c.GHA, c.AZBlob, c.S3, c.Raw) +} + +func (c CacheTo) validate(preview bool) (*controllerapi.CacheOptionsEntry, error) { + if strings.Count(c.String(), "type=") > 1 { + return nil, errors.New("cacheTo should only specify one cache type") + } + parsed, err := buildflags.ParseCacheEntry([]string{c.String()}) + if err != nil { + return nil, err + } + if len(parsed) == 0 { + // This can happen for example if we have a GHA cache but no GitHub + // environment variables set. + // Shouldn't happen... + return nil, nil + } + return parsed[0], nil +} + +// CacheMode controls the complexity of exported cache manifests. +type CacheMode string + +const ( + Min CacheMode = "min" // Min cache mode. + Max CacheMode = "max" // Max cache mode. +) + +// Values returns all valid CacheMode values for SDK generation. +func (CacheMode) Values() []infer.EnumValue[CacheMode] { + return []infer.EnumValue[CacheMode]{ + { + Value: Min, + Description: "Only layers that are exported into the resulting image are cached.", + }, + { + Value: Max, + Description: "All layers are cached, even those of intermediate steps.", + }, + } +} + +// CompressionType is the algorithm used for compressing blobs. +type CompressionType string + +const ( + Gzip CompressionType = "gzip" // Gzip compression. + Estargz CompressionType = "estargz" // Estargz compression. + Zstd CompressionType = "zstd" // Zstd compression. +) + +// Values returns all valid CompressionType values for SDK generation. +func (CompressionType) Values() []infer.EnumValue[CompressionType] { + return []infer.EnumValue[CompressionType]{ + {Value: Gzip, Description: "Use `gzip` for compression."}, + {Value: Estargz, Description: "Use `estargz` for compression."}, + {Value: Zstd, Description: "Use `zstd` for compression."}, + } +} + +type joiner struct{ sep string } + +func (j joiner) join(ss ...fmt.Stringer) string { + parts := []string{} + for _, s := range ss { + p := s.String() + if p == "" { + continue + } + parts = append(parts, p) + } + return strings.Join(parts, j.sep) +} + +func join(ss ...fmt.Stringer) string { + return joiner{","}.join(ss...) +} diff --git a/provider/internal/cache_test.go b/provider/internal/cache_test.go new file mode 100644 index 0000000..ad5dc79 --- /dev/null +++ b/provider/internal/cache_test.go @@ -0,0 +1,139 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "fmt" + "testing" + + "github.com/docker/buildx/util/buildflags" + "github.com/stretchr/testify/assert" + + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func TestCacheString(t *testing.T) { + t.Parallel() + gzip := Gzip + + tests := []struct { + name string + given fmt.Stringer + want string + }{ + { + name: "s3", + given: CacheTo{S3: &CacheToS3{ + CacheFromS3: CacheFromS3{ + Region: "us-west-2", + Bucket: "bucket-foo", + Name: "myname", + EndpointURL: "https://some.endpoint", + BlobsPrefix: "blob-prefix", + ManifestsPrefix: "manifest-prefix", + UsePathStyle: pulumi.BoolRef(true), + AccessKeyID: "access-key-id", + SecretAccessKey: "secret-key", + SessionToken: "session", + }, + }}, + //nolint:lll // Taken from AWS reference docs. + want: "type=s3,bucket=bucket-foo,name=myname,endpoint_url=https://some.endpoint,blobs_prefix=blob-prefix,manifests_prefix=manifest-prefix,use_path_type=true,access_key_id=access-key-id,secret_access_key=secret-key,session_token=session", + }, + { + name: "gha", + given: CacheTo{GHA: &CacheToGitHubActions{}}, + want: "type=gha", + }, + { + name: "from-local", + given: CacheFrom{Local: &CacheFromLocal{Src: "/foo/bar"}}, + want: "type=local,src=/foo/bar", + }, + { + name: "to-local", + given: CacheTo{Local: &CacheToLocal{Dest: "/foo/bar"}}, + want: "type=local,dest=/foo/bar", + }, + { + name: "inline", + given: CacheTo{Inline: &CacheToInline{}}, + want: "type=inline", + }, + { + name: "raw", + given: CacheTo{Raw: Raw("type=gha")}, + want: "type=gha", + }, + { + name: "compression", + given: CacheTo{Local: &CacheToLocal{ + Dest: "/foo", + CacheWithCompression: CacheWithCompression{ + Compression: &gzip, + CompressionLevel: 100, + ForceCompression: pulumi.BoolRef(true), + }, + }}, + want: "type=local,dest=/foo,compression=gzip,compression-level=22,force-compression=true", + }, + { + name: "ignore-error", + given: CacheTo{ + AZBlob: &CacheToAzureBlob{ + CacheWithIgnoreError: CacheWithIgnoreError{pulumi.BoolRef(true)}, + }, + }, + want: "type=azblob,ignore-error=true", + }, + { + name: "oci", + given: CacheTo{ + Registry: &CacheToRegistry{ + CacheFromRegistry: CacheFromRegistry{Ref: "docker.io/foo/bar:baz"}, + CacheWithOCI: CacheWithOCI{ + OCI: pulumi.BoolRef(true), + ImageManifest: pulumi.BoolRef(true), + }, + }, + }, + want: "type=registry,ref=docker.io/foo/bar:baz,oci-mediatypes=true,image-manifest=true", + }, + { + name: "disabled-to", + given: CacheTo{ + Raw: Raw("type=gha"), + Disabled: true, + }, + want: "", + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + actual := tt.given.String() + assert.Equal(t, tt.want, actual) + + if tt.want != "" { + // Our output should be parsable by Docker. + _, err := buildflags.ParseCacheEntry([]string{actual}) + assert.NoError(t, err) + } + }) + } +} diff --git a/provider/internal/cli.go b/provider/internal/cli.go new file mode 100644 index 0000000..bf58da4 --- /dev/null +++ b/provider/internal/cli.go @@ -0,0 +1,420 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate go run go.uber.org/mock/mockgen -typed -package internal -source cli.go -destination mockcli_test.go --self_package github.com/pulumi/pulumi-docker-build/provider/internal + +package internal + +import ( + "bufio" + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "os" + "path/filepath" + "strings" + + "github.com/docker/buildx/commands" + "github.com/docker/cli/cli-plugins/manager" + "github.com/docker/cli/cli/command" + "github.com/docker/cli/cli/config/credentials" + cfgtypes "github.com/docker/cli/cli/config/types" + "github.com/docker/cli/cli/streams" + "github.com/moby/buildkit/client" + cp "github.com/otiai10/copy" + "github.com/regclient/regclient" + "github.com/regclient/regclient/config" + "github.com/sirupsen/logrus" + + provider "github.com/pulumi/pulumi-go-provider" + "github.com/pulumi/pulumi/sdk/v3/go/common/diag" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource" + "github.com/pulumi/pulumi/sdk/v3/go/common/util/contract" +) + +// cli wraps a DockerCLI instance with scoped auth credentials. It satisfies +// the Cli interface so it can be used with Docker's cobra.Commands directly. +// +// It buffers stdout/stderr, and layers temporary auth configs on top of the +// host's existing auth. +type cli struct { + command.Cli + + auths map[string]cfgtypes.AuthConfig + host *host + + in string // stdin + r, w *os.File // stdout + err bytes.Buffer // stderr + dumplogs bool // if true then tail() will re-log status messages + done chan struct{} // signaled when all logs have been forwarded to the engine. +} + +// Cli wraps the Docker interface for mock generation. +type Cli interface { + command.Cli +} + +// wrap creates a new cli client with auth configs layered on top of our host's +// auth. Repeated auth for the same host will take precedence over earlier +// credentials. +func wrap(host *host, registries ...Registry) (*cli, error) { + // We need to create a new DockerCLI instance because we don't want the + // auth changes we make to the ConfigFile to leak to the host. + docker, err := newDockerCLI(host.config) + if err != nil { + return nil, err + } + + auths := map[string]cfgtypes.AuthConfig{} + for k, v := range host.auths { + if k != config.DockerRegistryAuth { + k = credentials.ConvertToHostname(k) + } + auths[k] = cfgtypes.AuthConfig{ + ServerAddress: v.ServerAddress, + Username: v.Username, + Password: v.Password, + } + } + + for _, r := range registries { + // HostNewName takes care of DockerHub's special-casing for us. + h := config.HostNewName(credentials.ConvertToHostname(r.Address)) + key := h.CredHost + if key == "" { + key = h.Hostname + } + + auths[key] = cfgtypes.AuthConfig{ + ServerAddress: h.Hostname, + Username: r.Username, + Password: r.Password, + } + } + + // Override our config's auth and disable any credential helpers. Auth + // lookups will now only return whatever we have in memory. + cfg := docker.ConfigFile() + cfg.AuthConfigs = auths + cfg.CredentialHelpers = nil + cfg.CredentialsStore = "" + + r, w, err := os.Pipe() + if err != nil { + return nil, err + } + + wrapped := &cli{ + Cli: docker, + host: host, + auths: auths, + r: r, + w: w, + } + + return wrapped, nil +} + +func (c *cli) In() *streams.In { + return streams.NewIn(io.NopCloser(strings.NewReader(c.in))) +} + +func (c *cli) Out() *streams.Out { + return streams.NewOut(c.w) +} + +func (c *cli) Err() io.Writer { + return &c.err +} + +// rc returns a registry client with matching auth. +func (c *cli) rc() *regclient.RegClient { + hosts := []config.Host{} + for k, v := range c.auths { + h := config.HostNewName(k) + h.User = v.Username + h.Pass = v.Password + hosts = append(hosts, *h) + } + return regclient.New( + regclient.WithConfigHost(hosts...), + ) +} + +// tail is meant to be called as a goroutine and will pipe output from the CLI +// back to the Pulumi engine. Requires a corresponding call to close. +func (c *cli) tail(ctx provider.Context) { + c.done = make(chan struct{}, 1) + defer func() { + c.done <- struct{}{} + if err := recover(); err != nil { + fmt.Fprintf(os.Stderr, "recovered: %s\n", err) + } + }() + + b := bytes.Buffer{} + + s := bufio.NewScanner(c.r) + for s.Scan() { + text := s.Text() + ctx.LogStatus(diag.Info, text) + _, _ = b.WriteString(text + "\n") + } + ctx.LogStatus(diag.Info, "") // clear confusing "DONE" statements. + + if c.dumplogs { + // Persist the full Docker output on error for easier debugging. + if b.Len() > 0 { + ctx.Log(diag.Info, b.String()) + } + if c.err.Len() > 0 { + ctx.Log(diag.Error, c.err.String()) + } + } +} + +// close flushes any outstanding logs and cleans up resources. +func (c *cli) Close() error { + err := errors.Join(c.w.Close(), c.r.Close()) + if c.done != nil { + <-c.done + } + return err +} + +// execBuild performs a build by os.Exec'ing the docker-buildx binary. +// Credentials are communicated to docker-buildx via a temporary directory. +// Secrets are communicated via dynamic environment variables. +func (c *cli) execBuild(b Build) (*client.SolveResponse, error) { + // Setup a temporary directory for auth, and clean it up when we're done. + tmp, err := os.MkdirTemp("", "pulumi-docker-") + if err != nil { + return nil, err + } + defer contract.IgnoreError(os.RemoveAll(tmp)) + + opts := b.BuildOptions() + + builder, err := c.host.builderFor(b) + if err != nil { + return nil, err + } + + // Docker expects a "$DOCKER_CONFIG/contexts" directory in addition to + // "$DOCKER_CONFIG/config.json", so we attempt to copy this from the host + // to our temporary directory. This doesn't always exist, so we ignore errors. + hostConfigDir := filepath.Dir(c.ConfigFile().Filename) + _ = cp.Copy( + filepath.Join(hostConfigDir, "contexts"), + filepath.Join(tmp, "contexts"), + ) + + // Save our temporary credentials to $tmp/config.json. + tmpCfg := filepath.Join(tmp, filepath.Base(c.ConfigFile().Filename)) + c.ConfigFile().Filename = tmpCfg + err = c.ConfigFile().Save() + if err != nil { + return nil, err + } + + // We will spawn docker-buildx with DOCKER_CONFIG set to our temporary + // directory for auth, but BUILDX_CONFIG will point to the host. There's a + // bunch of builder state in there that we want to preserve. + env := []string{ + "DOCKER_CONFIG=" + tmp, + "BUILDX_CONFIG=" + filepath.Join(hostConfigDir, "buildx"), + } + + // We need to write to this file in order to recover information about the + // build, like the digest. + metadata := filepath.Clean(filepath.Join(tmp, "metadata.json")) + args := []string{ + "buildx", + "build", + "--progress", "plain", + "--metadata-file", metadata, + "--builder", builder.name, + } + + // TODO: --allow + // TODO: --annotation + // TODO: --attest + // TODO: --cgroup-parent + + for k, v := range opts.BuildArgs { + args = append(args, "--build-arg", fmt.Sprintf("%s=%s", k, v)) + } + if opts.Builder != "" { + args = append(args, "--builder", opts.Builder) + } + for _, c := range opts.CacheFrom { + args = append(args, "--cache-from", attrcsv(c.Type, c.Attrs)) + } + for _, c := range opts.CacheTo { + args = append(args, "--cache-to", attrcsv(c.Type, c.Attrs)) + } + if opts.ExportLoad { + args = append(args, "--load") + } + if opts.ExportPush { + args = append(args, "--push") + } + for _, e := range opts.Exports { + args = append(args, "--output", attrcsv(e.Type, e.Attrs)) + } + for _, h := range opts.ExtraHosts { + args = append(args, "--add-host", h) + } + for k, v := range opts.NamedContexts { + args = append(args, "--build-context", fmt.Sprintf("%s=%s", k, v)) + } + for k, v := range opts.Labels { + args = append(args, "--label", fmt.Sprintf("%s=%s", k, v)) + } + if opts.NetworkMode != "" { + args = append(args, "--network", opts.NetworkMode) + } + if opts.NoCache { + args = append(args, "--no-cache") + } + for _, p := range opts.Platforms { + args = append(args, "--platform", p) + } + if opts.Pull { + args = append(args, "--pull") + } + for _, ssh := range opts.SSH { + s := ssh.ID + if len(ssh.Paths) > 0 { + s += "=" + strings.Join(ssh.Paths, ",") + } + args = append(args, "--ssh", s) + } + for _, t := range opts.Tags { + args = append(args, "--tag", t) + } + if opts.Target != "" { + args = append(args, "--target", opts.Target) + } + if opts.DockerfileName != "" { + args = append(args, "-f", opts.DockerfileName) + } + if in := b.Inline(); in != "" { + c.in = in + args = append(args, "-f", "-") + } + if opts.ContextPath != "" { + args = append(args, opts.ContextPath) + } + + // We pass secrets by value via dynamic PULUMI_DOCKER_* environment + // variables. + for _, s := range opts.Secrets { + envvar, err := resource.NewUniqueHex("PULUMI_DOCKER_", 0, 0) + if err != nil { + return nil, err + } + // We abuse the pb.Secret proto by stuffing the secret's value in + // XXX_unrecognized. We never serialize this proto so this is tolerable. + env = append(env, fmt.Sprintf("%s=%s", envvar, s.XXX_unrecognized)) + args = append(args, "--secret", fmt.Sprintf("id=%s,env=%s", s.ID, envvar)) + } + + // Invoke docker-buildx. + err = c.exec(args, env) + if err != nil { + return nil, err + } + + // Read the metadata file and transform it back into the map[string]string + // structure originally returned by the exporter. + _, err = os.Stat(metadata) + if err != nil { + return nil, fmt.Errorf("missing metadata: %w", err) + } + out, err := os.ReadFile(metadata) + if err != nil { + return nil, err + } + var raw map[string]any + err = json.Unmarshal(out, &raw) + if err != nil { + return nil, err + } + resp := map[string]string{} + for k, v := range raw { + switch vv := v.(type) { + case string: + resp[k] = vv + default: + out, err := json.Marshal(v) + if err != nil { + continue + } + resp[k] = string(out) + } + } + + return &client.SolveResponse{ExporterResponse: resp}, nil +} + +// exec invokes a Docker plugin binary. The first argument should be the name +// of the plugin's subcommand, e.g. "buildx". +func (c *cli) exec(args, extraEnv []string) error { + if len(args) == 0 { + return errors.New("args must be non-empty") + } + name := args[0] + + root := commands.NewRootCmd(name, false, c) + plug, err := manager.GetPlugin(name, c, root) + if err != nil { + return err + } + if plug.Err != nil { + return plug.Err + } + + defer contract.IgnoreClose(c.w) + + cmd, err := manager.PluginRunCommand(c, name, root) + if err != nil { + return err + } + cmd.Args = append([]string{cmd.Args[0]}, args...) + cmd.Stderr = c.Err() + cmd.Stdout = c.Out() + cmd.Stdin = c.In() + + cmd.Env = append(cmd.Env, extraEnv...) + + return cmd.Run() +} + +// attrcsv transforms key/values into a CSV: key1=value1,key2=value2,... +func attrcsv(typ string, m map[string]string) string { + s := []string{"type=" + typ} + for k, v := range m { + s = append(s, fmt.Sprintf("%s=%s", k, v)) + } + return strings.Join(s, ",") +} + +func init() { + // Disable the CLI's tendency to log randomly to stdout. + logrus.SetOutput(io.Discard) +} diff --git a/provider/internal/cli_test.go b/provider/internal/cli_test.go new file mode 100644 index 0000000..1ebe642 --- /dev/null +++ b/provider/internal/cli_test.go @@ -0,0 +1,108 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "io" + "testing" + + "github.com/docker/cli/cli/config/types" + "github.com/regclient/regclient/config" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestExec(t *testing.T) { + t.Parallel() + + h, err := newHost(nil) + require.NoError(t, err) + cli, err := wrap(h) + require.NoError(t, err) + + err = cli.exec([]string{"buildx", "version"}, nil) + assert.NoError(t, err) + + out, err := io.ReadAll(cli.r) + require.NoError(t, err) + assert.Contains(t, string(out), "github.com/docker/buildx") +} + +func TestWrappedAuth(t *testing.T) { + t.Parallel() + ecr := "https://1234.dkr.ecr.us-west-2.amazonaws.com" + + realhost, err := newHost(nil) + require.NoError(t, err) + + h := &host{ + auths: map[string]types.AuthConfig{ + ecr: { + Username: "host-aws-user", + Password: "host-aws-password", + ServerAddress: ecr, + }, + "https://misc": { // Legacy config includes http/https scheme. + Username: "host-misc-user", + Password: "host-misc-password", + ServerAddress: "misc", + }, + }, + } + + registries := []Registry{ + { + Address: "1234.dkr.ecr.us-west-2.amazonaws.com", + Username: "resource-aws-user", + Password: "resource-aws-password", + }, + { + Address: "docker.io", + Username: "resource-dockerhub-user", + Password: "resource-dockerhub-password", + }, + } + + _, err = wrap(h, registries...) + require.NoError(t, err) + + cli, err := wrap(h, registries...) + require.NoError(t, err) + + expected := map[string]types.AuthConfig{ + "1234.dkr.ecr.us-west-2.amazonaws.com": { + Username: "resource-aws-user", + Password: "resource-aws-password", + ServerAddress: "1234.dkr.ecr.us-west-2.amazonaws.com", + }, + config.DockerRegistryAuth: { + Username: "resource-dockerhub-user", + Password: "resource-dockerhub-password", + ServerAddress: config.DockerRegistryDNS, + }, + "misc": { + Username: "host-misc-user", + Password: "host-misc-password", + ServerAddress: "misc", + }, + } + assert.Equal(t, expected, cli.auths) + assert.Len(t, h.auths, 2) // In-memory host auth is unchanged. + + // Assert that our on-disk host's auth is untouched. + realhostRefreshed, err := newHost(nil) + require.NoError(t, err) + assert.Equal(t, realhost.auths, realhostRefreshed.auths) +} diff --git a/provider/internal/client.go b/provider/internal/client.go new file mode 100644 index 0000000..34ef2fd --- /dev/null +++ b/provider/internal/client.go @@ -0,0 +1,367 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate go run go.uber.org/mock/mockgen -typed -package internal -source client.go -destination mockclient_test.go --self_package github.com/pulumi/pulumi-docker-build/provider/internal + +package internal + +import ( + "bytes" + "context" + "errors" + "fmt" + "os" + "path/filepath" + "strings" + + "github.com/distribution/reference" + buildx "github.com/docker/buildx/build" + "github.com/docker/buildx/commands" + controllerapi "github.com/docker/buildx/controller/pb" + "github.com/docker/buildx/util/dockerutil" + "github.com/docker/buildx/util/platformutil" + "github.com/docker/buildx/util/progress" + "github.com/docker/cli/cli/command" + "github.com/docker/cli/cli/flags" + "github.com/docker/docker/api/types/image" + "github.com/moby/buildkit/client" + "github.com/moby/buildkit/session" + "github.com/moby/buildkit/session/auth/authprovider" + "github.com/moby/buildkit/util/progress/progressui" + "github.com/regclient/regclient/types/descriptor" + "github.com/regclient/regclient/types/errs" + "github.com/regclient/regclient/types/manifest" + "github.com/regclient/regclient/types/ref" + + provider "github.com/pulumi/pulumi-go-provider" + "github.com/pulumi/pulumi/sdk/v3/go/common/diag" + "github.com/pulumi/pulumi/sdk/v3/go/common/util/contract" +) + +// Client handles all our Docker API calls. +type Client interface { + Build(ctx provider.Context, b Build) (*client.SolveResponse, error) + BuildKitEnabled() (bool, error) + Inspect(ctx context.Context, id string) ([]descriptor.Descriptor, error) + Delete(ctx context.Context, id string) error + + ManifestCreate(ctx provider.Context, push bool, target string, refs ...string) error + ManifestInspect(ctx provider.Context, target string) (string, error) + ManifestDelete(ctx provider.Context, target string) error +} + +// Build encapsulates all of the user-provider build parameters and options. +type Build interface { + BuildOptions() controllerapi.BuildOptions + Inline() string + ShouldExec() bool + Secrets() session.Attachable +} + +var _ Client = (*cli)(nil) + +func newDockerCLI(config *Config) (*command.DockerCli, error) { + cli, err := command.NewDockerCli( + command.WithDefaultContextStoreConfig(), + command.WithContentTrustFromEnv(), + ) + if err != nil { + return nil, err + } + + opts := flags.NewClientOptions() + if config != nil && config.Host != "" { + opts.Hosts = append(opts.Hosts, config.Host) + } + err = cli.Initialize(opts) + if err != nil { + return nil, err + } + + // TODO: Log some version information for debugging. + + return cli, nil +} + +// Build performs a BuildKit build. Returns a map of target names (or one name, +// "default", if no targets were specified) to SolveResponses, which capture +// the build's digest and tags (if any). +func (c *cli) Build( + pctx provider.Context, + build Build, +) (*client.SolveResponse, error) { + ctx := context.Context(pctx) + opts := build.BuildOptions() + + go c.tail(pctx) + defer contract.IgnoreClose(c) + + if build.ShouldExec() { + return c.execBuild(build) + } + + b, err := c.host.builderFor(build) + if err != nil { + return nil, err + } + printer, err := progress.NewPrinter(ctx, c.w, + progressui.PlainMode, + progress.WithDesc( + fmt.Sprintf("building with %q instance using %s driver", b.name, b.driver), + fmt.Sprintf("%s:%s", b.driver, b.name), + ), + ) + if err != nil { + return nil, fmt.Errorf("creating printer: %w", err) + } + defer func() { + // Log any warnings when we're done. + _ = printer.Wait() + for _, w := range printer.Warnings() { + b := &bytes.Buffer{} + fmt.Fprint(b, w.Short) + for _, d := range w.Detail { + fmt.Fprintf(b, "\n%s", d) + } + pctx.Log(diag.Warning, b.String()) + } + }() + + cacheFrom := []client.CacheOptionsEntry{} + for _, c := range opts.CacheFrom { + if c == nil { + continue + } + cacheFrom = append(cacheFrom, client.CacheOptionsEntry{ + Type: c.Type, + Attrs: c.Attrs, + }) + } + cacheTo := []client.CacheOptionsEntry{} + for _, c := range opts.CacheTo { + if c == nil { + continue + } + cacheTo = append(cacheTo, client.CacheOptionsEntry{ + Type: c.Type, + Attrs: c.Attrs, + }) + } + exports := []client.ExportEntry{} + for _, e := range opts.Exports { + if e == nil { + continue + } + exports = append(exports, client.ExportEntry{ + Type: e.Type, + Attrs: e.Attrs, + OutputDir: e.Destination, + }) + } + platforms, _ := platformutil.Parse(opts.Platforms) + platforms = platformutil.Dedupe(platforms) + + namedContexts := map[string]buildx.NamedContext{} + for k, v := range opts.NamedContexts { + ref, err := reference.ParseNormalizedNamed(k) + if err != nil { + return nil, err + } + name := strings.TrimSuffix(reference.FamiliarString(ref), ":latest") + namedContexts[name] = buildx.NamedContext{Path: v} + } + + ssh, err := controllerapi.CreateSSH(opts.SSH) + if err != nil { + return nil, err + } + + target := opts.Target + if target == "" { + target = "default" + } + payload := map[string]buildx.Options{ + target: { + Inputs: buildx.Inputs{ + ContextPath: opts.ContextPath, + DockerfilePath: opts.DockerfileName, + DockerfileInline: build.Inline(), + NamedContexts: namedContexts, + InStream: strings.NewReader(""), + }, + // Disable default provenance for now. Docker's `manifest create` + // doesn't handle manifests with provenance included; more reason + // to use imagetools instead. + Attests: map[string]*string{"provenance": nil}, + BuildArgs: opts.BuildArgs, + CacheFrom: cacheFrom, + CacheTo: cacheTo, + Exports: exports, + ExtraHosts: opts.ExtraHosts, + NetworkMode: opts.NetworkMode, + NoCache: opts.NoCache, + Labels: opts.Labels, + Platforms: platforms, + Pull: opts.Pull, + Tags: opts.Tags, + Target: opts.Target, + + Session: []session.Attachable{ + ssh, + authprovider.NewDockerAuthProvider(c.ConfigFile(), nil), + build.Secrets(), + }, + }, + } + + // Perform the build. + results, err := buildx.Build( + ctx, + b.nodes, + payload, + dockerutil.NewClient(c), + filepath.Dir(c.ConfigFile().Filename), + printer, + ) + if err != nil { + c.dumplogs = true + return nil, err + } + + return results[target], err +} + +// BuildKitEnabled returns true if the client supports buildkit. +func (c *cli) BuildKitEnabled() (bool, error) { + return c.Cli.BuildKitEnabled() +} + +func (c *cli) ManifestCreate(ctx provider.Context, push bool, target string, refs ...string) error { + go c.tail(ctx) + defer contract.IgnoreClose(c) + + args := []string{ + // "buildx", + "imagetools", + "create", + "--progress=plain", + "--tag", target, + } + + if !push { + args = append(args, "--dry-run") + } + + args = append(args, refs...) + + cmd := commands.NewRootCmd(os.Args[0], false, c) + + cmd.SetArgs(args) + cmd.SetErr(c.Err()) + cmd.SetOut(c.Out()) + + ctx.Log(diag.Debug, fmt.Sprint("creating manifest with args", args)) + return cmd.ExecuteContext(ctx) +} + +func (c *cli) ManifestInspect(ctx provider.Context, target string) (string, error) { + rc := c.rc() + + ref, err := ref.New(target) + if err != nil { + return "", err + } + + m, err := rc.ManifestHead(ctx, ref) + if err != nil { + return "", fmt.Errorf("fetching %q: %w", ref, err) + } + + return string(m.GetDescriptor().Digest), nil +} + +func (c *cli) ManifestDelete(ctx provider.Context, target string) error { + rc := c.rc() + + ref, err := ref.New(target) + if err != nil { + return err + } + + err = rc.ManifestDelete(context.Context(ctx), ref) + if errors.Is(err, errs.ErrHTTPStatus) { + ctx.Log(diag.Warning, "this registry does not support deletions") + return nil + } + if err != nil { + return err + } + + return nil +} + +// Inspect inspects an image. +func (c *cli) Inspect(ctx context.Context, r string) ([]descriptor.Descriptor, error) { + ref, err := ref.New(r) + if err != nil { + return nil, err + } + rc := c.rc() + + m, err := rc.ManifestGet(ctx, ref) + if err != nil { + return nil, err + } + + if mi, ok := m.(manifest.Indexer); ok { + return mi.GetManifestList() + } + + return []descriptor.Descriptor{m.GetDescriptor()}, nil +} + +// Delete attempts to delete an image with the given ref. Many registries don't +// support the DELETE API yet, so this operation is not guaranteed to work. +func (c *cli) Delete(ctx context.Context, r string) error { + // Attempt to delete the ref locally if it exists. + _, _ = c.Client().ImageRemove(ctx, r, image.RemoveOptions{ + Force: true, // Needed in case the image has multiple tags. + }) + + // Attempt to delete the ref remotely if it was pushed -- requires a + // digest. + ref, err := ref.New(r) + if err != nil || ref.Digest == "" { + return nil + } + + rc := c.rc() + + // TODO: Multi-platform manifests are left dangling on ECR. + + _ = rc.ManifestDelete(ctx, ref) + + return nil +} + +func normalizeReference(ref string) (reference.Named, error) { + namedRef, err := reference.ParseNormalizedNamed(ref) + if err != nil { + return nil, err + } + if _, isDigested := namedRef.(reference.Canonical); !isDigested { + return reference.TagNameOnly(namedRef), nil + } + return namedRef, nil +} diff --git a/provider/internal/client_test.go b/provider/internal/client_test.go new file mode 100644 index 0000000..6970f4f --- /dev/null +++ b/provider/internal/client_test.go @@ -0,0 +1,481 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "bytes" + "context" + "os" + "path/filepath" + "testing" + + "github.com/docker/docker/api/types/registry" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + "github.com/pulumi/pulumi/sdk/v3/go/common/diag" +) + +func TestAuth(t *testing.T) { + t.Parallel() + user := "pulumibot" + if u := os.Getenv("DOCKER_HUB_USER"); u != "" { + user = u + } + password := os.Getenv("DOCKER_HUB_PASSWORD") + address := "docker.io" + + cli := testcli(t, true, Registry{ + Address: address, + Username: user, + Password: password, + }) + + _, err := cli.Client(). + RegistryLogin(context.Background(), registry.AuthConfig{ServerAddress: address}) + assert.NoError(t, err) +} + +func TestCustomHost(t *testing.T) { + socket := "unix:///foo/bar.sock" + + //nolint:paralleltest // not compatible with Setenv + t.Run("env", func(t *testing.T) { + t.Setenv("DOCKER_HOST", socket) + + h, err := newHost(nil) + require.NoError(t, err) + cli, err := wrap(h) + require.NoError(t, err) + + assert.Equal(t, socket, cli.Client().DaemonHost()) + assert.Equal(t, socket, cli.DockerEndpoint().Host) + }) + + t.Run("config", func(t *testing.T) { + t.Parallel() + h, err := newHost(&Config{Host: socket}) + require.NoError(t, err) + cli, err := wrap(h) + require.NoError(t, err) + + assert.Equal(t, socket, cli.Client().DaemonHost()) + assert.Equal(t, socket, cli.DockerEndpoint().Host) + }) +} + +func TestBuild(t *testing.T) { + t.Parallel() + // Workaround for https://github.com/pulumi/pulumi-go-provider/issues/159 + ctrl, ctx := gomock.WithContext(context.Background(), t) + pctx := NewMockProviderContext(ctrl) + pctx.EXPECT().Log(gomock.Any(), gomock.Any()).AnyTimes() + pctx.EXPECT().LogStatus(gomock.Any(), gomock.Any()).AnyTimes() + pctx.EXPECT().Done().Return(ctx.Done()).AnyTimes() + pctx.EXPECT(). + Value(gomock.Any()). + DoAndReturn(func(key any) any { return ctx.Value(key) }). + AnyTimes() + pctx.EXPECT().Err().Return(ctx.Err()).AnyTimes() + pctx.EXPECT().Deadline().Return(ctx.Deadline()).AnyTimes() + + tmpdir := t.TempDir() + max := Max + + exampleContext := &BuildContext{Context: Context{Location: "../../examples/app"}} + + tests := []struct { + name string + skip bool + args ImageArgs + + auths []Registry + }{ + { + name: "multiPlatform", + args: ImageArgs{ + Context: exampleContext, + Dockerfile: &Dockerfile{ + Location: "../../examples/app/Dockerfile.multiPlatform", + }, + Platforms: []Platform{"plan9/amd64", "plan9/arm64"}, + }, + }, + { + name: "registryPush", + skip: os.Getenv("DOCKER_HUB_PASSWORD") == "", + args: ImageArgs{ + Context: exampleContext, + Tags: []string{"docker.io/pulumibot/buildkit-e2e:unit"}, + Push: true, + }, + auths: []Registry{{ + Address: "docker.io", + Username: "pulumibot", + Password: os.Getenv("DOCKER_HUB_PASSWORD"), + }}, + }, + { + name: "cached", + args: ImageArgs{ + Context: exampleContext, + Tags: []string{"cached"}, + CacheTo: []CacheTo{{Local: &CacheToLocal{ + Dest: filepath.Join(tmpdir, "cache"), + CacheWithMode: CacheWithMode{Mode: &max}, + }}}, + CacheFrom: []CacheFrom{{Local: &CacheFromLocal{ + Src: filepath.Join(tmpdir, "cache"), + }}}, + }, + }, + { + name: "buildArgs", + args: ImageArgs{ + Context: exampleContext, + Dockerfile: &Dockerfile{ + Location: "../../examples/app/Dockerfile.buildArgs", + }, + BuildArgs: map[string]string{ + "SET_ME_TO_TRUE": "true", + }, + }, + }, + { + name: "extraHosts", + args: ImageArgs{ + Context: exampleContext, + Dockerfile: &Dockerfile{ + Location: "../../examples/app/Dockerfile.extraHosts", + }, + AddHosts: []string{ + "metadata.google.internal:169.254.169.254", + }, + }, + }, + { + name: "sshMount", + skip: os.Getenv("SSH_AUTH_SOCK") == "", + args: ImageArgs{ + Context: exampleContext, + Dockerfile: &Dockerfile{ + Location: "../../examples/app/Dockerfile.sshMount", + }, + SSH: []SSH{{ID: "default"}}, + }, + }, + { + name: "secrets", + args: ImageArgs{ + Context: exampleContext, + Dockerfile: &Dockerfile{ + Location: "../../examples/app/Dockerfile.secrets", + }, + Secrets: map[string]string{ + "password": "hunter2", + }, + NoCache: true, + }, + }, + { + name: "labels", + args: ImageArgs{ + Context: exampleContext, + Labels: map[string]string{ + "description": "foo", + }, + }, + }, + { + name: "target", + args: ImageArgs{ + Context: exampleContext, + Dockerfile: &Dockerfile{ + Location: "../../examples/app/Dockerfile.target", + }, + Target: "build-me", + }, + }, + { + name: "namedContext", + args: ImageArgs{ + Context: &BuildContext{ + Context: Context{ + Location: "../../examples/app", + }, + Named: NamedContexts{ + "golang:latest": Context{ + Location: "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", + }, + }, + }, + Dockerfile: &Dockerfile{ + Location: "../../examples/app/Dockerfile.namedContexts", + }, + }, + }, + { + name: "remoteContext", + args: ImageArgs{ + Context: &BuildContext{ + Context: Context{ + Location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + }, + }, + }, + }, + { + name: "remoteContextWithInline", + args: ImageArgs{ + Context: &BuildContext{ + Context: Context{ + Location: "https://github.com/docker-library/hello-world.git", + }, + }, + Dockerfile: &Dockerfile{ + Inline: dedent(` + FROM busybox + COPY hello.c ./ + `), + }, + }, + }, + { + name: "inline", + args: ImageArgs{ + Context: exampleContext, + Dockerfile: &Dockerfile{ + Inline: dedent(` + FROM alpine + RUN echo 👍 + `), + }, + }, + }, + { + name: "dockerLoad", + args: ImageArgs{ + Context: exampleContext, + Load: true, + }, + }, + } + + // Add an exec: true version for all of our test cases. + for _, tt := range tests { + tt := tt + tt.name = "exec-" + tt.name + tt.args.Exec = true + tmpdir := filepath.Join(t.TempDir(), "exec") + for _, c := range tt.args.CacheTo { + if c.Local != nil { + c.Local.Dest = tmpdir + } + } + for _, c := range tt.args.CacheFrom { + if c.Local != nil { + c.Local.Src = tmpdir + } + } + tests = append(tests, tt) + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + if tt.skip { + t.Skip() + } + cli := testcli(t, true, tt.auths...) + + build, err := tt.args.toBuild(pctx, false) + require.NoError(t, err) + + _, err = cli.Build(pctx, build) + assert.NoError(t, err, cli.err.String()) + }) + } +} + +func TestBuildkitEnabled(t *testing.T) { + t.Parallel() + cli := testcli(t, false) + ok, err := cli.BuildKitEnabled() + assert.NoError(t, err) + assert.True(t, ok) +} + +func TestInspect(t *testing.T) { + t.Parallel() + cli := testcli(t, false) + descriptors, err := cli.Inspect(context.Background(), "pulumibot/myapp:buildx") + require.NoError(t, err) + assert.Equal( + t, + "application/vnd.docker.distribution.manifest.v2+json", + descriptors[0].MediaType, + ) +} + +func TestNormalizeReference(t *testing.T) { + t.Parallel() + tests := []struct { + ref string + want string + wantErr string + }{ + { + ref: "foo", + want: "docker.io/library/foo:latest", + }, + { + ref: "pulumi/pulumi:v3.100.0", + want: "docker.io/pulumi/pulumi:v3.100.0", + }, + { + ref: "invalid:ref:format", + wantErr: "invalid reference format", + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.ref, func(t *testing.T) { + t.Parallel() + ref, err := normalizeReference(tt.ref) + if err != nil { + assert.ErrorContains(t, err, tt.wantErr) + } else { + assert.Equal(t, ref.String(), tt.want) + } + }) + } +} + +func TestBuildError(t *testing.T) { + t.Parallel() + + if os.Getenv("CI") != "" { + t.Skip("flaky on CI for some reason") + } + + ctrl, ctx := gomock.WithContext(context.Background(), t) + + exampleContext := &BuildContext{Context: Context{Location: "../../examples/app"}} + + args := ImageArgs{ + Context: exampleContext, + Dockerfile: &Dockerfile{ + Inline: "FROM alpine\nRUN echo hello\nRUN badcmd", + }, + } + logged := bytes.Buffer{} + + pctx := NewMockProviderContext(ctrl) + pctx.EXPECT().Done().Return(ctx.Done()).AnyTimes() + pctx.EXPECT(). + Value(gomock.Any()). + DoAndReturn(func(key any) any { return ctx.Value(key) }). + AnyTimes() + pctx.EXPECT().Err().Return(ctx.Err()).AnyTimes() + pctx.EXPECT().Deadline().Return(ctx.Deadline()).AnyTimes() + + pctx.EXPECT().LogStatus(gomock.Any(), gomock.Any()).AnyTimes() + pctx.EXPECT().Log(gomock.Any(), gomock.Any()).DoAndReturn(func(_ diag.Severity, msg string) { + logged.WriteString(msg) + }).AnyTimes() + + cli := testcli(t, true) + + build, err := args.toBuild(pctx, false) + require.NoError(t, err) + + _, err = cli.Build(pctx, build) + assert.Error(t, err) + + want := []string{ + `RUN echo hello`, + `/bin/sh: badcmd: not found`, + } + + for _, want := range want { + assert.Contains(t, logged.String(), want) + } + assert.ErrorContains(t, err, + `process "/bin/sh -c badcmd" did not complete successfully: exit code: 127`, + ) +} + +func TestBuildExecError(t *testing.T) { + t.Parallel() + ctrl, _ := gomock.WithContext(context.Background(), t) + + exampleContext := &BuildContext{Context: Context{Location: "../../examples/app"}} + + args := ImageArgs{ + Context: exampleContext, + Dockerfile: &Dockerfile{ + Inline: "FROM alpine\nRUN echo hello\nRUN badcmd", + }, + Exec: true, + } + + pctx := NewMockProviderContext(ctrl) + pctx.EXPECT().Log( + diag.Warning, + "No exports were specified so the build will only remain in the local build cache. "+ + "Use `push` to upload the image to a registry, or silence this warning with a `cacheonly` export.", + ) + pctx.EXPECT().LogStatus(gomock.Any(), gomock.Any()).AnyTimes() + + cli := testcli(t, true) + + build, err := args.toBuild(pctx, false) + require.NoError(t, err) + + _, err = cli.Build(pctx, build) + assert.Error(t, err) + + want := []string{ + `RUN echo hello`, + `/bin/sh: badcmd: not found`, + `process "/bin/sh -c badcmd" did not complete successfully: exit code: 127`, + } + + for _, want := range want { + assert.Contains(t, cli.err.String(), want) + } +} + +// testcli returns a new standalone CLI instance. Set ping to true if a live +// daemon is required -- the test will be skipped if the daemon is not available. +func testcli(t *testing.T, ping bool, auths ...Registry) *cli { + h, err := newHost(nil) + require.NoError(t, err) + + cli, err := wrap(h, auths...) + require.NoError(t, err) + + if ping { + _, err := cli.Client().Ping(context.Background()) + if err != nil { + t.Skip(err) + } + } + + return cli +} diff --git a/provider/internal/context.go b/provider/internal/context.go new file mode 100644 index 0000000..168aad0 --- /dev/null +++ b/provider/internal/context.go @@ -0,0 +1,345 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "context" + "crypto/sha256" + "encoding/hex" + "errors" + "fmt" + "hash" + "io" + gofs "io/fs" + "os" + "path" + "path/filepath" + "syscall" + + buildx "github.com/docker/buildx/build" + "github.com/moby/patternmatcher/ignorefile" + "github.com/spf13/afero" + "github.com/tonistiigi/fsutil" + + "github.com/pulumi/pulumi-go-provider/infer" + "github.com/pulumi/pulumi/sdk/v3/go/common/util/contract" +) + +var ( + _ infer.Annotated = (*Context)(nil) + _ infer.Annotated = (*BuildContext)(nil) +) + +// Context represents Docker's `PATH | URL | -` context argument. Inline +// context isn't supported yet. +type Context struct { + Location string `pulumi:"location"` // Location is a local directory or URL. +} + +// BuildContext represents Docker's named and unamed contexts. +type BuildContext struct { + Context + Named NamedContexts `pulumi:"named,optional"` +} + +func (bc *BuildContext) namedMap() map[string]string { + if bc == nil { + return nil + } + return bc.Named.Map() +} + +// NamedContexts correspond to Docker's `--build-context name=path` options. +// The path can be local or a remote URL. +type NamedContexts map[string]Context + +// Map returns NamedContexts as a simple map. +func (nc NamedContexts) Map() map[string]string { + m := map[string]string{} + for k, v := range nc { + m[k] = v.Location + } + return m +} + +// Annotate sets docstrings on Context. +func (c *Context) Annotate(a infer.Annotator) { + a.Describe(&c.Location, dedent(` + Resources to use for build context. + + The location can be: + * A relative or absolute path to a local directory (".", "./app", + "/app", etc.). + * A remote URL of a Git repository, tarball, or plain text file + ("https://github.com/user/myrepo.git", "http://server/context.tar.gz", + etc.). + `)) +} + +// validate returns a non-nil CheckError if the Context is invalid. The +// returned Dockerfile may have defaults set to match Docker's default +// handling. The returned Dockerfile should be validated separately. +func (bc *BuildContext) validate(preview bool, d *Dockerfile) (*Dockerfile, *Context, error) { + if d == nil { + d = &Dockerfile{} + } + c := &Context{} + if bc != nil { + c = &bc.Context + } + + if c.Location == "" && preview { + // The field is required so we normally wouldn't need to check if it + // exists, but during previews it can still be empty if the value is + // unknown. This isn't an error, but it does prevent us from performing + // a build later. + return d, c, nil + } + + if buildx.IsRemoteURL(c.Location) { + // We assume remote URLs are always valid. + return d, c, nil + } + + abs, err := filepath.Abs(c.Location) + if err != nil { + return d, c, newCheckFailure(err, "context.location") + } + + if d.Location == "" && d.Inline == "" { + // If a Dockerfile wasn't provided and our context is on-disk, then + // set our Dockerfile to a default of /Dockerfile. + d.Location = filepath.Join(c.Location, "Dockerfile") + } + + if isLocalDir(afero.NewOsFs(), abs) { + // Our context exists -- nothing else to check. + return d, c, nil + } + + if c.Location != "-" { + return d, c, newCheckFailure( + fmt.Errorf("%q: not a valid directory or URL", c.Location), + "context.location", + ) + } + + return d, c, nil +} + +// Annotate sets docstrings on BuildContext. +func (bc *BuildContext) Annotate(a infer.Annotator) { + a.Describe(&bc.Named, dedent(` + Additional build contexts to use. + + These contexts are accessed with "FROM name" or "--from=name" + statements when using Dockerfile 1.4+ syntax. + + Values can be local paths, HTTP URLs, or "docker-image://" images. + `)) +} + +// hashFile hashes a file's contents and accumulates it into the provider Hash. +func hashFile( + h hash.Hash, + fs fsutil.FS, + relativePath string, + fileMode gofs.FileMode, +) error { + if fileMode.IsDir() { + return nil + } + if !(fileMode.IsRegular() || fileMode.Type() == os.ModeSymlink) { + return nil + } + + f, err := fs.Open(relativePath) + if err != nil { + return fmt.Errorf("could not open %q: %w", relativePath, err) + } + defer contract.IgnoreClose(f) + + _, err = io.Copy(h, f) + if errors.Is(err, syscall.EISDIR) { + // Ignore symlinks to directories. + return nil + } + if err != nil { + return fmt.Errorf("could not copy %q to hash: %w", relativePath, err) + } + + h.Write([]byte(filepath.ToSlash(path.Clean(relativePath)))) + h.Write([]byte(fileMode.String())) + + return nil +} + +// hashBuildContext accumulates hashes for files in a directory. If the file is +// a symlink, the location it points to is hashed. If it is a regular file, we +// hash the contents of the file. In order to detect file renames and mode +// changes, we also write to the accumulator a relative name and file mode. +func hashBuildContext( + contextPath, dockerfilePath string, + namedContexts map[string]string, +) (string, error) { + h := sha256.New() + fs := afero.NewOsFs() + + // Grab .dockerignore if our context and/or Dockerfile is on-disk. + excludes := []string{} + if isLocalDir(fs, contextPath) || isLocalFile(fs, dockerfilePath) { + e, err := getIgnorePatterns(fs, dockerfilePath, contextPath) + if err != nil { + return "", err + } + excludes = e + } + + if isLocalFile(fs, dockerfilePath) { + err := hashDockerfile(h, dockerfilePath) + if err != nil { + return "", nil + } + } + + if isLocalDir(fs, contextPath) { + // Hash our context if it's on-disk. + fs, err := rootFS(contextPath, excludes) + if err != nil { + return "", err + } + if _, err := hashPath(h, fs); err != nil { + return "", err + } + } + + // Hash any local named contexts. + for _, namedContext := range namedContexts { + if isLocalDir(fs, namedContext) { + fs, err := rootFS(namedContext, excludes) + if err != nil { + return "", err + } + if _, err := hashPath(h, fs); err != nil { + return "", err + } + } + } + + return hex.EncodeToString(h.Sum(nil)), nil +} + +// hashPath hashes all paths within the provided FS. +func hashPath(h hash.Hash, fs fsutil.FS) (string, error) { + err := fs.Walk( + context.Background(), + "/", + func(filePath string, dir gofs.DirEntry, err error) error { + if err != nil { + return err + } + if dir.IsDir() { + return nil + } + // fsutil.Walk makes filePath relative to the root, we join it back to get an absolute path to + // the file to hash. + fi, err := dir.Info() + if err != nil { + return err + } + return hashFile(h, fs, filePath, fi.Mode()) + }, + ) + if err != nil { + return "", fmt.Errorf("unable to hash build context: %w", err) + } + // create a hash of the entire input of the hash accumulator + return hex.EncodeToString(h.Sum(nil)), nil +} + +// hashDockerfile hashes the contents of a Dockerfile. +func hashDockerfile(h hash.Hash, path string) error { + // The Dockerfile might be capture by .dockerignore, so we explicitly hash + // its content (but not filename -- to match Docker) in order to detect + // changes in it. + df, err := os.ReadFile(filepath.Clean(path)) + if err != nil { + return fmt.Errorf("error reading dockerfile %q: %w", path, err) + } + _, err = h.Write(df) + if err != nil { + return fmt.Errorf("error hashing dockerfile %q: %w", path, err) + } + return nil +} + +// getIgnorePatterns returns all patterns to ignore when constructing a build +// context for the given Dockerfile, if any such patterns exist. +// +// Precedence is given to Dockerfile-specific ignore-files as per +// https://docs.docker.com/build/building/context/#filename-and-location. +func getIgnorePatterns(fs afero.Fs, dockerfilePath, contextRoot string) ([]string, error) { + paths := []string{ + // Prefer .dockerignore if it's present. + dockerfilePath + ".dockerignore", + } + + if isLocalDir(fs, contextRoot) { + // Otherwise fall back to the ignore-file at the root of our build context. + paths = append(paths, filepath.Join(contextRoot, ".dockerignore")) + } + + // Attempt to parse our candidate ignore-files, skipping any that don't + // exist. + for _, p := range paths { + f, err := fs.Open(p) + if errors.Is(err, afero.ErrFileNotFound) { + continue + } + if err != nil { + return nil, fmt.Errorf("reading %q: %w", p, err) + } + + ignorePatterns, err := ignorefile.ReadAll(f) + if err != nil { + contract.IgnoreClose(f) + return nil, fmt.Errorf("unable to parse %q: %w", p, err) + } + contract.IgnoreClose(f) + return ignorePatterns, nil + } + + return nil, nil +} + +func isLocalDir(fs afero.Fs, path string) bool { + stat, err := fs.Stat(path) + return err == nil && stat.IsDir() +} + +func isLocalFile(fs afero.Fs, path string) bool { + stat, err := fs.Stat(path) + return err == nil && !stat.IsDir() +} + +// rootFS returns a new fsutil.FS scoped to the given root and with the given +// exclusions. +func rootFS(root string, excludes []string) (fsutil.FS, error) { + fs, err := fsutil.NewFS(root) + if err != nil { + return nil, err + } + return fsutil.NewFilterFS(fs, &fsutil.FilterOpt{ExcludePatterns: excludes}) +} diff --git a/provider/internal/context_test.go b/provider/internal/context_test.go new file mode 100644 index 0000000..71b0645 --- /dev/null +++ b/provider/internal/context_test.go @@ -0,0 +1,417 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "bufio" + "os" + "path/filepath" + "strings" + "syscall" + "testing" + + "github.com/spf13/afero" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +var _dockerfile = "Dockerfile" + +func TestValidateContext(t *testing.T) { + t.Parallel() + tests := []struct { + name string + c Context + givenD Dockerfile + preview bool + + wantD *Dockerfile + wantErr string + }{ + { + name: "relative", + c: Context{ + Location: "../internal/../internal/testdata/noop", + }, + wantD: &Dockerfile{ + Location: "../internal/testdata/noop/Dockerfile", + }, + }, + { + name: "missing directory", + c: Context{ + Location: "/does/not/exist/", + }, + wantErr: "not a valid directory", + }, + { + name: "missing default Dockerfile", + c: Context{ + Location: "testdata", + }, + wantD: &Dockerfile{Location: "testdata/Dockerfile"}, + }, + { + name: "with explicit Dockerfile", + c: Context{ + Location: "testdata", + }, + givenD: Dockerfile{ + Location: "testdata/Dockerfile.invalid", + }, + }, + { + name: "default location", + c: Context{}, + wantD: &Dockerfile{Location: "Dockerfile"}, + }, + { + name: "remote context doesn't default to local Dockerfile", + c: Context{ + Location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + }, + wantD: &Dockerfile{}, + }, + { + name: "preview", + c: Context{}, + preview: true, + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + bc := &BuildContext{Context: tt.c} + d, _, err := bc.validate(tt.preview, &tt.givenD) + + if tt.wantErr == "" { + assert.NoError(t, err) + } else { + assert.ErrorContains(t, err, tt.wantErr) + } + + if tt.wantD != nil { + assert.Equal(t, tt.wantD.Location, d.Location) + assert.Equal(t, tt.wantD.Inline, d.Inline) + } + }) + } +} + +func TestHashIgnoresFile(t *testing.T) { + t.Parallel() + + step1Dir := "./testdata/ignores/basedir" + baseResult, err := hashBuildContext(step1Dir, filepath.Join(step1Dir, _dockerfile), nil) + require.NoError(t, err) + + step2Dir := "./testdata/ignores/basedir-with-ignored-files" + result, err := hashBuildContext(step2Dir, filepath.Join(step2Dir, _dockerfile), nil) + require.NoError(t, err) + + assert.Equal(t, result, baseResult) +} + +// Tests that we handle .dockerignore exclusions such as "!foo/*/bar". +// +// See: +// - https://github.com/moby/moby/issues/30018 +// - https://github.com/moby/moby/issues/45608 +// +// Buildkit handles these correctly (according to spec), Docker's classic builder does not. +func TestHashIgnoresWildcards(t *testing.T) { + t.Parallel() + baselineDir := "testdata/ignores-wildcard/basedir" + baselineResult, err := hashBuildContext( + baselineDir, + filepath.Join(baselineDir, _dockerfile), + nil, + ) + require.NoError(t, err) + + modIgnoredDir := "testdata/ignores-wildcard/basedir-modified-ignored-file" + modIgnoredResult, err := hashBuildContext( + modIgnoredDir, + filepath.Join(modIgnoredDir, _dockerfile), + nil, + ) + require.NoError(t, err) + + modIncludedDir := "testdata/ignores-wildcard/basedir-modified-included-file" + modIncludedResult, err := hashBuildContext( + modIncludedDir, + filepath.Join(modIncludedDir, _dockerfile), + nil, + ) + require.NoError(t, err) + + assert.Equal( + t, + baselineResult, + modIgnoredResult, + "hash should not change when modifying ignored files", + ) + assert.NotEqual(t, baselineResult, modIncludedResult, + "hash should change when modifying included (via wildcard ignore exclusion) files") +} + +func BenchmarkHashBuildContext(b *testing.B) { + dir := "testdata/ignores-wildcard/basedir-modified-ignored-file" + for n := 0; n < b.N; n++ { + _, err := hashBuildContext(dir, filepath.Join(dir, _dockerfile), nil) + require.NoError(b, err) + + } +} + +// Tests that we handle .dockerignore exclusions such as "!foo/*/bar", as above, when using a +// relative context path. +// +//nolint:paralleltest // Incompatible with os.Chdir. +func TestHashIgnoresWildcardsRelative(t *testing.T) { + err := os.Chdir("testdata") + require.NoError(t, err) + defer func() { + err = os.Chdir("..") + require.NoError(t, err) + }() + + baselineDir := "../testdata/ignores-wildcard/basedir" + baselineResult, err := hashBuildContext( + baselineDir, + filepath.Join(baselineDir, _dockerfile), + nil, + ) + require.NoError(t, err) + + modIgnoredDir := "../testdata/ignores-wildcard/basedir-modified-ignored-file" + modIgnoredResult, err := hashBuildContext( + modIgnoredDir, + filepath.Join(modIgnoredDir, _dockerfile), + nil, + ) + require.NoError(t, err) + + modIncludedDir := "../testdata/ignores-wildcard/basedir-modified-included-file" + modIncludedResult, err := hashBuildContext( + modIncludedDir, + filepath.Join(modIncludedDir, _dockerfile), + nil, + ) + require.NoError(t, err) + + assert.Equal( + t, + baselineResult, + modIgnoredResult, + "hash should not change when modifying ignored files", + ) + assert.NotEqual(t, baselineResult, modIncludedResult, + "hash should change when modifying included (via wildcard ignore exclusion) files") +} + +func TestHashIgnoresDockerfileOutsideDirMove(t *testing.T) { + t.Parallel() + appDir := "./testdata/dockerfile-location-irrelevant/app" + baseResult, err := hashBuildContext( + appDir, + "./testdata/dockerfile-location-irrelevant/step1.Dockerfile", + nil, + ) + require.NoError(t, err) + + result, err := hashBuildContext( + appDir, + "./testdata/dockerfile-location-irrelevant/step2.Dockerfile", + nil, + ) + require.NoError(t, err) + + assert.Equal(t, result, baseResult) +} + +func TestHashRenamingMatters(t *testing.T) { + t.Parallel() + step1Dir := "./testdata/filemode-matters/step1" + baseResult, err := hashBuildContext(step1Dir, filepath.Join(step1Dir, _dockerfile), nil) + require.NoError(t, err) + + step2Dir := "./testdata/renaming-matters/step2" + result, err := hashBuildContext(step2Dir, filepath.Join(step2Dir, _dockerfile), nil) + require.NoError(t, err) + + assert.NotEqual(t, result, baseResult) +} + +func TestHashFilemodeMatters(t *testing.T) { + t.Parallel() + step1Dir := "./testdata/filemode-matters/step1" + baseResult, err := hashBuildContext(step1Dir, filepath.Join(step1Dir, _dockerfile), nil) + require.NoError(t, err) + + step2Dir := "./testdata/filemode-matters/step2-chmod-x" + result, err := hashBuildContext(step2Dir, filepath.Join(step2Dir, _dockerfile), nil) + require.NoError(t, err) + + assert.NotEqual(t, result, baseResult) +} + +func TestHashDeepSymlinks(t *testing.T) { + t.Parallel() + dir := "./testdata/symlinks" + _, err := hashBuildContext(dir, filepath.Join(dir, "Dockerfile"), nil) + assert.NoError(t, err) +} + +func TestIgnoreIrregularFiles(t *testing.T) { + t.Parallel() + dir := t.TempDir() + + // Create a Dockerfile + dockerfile := filepath.Join(dir, "Dockerfile") + err := os.WriteFile(dockerfile, []byte{}, 0o600) + require.NoError(t, err) + + // Create a pipe which should be ignored. (We will time out trying to read + // it if it's not.) + pipe := filepath.Join(dir, "pipe") + err = syscall.Mkfifo(pipe, 0o666) + require.NoError(t, err) + // Confirm it's irregular. + fi, err := os.Stat(pipe) + require.NoError(t, err) + assert.False(t, fi.Mode().IsRegular()) + + _, err = hashBuildContext(dir, dockerfile, nil) + assert.NoError(t, err) +} + +func TestHashUnignoredDirs(t *testing.T) { + t.Parallel() + step1Dir := "./testdata/unignores/basedir" + baseResult, err := hashBuildContext(step1Dir, filepath.Join(step1Dir, _dockerfile), nil) + require.NoError(t, err) + + step2Dir := "./testdata/unignores/basedir-with-unignored-files" + unignoreResult, err := hashBuildContext(step2Dir, filepath.Join(step2Dir, _dockerfile), nil) + require.NoError(t, err) + + assert.Equal(t, baseResult, unignoreResult) +} + +func TestDockerIgnore(t *testing.T) { + t.Parallel() + tests := []struct { + name string + + dockerfile string + context string + fs map[string]string + + want []string + wantErr error + }{ + { + name: "Dockerfile with root dockerignore", + dockerfile: "./foo/Dockerfile", + fs: map[string]string{ + ".dockerignore": "rootignore", + }, + want: []string{"rootignore"}, + }, + { + name: "Dockerfile with root dockerignore and custom dockerignore", + dockerfile: "./foo/Dockerfile", + fs: map[string]string{ + "foo/Dockerfile.dockerignore": "customignore", + ".dockerignore": "rootignore", + }, + want: []string{"customignore"}, + }, + { + name: "Dockerfile with root dockerignore and relative context", + dockerfile: "./foo/Dockerfile", + context: "../", + fs: map[string]string{ + "../.dockerignore": "rootignore", + }, + want: []string{"rootignore"}, + }, + { + name: "Dockerfile without root dockerignore", + dockerfile: "./foo/Dockerfile", + want: nil, + }, + { + name: "Dockerfile with invalid root dockerignore", + dockerfile: "./foo/Dockerfile", + fs: map[string]string{ + ".dockerignore": strings.Repeat("*", bufio.MaxScanTokenSize), + }, + wantErr: bufio.ErrTooLong, + }, + { + name: "custom.Dockerfile without custom dockerignore and without root dockerignore", + dockerfile: "./foo/custom.Dockerfile", + want: nil, + }, + { + name: "custom.Dockerfile with custom dockerignore and without root dockerignore", + dockerfile: "./foo/custom.Dockerfile", + fs: map[string]string{ + "foo/custom.Dockerfile.dockerignore": "customignore", + }, + want: []string{"customignore"}, + }, + { + name: "custom.Dockerfile with custom dockerignore and with root dockerignore", + dockerfile: "foo/custom.Dockerfile", + fs: map[string]string{ + "foo/custom.Dockerfile.dockerignore": "customignore", + ".dockerignore": "rootignore", + }, + want: []string{"customignore"}, + }, + { + name: "custom.Dockerfile without custom dockerignore and with root dockerignore", + dockerfile: "foo/custom.Dockerfile", + fs: map[string]string{ + ".dockerignore": "rootignore", + }, + want: []string{"rootignore"}, + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + fs := afero.NewMemMapFs() + for fname, fdata := range tt.fs { + f, err := fs.Create(fname) + require.NoError(t, err) + _, err = f.WriteString(fdata) + require.NoError(t, err) + } + actual, err := getIgnorePatterns(fs, tt.dockerfile, tt.context) + + assert.ErrorIs(t, err, tt.wantErr) + assert.Equal(t, tt.want, actual) + }) + } +} diff --git a/provider/internal/coverage.out b/provider/internal/coverage.out new file mode 100644 index 0000000..dddbc6f --- /dev/null +++ b/provider/internal/coverage.out @@ -0,0 +1,870 @@ +mode: set +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:34.47,36.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:38.65,40.9 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:40.9,42.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:43.2,44.9 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:44.9,46.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:47.2,48.9 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:48.9,50.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:51.2,51.46 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:51.46,53.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:54.2,55.18 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:60.3,62.27 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:62.27,64.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:68.2,68.13 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:68.13,70.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:72.2,73.62 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:73.62,75.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:77.2,81.59 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:81.59,83.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:83.16,85.4 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:87.3,88.23 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:88.23,90.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:92.3,92.17 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:95.2,95.66 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:98.69,99.13 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:100.17,101.42 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:102.27,103.38 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:104.15,105.52 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:106.10,107.61 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:111.66,118.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:123.36,127.16 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:127.16,129.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:131.2,134.9 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:134.9,136.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:138.2,141.19 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:141.19,144.3 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:146.2,146.78 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:146.78,150.3 3 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:152.2,152.24 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:152.24,154.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:154.17,156.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:157.3,157.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:157.23,160.4 2 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:161.3,161.17 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:166.2,166.21 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:166.21,168.46 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:168.46,171.4 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:174.2,174.16 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:178.102,185.18 4 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:185.18,186.31 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:186.31,188.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:189.3,189.21 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:193.2,193.27 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:193.27,196.17 3 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:196.17,198.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:198.9,198.22 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:198.22,199.36 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:199.36,200.13 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:202.4,202.67 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:202.67,203.13 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:205.4,205.19 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/deprecated/configencoding.go:209.2,209.20 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/auth.go:11.53,15.2 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/builder.go:13.53,22.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/buildx.go:33.46,36.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/buildx.go:39.54,46.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/buildx.go:46.16,48.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/buildx.go:49.2,56.12 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/buildx.go:60.44,76.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/buildx.go:79.69,84.2 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:39.42,40.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:40.14,42.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:43.2,44.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:44.17,46.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:47.2,47.20 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:47.20,49.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:50.2,50.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:53.54,56.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:62.57,64.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:66.45,67.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:67.14,69.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:70.2,70.51 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:78.52,92.2 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:94.39,95.18 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:95.18,97.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:98.2,99.28 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:99.28,101.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:102.2,102.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:111.62,138.2 6 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:140.50,141.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:141.14,143.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:144.2,145.19 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:145.19,147.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:148.2,148.19 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:148.19,150.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:151.2,151.17 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:151.17,153.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:154.2,154.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:163.46,164.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:164.14,166.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:167.2,168.18 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:168.18,170.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:171.2,171.24 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:171.24,173.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:174.2,174.29 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:174.29,176.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:177.2,177.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:180.58,184.2 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:193.44,194.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:194.14,196.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:197.2,197.77 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:213.51,249.2 14 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:251.39,252.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:252.14,254.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:255.2,256.20 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:256.20,258.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:259.2,259.18 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:259.18,261.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:262.2,262.25 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:262.25,264.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:265.2,265.25 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:265.25,267.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:268.2,268.29 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:268.29,270.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:271.2,271.27 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:271.27,273.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:274.2,274.25 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:274.25,276.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:277.2,277.29 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:277.29,279.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:280.2,280.26 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:280.26,282.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:284.2,284.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:291.53,296.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:298.40,299.18 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:299.18,301.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:302.2,302.39 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:309.60,312.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:314.47,315.26 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:315.26,317.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:318.2,318.55 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:328.37,329.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:329.14,331.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:332.2,332.70 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:337.30,339.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:352.54,380.2 7 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:382.41,383.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:383.16,385.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:386.2,386.64 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:391.41,392.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:392.14,394.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:395.2,395.22 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:406.52,410.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:412.40,413.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:413.14,415.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:416.2,420.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:432.43,433.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:433.14,435.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:436.2,442.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:451.60,459.2 6 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:461.47,462.29 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:462.29,464.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:465.2,466.25 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:466.25,468.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:469.2,469.28 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:469.28,471.14 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:471.14,473.4 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:474.3,474.65 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:476.2,476.31 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:476.31,478.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:479.2,479.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:489.48,490.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:490.14,492.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:493.2,493.81 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:508.52,541.2 8 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:543.39,544.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:544.16,546.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:547.2,547.74 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:557.56,568.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:578.68,584.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:588.49,590.23 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:590.23,592.14 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:592.14,593.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:595.3,595.27 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:597.2,597.35 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cache.go:600.38,602.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:31.62,33.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:33.16,35.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:55.2,56.28 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:56.28,58.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:60.2,60.31 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:60.31,67.3 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:80.2,100.16 6 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:100.16,102.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:104.2,114.21 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:177.32,179.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:181.34,183.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:185.31,187.2 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:190.41,192.28 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:192.28,197.3 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:198.2,200.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:205.42,207.15 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:207.15,209.35 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:209.35,211.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:214.2,215.15 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:215.15,217.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:218.2,218.30 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:222.29,225.19 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:225.19,227.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:228.2,228.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:231.76,235.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:235.16,237.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:238.2,243.16 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:243.16,245.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:251.2,252.52 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:252.52,257.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:260.2,263.16 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:263.16,265.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:266.2,298.35 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:298.35,300.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:301.2,301.24 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:301.24,303.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:304.2,304.35 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:304.35,306.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:307.2,307.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:307.33,309.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:310.2,310.21 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:310.21,312.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:313.2,313.21 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:313.21,315.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:316.2,316.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:316.33,318.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:319.2,319.36 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:319.36,321.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:322.2,322.39 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:322.39,324.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:325.2,325.32 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:325.32,327.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:328.2,328.18 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:328.18,330.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:331.2,331.35 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:331.35,333.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:334.2,334.15 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:334.15,336.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:337.2,337.31 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:337.31,339.25 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:339.25,341.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:342.3,342.34 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:344.2,344.30 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:344.30,346.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:347.2,347.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:347.23,349.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:350.2,350.31 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:350.31,352.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:353.2,353.32 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:353.32,356.3 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:357.2,357.28 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:357.28,359.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:361.2,361.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:361.33,367.3 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:369.2,370.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:370.16,372.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:376.2,377.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:377.16,379.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:380.2,381.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:381.16,383.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:384.2,386.16 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:386.16,388.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:389.2,390.24 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:390.24,391.25 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:392.15,393.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:394.11,396.18 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:396.18,397.13 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:399.4,399.25 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:403.2,404.18 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:404.18,406.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:407.2,409.8 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:414.60,417.20 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:417.20,419.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:420.2,425.16 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:425.16,427.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:428.2,428.21 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:428.21,430.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:432.2,445.16 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:445.16,447.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:448.2,455.18 6 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:467.54,469.22 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:469.22,471.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/cli.go:472.2,472.29 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:71.63,101.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:101.16,103.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:105.2,106.40 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:106.40,108.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:109.2,111.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:111.16,113.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:118.2,120.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:193.45,212.24 5 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:212.24,214.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:231.2,232.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:232.16,234.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:235.2,242.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:242.16,244.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:246.2,247.35 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:247.35,252.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:253.2,254.33 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:254.33,259.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:260.2,261.33 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:261.33,267.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:268.2,280.39 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:280.39,282.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:282.17,284.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:285.3,286.53 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:289.2,290.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:290.16,292.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:294.2,295.18 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:295.18,297.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:298.2,339.16 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:339.16,341.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:343.2,343.49 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:343.49,345.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:346.2,346.39 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:346.39,349.30 3 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:349.30,351.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:352.3,352.37 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:355.2,355.21 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:359.47,361.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:363.100,441.16 10 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:441.16,443.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:445.2,445.11 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:445.11,447.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:449.2,453.16 5 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:453.16,455.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:456.2,456.12 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:459.84,472.16 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:472.16,474.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:476.2,477.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:477.16,479.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:481.2,481.46 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:547.73,561.56 8 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:561.56,563.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:567.2,567.12 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:571.94,573.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:573.16,575.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:578.2,579.85 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:579.85,581.21 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:581.21,583.4 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:584.3,584.49 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:597.2,603.80 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:603.80,607.3 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:609.2,609.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:613.86,617.2 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:619.62,621.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:621.16,623.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:624.2,624.66 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:624.66,626.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/client.go:627.2,627.22 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:40.49,42.23 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:42.23,44.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:45.2,45.10 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:48.47,59.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:61.53,70.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:77.9,78.22 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:78.22,80.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:81.2,81.66 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:81.66,83.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:85.2,86.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:86.16,88.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:89.2,91.36 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:91.36,94.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:95.2,95.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:95.16,97.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:99.2,102.12 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:109.105,115.68 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:115.68,117.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:117.17,119.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:120.3,120.15 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:123.2,123.37 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:123.37,125.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:125.17,127.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:130.2,130.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:130.33,133.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:133.17,135.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:136.3,136.44 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:136.44,138.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:142.2,142.45 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:142.45,143.35 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:143.35,145.18 2 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:145.18,147.5 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:148.4,148.45 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:148.45,150.5 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:154.2,154.44 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:158.70,160.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:162.58,163.102 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:163.102,164.17 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:164.17,166.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:167.3,167.18 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:167.18,169.4 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:172.3,173.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:173.17,175.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:176.3,176.46 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:178.2,178.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:178.16,180.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:182.2,182.44 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:185.53,190.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:190.16,192.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:193.2,194.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:194.16,196.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:197.2,197.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:205.91,211.33 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:211.33,214.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:218.2,218.26 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:218.26,220.44 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:220.44,221.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:223.3,223.17 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:223.17,225.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:226.3,229.17 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:229.17,231.4 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:232.3,232.29 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:235.2,235.17 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:238.48,241.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:243.49,246.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:250.64,252.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:252.16,254.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/context.go:255.2,255.77 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/dedent.go:9.30,13.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/dockerfile.go:12.50,29.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:48.51,79.2 9 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:81.38,82.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:82.16,84.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:85.2,85.87 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:88.36,89.17 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:89.17,91.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:91.17,93.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:94.3,94.40 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:96.2,96.23 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:96.23,98.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:99.2,99.20 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:99.20,101.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:102.2,102.14 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:107.43,108.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:108.14,110.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:111.2,111.25 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:124.52,129.2 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:131.40,132.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:132.14,134.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:135.2,136.18 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:136.18,138.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:139.2,139.18 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:139.18,141.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:143.2,150.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:157.49,160.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:162.37,163.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:163.14,165.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:166.2,166.79 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:184.51,213.2 8 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:215.39,216.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:216.14,218.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:219.2,220.19 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:220.19,222.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:223.2,223.27 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:223.27,225.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:226.2,226.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:226.23,228.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:229.2,229.32 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:229.32,231.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:232.2,232.28 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:232.28,234.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:235.2,235.21 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:235.21,237.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:238.2,238.20 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:238.20,240.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:241.2,248.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:255.54,257.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:259.42,260.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:260.14,262.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:263.2,263.82 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:270.39,271.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:271.14,273.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:274.2,274.50 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:277.51,279.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:285.37,286.14 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:286.14,288.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:289.2,289.48 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:296.53,299.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:301.40,302.18 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:302.18,304.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:305.2,305.49 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:314.61,322.2 6 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:324.48,325.29 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:325.29,327.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:328.2,329.25 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:329.25,331.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:332.2,332.28 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:332.28,334.14 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:334.14,336.4 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:337.3,337.65 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:339.2,339.31 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:339.31,341.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:342.2,342.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:349.42,351.28 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:351.28,353.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:354.2,354.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:357.55,359.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:365.48,367.34 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:367.34,369.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:370.2,371.33 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:374.61,378.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/export.go:380.61,382.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:24.45,26.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:26.16,28.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:30.2,31.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:31.16,33.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:34.2,40.15 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:49.64,55.43 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:55.43,57.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:59.2,60.70 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:60.70,62.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:63.2,67.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:67.16,69.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:74.2,74.42 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:74.42,76.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:76.17,78.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:79.3,82.17 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:82.17,84.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:85.2,86.31 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:86.31,87.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:87.23,88.13 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:90.4,90.40 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:90.40,91.13 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:93.4,93.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:93.23,94.13 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:96.4,97.18 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:97.18,98.13 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:100.4,100.28 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:100.28,101.24 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:101.24,102.26 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:104.5,104.66 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:104.66,105.26 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:111.4,112.9 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:119.2,120.39 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:120.39,122.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/host.go:124.2,127.20 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:62.45,83.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:112.50,285.2 23 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:297.51,328.2 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:330.96,333.55 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:333.55,335.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:337.2,344.33 4 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:354.47,356.38 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:356.38,358.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:361.2,363.58 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:363.58,365.26 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:365.26,366.38 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:366.38,368.5 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:391.2,391.28 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:398.39,400.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:402.63,404.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:406.62,432.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:434.39,438.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:441.40,442.13 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:442.13,444.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:445.2,445.31 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:445.31,446.17 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:446.17,448.4 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:450.2,450.14 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:453.50,454.30 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:454.30,456.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:457.2,457.22 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:467.58,469.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:471.32,473.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:475.45,477.30 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:477.30,479.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:480.2,480.35 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:483.34,485.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:490.20,492.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:492.16,494.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:496.2,496.26 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:496.26,501.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:503.2,503.54 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:503.54,507.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:509.2,511.8 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:517.87,520.25 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:520.25,524.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:525.2,525.24 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:525.24,529.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:530.2,530.49 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:530.49,534.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:536.2,536.31 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:536.31,538.53 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:538.53,539.66 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:539.66,541.62 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:541.62,546.6 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:548.9,548.84 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:548.84,553.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:556.2,556.34 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:556.34,558.54 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:558.54,561.4 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:564.2,564.32 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:564.32,566.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:570.2,573.19 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:573.19,575.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:576.2,576.19 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:576.19,578.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:579.2,579.37 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:579.37,580.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:580.23,581.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:583.3,583.45 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:583.45,591.12 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:593.3,594.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:594.17,596.12 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:598.3,599.74 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:599.74,607.12 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:609.3,609.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:612.2,612.13 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:612.13,614.29 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:614.29,615.25 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:615.25,617.5 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:621.2,622.39 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:622.39,624.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:624.17,626.12 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:628.3,628.44 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:631.2,632.39 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:632.39,633.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:633.23,634.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:636.3,636.45 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:636.45,644.12 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:646.3,647.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:647.17,649.12 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:651.3,651.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:651.23,652.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:654.3,654.43 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:657.2,658.37 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:658.37,659.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:659.23,660.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:662.3,662.45 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:662.45,670.12 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:672.3,673.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:673.17,675.12 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:677.3,677.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:677.23,678.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:680.3,680.39 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:683.2,684.33 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:684.33,686.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:686.17,688.12 2 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:690.3,690.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:690.23,691.12 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:693.3,693.31 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:696.2,696.76 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:696.76,704.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:706.2,706.34 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:706.34,707.47 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:707.47,709.4 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:712.2,713.37 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:713.37,718.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:720.2,741.23 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:751.23,755.16 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:755.16,757.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:759.2,760.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:760.16,762.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:763.2,763.9 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:763.9,765.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:767.2,768.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:768.16,770.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:772.2,777.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:777.16,779.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:780.2,782.46 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:782.46,784.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:785.2,785.35 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:785.35,788.3 2 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:790.2,791.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:791.16,793.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:795.2,795.41 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:795.41,798.17 3 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:798.17,800.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:805.2,805.30 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:805.30,806.74 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:806.74,808.4 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:811.2,811.24 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:811.24,814.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:818.2,818.33 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:818.33,820.10 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:820.10,821.12 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:824.3,825.8 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:828.2,828.19 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:837.31,840.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:854.3,856.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:856.16,858.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:867.2,867.25 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:867.25,870.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:872.2,875.33 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:875.33,877.10 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:877.10,880.9 2 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:884.3,885.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:885.17,887.12 2 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:890.3,890.27 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:890.27,891.87 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:891.87,893.13 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:895.4,895.20 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:895.20,897.13 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:900.4,901.9 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:907.2,907.49 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:907.49,909.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:911.2,913.32 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:923.9,925.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:925.16,927.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:929.2,931.33 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:931.33,933.17 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:933.17,934.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:936.3,937.30 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:937.30,938.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:940.3,942.31 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:942.31,943.23 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:943.23,945.5 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:946.4,946.24 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:946.24,948.5 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:954.2,954.17 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:964.34,968.54 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:968.54,970.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:971.2,971.56 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:971.56,973.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:974.2,974.48 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:974.48,976.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:977.2,977.52 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:977.52,979.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:980.2,980.56 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:980.56,982.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:983.2,983.52 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:983.52,985.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:986.2,986.52 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:986.52,988.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:989.2,989.64 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:989.64,991.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:992.2,992.58 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:992.58,994.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:995.2,995.54 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:995.54,997.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:999.2,999.58 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:999.58,1001.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1002.2,1002.50 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1002.50,1004.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1005.2,1005.28 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1005.28,1007.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1008.2,1008.34 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1008.34,1010.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1011.2,1011.52 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1011.52,1013.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1014.2,1014.56 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1014.56,1016.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1017.2,1017.28 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1017.28,1019.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1020.2,1020.28 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1020.28,1022.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1023.2,1023.52 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1023.52,1025.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1026.2,1026.44 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1026.44,1028.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1029.2,1029.46 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1029.46,1031.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1032.2,1032.50 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1032.50,1034.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1038.2,1038.68 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1038.68,1040.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1043.2,1048.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1048.16,1050.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1051.2,1051.30 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1051.30,1053.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1056.2,1056.50 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1056.50,1058.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1058.8,1059.42 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1059.42,1061.74 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1061.74,1062.13 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1064.4,1065.9 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1069.2,1073.8 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1076.41,1078.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1078.16,1080.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1081.2,1082.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1082.16,1084.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1085.2,1085.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1091.51,1093.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1093.16,1095.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1096.2,1097.48 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1097.48,1099.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1101.2,1104.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1104.16,1106.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/image.go:1108.2,1108.28 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:40.46,50.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:52.50,71.2 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:78.32,81.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:89.24,93.16 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:93.16,95.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:97.2,97.13 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:97.13,99.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:103.2,104.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:104.16,106.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:108.2,109.19 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:117.44,122.16 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:122.16,124.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:132.2,133.84 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:133.84,136.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:137.2,137.85 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:137.85,140.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:141.2,141.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:141.16,143.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:145.2,145.49 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:145.49,147.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:149.2,149.32 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:157.48,159.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:159.16,161.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:176.2,176.74 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:176.74,184.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:186.2,186.35 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:186.35,187.61 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:187.61,195.4 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:198.2,198.28 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:201.82,203.16 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:203.16,205.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:206.2,208.70 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:208.70,210.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:211.2,211.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:219.34,223.26 3 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:223.26,225.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:226.2,226.52 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:226.52,228.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:229.2,229.52 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:229.52,231.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:232.2,232.54 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:232.54,234.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:237.2,241.8 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:248.19,251.55 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:251.55,253.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/images.go:255.2,259.33 4 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/network.go:15.60,30.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/platform.go:26.54,57.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/platform.go:59.35,61.2 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:14.49,16.26 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:16.26,17.17 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:17.17,18.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:20.3,20.29 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:22.2,22.15 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:28.43,29.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:29.16,31.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:32.2,32.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:39.43,40.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:40.16,42.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:43.2,43.41 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:52.51,53.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:53.16,55.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:56.2,56.44 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:62.64,63.31 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:63.31,65.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:66.2,68.26 3 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:68.26,69.20 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:69.20,70.12 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:72.3,72.20 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:72.20,73.12 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:75.3,75.22 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:77.2,77.17 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:82.59,83.38 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:83.38,85.3 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:87.2,89.29 3 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:89.29,90.42 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:90.42,91.12 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:93.3,93.15 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/preview.go:96.2,99.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/ssh.go:14.43,31.2 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/ssh.go:33.30,34.16 1 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/ssh.go:34.16,36.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/ssh.go:38.2,40.22 2 1 +github.com/pulumi/pulumi-docker/provider/v4/internal/ssh.go:40.22,42.3 1 0 +github.com/pulumi/pulumi-docker/provider/v4/internal/ssh.go:44.2,44.10 1 1 diff --git a/provider/internal/dedent.go b/provider/internal/dedent.go new file mode 100644 index 0000000..613496d --- /dev/null +++ b/provider/internal/dedent.go @@ -0,0 +1,27 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "strings" + + dd "github.com/muesli/reflow/dedent" +) + +func dedent(s string) string { + return strings.TrimSpace(dd.String( + strings.ReplaceAll(s, `"`, "`"), + )) +} diff --git a/provider/internal/dedent_test.go b/provider/internal/dedent_test.go new file mode 100644 index 0000000..7b4ca93 --- /dev/null +++ b/provider/internal/dedent_test.go @@ -0,0 +1,51 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestDedent(t *testing.T) { + t.Parallel() + tests := []struct { + name string + given string + want string + }{ + { + name: "simple case", + given: ` + An optional map of named build-time argument variables to set during + the Docker build. This flag allows you to pass build-time variables that + can be accessed like environment variables inside the "RUN" + instruction.`, + want: `An optional map of named build-time argument variables to set during +the Docker build. This flag allows you to pass build-time variables that +can be accessed like environment variables inside the ` + "`RUN`\n" + `instruction.`, + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + actual := dedent(tt.given) + assert.Equal(t, tt.want, actual) + }) + } +} diff --git a/provider/internal/deprecated/configencoding.go b/provider/internal/deprecated/configencoding.go new file mode 100644 index 0000000..a10d48e --- /dev/null +++ b/provider/internal/deprecated/configencoding.go @@ -0,0 +1,213 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package deprecated + +import ( + "encoding/json" + "fmt" + "sort" + + "google.golang.org/protobuf/types/known/structpb" + + "github.com/pulumi/pulumi/pkg/v3/codegen/schema" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin" +) + +// ConfigEncoding handles unmarshaling legacy JSON provider config. +type ConfigEncoding struct { + schema schema.ConfigSpec +} + +// New constructs a new config encoder for the provided spec. +func New(s schema.ConfigSpec) *ConfigEncoding { + return &ConfigEncoding{schema: s} +} + +func (*ConfigEncoding) tryUnwrapSecret(encoded any) (any, bool) { + m, ok := encoded.(map[string]any) + if !ok { + return nil, false + } + sig, ok := m["4dabf18193072939515e22adb298388d"] + if !ok { + return nil, false + } + ss, ok := sig.(string) + if !ok { + return nil, false + } + if ss != "1b47061264138c4ac30d75fd1eb44270" { + return nil, false + } + value, ok := m["value"] + return value, ok +} + +func (enc *ConfigEncoding) convertStringToPropertyValue(s string, prop schema.PropertySpec) ( + resource.PropertyValue, error, +) { + // If the schema expects a string, we can just return this as-is. + if prop.Type == "string" { + return resource.NewStringProperty(s), nil + } + + // Otherwise, we will attempt to deserialize the input string as JSON and convert the result into a Pulumi + // property. If the input string is empty, we will return an appropriate zero value. + if s == "" { + return enc.zeroValue(prop.Type), nil + } + + var jsonValue interface{} + if err := json.Unmarshal([]byte(s), &jsonValue); err != nil { + return resource.PropertyValue{}, err + } + + opts := enc.unmarshalOpts() + + // Instead of using resource.NewPropertyValue, specialize it to detect nested json-encoded secrets. + var replv func(encoded any) (resource.PropertyValue, bool) + replv = func(encoded any) (resource.PropertyValue, bool) { + encodedSecret, isSecret := enc.tryUnwrapSecret(encoded) + if !isSecret { + return resource.NewNullProperty(), false + } + + v := resource.NewPropertyValueRepl(encodedSecret, nil, replv) + if opts.KeepSecrets { + v = resource.MakeSecret(v) + } + + return v, true + } + + return resource.NewPropertyValueRepl(jsonValue, nil, replv), nil +} + +func (*ConfigEncoding) zeroValue(typ string) resource.PropertyValue { + switch typ { + case "boolean": + return resource.NewPropertyValue(false) + case "integer", "number": + return resource.NewPropertyValue(0) + case "array": + return resource.NewPropertyValue([]interface{}{}) + default: + return resource.NewPropertyValue(map[string]interface{}{}) + } +} + +func (enc *ConfigEncoding) unmarshalOpts() plugin.MarshalOptions { + return plugin.MarshalOptions{ + Label: "config", + KeepUnknowns: true, + SkipNulls: true, + RejectAssets: true, + } +} + +// Like plugin.UnmarshalPropertyValue but overrides string parsing with convertStringToPropertyValue. +func (enc *ConfigEncoding) unmarshalPropertyValue(key resource.PropertyKey, + v *structpb.Value, +) (*resource.PropertyValue, error) { + opts := enc.unmarshalOpts() + + pv, err := plugin.UnmarshalPropertyValue(key, v, enc.unmarshalOpts()) + if err != nil { + return nil, fmt.Errorf("error unmarshalling property %q: %w", key, err) + } + + prop, ok := enc.schema.Variables[string(key)] + + // Only apply JSON-encoded recognition for known fields. + if !ok { + return pv, nil + } + + var jsonString string + var jsonStringDetected, jsonStringSecret bool + + if pv.IsString() { + jsonString = pv.StringValue() + jsonStringDetected = true + } + + if opts.KeepSecrets && pv.IsSecret() && pv.SecretValue().Element.IsString() { + jsonString = pv.SecretValue().Element.StringValue() + jsonStringDetected = true + jsonStringSecret = true + } + + if jsonStringDetected { + v, err := enc.convertStringToPropertyValue(jsonString, prop) + if err != nil { + return nil, fmt.Errorf("error unmarshalling property %q: %w", key, err) + } + if jsonStringSecret { + s := resource.MakeSecret(v) + return &s, nil + } + return &v, nil + } + + // Computed sentinels are coming in as always having an empty string, but the encoding coerses them to a zero + // value of the appropriate type. + if pv.IsComputed() { + el := pv.V.(resource.Computed).Element + if el.IsString() && el.StringValue() == "" { + res := resource.MakeComputed(enc.zeroValue(prop.Type)) + return &res, nil + } + } + + return pv, nil +} + +// UnmarshalProperties is copied from plugin.UnmarshalProperties substituting plugin.UnmarshalPropertyValue. +func (enc *ConfigEncoding) UnmarshalProperties( + props *structpb.Struct, +) (resource.PropertyMap, error) { + opts := enc.unmarshalOpts() + + result := make(resource.PropertyMap) + + // First sort the keys so we enumerate them in order (in case errors happen, we want determinism). + var keys []string + if props != nil { + for k := range props.Fields { + keys = append(keys, k) + } + sort.Strings(keys) + } + + // And now unmarshal every field it into the map. + for _, key := range keys { + pk := resource.PropertyKey(key) + v, err := enc.unmarshalPropertyValue(pk, props.Fields[key]) + if err != nil { + return nil, err + } else if v != nil { + if opts.SkipNulls && v.IsNull() { + continue + } + if opts.SkipInternalKeys && resource.IsInternalPropertyKey(pk) { + continue + } + result[pk] = *v + } + } + + return result, nil +} diff --git a/provider/internal/deprecated/configencoding_test.go b/provider/internal/deprecated/configencoding_test.go new file mode 100644 index 0000000..1d2a8e2 --- /dev/null +++ b/provider/internal/deprecated/configencoding_test.go @@ -0,0 +1,295 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package deprecated + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/assert" + structpb "google.golang.org/protobuf/types/known/structpb" + + "github.com/pulumi/pulumi/pkg/v3/codegen/schema" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin" +) + +func TestConfigEncoding(t *testing.T) { + t.Parallel() + + type testCase struct { + ty schema.TypeSpec + v *structpb.Value + pv resource.PropertyValue + } + + knownKey := "mykey" + + makeEnc := func(typ schema.TypeSpec) *ConfigEncoding { + return New( + schema.ConfigSpec{ + Variables: map[string]schema.PropertySpec{ + knownKey: { + TypeSpec: typ, + }, + }, + }, + ) + } + + makeValue := func(x any) *structpb.Value { + vv, err := structpb.NewValue(x) + assert.NoErrorf(t, err, "structpb.NewValue failed") + return vv + } + + checkUnmarshal := func(t *testing.T, tc testCase) { + enc := makeEnc(tc.ty) + pv, err := enc.unmarshalPropertyValue(resource.PropertyKey(knownKey), tc.v) + assert.NoError(t, err) + assert.NotNil(t, pv) + assert.Equal(t, tc.pv, *pv) + } + + turnaroundTestCases := []testCase{ + { + schema.TypeSpec{Type: "boolean"}, + makeValue(`true`), + resource.NewBoolProperty(true), + }, + { + schema.TypeSpec{Type: "boolean"}, + makeValue(`false`), + resource.NewBoolProperty(false), + }, + { + schema.TypeSpec{Type: "integer"}, + makeValue(`0`), + resource.NewNumberProperty(0), + }, + { + schema.TypeSpec{Type: "integer"}, + makeValue(`42`), + resource.NewNumberProperty(42), + }, + { + schema.TypeSpec{Type: "number"}, + makeValue(`0`), + resource.NewNumberProperty(0.0), + }, + { + schema.TypeSpec{Type: "number"}, + makeValue(`42.5`), + resource.NewNumberProperty(42.5), + }, + { + schema.TypeSpec{Type: "string"}, + structpb.NewStringValue(""), + resource.NewStringProperty(""), + }, + { + schema.TypeSpec{Type: "string"}, + structpb.NewStringValue("hello"), + resource.NewStringProperty("hello"), + }, + { + schema.TypeSpec{Type: "array"}, + makeValue(`[]`), + resource.NewArrayProperty([]resource.PropertyValue{}), + }, + { + schema.TypeSpec{Type: "array"}, + makeValue(`["hello","there"]`), + resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewStringProperty("hello"), + resource.NewStringProperty("there"), + }), + }, + { + schema.TypeSpec{Type: "object"}, + makeValue(`{}`), + resource.NewObjectProperty(resource.PropertyMap{}), + }, + { + schema.TypeSpec{Type: "object"}, + makeValue(`{"key":"value"}`), + resource.NewObjectProperty(resource.PropertyMap{ + "key": resource.NewStringProperty("value"), + }), + }, + } + + t.Run("turnaround", func(t *testing.T) { + for i, tc := range turnaroundTestCases { + tc := tc + + t.Run(fmt.Sprintf("UnmarshalPropertyValue/%d", i), func(t *testing.T) { + t.Parallel() + checkUnmarshal(t, tc) + }) + } + }) + + t.Run("zero_values", func(t *testing.T) { + // Historically the encoding was able to convert empty strings into type-appropriate zero values. + cases := []testCase{ + { + schema.TypeSpec{Type: "boolean"}, + makeValue(""), + resource.NewBoolProperty(false), + }, + { + schema.TypeSpec{Type: "number"}, + makeValue(""), + resource.NewNumberProperty(0.), + }, + { + schema.TypeSpec{Type: "integer"}, + makeValue(""), + resource.NewNumberProperty(0), + }, + { + schema.TypeSpec{Type: "string"}, + makeValue(""), + resource.NewStringProperty(""), + }, + { + schema.TypeSpec{Type: "object"}, + makeValue(""), + resource.NewObjectProperty(make(resource.PropertyMap)), + }, + { + schema.TypeSpec{Type: "array"}, + makeValue(""), + resource.NewArrayProperty([]resource.PropertyValue{}), + }, + } + for _, tc := range cases { + tc := tc + + t.Run(fmt.Sprintf("%v", tc.ty), func(t *testing.T) { + t.Parallel() + checkUnmarshal(t, tc) + }) + } + }) + + t.Run("computed", func(t *testing.T) { + unk := makeValue(plugin.UnknownStringValue) + + for i, tc := range turnaroundTestCases { + tc := tc + + t.Run(fmt.Sprintf("UnmarshalPropertyValue/%d", i), func(t *testing.T) { + t.Parallel() + // Unknown sentinel unmarshals to a Computed with a type-appropriate zero value. + checkUnmarshal(t, testCase{ + tc.ty, + unk, + resource.MakeComputed(makeEnc(tc.ty).zeroValue(tc.ty.Type)), + }) + }) + } + }) + + t.Run("secret", func(t *testing.T) { + // Unmarshalling happens with KeepSecrets=false, replacing them with the underlying values. This case + // does not need to be tested. + // + // Marhalling however supports sending secrets back to the engine, intending to mark values as secret + // that happen on paths that are declared as secret in the schema. Due to the limitation of the + // JSON-in-proto-encoding, secrets are communicated imprecisely as an approximation: if any nested + // element of a property is secret, the entire property is marshalled as secret. + + var secretCases []testCase + + pbSecret := func(v *structpb.Value) *structpb.Value { + return structpb.NewStructValue(&structpb.Struct{Fields: map[string]*structpb.Value{ + "4dabf18193072939515e22adb298388d": makeValue("1b47061264138c4ac30d75fd1eb44270"), + "value": v, + }}) + } + + for _, tc := range turnaroundTestCases { + secretCases = append(secretCases, testCase{ + tc.ty, + pbSecret(tc.v), + resource.MakeSecret(tc.pv), + }) + } + + for i, tc := range secretCases { + tc := tc + + t.Run(fmt.Sprintf("secret/UnmarshalPropertyValue/%d", i), func(t *testing.T) { + t.Parallel() + + // Unmarshallin will remove secrts, so the expected value needs to be modified. + tc.pv = tc.pv.SecretValue().Element + checkUnmarshal(t, tc) + }) + } + + t.Run("tolerate secrets in Configure", func(t *testing.T) { + // This is a bit of a histirocal quirk: the engine may send secrets to Configure before + // receiving the response from Configure indicating that the provider does not want to receive + // secrets. These are simply ignored. The engine does not currently send secrets to CheckConfig. + // The engine does take care of making sure the secrets are stored as such in the statefile. + // + // Check here that unmarshalilng such values removes the secrets. + checkUnmarshal(t, testCase{ + schema.TypeSpec{Type: "object"}, + pbSecret(makeValue(`{"key":"val"}`)), + resource.NewObjectProperty(resource.PropertyMap{ + "key": resource.NewStringProperty("val"), + }), + }) + }) + }) + + regressUnmarshalTestCases := []testCase{ + { + schema.TypeSpec{Type: "array"}, + makeValue(` + [ + { + "address": "somewhere.org", + "password": { + "4dabf18193072939515e22adb298388d": "1b47061264138c4ac30d75fd1eb44270", + "value": "some-password" + }, + "username": "some-user" + } + ]`), + resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{ + "address": resource.NewStringProperty("somewhere.org"), + "password": resource.NewStringProperty("some-password"), + "username": resource.NewStringProperty("some-user"), + }), + }), + }, + } + + t.Run("regress-unmarshal", func(t *testing.T) { + for i, tc := range regressUnmarshalTestCases { + tc := tc + t.Run(fmt.Sprintf("UnmarshalPropertyValue/%d", i), func(t *testing.T) { + t.Parallel() + checkUnmarshal(t, tc) + }) + } + }) +} diff --git a/provider/internal/deprecated/doc.go b/provider/internal/deprecated/doc.go new file mode 100644 index 0000000..666c33b --- /dev/null +++ b/provider/internal/deprecated/doc.go @@ -0,0 +1,19 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package deprecated vendors config parsing from pulumi-terraform-bridge. +// +// Originally taken from here: +// https://github.com/pulumi/pulumi-terraform-bridge/blob/90733a0c7/pkg/tfbridge/config_encoding.go +package deprecated diff --git a/provider/internal/doc.go b/provider/internal/doc.go new file mode 100644 index 0000000..ac50355 --- /dev/null +++ b/provider/internal/doc.go @@ -0,0 +1,63 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package internal contains our clients, validation, and provider +// implementation for interacting with Docker's buildx APIs. +// +// The provider has two primary modes of operation when building an image. The +// default behavior is to use an embedded Docker CLI, which does not require to +// actually be installed on a host in order to perform builds (a build daemon +// must still be accessible locally or remotely). The second mode execs a +// "docker-buildx" binary on the host to perform builds. This second mode was +// added primarily for compatibility with Docker Build Cloud, which requires a +// custom docker-buildx binary. +// +// # CLIs +// +// In both execution modes we have several CLI clients. The first client is +// scoped to the host and initialized as part of the provider's Configure call. +// We use this CLI for host-level operations, in particular when we potentially +// initialize a new buildx builder and when we fetch existing credentials on +// the host. +// +// Each operation then has a CLI instance scoped to the life of the operation. +// This allows us to layer resource-scoped credentials on top of the host's +// existing credentials, and in practice Docker seems to handle these +// connections more reliably than a single CLI for all operations. +// +// # Credentials +// +// When using the embedded Docker client, secrets are communicated to the build +// daemon natively via gRPC callbacks. When running in exec mode, credentials +// must be communicated to the buildx binary via a configuration file. In order +// to not pollute the host's existing credentials with e.g. short-lived ECR +// tokens, we copy a small subset of the host's Docker config to a temporary +// directory and use that for the lifetime of the exec operation. +// +// # Preview mode +// +// The pulumi-go-provider primarily operates on simple Go structs and doesn't +// currently have a way to distinguish whether a value is unknown or empty. We +// ignore anything that is a zero value during previews before we apply +// validation or perform builds. +// +// # Diffs +// +// Another limitation of pulumi-go-provider is that it doesn't currently allow +// us to override the default Diff behavior. We intentionally apply +// "ignoreChanges" semantics to registry passwords, in order to reduce noise +// and unnecessary updates, but as a result we have to re-implement Diff from +// the ground up. This implementation is not nearly as rich as the default +// experience and should be replaced when an alternative is available. +package internal diff --git a/provider/internal/dockerfile.go b/provider/internal/dockerfile.go new file mode 100644 index 0000000..2ff5790 --- /dev/null +++ b/provider/internal/dockerfile.go @@ -0,0 +1,108 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "errors" + "io" + "os" + "path/filepath" + "strings" + + buildx "github.com/docker/buildx/build" + "github.com/moby/buildkit/frontend/dockerfile/instructions" + "github.com/moby/buildkit/frontend/dockerfile/parser" + + "github.com/pulumi/pulumi-go-provider/infer" +) + +// Dockerfile references a local, remote, or inline Dockerfile. +type Dockerfile struct { + Location string `pulumi:"location,optional"` + Inline string `pulumi:"inline,optional"` +} + +// Annotate sets docstrings on Dockerfile. +func (d *Dockerfile) Annotate(a infer.Annotator) { + a.Describe(&d.Location, dedent(` + Location of the Dockerfile to use. + + Can be a relative or absolute path to a local file, or a remote URL. + + Defaults to "${context.location}/Dockerfile" if context is on-disk. + + Conflicts with "inline". + `)) + a.Describe(&d.Inline, dedent(` + Raw Dockerfile contents. + + Conflicts with "location". + + Equivalent to invoking Docker with "-f -". + `)) +} + +func (d *Dockerfile) validate(preview bool, c *Context) error { + if d.Location != "" && d.Inline != "" { + return newCheckFailure( + errors.New(`only specify "file" or "inline", not both`), + "dockerfile", + ) + } + + if d.Location != "" { + if buildx.IsRemoteURL(d.Location) { + return nil + } + abs, err := filepath.Abs(d.Location) + if err != nil { + return err + } + f, err := os.Open(filepath.Clean(abs)) + if err != nil { + return newCheckFailure(err, "dockerfile.location") + } + if err := parseDockerfile(f); err != nil { + return newCheckFailure(err, "dockerfile.location") + } + return nil + } + + if d.Inline != "" { + err := parseDockerfile(strings.NewReader(d.Inline)) + if err != nil { + return newCheckFailure(err, "dockerfile.inline") + } + return nil + } + + if !preview && c != nil && !buildx.IsRemoteURL(c.Location) { + return newCheckFailure(errors.New("missing 'location' or 'inline'"), "dockerfile") + } + + return nil +} + +func parseDockerfile(r io.Reader) error { + parsed, err := parser.Parse(r) + if err != nil { + return newCheckFailure(err, "dockerfile") + } + _, _, err = instructions.Parse(parsed.AST) + if err != nil { + return err + } + return nil +} diff --git a/provider/internal/dockerfile_test.go b/provider/internal/dockerfile_test.go new file mode 100644 index 0000000..bd9fc74 --- /dev/null +++ b/provider/internal/dockerfile_test.go @@ -0,0 +1,102 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestValidateDockerfile(t *testing.T) { + t.Parallel() + tests := []struct { + name string + d Dockerfile + givenC Context + preview bool + + wantErr string + }{ + { + name: "relative", + d: Dockerfile{ + Location: "../internal/../internal/testdata/noop/Dockerfile", + }, + }, + { + name: "missing file", + d: Dockerfile{ + Location: "/does/not/exist/Dockerfile", + }, + wantErr: "no such file", + }, + { + name: "invalid syntax", + d: Dockerfile{ + Location: "testdata/Dockerfile.invalid", + }, + wantErr: "unknown instruction: RUNN", + }, + { + name: "invalid syntax inline", + d: Dockerfile{ + Inline: "RUNN it", + }, + wantErr: "unknown instruction: RUNN", + }, + { + name: "valid syntax inline", + d: Dockerfile{ + Inline: "FROM scratch", + }, + }, + { + name: "unset", + d: Dockerfile{}, + wantErr: "missing 'location' or 'inline'", + }, + { + name: "unset with remote context", + d: Dockerfile{}, + givenC: Context{Location: "https://github.com/foobar"}, + }, + { + name: "preview", + d: Dockerfile{}, + preview: true, + }, + { + name: "over-specified", + d: Dockerfile{Location: ".", Inline: "FROM scratch"}, + wantErr: `only specify "file" or "inline", not both`, + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + err := tt.d.validate(tt.preview, &tt.givenC) + + if tt.wantErr == "" { + assert.NoError(t, err) + } else { + assert.ErrorContains(t, err, tt.wantErr) + } + }) + } +} diff --git a/provider/internal/embed/image-examples.md b/provider/internal/embed/image-examples.md new file mode 100644 index 0000000..c8723ea --- /dev/null +++ b/provider/internal/embed/image-examples.md @@ -0,0 +1,1862 @@ +{{% examples %}} +## Example Usage +{{% example %}} +### Push to AWS ECR with caching + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as aws from "@pulumi/aws"; +import * as docker_build from "@pulumi/docker-build"; + +const ecrRepository = new aws.ecr.Repository("ecr-repository", {}); +const authToken = aws.ecr.getAuthorizationTokenOutput({ + registryId: ecrRepository.registryId, +}); +const myImage = new docker_build.Image("my-image", { + cacheFrom: [{ + registry: { + ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`, + }, + }], + cacheTo: [{ + registry: { + imageManifest: true, + ociMediaTypes: true, + ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`, + }, + }], + context: { + location: "./app", + }, + push: true, + registries: [{ + address: ecrRepository.repositoryUrl, + password: authToken.apply(authToken => authToken.password), + username: authToken.apply(authToken => authToken.userName), + }], + tags: [pulumi.interpolate`${ecrRepository.repositoryUrl}:latest`], +}); +export const ref = myImage.ref; +``` +```python +import pulumi +import pulumi_aws as aws +import pulumi_docker_build as docker_build + +ecr_repository = aws.ecr.Repository("ecr-repository") +auth_token = aws.ecr.get_authorization_token_output(registry_id=ecr_repository.registry_id) +my_image = docker_build.Image("my-image", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( + ref=ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"), + ), + )], + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + image_manifest=True, + oci_media_types=True, + ref=ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"), + ), + )], + context=docker_build.BuildContextArgs( + location="./app", + ), + push=True, + registries=[docker_build.RegistryArgs( + address=ecr_repository.repository_url, + password=auth_token.password, + username=auth_token.user_name, + )], + tags=[ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:latest")]) +pulumi.export("ref", my_image.ref) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using Aws = Pulumi.Aws; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var ecrRepository = new Aws.Ecr.Repository("ecr-repository"); + + var authToken = Aws.Ecr.GetAuthorizationToken.Invoke(new() + { + RegistryId = ecrRepository.RegistryId, + }); + + var myImage = new DockerBuild.Image("my-image", new() + { + CacheFrom = new[] + { + new DockerBuild.Inputs.CacheFromArgs + { + Registry = new DockerBuild.Inputs.CacheFromRegistryArgs + { + Ref = ecrRepository.RepositoryUrl.Apply(repositoryUrl => $"{repositoryUrl}:cache"), + }, + }, + }, + CacheTo = new[] + { + new DockerBuild.Inputs.CacheToArgs + { + Registry = new DockerBuild.Inputs.CacheToRegistryArgs + { + ImageManifest = true, + OciMediaTypes = true, + Ref = ecrRepository.RepositoryUrl.Apply(repositoryUrl => $"{repositoryUrl}:cache"), + }, + }, + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "./app", + }, + Push = true, + Registries = new[] + { + new DockerBuild.Inputs.RegistryArgs + { + Address = ecrRepository.RepositoryUrl, + Password = authToken.Apply(getAuthorizationTokenResult => getAuthorizationTokenResult.Password), + Username = authToken.Apply(getAuthorizationTokenResult => getAuthorizationTokenResult.UserName), + }, + }, + Tags = new[] + { + ecrRepository.RepositoryUrl.Apply(repositoryUrl => $"{repositoryUrl}:latest"), + }, + }); + + return new Dictionary + { + ["ref"] = myImage.Ref, + }; +}); + +``` +```go +package main + +import ( + "fmt" + + "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + ecrRepository, err := ecr.NewRepository(ctx, "ecr-repository", nil) + if err != nil { + return err + } + authToken := ecr.GetAuthorizationTokenOutput(ctx, ecr.GetAuthorizationTokenOutputArgs{ + RegistryId: ecrRepository.RegistryId, + }, nil) + myImage, err := dockerbuild.NewImage(ctx, "my-image", &dockerbuild.ImageArgs{ + CacheFrom: dockerbuild.CacheFromArray{ + &dockerbuild.CacheFromArgs{ + Registry: &dockerbuild.CacheFromRegistryArgs{ + Ref: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) { + return fmt.Sprintf("%v:cache", repositoryUrl), nil + }).(pulumi.StringOutput), + }, + }, + }, + CacheTo: dockerbuild.CacheToArray{ + &dockerbuild.CacheToArgs{ + Registry: &dockerbuild.CacheToRegistryArgs{ + ImageManifest: pulumi.Bool(true), + OciMediaTypes: pulumi.Bool(true), + Ref: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) { + return fmt.Sprintf("%v:cache", repositoryUrl), nil + }).(pulumi.StringOutput), + }, + }, + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("./app"), + }, + Push: pulumi.Bool(true), + Registries: dockerbuild.RegistryArray{ + &dockerbuild.RegistryArgs{ + Address: ecrRepository.RepositoryUrl, + Password: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) { + return &authToken.Password, nil + }).(pulumi.StringPtrOutput), + Username: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) { + return &authToken.UserName, nil + }).(pulumi.StringPtrOutput), + }, + }, + Tags: pulumi.StringArray{ + ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) { + return fmt.Sprintf("%v:latest", repositoryUrl), nil + }).(pulumi.StringOutput), + }, + }) + if err != nil { + return err + } + ctx.Export("ref", myImage.Ref) + return nil + }) +} +``` +```yaml +description: Push to AWS ECR with caching +name: ecr +outputs: + ref: ${my-image.ref} +resources: + ecr-repository: + type: aws:ecr:Repository + my-image: + properties: + cacheFrom: + - registry: + ref: ${ecr-repository.repositoryUrl}:cache + cacheTo: + - registry: + imageManifest: true + ociMediaTypes: true + ref: ${ecr-repository.repositoryUrl}:cache + context: + location: ./app + push: true + registries: + - address: ${ecr-repository.repositoryUrl} + password: ${auth-token.password} + username: ${auth-token.userName} + tags: + - ${ecr-repository.repositoryUrl}:latest + type: docker-build:Image +runtime: yaml +variables: + auth-token: + fn::aws:ecr:getAuthorizationToken: + registryId: ${ecr-repository.registryId} +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.aws.ecr.Repository; +import com.pulumi.aws.ecr.EcrFunctions; +import com.pulumi.aws.ecr.inputs.GetAuthorizationTokenArgs; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.CacheFromArgs; +import com.pulumi.dockerbuild.inputs.CacheFromRegistryArgs; +import com.pulumi.dockerbuild.inputs.CacheToArgs; +import com.pulumi.dockerbuild.inputs.CacheToRegistryArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import com.pulumi.dockerbuild.inputs.RegistryArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var ecrRepository = new Repository("ecrRepository"); + + final var authToken = EcrFunctions.getAuthorizationToken(GetAuthorizationTokenArgs.builder() + .registryId(ecrRepository.registryId()) + .build()); + + var myImage = new Image("myImage", ImageArgs.builder() + .cacheFrom(CacheFromArgs.builder() + .registry(CacheFromRegistryArgs.builder() + .ref(ecrRepository.repositoryUrl().applyValue(repositoryUrl -> String.format("%s:cache", repositoryUrl))) + .build()) + .build()) + .cacheTo(CacheToArgs.builder() + .registry(CacheToRegistryArgs.builder() + .imageManifest(true) + .ociMediaTypes(true) + .ref(ecrRepository.repositoryUrl().applyValue(repositoryUrl -> String.format("%s:cache", repositoryUrl))) + .build()) + .build()) + .context(BuildContextArgs.builder() + .location("./app") + .build()) + .push(true) + .registries(RegistryArgs.builder() + .address(ecrRepository.repositoryUrl()) + .password(authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult).applyValue(authToken -> authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult.password()))) + .username(authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult).applyValue(authToken -> authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult.userName()))) + .build()) + .tags(ecrRepository.repositoryUrl().applyValue(repositoryUrl -> String.format("%s:latest", repositoryUrl))) + .build()); + + ctx.export("ref", myImage.ref()); + } +} +``` +{{% /example %}} +{{% example %}} +### Multi-platform image + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const image = new docker_build.Image("image", { + context: { + location: "app", + }, + platforms: [ + docker_build.Platform.Plan9_amd64, + docker_build.Platform.Plan9_386, + ], + push: false, +}); +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + platforms=[ + docker_build.Platform.PLAN9_AMD64, + docker_build.Platform.PLAN9_386, + ], + push=False) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var image = new DockerBuild.Image("image", new() + { + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "app", + }, + Platforms = new[] + { + DockerBuild.Platform.Plan9_amd64, + DockerBuild.Platform.Plan9_386, + }, + Push = false, + }); + +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("app"), + }, + Platforms: docker - build.PlatformArray{ + dockerbuild.Platform_Plan9_amd64, + dockerbuild.Platform_Plan9_386, + }, + Push: pulumi.Bool(false), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```yaml +description: Multi-platform image +name: multi-platform +resources: + image: + properties: + context: + location: app + platforms: + - plan9/amd64 + - plan9/386 + push: false + type: docker-build:Image +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var image = new Image("image", ImageArgs.builder() + .context(BuildContextArgs.builder() + .location("app") + .build()) + .platforms( + "plan9/amd64", + "plan9/386") + .push(false) + .build()); + + } +} +``` +{{% /example %}} +{{% example %}} +### Registry export + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const image = new docker_build.Image("image", { + context: { + location: "app", + }, + push: true, + registries: [{ + address: "docker.io", + password: dockerHubPassword, + username: "pulumibot", + }], + tags: ["docker.io/pulumi/pulumi:3.107.0"], +}); +export const ref = myImage.ref; +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + push=True, + registries=[docker_build.RegistryArgs( + address="docker.io", + password=docker_hub_password, + username="pulumibot", + )], + tags=["docker.io/pulumi/pulumi:3.107.0"]) +pulumi.export("ref", my_image["ref"]) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var image = new DockerBuild.Image("image", new() + { + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "app", + }, + Push = true, + Registries = new[] + { + new DockerBuild.Inputs.RegistryArgs + { + Address = "docker.io", + Password = dockerHubPassword, + Username = "pulumibot", + }, + }, + Tags = new[] + { + "docker.io/pulumi/pulumi:3.107.0", + }, + }); + + return new Dictionary + { + ["ref"] = myImage.Ref, + }; +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("app"), + }, + Push: pulumi.Bool(true), + Registries: dockerbuild.RegistryArray{ + &dockerbuild.RegistryArgs{ + Address: pulumi.String("docker.io"), + Password: pulumi.Any(dockerHubPassword), + Username: pulumi.String("pulumibot"), + }, + }, + Tags: pulumi.StringArray{ + pulumi.String("docker.io/pulumi/pulumi:3.107.0"), + }, + }) + if err != nil { + return err + } + ctx.Export("ref", myImage.Ref) + return nil + }) +} +``` +```yaml +description: Registry export +name: registry +outputs: + ref: ${my-image.ref} +resources: + image: + properties: + context: + location: app + push: true + registries: + - address: docker.io + password: ${dockerHubPassword} + username: pulumibot + tags: + - docker.io/pulumi/pulumi:3.107.0 + type: docker-build:Image +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import com.pulumi.dockerbuild.inputs.RegistryArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var image = new Image("image", ImageArgs.builder() + .context(BuildContextArgs.builder() + .location("app") + .build()) + .push(true) + .registries(RegistryArgs.builder() + .address("docker.io") + .password(dockerHubPassword) + .username("pulumibot") + .build()) + .tags("docker.io/pulumi/pulumi:3.107.0") + .build()); + + ctx.export("ref", myImage.ref()); + } +} +``` +{{% /example %}} +{{% example %}} +### Caching + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const image = new docker_build.Image("image", { + cacheFrom: [{ + local: { + src: "tmp/cache", + }, + }], + cacheTo: [{ + local: { + dest: "tmp/cache", + mode: docker_build.CacheMode.Max, + }, + }], + context: { + location: "app", + }, + push: false, +}); +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +image = docker_build.Image("image", + cache_from=[docker_build.CacheFromArgs( + local=docker_build.CacheFromLocalArgs( + src="tmp/cache", + ), + )], + cache_to=[docker_build.CacheToArgs( + local=docker_build.CacheToLocalArgs( + dest="tmp/cache", + mode=docker_build.CacheMode.MAX, + ), + )], + context=docker_build.BuildContextArgs( + location="app", + ), + push=False) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var image = new DockerBuild.Image("image", new() + { + CacheFrom = new[] + { + new DockerBuild.Inputs.CacheFromArgs + { + Local = new DockerBuild.Inputs.CacheFromLocalArgs + { + Src = "tmp/cache", + }, + }, + }, + CacheTo = new[] + { + new DockerBuild.Inputs.CacheToArgs + { + Local = new DockerBuild.Inputs.CacheToLocalArgs + { + Dest = "tmp/cache", + Mode = DockerBuild.CacheMode.Max, + }, + }, + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "app", + }, + Push = false, + }); + +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ + CacheFrom: dockerbuild.CacheFromArray{ + &dockerbuild.CacheFromArgs{ + Local: &dockerbuild.CacheFromLocalArgs{ + Src: pulumi.String("tmp/cache"), + }, + }, + }, + CacheTo: dockerbuild.CacheToArray{ + &dockerbuild.CacheToArgs{ + Local: &dockerbuild.CacheToLocalArgs{ + Dest: pulumi.String("tmp/cache"), + Mode: dockerbuild.CacheModeMax, + }, + }, + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("app"), + }, + Push: pulumi.Bool(false), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```yaml +description: Caching +name: caching +resources: + image: + properties: + cacheFrom: + - local: + src: tmp/cache + cacheTo: + - local: + dest: tmp/cache + mode: max + context: + location: app + push: false + type: docker-build:Image +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.CacheFromArgs; +import com.pulumi.dockerbuild.inputs.CacheFromLocalArgs; +import com.pulumi.dockerbuild.inputs.CacheToArgs; +import com.pulumi.dockerbuild.inputs.CacheToLocalArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var image = new Image("image", ImageArgs.builder() + .cacheFrom(CacheFromArgs.builder() + .local(CacheFromLocalArgs.builder() + .src("tmp/cache") + .build()) + .build()) + .cacheTo(CacheToArgs.builder() + .local(CacheToLocalArgs.builder() + .dest("tmp/cache") + .mode("max") + .build()) + .build()) + .context(BuildContextArgs.builder() + .location("app") + .build()) + .push(false) + .build()); + + } +} +``` +{{% /example %}} +{{% example %}} +### Docker Build Cloud + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const image = new docker_build.Image("image", { + builder: { + name: "cloud-builder-name", + }, + context: { + location: "app", + }, + exec: true, + push: false, +}); +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +image = docker_build.Image("image", + builder=docker_build.BuilderConfigArgs( + name="cloud-builder-name", + ), + context=docker_build.BuildContextArgs( + location="app", + ), + exec_=True, + push=False) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var image = new DockerBuild.Image("image", new() + { + Builder = new DockerBuild.Inputs.BuilderConfigArgs + { + Name = "cloud-builder-name", + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "app", + }, + Exec = true, + Push = false, + }); + +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ + Builder: &dockerbuild.BuilderConfigArgs{ + Name: pulumi.String("cloud-builder-name"), + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("app"), + }, + Exec: pulumi.Bool(true), + Push: pulumi.Bool(false), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```yaml +description: Docker Build Cloud +name: dbc +resources: + image: + properties: + builder: + name: cloud-builder-name + context: + location: app + exec: true + push: false + type: docker-build:Image +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.BuilderConfigArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var image = new Image("image", ImageArgs.builder() + .builder(BuilderConfigArgs.builder() + .name("cloud-builder-name") + .build()) + .context(BuildContextArgs.builder() + .location("app") + .build()) + .exec(true) + .push(false) + .build()); + + } +} +``` +{{% /example %}} +{{% example %}} +### Build arguments + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const image = new docker_build.Image("image", { + buildArgs: { + SET_ME_TO_TRUE: "true", + }, + context: { + location: "app", + }, + push: false, +}); +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +image = docker_build.Image("image", + build_args={ + "SET_ME_TO_TRUE": "true", + }, + context=docker_build.BuildContextArgs( + location="app", + ), + push=False) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var image = new DockerBuild.Image("image", new() + { + BuildArgs = + { + { "SET_ME_TO_TRUE", "true" }, + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "app", + }, + Push = false, + }); + +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ + BuildArgs: pulumi.StringMap{ + "SET_ME_TO_TRUE": pulumi.String("true"), + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("app"), + }, + Push: pulumi.Bool(false), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```yaml +description: Build arguments +name: build-args +resources: + image: + properties: + buildArgs: + SET_ME_TO_TRUE: "true" + context: + location: app + push: false + type: docker-build:Image +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var image = new Image("image", ImageArgs.builder() + .buildArgs(Map.of("SET_ME_TO_TRUE", "true")) + .context(BuildContextArgs.builder() + .location("app") + .build()) + .push(false) + .build()); + + } +} +``` +{{% /example %}} +{{% example %}} +### Build target + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const image = new docker_build.Image("image", { + context: { + location: "app", + }, + push: false, + target: "build-me", +}); +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + push=False, + target="build-me") +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var image = new DockerBuild.Image("image", new() + { + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "app", + }, + Push = false, + Target = "build-me", + }); + +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("app"), + }, + Push: pulumi.Bool(false), + Target: pulumi.String("build-me"), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```yaml +description: Build target +name: build-target +resources: + image: + properties: + context: + location: app + push: false + target: build-me + type: docker-build:Image +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var image = new Image("image", ImageArgs.builder() + .context(BuildContextArgs.builder() + .location("app") + .build()) + .push(false) + .target("build-me") + .build()); + + } +} +``` +{{% /example %}} +{{% example %}} +### Named contexts + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const image = new docker_build.Image("image", { + context: { + location: "app", + named: { + "golang:latest": { + location: "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", + }, + }, + }, + push: false, +}); +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + named={ + "golang:latest": docker_build.ContextArgs( + location="docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", + ), + }, + ), + push=False) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var image = new DockerBuild.Image("image", new() + { + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "app", + Named = + { + { "golang:latest", new DockerBuild.Inputs.ContextArgs + { + Location = "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", + } }, + }, + }, + Push = false, + }); + +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("app"), + Named: dockerbuild.ContextMap{ + "golang:latest": &dockerbuild.ContextArgs{ + Location: pulumi.String("docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"), + }, + }, + }, + Push: pulumi.Bool(false), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```yaml +description: Named contexts +name: named-contexts +resources: + image: + properties: + context: + location: app + named: + golang:latest: + location: docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984 + push: false + type: docker-build:Image +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var image = new Image("image", ImageArgs.builder() + .context(BuildContextArgs.builder() + .location("app") + .named(Map.of("golang:latest", Map.of("location", "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"))) + .build()) + .push(false) + .build()); + + } +} +``` +{{% /example %}} +{{% example %}} +### Remote context + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const image = new docker_build.Image("image", { + context: { + location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + }, + push: false, +}); +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + ), + push=False) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var image = new DockerBuild.Image("image", new() + { + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + }, + Push = false, + }); + +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"), + }, + Push: pulumi.Bool(false), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```yaml +description: Remote context +name: remote-context +resources: + image: + properties: + context: + location: https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile + push: false + type: docker-build:Image +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var image = new Image("image", ImageArgs.builder() + .context(BuildContextArgs.builder() + .location("https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile") + .build()) + .push(false) + .build()); + + } +} +``` +{{% /example %}} +{{% example %}} +### Inline Dockerfile + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const image = new docker_build.Image("image", { + context: { + location: "app", + }, + dockerfile: { + inline: `FROM busybox +COPY hello.c ./ +`, + }, + push: false, +}); +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + dockerfile=docker_build.DockerfileArgs( + inline="""FROM busybox +COPY hello.c ./ +""", + ), + push=False) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var image = new DockerBuild.Image("image", new() + { + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "app", + }, + Dockerfile = new DockerBuild.Inputs.DockerfileArgs + { + Inline = @"FROM busybox +COPY hello.c ./ +", + }, + Push = false, + }); + +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("app"), + }, + Dockerfile: &dockerbuild.DockerfileArgs{ + Inline: pulumi.String("FROM busybox\nCOPY hello.c ./\n"), + }, + Push: pulumi.Bool(false), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```yaml +description: Inline Dockerfile +name: inline +resources: + image: + properties: + context: + location: app + dockerfile: + inline: | + FROM busybox + COPY hello.c ./ + push: false + type: docker-build:Image +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import com.pulumi.dockerbuild.inputs.DockerfileArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var image = new Image("image", ImageArgs.builder() + .context(BuildContextArgs.builder() + .location("app") + .build()) + .dockerfile(DockerfileArgs.builder() + .inline(""" +FROM busybox +COPY hello.c ./ + """) + .build()) + .push(false) + .build()); + + } +} +``` +{{% /example %}} +{{% example %}} +### Remote context + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const image = new docker_build.Image("image", { + context: { + location: "https://github.com/docker-library/hello-world.git", + }, + dockerfile: { + location: "app/Dockerfile", + }, + push: false, +}); +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="https://github.com/docker-library/hello-world.git", + ), + dockerfile=docker_build.DockerfileArgs( + location="app/Dockerfile", + ), + push=False) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var image = new DockerBuild.Image("image", new() + { + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "https://github.com/docker-library/hello-world.git", + }, + Dockerfile = new DockerBuild.Inputs.DockerfileArgs + { + Location = "app/Dockerfile", + }, + Push = false, + }); + +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("https://github.com/docker-library/hello-world.git"), + }, + Dockerfile: &dockerbuild.DockerfileArgs{ + Location: pulumi.String("app/Dockerfile"), + }, + Push: pulumi.Bool(false), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```yaml +description: Remote context +name: remote-context +resources: + image: + properties: + context: + location: https://github.com/docker-library/hello-world.git + dockerfile: + location: app/Dockerfile + push: false + type: docker-build:Image +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import com.pulumi.dockerbuild.inputs.DockerfileArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var image = new Image("image", ImageArgs.builder() + .context(BuildContextArgs.builder() + .location("https://github.com/docker-library/hello-world.git") + .build()) + .dockerfile(DockerfileArgs.builder() + .location("app/Dockerfile") + .build()) + .push(false) + .build()); + + } +} +``` +{{% /example %}} +{{% example %}} +### Local export + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const image = new docker_build.Image("image", { + context: { + location: "app", + }, + exports: [{ + docker: { + tar: true, + }, + }], + push: false, +}); +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + exports=[docker_build.ExportArgs( + docker=docker_build.ExportDockerArgs( + tar=True, + ), + )], + push=False) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var image = new DockerBuild.Image("image", new() + { + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "app", + }, + Exports = new[] + { + new DockerBuild.Inputs.ExportArgs + { + Docker = new DockerBuild.Inputs.ExportDockerArgs + { + Tar = true, + }, + }, + }, + Push = false, + }); + +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("app"), + }, + Exports: dockerbuild.ExportArray{ + &dockerbuild.ExportArgs{ + Docker: &dockerbuild.ExportDockerArgs{ + Tar: pulumi.Bool(true), + }, + }, + }, + Push: pulumi.Bool(false), + }) + if err != nil { + return err + } + return nil + }) +} +``` +```yaml +description: Local export +name: docker-load +resources: + image: + properties: + context: + location: app + exports: + - docker: + tar: true + push: false + type: docker-build:Image +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import com.pulumi.dockerbuild.inputs.ExportArgs; +import com.pulumi.dockerbuild.inputs.ExportDockerArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var image = new Image("image", ImageArgs.builder() + .context(BuildContextArgs.builder() + .location("app") + .build()) + .exports(ExportArgs.builder() + .docker(ExportDockerArgs.builder() + .tar(true) + .build()) + .build()) + .push(false) + .build()); + + } +} +``` +{{% /example %}} +{{% /examples %}} \ No newline at end of file diff --git a/provider/internal/embed/image-migration.md b/provider/internal/embed/image-migration.md new file mode 100644 index 0000000..9e85b93 --- /dev/null +++ b/provider/internal/embed/image-migration.md @@ -0,0 +1,224 @@ +## Migrating Pulumi Docker v3 and v4 Image resources + +This provider's `Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider. +Existing `Image` resources can be converted to the docker-build `Image` resources with minor modifications. + +### Behavioral differences + +There are several key behavioral differences to keep in mind when transitioning images to the new `Image` resource. + +#### Previews + +Version `3.x` of the Pulumi Docker provider always builds images during preview operations. +This is helpful as a safeguard to prevent "broken" images from merging, but users found the behavior unnecessarily redundant when running previews and updates locally. + +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. +Several users reported outages due to the default behavior allowing bad images to accidentally sneak through CI. + +The default behavior of this provider's `Image` resource is similar to `3.x` and will build images during previews. +This behavior can be changed by specifying `buildOnPreview`. + +#### Push behavior + +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. + +This provider's `Image` resource matches the Docker CLI's behavior and does not push images anywhere by default. + +To push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`). +Like Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally. + +#### Secrets + +Version `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field. + +Version `4.x` of the Pulumi Docker provider does not support secrets. + +The `Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables. +Instead, they should be passed directly as values. +(Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).) +Pulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments. + +#### Caching + +Version `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`. +It builds targets individually and pushes them to separate images for caching. + +Version `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches. + +Both versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior. +This can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc. + +The `Image` resource delegates all caching behavior to Docker. +`cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc. + +#### Outputs + +Versions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest. +In `4.x` this could also be a single sha256 hash if the image wasn't pushed. + +Unlike earlier providers the `Image` resource can push multiple tags. +As a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed. +If multiple tags were pushed this uses one at random. + +If you need more control over tag references you can use the `digest` output, which is always a single sha256 hash as long as the image was exported somewhere. + +#### Tag deletion and refreshes + +Versions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` resource is deleted, nor do they confirm expected tags exist during `refresh` operations. + +The `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist. +If any are missing a subsequent `update` will push them. + +When a `Image` is deleted, it will _attempt_ to also delete any pushed tags. +Deletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular). +Manifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace. + +Use the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted. + +### Example migration + +Examples of "fully-featured" `v3` and `v4` `Image` resources are shown below, along with an example `Image` resource showing how they would look after migration. + +The `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`. +After migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`. +In almost all cases, properties of `Image` are named after the Docker CLI flag they correspond to. + +The `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`. +It it is shown with parameters similar to the `v3` example for completeness. + +{{% examples %}} +## Example Usage +{{% example %}} +### v3/v4 migration + +```typescript + +// v3 Image +const v3 = new docker.Image("v3-image", { + imageName: "myregistry.com/user/repo:latest", + localImageName: "local-tag", + skipPush: false, + build: { + dockerfile: "./Dockerfile", + context: "../app", + target: "mytarget", + args: { + MY_BUILD_ARG: "foo", + }, + env: { + DOCKER_BUILDKIT: "1", + }, + extraOptions: [ + "--cache-from", + "type=registry,myregistry.com/user/repo:cache", + "--cache-to", + "type=registry,myregistry.com/user/repo:cache", + "--add-host", + "metadata.google.internal:169.254.169.254", + "--secret", + "id=mysecret,src=/local/secret", + "--ssh", + "default=/home/runner/.ssh/id_ed25519", + "--network", + "host", + "--platform", + "linux/amd64", + ], + }, + registry: { + server: "myregistry.com", + username: "username", + password: pulumi.secret("password"), + }, +}); + +// v3 Image after migrating to docker-build.Image +const v3Migrated = new dockerbuild.Image("v3-to-buildx", { + tags: ["myregistry.com/user/repo:latest", "local-tag"], + push: true, + dockerfile: { + location: "./Dockerfile", + }, + context: { + location: "../app", + }, + target: "mytarget", + buildArgs: { + MY_BUILD_ARG: "foo", + }, + cacheFrom: [{ registry: { ref: "myregistry.com/user/repo:cache" } }], + cacheTo: [{ registry: { ref: "myregistry.com/user/repo:cache" } }], + secrets: { + mysecret: "value", + }, + addHosts: ["metadata.google.internal:169.254.169.254"], + ssh: { + default: ["/home/runner/.ssh/id_ed25519"], + }, + network: "host", + platforms: ["linux/amd64"], + registries: [{ + address: "myregistry.com", + username: "username", + password: pulumi.secret("password"), + }], +}); + + +// v4 Image +const v4 = new docker.Image("v4-image", { + imageName: "myregistry.com/user/repo:latest", + skipPush: false, + build: { + dockerfile: "./Dockerfile", + context: "../app", + target: "mytarget", + args: { + MY_BUILD_ARG: "foo", + }, + cacheFrom: { + images: ["myregistry.com/user/repo:cache"], + }, + addHosts: ["metadata.google.internal:169.254.169.254"], + network: "host", + platform: "linux/amd64", + }, + buildOnPreview: true, + registry: { + server: "myregistry.com", + username: "username", + password: pulumi.secret("password"), + }, +}); + +// v4 Image after migrating to docker-build.Image +const v4Migrated = new dockerbuild.Image("v4-to-buildx", { + tags: ["myregistry.com/user/repo:latest"], + push: true, + dockerfile: { + location: "./Dockerfile", + }, + context: { + location: "../app", + }, + target: "mytarget", + buildArgs: { + MY_BUILD_ARG: "foo", + }, + cacheFrom: [{ registry: { ref: "myregistry.com/user/repo:cache" } }], + cacheTo: [{ registry: { ref: "myregistry.com/user/repo:cache" } }], + addHosts: ["metadata.google.internal:169.254.169.254"], + network: "host", + platforms: ["linux/amd64"], + registries: [{ + address: "myregistry.com", + username: "username", + password: pulumi.secret("password"), + }], +}); + +``` + +{{% /example %}} diff --git a/provider/internal/embed/index-examples.md b/provider/internal/embed/index-examples.md new file mode 100644 index 0000000..415b026 --- /dev/null +++ b/provider/internal/embed/index-examples.md @@ -0,0 +1,408 @@ +{{% examples %}} +## Example Usage +{{% example %}} +### Multi-platform registry caching + +```typescript +import * as pulumi from "@pulumi/pulumi"; +import * as docker_build from "@pulumi/docker-build"; + +const amd64 = new docker_build.Image("amd64", { + cacheFrom: [{ + registry: { + ref: "docker.io/pulumi/pulumi:cache-amd64", + }, + }], + cacheTo: [{ + registry: { + mode: docker_build.CacheMode.Max, + ref: "docker.io/pulumi/pulumi:cache-amd64", + }, + }], + context: { + location: "app", + }, + platforms: [docker_build.Platform.Linux_amd64], + tags: ["docker.io/pulumi/pulumi:3.107.0-amd64"], +}); +const arm64 = new docker_build.Image("arm64", { + cacheFrom: [{ + registry: { + ref: "docker.io/pulumi/pulumi:cache-arm64", + }, + }], + cacheTo: [{ + registry: { + mode: docker_build.CacheMode.Max, + ref: "docker.io/pulumi/pulumi:cache-arm64", + }, + }], + context: { + location: "app", + }, + platforms: [docker_build.Platform.Linux_arm64], + tags: ["docker.io/pulumi/pulumi:3.107.0-arm64"], +}); +const index = new docker_build.Index("index", { + sources: [ + amd64.ref, + arm64.ref, + ], + tag: "docker.io/pulumi/pulumi:3.107.0", +}); +export const ref = index.ref; +``` +```python +import pulumi +import pulumi_docker_build as docker_build + +amd64 = docker_build.Image("amd64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( + ref="docker.io/pulumi/pulumi:cache-amd64", + ), + )], + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, + ref="docker.io/pulumi/pulumi:cache-amd64", + ), + )], + context=docker_build.BuildContextArgs( + location="app", + ), + platforms=[docker_build.Platform.LINUX_AMD64], + tags=["docker.io/pulumi/pulumi:3.107.0-amd64"]) +arm64 = docker_build.Image("arm64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( + ref="docker.io/pulumi/pulumi:cache-arm64", + ), + )], + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, + ref="docker.io/pulumi/pulumi:cache-arm64", + ), + )], + context=docker_build.BuildContextArgs( + location="app", + ), + platforms=[docker_build.Platform.LINUX_ARM64], + tags=["docker.io/pulumi/pulumi:3.107.0-arm64"]) +index = docker_build.Index("index", + sources=[ + amd64.ref, + arm64.ref, + ], + tag="docker.io/pulumi/pulumi:3.107.0") +pulumi.export("ref", index.ref) +``` +```csharp +using System.Collections.Generic; +using System.Linq; +using Pulumi; +using DockerBuild = Pulumi.DockerBuild; + +return await Deployment.RunAsync(() => +{ + var amd64 = new DockerBuild.Image("amd64", new() + { + CacheFrom = new[] + { + new DockerBuild.Inputs.CacheFromArgs + { + Registry = new DockerBuild.Inputs.CacheFromRegistryArgs + { + Ref = "docker.io/pulumi/pulumi:cache-amd64", + }, + }, + }, + CacheTo = new[] + { + new DockerBuild.Inputs.CacheToArgs + { + Registry = new DockerBuild.Inputs.CacheToRegistryArgs + { + Mode = DockerBuild.CacheMode.Max, + Ref = "docker.io/pulumi/pulumi:cache-amd64", + }, + }, + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "app", + }, + Platforms = new[] + { + DockerBuild.Platform.Linux_amd64, + }, + Tags = new[] + { + "docker.io/pulumi/pulumi:3.107.0-amd64", + }, + }); + + var arm64 = new DockerBuild.Image("arm64", new() + { + CacheFrom = new[] + { + new DockerBuild.Inputs.CacheFromArgs + { + Registry = new DockerBuild.Inputs.CacheFromRegistryArgs + { + Ref = "docker.io/pulumi/pulumi:cache-arm64", + }, + }, + }, + CacheTo = new[] + { + new DockerBuild.Inputs.CacheToArgs + { + Registry = new DockerBuild.Inputs.CacheToRegistryArgs + { + Mode = DockerBuild.CacheMode.Max, + Ref = "docker.io/pulumi/pulumi:cache-arm64", + }, + }, + }, + Context = new DockerBuild.Inputs.BuildContextArgs + { + Location = "app", + }, + Platforms = new[] + { + DockerBuild.Platform.Linux_arm64, + }, + Tags = new[] + { + "docker.io/pulumi/pulumi:3.107.0-arm64", + }, + }); + + var index = new DockerBuild.Index("index", new() + { + Sources = new[] + { + amd64.Ref, + arm64.Ref, + }, + Tag = "docker.io/pulumi/pulumi:3.107.0", + }); + + return new Dictionary + { + ["ref"] = index.Ref, + }; +}); + +``` +```go +package main + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func main() { + pulumi.Run(func(ctx *pulumi.Context) error { + amd64, err := dockerbuild.NewImage(ctx, "amd64", &dockerbuild.ImageArgs{ + CacheFrom: dockerbuild.CacheFromArray{ + &dockerbuild.CacheFromArgs{ + Registry: &dockerbuild.CacheFromRegistryArgs{ + Ref: pulumi.String("docker.io/pulumi/pulumi:cache-amd64"), + }, + }, + }, + CacheTo: dockerbuild.CacheToArray{ + &dockerbuild.CacheToArgs{ + Registry: &dockerbuild.CacheToRegistryArgs{ + Mode: dockerbuild.CacheModeMax, + Ref: pulumi.String("docker.io/pulumi/pulumi:cache-amd64"), + }, + }, + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("app"), + }, + Platforms: docker - build.PlatformArray{ + dockerbuild.Platform_Linux_amd64, + }, + Tags: pulumi.StringArray{ + pulumi.String("docker.io/pulumi/pulumi:3.107.0-amd64"), + }, + }) + if err != nil { + return err + } + arm64, err := dockerbuild.NewImage(ctx, "arm64", &dockerbuild.ImageArgs{ + CacheFrom: dockerbuild.CacheFromArray{ + &dockerbuild.CacheFromArgs{ + Registry: &dockerbuild.CacheFromRegistryArgs{ + Ref: pulumi.String("docker.io/pulumi/pulumi:cache-arm64"), + }, + }, + }, + CacheTo: dockerbuild.CacheToArray{ + &dockerbuild.CacheToArgs{ + Registry: &dockerbuild.CacheToRegistryArgs{ + Mode: dockerbuild.CacheModeMax, + Ref: pulumi.String("docker.io/pulumi/pulumi:cache-arm64"), + }, + }, + }, + Context: &dockerbuild.BuildContextArgs{ + Location: pulumi.String("app"), + }, + Platforms: docker - build.PlatformArray{ + dockerbuild.Platform_Linux_arm64, + }, + Tags: pulumi.StringArray{ + pulumi.String("docker.io/pulumi/pulumi:3.107.0-arm64"), + }, + }) + if err != nil { + return err + } + index, err := dockerbuild.NewIndex(ctx, "index", &dockerbuild.IndexArgs{ + Sources: pulumi.StringArray{ + amd64.Ref, + arm64.Ref, + }, + Tag: pulumi.String("docker.io/pulumi/pulumi:3.107.0"), + }) + if err != nil { + return err + } + ctx.Export("ref", index.Ref) + return nil + }) +} +``` +```yaml +description: Multi-platform registry caching +name: registry-caching +outputs: + ref: ${index.ref} +resources: + amd64: + properties: + cacheFrom: + - registry: + ref: docker.io/pulumi/pulumi:cache-amd64 + cacheTo: + - registry: + mode: max + ref: docker.io/pulumi/pulumi:cache-amd64 + context: + location: app + platforms: + - linux/amd64 + tags: + - docker.io/pulumi/pulumi:3.107.0-amd64 + type: docker-build:Image + arm64: + properties: + cacheFrom: + - registry: + ref: docker.io/pulumi/pulumi:cache-arm64 + cacheTo: + - registry: + mode: max + ref: docker.io/pulumi/pulumi:cache-arm64 + context: + location: app + platforms: + - linux/arm64 + tags: + - docker.io/pulumi/pulumi:3.107.0-arm64 + type: docker-build:Image + index: + properties: + sources: + - ${amd64.ref} + - ${arm64.ref} + tag: docker.io/pulumi/pulumi:3.107.0 + type: docker-build:Index +runtime: yaml +``` +```java +package generated_program; + +import com.pulumi.Context; +import com.pulumi.Pulumi; +import com.pulumi.core.Output; +import com.pulumi.dockerbuild.Image; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.inputs.CacheFromArgs; +import com.pulumi.dockerbuild.inputs.CacheFromRegistryArgs; +import com.pulumi.dockerbuild.inputs.CacheToArgs; +import com.pulumi.dockerbuild.inputs.CacheToRegistryArgs; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import com.pulumi.dockerbuild.Index; +import com.pulumi.dockerbuild.IndexArgs; +import java.util.List; +import java.util.ArrayList; +import java.util.Map; +import java.io.File; +import java.nio.file.Files; +import java.nio.file.Paths; + +public class App { + public static void main(String[] args) { + Pulumi.run(App::stack); + } + + public static void stack(Context ctx) { + var amd64 = new Image("amd64", ImageArgs.builder() + .cacheFrom(CacheFromArgs.builder() + .registry(CacheFromRegistryArgs.builder() + .ref("docker.io/pulumi/pulumi:cache-amd64") + .build()) + .build()) + .cacheTo(CacheToArgs.builder() + .registry(CacheToRegistryArgs.builder() + .mode("max") + .ref("docker.io/pulumi/pulumi:cache-amd64") + .build()) + .build()) + .context(BuildContextArgs.builder() + .location("app") + .build()) + .platforms("linux/amd64") + .tags("docker.io/pulumi/pulumi:3.107.0-amd64") + .build()); + + var arm64 = new Image("arm64", ImageArgs.builder() + .cacheFrom(CacheFromArgs.builder() + .registry(CacheFromRegistryArgs.builder() + .ref("docker.io/pulumi/pulumi:cache-arm64") + .build()) + .build()) + .cacheTo(CacheToArgs.builder() + .registry(CacheToRegistryArgs.builder() + .mode("max") + .ref("docker.io/pulumi/pulumi:cache-arm64") + .build()) + .build()) + .context(BuildContextArgs.builder() + .location("app") + .build()) + .platforms("linux/arm64") + .tags("docker.io/pulumi/pulumi:3.107.0-arm64") + .build()); + + var index = new Index("index", IndexArgs.builder() + .sources( + amd64.ref(), + arm64.ref()) + .tag("docker.io/pulumi/pulumi:3.107.0") + .build()); + + ctx.export("ref", index.ref()); + } +} +``` +{{% /example %}} +{{% /examples %}} \ No newline at end of file diff --git a/provider/internal/export.go b/provider/internal/export.go new file mode 100644 index 0000000..260c69a --- /dev/null +++ b/provider/internal/export.go @@ -0,0 +1,475 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "errors" + "fmt" + "slices" + "strings" + + controllerapi "github.com/docker/buildx/controller/pb" + "github.com/docker/buildx/util/buildflags" + + "github.com/pulumi/pulumi-go-provider/infer" +) + +var ( + _ fmt.Stringer = (*Export)(nil) + _ fmt.Stringer = (*ExportDocker)(nil) + _ fmt.Stringer = (*ExportImage)(nil) + _ fmt.Stringer = (*ExportLocal)(nil) + _ fmt.Stringer = (*ExportOCI)(nil) + _ fmt.Stringer = (*ExportRegistry)(nil) + _ fmt.Stringer = (*ExportTar)(nil) + _ fmt.Stringer = ExportWithAnnotations{} + _ fmt.Stringer = ExportWithCompression{} + _ fmt.Stringer = ExportWithNames{} + _ fmt.Stringer = ExportWithOCI{} + _ infer.Annotated = (*Export)(nil) + _ infer.Annotated = (*ExportDocker)(nil) + _ infer.Annotated = (*ExportImage)(nil) + _ infer.Annotated = (*ExportLocal)(nil) + _ infer.Annotated = (*ExportOCI)(nil) + _ infer.Annotated = (*ExportRegistry)(nil) + _ infer.Annotated = (*ExportTar)(nil) +) + +// Export is a "union" type for all of our available `--output` options. +type Export struct { + Tar *ExportTar `pulumi:"tar,optional"` + Local *ExportLocal `pulumi:"local,optional"` + Registry *ExportRegistry `pulumi:"registry,optional"` + Image *ExportImage `pulumi:"image,optional"` + OCI *ExportOCI `pulumi:"oci,optional"` + Docker *ExportDocker `pulumi:"docker,optional"` + CacheOnly *ExportCacheOnly `pulumi:"cacheonly,optional"` + Raw Raw `pulumi:"raw,optional"` + + Disabled bool `pulumi:"disabled,optional"` +} + +// Annotate sets docstrings on Export. +func (e *Export) Annotate(a infer.Annotator) { + a.Describe(&e.Tar, dedent(` + Export to a local directory as a tarball.`, + )) + a.Describe(&e.Local, dedent(` + Export to a local directory as files and directories.`, + )) + a.Describe(&e.Registry, dedent(` + Identical to the Image exporter, but pushes by default.`, + )) + a.Describe(&e.Image, dedent(` + Outputs the build result into a container image format.`, + )) + a.Describe(&e.OCI, dedent(` + Identical to the Docker exporter but uses OCI media types by default.`, + )) + a.Describe(&e.Docker, dedent(` + Export as a Docker image layout.`, + )) + a.Describe(&e.Raw, dedent(` + A raw string as you would provide it to the Docker CLI (e.g., + "type=docker")`, + )) + a.Describe(&e.CacheOnly, dedent(` + A no-op export. Helpful for silencing the 'no exports' warning if you + just want to populate caches. + `)) + + a.Describe(&e.Disabled, dedent(` + When "true" this entry will be excluded. Defaults to "false". + `)) +} + +// String returns a CLI-encoded value for this `--output` entry, or an empty +// string if disabled. `validate` should be called to ensure only one entry was +// set. +func (e Export) String() string { + if e.Disabled { + return "" + } + return join(e.Tar, e.Local, e.Registry, e.Image, e.OCI, e.Docker, e.CacheOnly, e.Raw) +} + +// pushed returns true if the export would result in a registry push. +func (e Export) pushed() bool { + if e.Raw != "" { + exp, err := buildflags.ParseExports([]string{e.Raw.String()}) + if err != nil { + return false + } + return exp[0].Attrs["push"] == "true" + } + if e.Registry != nil { + return e.Registry.Push == nil || *e.Registry.Push + } + if e.Image != nil { + return e.Image.Push != nil && *e.Image.Push + } + return false +} + +func (e Export) validate(preview bool, tags []string) (*controllerapi.ExportEntry, error) { + if strings.Count(e.String(), "type=") > 1 { + return nil, errors.New("exports should only specify one export type") + } + ee, err := buildflags.ParseExports([]string{e.String()}) + if err != nil { + return nil, err + } + exp := ee[0] + if len(tags) == 0 && isRegistryPush(exp) && exp.Attrs["name"] == "" { + return nil, errors.New( + "at least one tag or export name is needed when pushing to a registry", + ) + } + if !preview { + return exp, nil + } + + // Don't perform registry pushes during previews. + if exp.Type == "image" { + exp.Attrs["push"] = "false" + } + return exp, nil +} + +// ExportCacheOnly is a dummy/no-op --cache-to entry. It exists only to help +// silence the "no exports configured" warning. By using this the user signals +// that they intentionally do not want exports, and only caches will be +// populated as a result. +type ExportCacheOnly struct{} + +// String returns the CLI-encoded value of these export options, or an empty +// string if the receiver is nil. +func (e *ExportCacheOnly) String() string { + if e == nil { + return "" + } + return "type=cacheonly" +} + +// ExportDocker pushes the final image to the local build daemon. +type ExportDocker struct { + ExportWithOCI + ExportWithCompression + ExportWithAnnotations + ExportWithNames + + Dest string `pulumi:"dest,optional"` + Tar *bool `pulumi:"tar,optional"` +} + +// Annotate sets docstrings and defaults on ExportDocker. +func (e *ExportDocker) Annotate(a infer.Annotator) { + a.SetDefault(&e.Tar, true) + + a.Describe(&e.Dest, "The local export path.") + a.Describe(&e.Tar, "Bundle the output into a tarball layout.") +} + +// String returns the CLI-encoded value of these export options, or an empty +// string if the receiver is nil. +func (e *ExportDocker) String() string { + if e == nil { + return "" + } + parts := []string{} + if e.Dest != "" { + parts = append(parts, "dest="+e.Dest) + } + if e.Tar != nil { + parts = append(parts, fmt.Sprintf("tar=%t", *e.Tar)) + } + + return join( + Raw("type=docker"), + Raw(strings.Join(parts, ",")), + e.ExportWithOCI, + e.ExportWithCompression, + e.ExportWithAnnotations, + e.ExportWithNames, + ) +} + +// ExportOCI is a cache that defaults to using OCI media types. +type ExportOCI struct { + ExportDocker +} + +// Annotate sets docstrings and defaults on ExportOCI. +func (e *ExportOCI) Annotate(a infer.Annotator) { + a.SetDefault(&e.OCI, true) + a.Describe(&e.OCI, "Use OCI media types in exporter manifests.") +} + +func (e *ExportOCI) String() string { + if e == nil { + return "" + } + return strings.Replace(e.ExportDocker.String(), "type=docker", "type=oci", 1) +} + +// ExportImage can push the final image to remote registries. +type ExportImage struct { + ExportWithOCI + ExportWithCompression + ExportWithNames + ExportWithAnnotations + + Push *bool `pulumi:"push,optional"` + PushByDigest *bool `pulumi:"pushByDigest,optional"` + Insecure *bool `pulumi:"insecure,optional"` + DanglingNamePrefix string `pulumi:"danglingNamePrefix,optional"` + NameCanonical *bool `pulumi:"nameCanonical,optional"` + Unpack *bool `pulumi:"unpack,optional"` + Store *bool `pulumi:"store,optional"` +} + +// Annotate sets docstrings and defaults on ExportImage. +func (e *ExportImage) Annotate(a infer.Annotator) { + a.SetDefault(&e.Store, true) + + a.Describe(&e.Store, dedent(` + Store resulting images to the worker's image store and ensure all of + its blobs are in the content store. + + Defaults to "true". + + Ignored if the worker doesn't have image store (when using OCI workers, + for example). + `)) + a.Describe(&e.Push, dedent(` + Push after creating the image. Defaults to "false". + `)) + a.Describe(&e.DanglingNamePrefix, dedent(` + Name image with "prefix@", used for anonymous images. + `)) + a.Describe(&e.NameCanonical, dedent(` + Add additional canonical name ("name@"). + `)) + a.Describe(&e.Insecure, dedent(` + Allow pushing to an insecure registry. + `)) + a.Describe(&e.PushByDigest, dedent(` + Push image without name. + `)) + a.Describe(&e.Unpack, dedent(` + Unpack image after creation (for use with containerd). Defaults to + "false". + `)) +} + +// String returns the CLI-encoded value of these export options, or an empty +// string if the receiver is nil. +func (e *ExportImage) String() string { + if e == nil { + return "" + } + parts := []string{} + if e.Push != nil { + parts = append(parts, fmt.Sprintf("push=%t", *e.Push)) + } + if e.PushByDigest != nil { + parts = append(parts, fmt.Sprintf("push-by-digest=%t", *e.PushByDigest)) + } + if e.Insecure != nil { + parts = append(parts, fmt.Sprintf("insecure=%t", *e.Insecure)) + } + if e.DanglingNamePrefix != "" { + parts = append(parts, "dangling-name-prefix="+e.DanglingNamePrefix) + } + if e.NameCanonical != nil { + parts = append(parts, fmt.Sprintf("name-canonical=%t", *e.NameCanonical)) + } + if e.Unpack != nil { + parts = append(parts, fmt.Sprintf("unpack=%t", *e.Unpack)) + } + if e.Store != nil { + parts = append(parts, fmt.Sprintf("store=%t", *e.Store)) + } + return join( + Raw("type=image"), + Raw(strings.Join(parts, ",")), + e.ExportWithOCI, + e.ExportWithCompression, + e.ExportWithNames, + e.ExportWithAnnotations, + ) +} + +// ExportRegistry is equivalent to ExportImage but defaults to push=true. +type ExportRegistry struct { + ExportImage +} + +// Annotate sets docstrings and defaults on ExportRegistry. +func (e *ExportRegistry) Annotate(a infer.Annotator) { + a.Describe(&e.Push, dedent(` + Push after creating the image. Defaults to "true". + `)) + a.SetDefault(&e.Push, true) +} + +// String returns the CLI-encoded value of these export options, or an empty +// string if the receiver is nil. +func (e *ExportRegistry) String() string { + if e == nil { + return "" + } + return strings.Replace(e.ExportImage.String(), "type=image", "type=registry", 1) +} + +// ExportLocal writes the final image to disk. +type ExportLocal struct { + Dest string `pulumi:"dest"` +} + +// String returns the CLI-encoded value of these export options, or an empty +// string if the receiver is nil. +func (e *ExportLocal) String() string { + if e == nil { + return "" + } + return "type=local,dest=" + e.Dest +} + +// Annotate sets docstrings on ExportLocal. +func (e *ExportLocal) Annotate(a infer.Annotator) { + a.Describe(&e.Dest, "Output path.") +} + +// ExportTar is an export that uses the tar format for exporting. +type ExportTar struct { + ExportLocal +} + +func (e *ExportTar) String() string { + if e == nil { + return "" + } + return "type=tar,dest=" + e.Dest +} + +// ExportWithOCI is an export that support OCI media types. +type ExportWithOCI struct { + OCI *bool `pulumi:"ociMediaTypes,optional"` +} + +// Annotate sets defaults on ExportWithOCI. +func (c *ExportWithOCI) Annotate(a infer.Annotator) { + a.SetDefault(&c.OCI, false) + a.Describe(&c.OCI, "Use OCI media types in exporter manifests.") +} + +func (c ExportWithOCI) String() string { + if c.OCI == nil { + return "" + } + return fmt.Sprintf("oci-mediatypes=%t", *c.OCI) +} + +// ExportWithCompression is an export with options to configure compression +// settings. +type ExportWithCompression struct { + Compression *CompressionType `pulumi:"compression,optional"` + CompressionLevel int `pulumi:"compressionLevel,optional"` + ForceCompression *bool `pulumi:"forceCompression,optional"` +} + +// Annotate sets docstrings and defaults on ExportWithCompression. +func (e *ExportWithCompression) Annotate(a infer.Annotator) { + gzip := Gzip + a.SetDefault(&e.Compression, &gzip) + a.SetDefault(&e.CompressionLevel, 0) + a.SetDefault(&e.ForceCompression, false) + + a.Describe(&e.Compression, "The compression type to use.") + a.Describe(&e.CompressionLevel, "Compression level from 0 to 22.") + a.Describe(&e.ForceCompression, "Forcefully apply compression.") +} + +func (e ExportWithCompression) String() string { + if e.CompressionLevel == 0 { + return "" + } + parts := []string{} + if e.Compression != nil { + parts = append(parts, fmt.Sprintf("compression=%s", *e.Compression)) + } + if e.CompressionLevel > 0 { + cl := e.CompressionLevel + if cl > 22 { + cl = 22 + } + parts = append(parts, fmt.Sprintf("compression-level=%d", cl)) + } + if e.ForceCompression != nil { + parts = append(parts, fmt.Sprintf("force-compression=%t", *e.ForceCompression)) + } + return strings.Join(parts, ",") +} + +// ExportWithNames is an export with configurable names (tags). +type ExportWithNames struct { + Names []string `pulumi:"names,optional"` +} + +func (e ExportWithNames) String() string { + parts := []string{} + for _, n := range e.Names { + parts = append(parts, "name="+n) + } + return strings.Join(parts, ",") +} + +// Annotate sets docstrings on ExportWithNames. +func (e *ExportWithNames) Annotate(a infer.Annotator) { + a.Describe( + &e.Names, + "Specify images names to export. This is overridden if tags are already specified.", + ) +} + +// ExportWithAnnotations is an export with configurable annotations. +type ExportWithAnnotations struct { + Annotations map[string]string `pulumi:"annotations,optional"` +} + +func (e ExportWithAnnotations) String() string { + parts := []string{} + for k, v := range e.Annotations { + parts = append(parts, fmt.Sprintf("annotation.%s=%s", k, v)) + } + slices.Sort(parts) + return strings.Join(parts, ",") +} + +// Annotate sets docstrings on ExportWithAnnotations. +func (e *ExportWithAnnotations) Annotate(a infer.Annotator) { + a.Describe(&e.Annotations, dedent(` + Attach an arbitrary key/value annotation to the image. + `)) +} + +// isRegistryPush returns true if the ExportEntry results in an image pushed to +// a registry. +func isRegistryPush(export *controllerapi.ExportEntry) bool { + // "type=registry" is shorthand for "type=image,push=true" so we only need + // to check "image" types. + return export.Type == "image" && export.Attrs["push"] == "true" +} diff --git a/provider/internal/export_test.go b/provider/internal/export_test.go new file mode 100644 index 0000000..60ba4ea --- /dev/null +++ b/provider/internal/export_test.go @@ -0,0 +1,246 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "testing" + + controllerapi "github.com/docker/buildx/controller/pb" + "github.com/docker/buildx/util/buildflags" + "github.com/stretchr/testify/assert" + + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +func TestValidateExport(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + e Export + givenTags []string + preview bool + + wantExp *controllerapi.ExportEntry + wantErr string + }{ + { + name: "raw - no push on preview", + preview: true, + e: Export{Raw: "type=registry"}, + givenTags: []string{"docker.io/foo/bar"}, + wantExp: &controllerapi.ExportEntry{ + Type: "image", + Attrs: map[string]string{"push": "false"}, + }, + }, + { + name: "raw - push requires tags", + e: Export{Raw: "type=registry"}, + wantErr: "tag or export name is needed", + }, + { + name: "registry - no push on preview", + preview: true, + e: Export{Registry: &ExportRegistry{}}, + givenTags: []string{"docker.io/foo/bar"}, + wantExp: &controllerapi.ExportEntry{ + Type: "image", + Attrs: map[string]string{"push": "false"}, + }, + }, + { + name: "registry - push requires tags", + e: Export{Registry: &ExportRegistry{}}, + wantErr: "tag or export name is needed", + }, + { + name: "over-specified", + e: Export{Raw: "type=registry", Registry: &ExportRegistry{}}, + wantErr: "specify one export type", + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + e, err := tt.e.validate(tt.preview, tt.givenTags) + if tt.wantErr == "" { + assert.NoError(t, err) + } else { + assert.ErrorContains(t, err, tt.wantErr) + } + if tt.wantExp != nil { + assert.Equal(t, tt.wantExp.Type, e.Type) + assert.Equal(t, tt.wantExp.Attrs, e.Attrs) + } + }) + } +} + +func TestExportString(t *testing.T) { + t.Parallel() + gzip := Gzip + tests := []struct { + name string + given Export + want string + }{ + { + name: "tar", + given: Export{Tar: &ExportTar{ExportLocal: ExportLocal{Dest: "/foo"}}}, + want: "type=tar,dest=/foo", + }, + { + name: "local", + given: Export{Local: &ExportLocal{Dest: "/bar"}}, + want: "type=local,dest=/bar", + }, + { + name: "registry-with-compression", + given: Export{Registry: &ExportRegistry{ + ExportImage: ExportImage{ + ExportWithCompression: ExportWithCompression{ + Compression: &gzip, + CompressionLevel: 100, + ForceCompression: pulumi.BoolRef(true), + }, + }, + }}, + want: "type=registry,compression=gzip,compression-level=22,force-compression=true", + }, + { + name: "registry-without-push", + given: Export{Registry: &ExportRegistry{ + ExportImage: ExportImage{ + Push: pulumi.BoolRef(false), + }, + }}, + want: "type=registry,push=false", + }, + { + name: "image", + given: Export{ + Image: &ExportImage{ + Push: pulumi.BoolRef(true), + PushByDigest: pulumi.BoolRef(true), + Insecure: pulumi.BoolRef(true), + DanglingNamePrefix: "prefix", + Unpack: pulumi.BoolRef(true), + Store: pulumi.BoolRef(false), + }, + }, + want: "type=image,push=true,push-by-digest=true,insecure=true,dangling-name-prefix=prefix,unpack=true,store=false", + }, + { + name: "oci-with-names", + given: Export{OCI: &ExportOCI{ + ExportDocker: ExportDocker{ + ExportWithNames: ExportWithNames{ + Names: []string{"foo", "bar"}, + }, + }, + }}, + want: "type=oci,name=foo,name=bar", + }, + { + name: "docker-with-annotations", + given: Export{Docker: &ExportDocker{ + ExportWithAnnotations: ExportWithAnnotations{ + Annotations: map[string]string{ + "foo": "bar", + "boo": "baz", + }, + }, + }}, + want: "type=docker,annotation.boo=baz,annotation.foo=bar", + }, + { + name: "raw", + given: Export{Raw: Raw("type=docker")}, + want: "type=docker", + }, + { + name: "disabled", + given: Export{Raw: Raw("type=docker"), Disabled: true}, + want: "", + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + actual := tt.given.String() + assert.Equal(t, tt.want, tt.given.String()) + + if tt.want != "" { + // Our output should be parsable by Docker. + _, err := buildflags.ParseExports([]string{actual}) + assert.NoError(t, err) + } + }) + } +} + +func TestExportPushed(t *testing.T) { + t.Parallel() + tests := []struct { + name string + e Export + want bool + }{ + { + name: "raw registry", + e: Export{Raw: "type=registry"}, + want: true, + }, + { + name: "raw image", + e: Export{Raw: "type=image"}, + want: false, + }, + { + name: "registry with no push", + e: Export{Registry: &ExportRegistry{}}, + want: true, + }, + { + name: "registry with explicit push", + e: Export{Registry: &ExportRegistry{ExportImage{Push: pulumi.BoolRef(false)}}}, + want: false, + }, + { + name: "image with explicit push", + e: Export{Image: &ExportImage{Push: pulumi.BoolRef(true)}}, + want: true, + }, + { + name: "local", + e: Export{Local: &ExportLocal{}}, + want: false, + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + actual := tt.e.pushed() + assert.Equal(t, tt.want, actual) + }) + } +} diff --git a/provider/internal/host.go b/provider/internal/host.go new file mode 100644 index 0000000..97be584 --- /dev/null +++ b/provider/internal/host.go @@ -0,0 +1,163 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "context" + "path/filepath" + "sync" + + "github.com/docker/buildx/builder" + "github.com/docker/buildx/store/storeutil" + "github.com/docker/cli/cli/command" + cfgtypes "github.com/docker/cli/cli/config/types" +) + +// host contains a host-level Docker CLI as well as a cache of initialized +// builders. Operations on the host are serialized. +type host struct { + mu sync.Mutex + cli command.Cli + config *Config + builders map[string]*cachedBuilder + auths map[string]cfgtypes.AuthConfig +} + +func newHost(config *Config) (*host, error) { + docker, err := newDockerCLI(config) + if err != nil { + return nil, err + } + // Load existing credentials into memory. + auths, err := docker.ConfigFile().GetAllCredentials() + if err != nil { + return nil, err + } + h := &host{ + cli: docker, + config: config, + builders: map[string]*cachedBuilder{}, + auths: auths, + } + return h, err +} + +// builderFor ensures a builder is available and running. This is guarded by a +// mutex to ensure other resources don't attempt to use the builder until it's +// ready. +// +// If the build doesn't specify a builder by name, we will iterate through all +// available builders until we find one that we can connect to. +func (h *host) builderFor(build Build) (*cachedBuilder, error) { + h.mu.Lock() + defer h.mu.Unlock() + + opts := build.BuildOptions() + + if b, ok := h.builders[opts.Builder]; ok { + return b, nil + } + + txn, release, err := storeutil.GetStore(h.cli) + if err != nil { + return nil, err + } + defer release() + + contextPathHash := opts.ContextPath + if absContextPath, err := filepath.Abs(contextPathHash); err == nil { + contextPathHash = absContextPath + } + b, err := builder.New(h.cli, + builder.WithName(opts.Builder), + builder.WithContextPathHash(contextPathHash), + builder.WithStore(txn), + ) + if err != nil { + return nil, err + } + + // If we didn't request a particular builder, and we loaded a default + // builder with an unsupported (docker) driver, then look for a builder we + // do support. + if b.Driver == "" && opts.Builder == "" { + builders, err := builder.GetBuilders(h.cli, txn) + if err != nil { + return nil, err + } + nextbuilder: + for _, bb := range builders { + if bb.Driver == "" { + continue + } + if err := bb.Validate(); err != nil { + continue + } + if bb.Err() != nil { + continue + } + nodes, err := bb.LoadNodes(context.Background()) + if err != nil { + continue + } + for idx := range nodes { + n := nodes[idx] + if n.Driver == nil { + continue nextbuilder + } + if _, err := n.Driver.Dial(context.Background()); err != nil { + continue nextbuilder + } + // TODO: Confirm the builder supports the requested platforms. + } + b = bb + break + } + } + + if b.Driver == "" && opts.Builder == "" { + // If we STILL don't have a builder, create a docker-container instance. + b, err = builder.Create( + context.Background(), + txn, + h.cli, + builder.CreateOpts{Driver: "docker-container"}, + ) + if err != nil { + return nil, err + } + } + + // Attempt to load nodes in order to determine the builder's driver. Ignore + // errors for "exec" builds because it's possible to request builders with + // drivers that are unknown to us. + nodes, err := b.LoadNodes(context.Background()) + if err != nil && !build.ShouldExec() { + return nil, err + } + + cached := &cachedBuilder{name: b.Name, driver: b.Driver, nodes: nodes} + h.builders[opts.Builder] = cached + + return cached, nil +} + +// cachedBuilder caches the builders we've loaded. Repeatedly fetching them can +// sometimes result in EOF errors from the daemon, especially when under load. +type cachedBuilder struct { + name string + driver string + nodes []builder.Node +} diff --git a/provider/internal/image.go b/provider/internal/image.go new file mode 100644 index 0000000..5b674d6 --- /dev/null +++ b/provider/internal/image.go @@ -0,0 +1,1012 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "context" + "errors" + "fmt" + "reflect" + "slices" + + // For examples/docs. + _ "embed" + // These imports are needed to register the drivers with buildkit. + _ "github.com/docker/buildx/driver/docker-container" + _ "github.com/docker/buildx/driver/kubernetes" + _ "github.com/docker/buildx/driver/remote" + + "github.com/distribution/reference" + controllerapi "github.com/docker/buildx/controller/pb" + "github.com/docker/docker/errdefs" + "github.com/moby/buildkit/exporter/containerimage/exptypes" + "github.com/moby/buildkit/session" + "github.com/moby/buildkit/session/secrets/secretsprovider" + "github.com/regclient/regclient/types/ref" + + provider "github.com/pulumi/pulumi-go-provider" + "github.com/pulumi/pulumi-go-provider/infer" + "github.com/pulumi/pulumi/sdk/v3/go/common/diag" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +var ( + _ infer.Annotated = (*Image)(nil) + _ infer.Annotated = (*ImageArgs)(nil) + _ infer.Annotated = (*ImageState)(nil) + _ infer.CustomCheck[ImageArgs] = (*Image)(nil) + _ infer.CustomDelete[ImageState] = (*Image)(nil) + _ infer.CustomDiff[ImageArgs, ImageState] = (*Image)(nil) + _ infer.CustomRead[ImageArgs, ImageState] = (*Image)(nil) + _ infer.CustomResource[ImageArgs, ImageState] = (*Image)(nil) + _ infer.CustomUpdate[ImageArgs, ImageState] = (*Image)(nil) +) + +//go:embed embed/image-examples.md +var _imageExamples string + +//go:embed embed/image-migration.md +var _migration string + +// Image is a Docker image build using buildkit. +type Image struct{} + +// Annotate provides a description of the Image resource. +func (i *Image) Annotate(a infer.Annotator) { + a.Describe(&i, dedent(` + A Docker image built using buildx -- Docker's interface to the improved + BuildKit backend. + + ## Stability + + **This resource is pre-1.0 and in public preview.** + + We will strive to keep APIs and behavior as stable as possible, but we + cannot guarantee stability until version 1.0. + `)+ + "\n\n"+_migration+ + "\n\n"+_imageExamples, + ) +} + +// ImageArgs instantiates a new Image. +type ImageArgs struct { + AddHosts []string `pulumi:"addHosts,optional"` + BuildArgs map[string]string `pulumi:"buildArgs,optional"` + BuildOnPreview *bool `pulumi:"buildOnPreview,optional"` + Builder *BuilderConfig `pulumi:"builder,optional"` + CacheFrom []CacheFrom `pulumi:"cacheFrom,optional"` + CacheTo []CacheTo `pulumi:"cacheTo,optional"` + Context *BuildContext `pulumi:"context,optional"` + Dockerfile *Dockerfile `pulumi:"dockerfile,optional"` + Exports []Export `pulumi:"exports,optional"` + Labels map[string]string `pulumi:"labels,optional"` + Load bool `pulumi:"load,optional"` + Network *NetworkMode `pulumi:"network,optional"` + NoCache bool `pulumi:"noCache,optional"` + Platforms []Platform `pulumi:"platforms,optional"` + Pull bool `pulumi:"pull,optional"` + Push bool `pulumi:"push"` + Registries []Registry `pulumi:"registries,optional"` + Secrets map[string]string `pulumi:"secrets,optional"` + SSH []SSH `pulumi:"ssh,optional"` + Tags []string `pulumi:"tags,optional"` + Target string `pulumi:"target,optional"` + Exec bool `pulumi:"exec,optional"` +} + +// Annotate describes inputs to the Image resource. +func (ia *ImageArgs) Annotate(a infer.Annotator) { + a.Describe(&ia.AddHosts, dedent(` + Custom "host:ip" mappings to use during the build. + + Equivalent to Docker's "--add-host" flag. + `)) + a.Describe(&ia.BuildArgs, dedent(` + "ARG" names and values to set during the build. + + These variables are accessed like environment variables inside "RUN" + instructions. + + Build arguments are persisted in the image, so you should use "secrets" + if these arguments are sensitive. + + Equivalent to Docker's "--build-arg" flag. + `)) + a.Describe(&ia.BuildOnPreview, dedent(` + Setting this to "false" will always skip image builds during previews, + and setting it to "true" will always build images during previews. + + Images built during previews are never exported to registries, however + cache manifests are still exported. + + On-disk Dockerfiles are always validated for syntactic correctness + regardless of this setting. + + Defaults to "true" as a safeguard against broken images merging as part + of CI pipelines. + `)) + a.SetDefault(&ia.BuildOnPreview, pulumi.Bool(true)) + a.Describe(&ia.Builder, dedent(` + Builder configuration. + `)) + a.Describe(&ia.CacheFrom, dedent(` + Cache export configuration. + + Equivalent to Docker's "--cache-from" flag. + `)) + a.Describe(&ia.CacheTo, dedent(` + Cache import configuration. + + Equivalent to Docker's "--cache-to" flag. + `)) + a.Describe(&ia.Context, dedent(` + Build context settings. + + Equivalent to Docker's "PATH | URL | -" positional argument. + `)) + a.Describe(&ia.Dockerfile, dedent(` + Dockerfile settings. + + Equivalent to Docker's "--file" flag. + `)) + a.Describe(&ia.Exports, dedent(` + Controls where images are persisted after building. + + Images are only stored in the local cache unless "exports" are + explicitly configured. + + Exporting to multiple destinations requires a daemon running BuildKit + 0.13 or later. + + Equivalent to Docker's "--output" flag. + `)) + a.Describe(&ia.Labels, dedent(` + Attach arbitrary key/value metadata to the image. + + Equivalent to Docker's "--label" flag. + `)) + a.Describe(&ia.Load, dedent(` + When "true" the build will automatically include a "docker" export. + + Defaults to "false". + + Equivalent to Docker's "--load" flag. + `)) + a.Describe(&ia.Network, dedent(` + Set the network mode for "RUN" instructions. Defaults to "default". + + For custom networks, configure your builder with "--driver-opt network=...". + + Equivalent to Docker's "--network" flag. + `)) + a.Describe(&ia.NoCache, dedent(` + Do not import cache manifests when building the image. + + Equivalent to Docker's "--no-cache" flag. + `)) + a.Describe(&ia.Platforms, dedent(` + Set target platform(s) for the build. Defaults to the host's platform. + + Equivalent to Docker's "--platform" flag. + `)) + a.Describe(&ia.Pull, dedent(` + Always pull referenced images. + + Equivalent to Docker's "--pull" flag. + `)) + a.Describe(&ia.Push, dedent(` + When "true" the build will automatically include a "registry" export. + + Defaults to "false". + + Equivalent to Docker's "--push" flag. + `)) + a.Describe(&ia.Secrets, dedent(` + A mapping of secret names to their corresponding values. + + Unlike the Docker CLI, these can be passed by value and do not need to + exist on-disk or in environment variables. + + Build arguments and environment variables are persistent in the final + image, so you should use this for sensitive values. + + Similar to Docker's "--secret" flag. + `)) + a.Describe(&ia.SSH, dedent(` + SSH agent socket or keys to expose to the build. + + Equivalent to Docker's "--ssh" flag. + `)) + a.Describe(&ia.Tags, dedent(` + Name and optionally a tag (format: "name:tag"). + + If exporting to a registry, the name should include the fully qualified + registry address (e.g. "docker.io/pulumi/pulumi:latest"). + + Equivalent to Docker's "--tag" flag. + `)) + a.Describe(&ia.Target, dedent(` + Set the target build stage(s) to build. + + If not specified all targets will be built by default. + + Equivalent to Docker's "--target" flag. + `)) + a.Describe(&ia.Registries, dedent(` + Registry credentials. Required if reading or exporting to private + repositories. + + Credentials are kept in-memory and do not pollute pre-existing + credentials on the host. + + Similar to "docker login". + `)) + + a.Describe(&ia.Exec, dedent(` + Use "exec" mode to build this image. + + By default the provider embeds a v25 Docker client with v0.12 buildx + support. This helps ensure consistent behavior across environments and + is compatible with alternative build backends (e.g. "buildkitd"), but + it may not be desirable if you require a specific version of buildx. + For example you may want to run a custom "docker-buildx" binary with + support for [Docker Build + Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + + When this is set to "true" the provider will instead execute the + "docker-buildx" binary directly to perform its operations. The user is + responsible for ensuring this binary exists, with correct permissions + and pre-configured builders, at a path Docker expects (e.g. + "~/.docker/cli-plugins"). + + Debugging "exec" mode may be more difficult as Pulumi will not be able + to surface fine-grained errors and warnings. Additionally credentials + are temporarily written to disk in order to provide them to the + "docker-buildx" binary. + `)) + + d := Default + a.SetDefault(&ia.Network, &d) +} + +// ImageState is serialized to the program's state file. +type ImageState struct { + ImageArgs + + Digest string `pulumi:"digest" provider:"output"` + ContextHash string `pulumi:"contextHash" provider:"output"` + Ref string `pulumi:"ref" provider:"output"` +} + +// Annotate describes outputs of the Image resource. +func (is *ImageState) Annotate(a infer.Annotator) { + is.ImageArgs.Annotate(a) + + a.Describe(&is.Digest, dedent(` + A SHA256 digest of the image if it was exported to a registry or + elsewhere. + + Empty if the image was not exported. + + Registry images can be referenced precisely as "@". The + "ref" output provides one such reference as a convenience. + `, + )) + a.Describe(&is.ContextHash, dedent(` + A preliminary hash of the image's build context. + + Pulumi uses this to determine if an image _may_ need to be re-built. + `)) + a.Describe(&is.Ref, dedent(` + If the image was pushed to any registries then this will contain a + single fully-qualified tag including the build's digest. + + If the image had tags but was not exported, this will take on a value + of one of those tags. + + This will be empty if the image had no exports and no tags. + + This is only for convenience and may not be appropriate for situations + where multiple tags or registries are involved. In those cases this + output is not guaranteed to be stable. + + For more control over tags consumed by downstream resources you should + use the "digest" output. + `)) +} + +// client produces a CLI client with scoped to this resource and layered on top +// of any host-level credentials. +func (i *Image) client(pctx provider.Context, state ImageState, args ImageArgs) (Client, error) { + ctx := context.Context(pctx) + + cfg := infer.GetConfig[Config](pctx) + + if cli, ok := ctx.Value(_mockClientKey).(Client); ok { + return cli, nil + } + + // We prefer auth from args, the provider, and state in that order. We + // build a slice in reverse order because wrap() will overwrite earlier + // entries with later ones. + auths := []Registry{} + auths = append(auths, cfg.Registries...) + auths = append(auths, args.Registries...) + + return wrap(cfg.host, auths...) +} + +// Check validates ImageArgs, sets defaults, and ensures our client is +// authenticated. +func (i *Image) Check( + _ provider.Context, + _ string, + _ resource.PropertyMap, + news resource.PropertyMap, +) (ImageArgs, []provider.CheckFailure, error) { + args, failures, err := infer.DefaultCheck[ImageArgs](news) + if err != nil || len(failures) != 0 { + return args, failures, err + } + + // :( + preview := news.ContainsUnknowns() + + if _, berr := args.validate(preview); berr != nil { + errs := berr.(interface{ Unwrap() []error }).Unwrap() + for _, e := range errs { + if cf, ok := e.(checkFailure); ok { + failures = append(failures, cf.CheckFailure) + } + } + } + + return args, failures, err +} + +type checkFailure struct { + provider.CheckFailure +} + +func (cf checkFailure) Error() string { + return cf.Reason +} + +func newCheckFailure(err error, format string, args ...any) error { + return checkFailure{ + provider.CheckFailure{Property: fmt.Sprintf(format, args...), Reason: err.Error()}, + } +} + +// normalize returns a copy of ImageArgs after accounting for unknown (preview) +// values and CLI push/load shorthand. +// +// During preview the go-provider sends unknown inputs as zero values. In order +// to enable build-on-preview behavior, we omit zero values during previews. +func (ia *ImageArgs) normalize(preview bool) ImageArgs { + normalized := ImageArgs{ + AddHosts: filter(stringKeeper{preview}, ia.AddHosts...), + BuildArgs: mapKeeper{preview}.keep(ia.BuildArgs), + BuildOnPreview: ia.BuildOnPreview, + Builder: ia.Builder, + CacheFrom: filter(stringerKeeper[CacheFrom]{preview}, ia.CacheFrom...), + CacheTo: filter(stringerKeeper[CacheTo]{preview}, ia.CacheTo...), + Context: contextKeeper{preview}.keep(ia.Context), + Dockerfile: ia.Dockerfile, + Exports: filter(stringerKeeper[Export]{preview}, ia.Exports...), + Labels: mapKeeper{preview}.keep(ia.Labels), + Load: ia.Load, + Network: ia.Network, + NoCache: ia.NoCache, + Platforms: filter(stringerKeeper[Platform]{preview}, ia.Platforms...), + Pull: ia.Pull, + Push: ia.Push, + Registries: filter(registryKeeper{preview}, ia.Registries...), + SSH: filter(stringerKeeper[SSH]{preview}, ia.SSH...), + Secrets: mapKeeper{preview}.keep(ia.Secrets), + Tags: filter(stringKeeper{preview}, ia.Tags...), + Target: ia.Target, + } + + // Handle --push/--load shorthand. + if normalized.Push { + normalized.Exports = append(normalized.Exports, Export{Raw: "type=registry"}) + } + if normalized.Load { + normalized.Exports = append(normalized.Exports, Export{Raw: "type=docker"}) + } + + return normalized +} + +// buildable returns true if the ImageArgs has no unknown values and can +// therefore be built during previews. +func (ia *ImageArgs) buildable() bool { + // We can build the given inputs if filtering unknowns is a no-op. + filtered := ia.normalize(true) + return reflect.DeepEqual(ia, &filtered) +} + +// isExported returns true if the args include a registry export. +func (ia *ImageArgs) isExported() bool { + if ia.Push { + return true + } + for _, e := range ia.Exports { + if e.pushed() { + return true + } + } + return false +} + +// shouldBuildOnPreview returns true if we should build this image during +// previews. +func (ia *ImageArgs) shouldBuildOnPreview() bool { + if ia.BuildOnPreview != nil { + return *ia.BuildOnPreview + } + return true +} + +type build struct { + opts controllerapi.BuildOptions + secrets map[string]string + inline string + exec bool +} + +func (b build) BuildOptions() controllerapi.BuildOptions { + return b.opts +} + +func (b build) Inline() string { + return b.inline +} + +func (b build) Secrets() session.Attachable { + m := map[string][]byte{} + for k, v := range b.secrets { + m[k] = []byte(v) + } + return secretsprovider.FromMap(m) +} + +func (b build) ShouldExec() bool { + return b.exec +} + +func (ia ImageArgs) toBuild( + ctx provider.Context, + preview bool, +) (Build, error) { + opts, err := ia.validate(preview) + if err != nil { + return nil, err + } + + if len(ia.Exports) == 0 && !ia.Push && !ia.Load { + ctx.Log(diag.Warning, + "No exports were specified so the build will only remain in the local build cache. "+ + "Use `push` to upload the image to a registry, or silence this warning with a `cacheonly` export.", + ) + } + + if len(opts.Platforms) > 1 && len(opts.CacheTo) > 0 { + ctx.Log( + diag.Warning, + "Caching doesn't work reliably with multi-platform builds (https://github.com/docker/buildx/discussions/1382). "+ + "Instead, perform one cached build per platform and create an Index to join them all together.", + ) + } + + return build{ + opts: opts, + inline: ia.Dockerfile.Inline, + secrets: ia.Secrets, + exec: ia.Exec, + }, nil +} + +// validate confirms the ImageArgs are valid and returns BuildOptions +// appropriate for passing to builders. +func (ia *ImageArgs) validate(preview bool) (controllerapi.BuildOptions, error) { + var multierr error + + if len(ia.Exports) > 1 { + multierr = errors.Join(multierr, + newCheckFailure(errors.New("multiple exports are currently unsupported"), "exports"), + ) + } + if ia.Push && ia.Load { + multierr = errors.Join( + multierr, + newCheckFailure( + errors.New("push and load may not be set together at the moment"), + "push", + ), + ) + } + if len(ia.Exports) > 0 && (ia.Push || ia.Load) { + multierr = errors.Join(multierr, + newCheckFailure(errors.New("exports can't be provided with push or load"), "exports"), + ) + } + + dockerfile, context, err := ia.Context.validate(preview, ia.Dockerfile) + if err != nil { + multierr = errors.Join(multierr, err) + } + ia.Dockerfile = dockerfile + + if err := ia.Dockerfile.validate(preview, context); err != nil { + multierr = errors.Join(multierr, err) + } + + // Discard any unknown inputs if this is a preview -- we don't want them to + // cause validation errors. + normalized := ia.normalize(preview) + + exports := []*controllerapi.ExportEntry{} + for idx, e := range normalized.Exports { + if e.Disabled { + continue + } + exp, err := e.validate(preview, ia.Tags) + if err != nil { + multierr = errors.Join(multierr, newCheckFailure(err, "exports[%d]", idx)) + continue + } + exports = append(exports, exp) + } + + platforms := []string{} + for idx, p := range normalized.Platforms { + platform, err := p.validate(preview) + if err != nil { + multierr = errors.Join(multierr, newCheckFailure(err, "platforms[%d]", idx)) + continue + } + platforms = append(platforms, platform) + } + + cacheFrom := []*controllerapi.CacheOptionsEntry{} + for idx, c := range normalized.CacheFrom { + if c.String() == "" { + continue // Disabled or unknown/preview. + } + cache, err := c.validate(preview) + if err != nil { + multierr = errors.Join(multierr, newCheckFailure(err, "cacheFrom[%d]", idx)) + continue + } + cacheFrom = append(cacheFrom, cache) + } + + cacheTo := []*controllerapi.CacheOptionsEntry{} + for idx, c := range normalized.CacheTo { + if c.String() == "" { + continue // Disabled or unknown/preview. + } + cache, err := c.validate(preview) + if err != nil { + multierr = errors.Join(multierr, newCheckFailure(err, "cacheTo[%d]", idx)) + continue + } + cacheTo = append(cacheTo, cache) + } + + ssh := []*controllerapi.SSH{} + for idx, s := range normalized.SSH { + ss, err := s.validate() + if err != nil { + multierr = errors.Join(multierr, newCheckFailure(err, "ssh[%d]", idx)) + continue + } + ssh = append(ssh, ss) + } + + for idx, t := range normalized.Tags { + if _, err := reference.Parse(t); err != nil { + multierr = errors.Join(multierr, newCheckFailure(err, "tags[%d]", idx)) + } + } + + secrets := []*controllerapi.Secret{} + for k, v := range normalized.Secrets { + // We abuse the pb.Secret proto by stuffing the secret's value in + // XXX_unrecognized. We never serialize this proto so this is tolerable. + secrets = append(secrets, &controllerapi.Secret{ + ID: k, + XXX_unrecognized: []byte(v), + }) + } + + builder := BuilderConfig{} + if normalized.Builder != nil { + builder = *normalized.Builder + } + + opts := controllerapi.BuildOptions{ + BuildArgs: normalized.BuildArgs, + Builder: builder.Name, + CacheFrom: cacheFrom, + CacheTo: cacheTo, + ContextPath: context.Location, + DockerfileName: dockerfile.Location, + Exports: exports, + ExtraHosts: normalized.AddHosts, + Labels: normalized.Labels, + NetworkMode: normalized.Network.String(), + NoCache: normalized.NoCache, + NamedContexts: normalized.Context.namedMap(), + Platforms: platforms, + Pull: normalized.Pull, + Secrets: secrets, + SSH: ssh, + Tags: normalized.Tags, + Target: normalized.Target, + } + + return opts, multierr +} + +// Create builds an image using buildkit. +func (i *Image) Create( + ctx provider.Context, + name string, + input ImageArgs, + preview bool, +) (string, ImageState, error) { + state := ImageState{ImageArgs: input} + id := name + + // Default our ref to one of our tags. + for _, tag := range state.Tags { + if _, err := normalizeReference(tag); err != nil { + continue + } + state.Ref = tag + break + } + + cli, err := i.client(ctx, state, input) + if err != nil { + return id, state, err + } + + ok, err := cli.BuildKitEnabled() + if err != nil { + return id, state, fmt.Errorf("checking buildkit compatibility: %w", err) + } + if !ok { + return id, state, errors.New("buildkit is not supported on this host") + } + + build, err := input.toBuild(ctx, preview) + if err != nil { + return id, state, fmt.Errorf("preparing: %w", err) + } + + hash, err := hashBuildContext( + input.Context.Location, + input.Dockerfile.Location, + input.Context.Named.Map(), + ) + if err != nil { + return id, state, fmt.Errorf("hashing build context: %w", err) + } + state.ContextHash = hash + + if preview && !input.shouldBuildOnPreview() { + return id, state, nil + } + if preview && !input.buildable() { + ctx.Log(diag.Warning, "Skipping preview build because some inputs are unknown.") + return id, state, nil + } + + result, err := cli.Build(ctx, build) + if err != nil { + return id, state, err + } + + if d, ok := result.ExporterResponse[exptypes.ExporterImageDigestKey]; ok { + state.Digest = d + id = d + } + + if state.Digest == "" { + // Can't construct a ref, nothing else to do. + return id, state, nil + } + + // Take the first registry tag we find and add a digest to it. That becomes + // our simplified "ref" output. + for _, tag := range state.Tags { + ref, ok := addDigest(tag, state.Digest) + if !ok { + continue + } + + state.Ref = ref + break + } + + return id, state, nil +} + +// Update builds a new image. Normally we create-replace resources, but for +// images built locally there is nothing to delete. We treat those cases as +// updates and simply re-build the image without deleting anything. +func (i *Image) Update( + ctx provider.Context, + name string, + _ ImageState, + input ImageArgs, + preview bool, +) (ImageState, error) { + _, state, err := i.Create(ctx, name, input, preview) + return state, err +} + +// Read attempts to read manifests from an image's exports. An image without +// exports will have no manifests. +func (i *Image) Read( + ctx provider.Context, + name string, + input ImageArgs, + state ImageState, +) ( + string, // id + ImageArgs, // normalized inputs + ImageState, // normalized state + error, +) { + cli, err := i.client(ctx, state, input) + if err != nil { + return name, input, state, err + } + + if !state.isExported() { + // Nothing was pushed -- all done. + return name, input, state, nil + } + + tagsToKeep := []string{} + + // Do a lookup on all of the tags at the digests we expect to see. + for _, tag := range state.Tags { + ref, ok := addDigest(tag, state.Digest) + if !ok { + // Not a pushed tag. + tagsToKeep = append(tagsToKeep, tag) + break + } + + // Does a tag with this digest exist? + descriptors, err := cli.Inspect(ctx, ref) + if err != nil { + ctx.Log(diag.Warning, err.Error()) + continue + } + + for _, d := range descriptors { + if d.Platform != nil && d.Platform.Architecture == "unknown" { + // Ignore cache manifests. + continue + } + + tagsToKeep = append(tagsToKeep, tag) + break + } + } + + // If we couldn't find the tags we expected then return an empty ID to + // delete the resource. + if len(input.Tags) > 0 && len(tagsToKeep) == 0 { + return "", input, state, nil + } + + state.Tags = tagsToKeep + + return name, input, state, nil +} + +// Delete deletes an Image. If the Image was already deleted out-of-band it is +// treated as a success. +func (i *Image) Delete( + ctx provider.Context, + _ string, + state ImageState, +) error { + cli, err := i.client(ctx, state, state.ImageArgs) + if err != nil { + return err + } + + if state.Digest == "" { + // Nothing was exported. Just try to delete the local image. + return cli.Delete(ctx, state.Ref) + } + + digests := []string{} + + // Construct a ref with digest for each repository we pushed to. + for _, tag := range state.Tags { + ref, err := ref.New(tag) + if err != nil { + continue + } + digested := ref.SetDigest(state.Digest) + digests = append(digests, digested.CommonName()) + } + + slices.Sort(digests) + digests = slices.Compact(digests) + + var multierr error + for _, digested := range digests { + err = cli.Delete(context.Context(ctx), digested) + if errdefs.IsNotFound(err) { + ctx.Log(diag.Warning, digested+" not found") + continue // Nothing to do. + } + multierr = errors.Join(multierr, err) + } + + return multierr +} + +// Diff re-implements most of the default diff behavior, with the exception of +// ignoring "password" changes on registry inputs. +func (*Image) Diff( + _ provider.Context, + _ string, + olds ImageState, + news ImageArgs, +) (provider.DiffResponse, error) { + diff := map[string]provider.PropertyDiff{} + update := provider.PropertyDiff{Kind: provider.Update} + + if !reflect.DeepEqual(olds.AddHosts, news.AddHosts) { + diff["addHosts"] = update + } + if !reflect.DeepEqual(olds.BuildArgs, news.BuildArgs) { + diff["buildArgs"] = update + } + if !reflect.DeepEqual(olds.BuildOnPreview, news.BuildOnPreview) { + diff["buildOnPreview"] = update + } + if !reflect.DeepEqual(olds.Builder, news.Builder) { + diff["builder"] = update + } + if !reflect.DeepEqual(olds.CacheFrom, news.CacheFrom) { + diff["cacheFrom"] = update + } + if !reflect.DeepEqual(olds.CacheTo, news.CacheTo) { + diff["cacheTo"] = update + } + if olds.Context.Location != news.Context.Location { + diff["context.location"] = update + } + if !reflect.DeepEqual(olds.Context.Named, news.Context.Named) { + diff["context.named"] = update + } + dockerfile, _, _ := news.Context.validate(true, news.Dockerfile) + if !reflect.DeepEqual(olds.Dockerfile, dockerfile) { + diff["dockerfile"] = update + } + // Use string comparison to ignore any manifests attached to the export. + if fmt.Sprint(olds.Exports) != fmt.Sprint(news.Exports) { + diff["exports"] = update + } + if !reflect.DeepEqual(olds.Labels, news.Labels) { + diff["labels"] = update + } + if olds.Load != news.Load { + diff["load"] = update + } + if !reflect.DeepEqual(olds.Network, news.Network) { + diff["network"] = update + } + if !reflect.DeepEqual(olds.NoCache, news.NoCache) { + diff["noCache"] = update + } + if !reflect.DeepEqual(olds.Platforms, news.Platforms) { + diff["platforms"] = update + } + if !reflect.DeepEqual(olds.Pull, news.Pull) { + diff["pull"] = update + } + if !reflect.DeepEqual(olds.Push, news.Push) { + diff["push"] = update + } + if !reflect.DeepEqual(olds.Secrets, news.Secrets) { + diff["secrets"] = update + } + if !reflect.DeepEqual(olds.SSH, news.SSH) { + diff["ssh"] = update + } + if !reflect.DeepEqual(olds.Tags, news.Tags) { + diff["tags"] = update + } + if !reflect.DeepEqual(olds.Target, news.Target) { + diff["target"] = update + } + + // pull=true indicates that we want to keep base layers up-to-date. In this + // case we'll always perform the build. + if news.Pull && (len(news.Exports) > 0 || news.Push || news.Load) { + diff["contextHash"] = update + } + + // Check if anything has changed in our build context. + hash, err := hashBuildContext( + news.Context.Location, + dockerfile.Location, + news.Context.Named.Map(), + ) + if err != nil { + return provider.DiffResponse{}, err + } + if hash != olds.ContextHash { + diff["contextHash"] = update + } + + // Registries need special handling because we ignore "password" changes to not introduce unnecessary changes. + if len(olds.Registries) != len(news.Registries) { + diff["registries"] = update + } else { + for idx, oldr := range olds.Registries { + newr := news.Registries[idx] + if (oldr.Username == newr.Username) && (oldr.Address == newr.Address) { + continue + } + diff[fmt.Sprintf("registries[%d]", idx)] = update + break + } + } + + return provider.DiffResponse{ + HasChanges: len(diff) > 0, + DetailedDiff: diff, + }, nil +} + +// addDigest constructs a tagged ref with an "@" suffix. +// +// Returns false if the given ref was not fully qualified. +func addDigest(ref, digest string) (string, bool) { + named, err := reference.ParseNamed(ref) + if err != nil { + return "", false + } + tag := "latest" + if tagged, ok := named.(reference.Tagged); ok { + tag = tagged.Tag() + } + + full, err := reference.Parse( + fmt.Sprintf("%s:%s@%s", named.Name(), tag, digest), + ) + if err != nil { + return "", false + } + + return full.String(), true +} diff --git a/provider/internal/image_test.go b/provider/internal/image_test.go new file mode 100644 index 0000000..606853a --- /dev/null +++ b/provider/internal/image_test.go @@ -0,0 +1,994 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "errors" + "fmt" + "os" + "path/filepath" + "testing" + + _ "github.com/docker/buildx/driver/docker-container" + + "github.com/docker/distribution/reference" + "github.com/moby/buildkit/client" + "github.com/moby/buildkit/exporter/containerimage/exptypes" + "github.com/regclient/regclient/types/descriptor" + "github.com/regclient/regclient/types/platform" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" + + provider "github.com/pulumi/pulumi-go-provider" + "github.com/pulumi/pulumi-go-provider/integration" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource" + "github.com/pulumi/pulumi/sdk/v3/go/common/util/mapper" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +var _fakeURN = resource.NewURN("test", "provider", "a", "docker-build:index:Image", "test") + +func TestImageLifecycle(t *testing.T) { + t.Parallel() + noClient := func(t *testing.T) Client { + ctrl := gomock.NewController(t) + return NewMockClient(ctrl) + } + + _, err := reference.ParseNamed("docker.io/pulumibot/buildkit-e2e") + require.NoError(t, err) + + tests := []struct { + name string + + op func(t *testing.T) integration.Operation + client func(t *testing.T) Client + }{ + { + name: "happy path builds", + client: func(t *testing.T) Client { + ctrl := gomock.NewController(t) + c := NewMockClient(ctrl) + c.EXPECT().BuildKitEnabled().Return(true, nil).AnyTimes() + c.EXPECT().Build(gomock.Any(), gomock.AssignableToTypeOf(build{})).DoAndReturn( + func(_ provider.Context, b Build) (*client.SolveResponse, error) { + assert.Equal(t, "testdata/noop/Dockerfile", b.BuildOptions().DockerfileName) + return &client.SolveResponse{ + ExporterResponse: map[string]string{ + exptypes.ExporterImageDigestKey: "sha256:98ea6e4f216f2fb4b69fff9b3a44842c38686ca685f3f55dc48c5d3fb1107be4", + }, + }, nil + }, + ).AnyTimes() + c.EXPECT().Delete(gomock.Any(), + "docker.io/pulumibot/buildkit-e2e@sha256:98ea6e4f216f2fb4b69fff9b3a44842c38686ca685f3f55dc48c5d3fb1107be4", + ). + Return(nil) + return c + }, + op: func(t *testing.T) integration.Operation { + return integration.Operation{ + Inputs: resource.PropertyMap{ + "push": resource.NewBoolProperty(false), + "tags": resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewStringProperty("docker.io/pulumibot/buildkit-e2e"), + resource.NewStringProperty("docker.io/pulumibot/buildkit-e2e:main"), + }, + ), + "platforms": resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewStringProperty("linux/arm64"), + resource.NewStringProperty("linux/amd64"), + }, + ), + "context": resource.NewObjectProperty(resource.PropertyMap{ + "location": resource.NewStringProperty("testdata/noop"), + }), + "dockerfile": resource.NewObjectProperty(resource.PropertyMap{ + "location": resource.NewStringProperty("testdata/noop/Dockerfile"), + }), + "exports": resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{ + "raw": resource.NewStringProperty("type=registry"), + }, + ), + }, + ), + "registries": resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{ + "address": resource.NewStringProperty("fakeaddress"), + "username": resource.NewStringProperty("fakeuser"), + "password": resource.MakeSecret( + resource.NewStringProperty("password"), + ), + }), + }, + ), + }, + } + }, + }, + { + name: "tags are required when pushing", + client: noClient, + op: func(t *testing.T) integration.Operation { + return integration.Operation{ + Inputs: resource.PropertyMap{ + "push": resource.NewBoolProperty(false), + "tags": resource.NewArrayProperty([]resource.PropertyValue{}), + "context": resource.NewObjectProperty(resource.PropertyMap{ + "location": resource.NewStringProperty("testdata/noop"), + }), + "exports": resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{ + "raw": resource.NewStringProperty("type=registry"), + }), + }, + ), + }, + ExpectFailure: true, + CheckFailures: []provider.CheckFailure{ + { + Property: "exports[0]", + Reason: "at least one tag or export name is needed when pushing to a registry", + }, + }, + } + }, + }, + { + name: "invalid exports", + client: noClient, + op: func(t *testing.T) integration.Operation { + return integration.Operation{ + Inputs: resource.PropertyMap{ + "push": resource.NewBoolProperty(false), + "tags": resource.NewArrayProperty( + []resource.PropertyValue{resource.NewStringProperty("invalid-exports")}, + ), + "exports": resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{ + "raw": resource.NewStringProperty("type="), + }), + }, + ), + }, + ExpectFailure: true, + CheckFailures: []provider.CheckFailure{{ + Property: "exports[0]", + Reason: "type is required for output", + }}, + } + }, + }, + { + name: "requires buildkit", + client: func(t *testing.T) Client { + ctrl := gomock.NewController(t) + c := NewMockClient(ctrl) + gomock.InOrder( + c.EXPECT().BuildKitEnabled().Return(false, nil), // Preview. + ) + return c + }, + op: func(t *testing.T) integration.Operation { + return integration.Operation{ + Inputs: resource.PropertyMap{ + "push": resource.NewBoolProperty(false), + "tags": resource.NewArrayProperty( + []resource.PropertyValue{resource.NewStringProperty("foo")}, + ), + "context": resource.NewObjectProperty(resource.PropertyMap{ + "location": resource.NewStringProperty("testdata/noop"), + }), + }, + ExpectFailure: true, + } + }, + }, + { + name: "error reading DOCKER_BUILDKIT", + client: func(t *testing.T) Client { + ctrl := gomock.NewController(t) + c := NewMockClient(ctrl) + gomock.InOrder( + c.EXPECT(). + BuildKitEnabled(). + Return(false, errors.New("invalid DOCKER_BUILDKIT")), // Preview. + ) + return c + }, + op: func(t *testing.T) integration.Operation { + return integration.Operation{ + Inputs: resource.PropertyMap{ + "push": resource.NewBoolProperty(false), + "tags": resource.NewArrayProperty( + []resource.PropertyValue{resource.NewStringProperty("foo")}, + ), + "context": resource.NewObjectProperty(resource.PropertyMap{ + "location": resource.NewStringProperty("testdata/noop"), + }), + }, + ExpectFailure: true, + } + }, + }, + { + name: "file defaults to Dockerfile", + client: func(t *testing.T) Client { + ctrl := gomock.NewController(t) + c := NewMockClient(ctrl) + c.EXPECT().BuildKitEnabled().Return(true, nil).AnyTimes() + c.EXPECT().Build(gomock.Any(), gomock.AssignableToTypeOf(build{})).DoAndReturn( + func(_ provider.Context, b Build) (*client.SolveResponse, error) { + assert.Equal(t, "testdata/noop/Dockerfile", b.BuildOptions().DockerfileName) + return &client.SolveResponse{ + ExporterResponse: map[string]string{"image.name": "test:latest"}, + }, nil + }, + ).AnyTimes() + c.EXPECT().Delete(gomock.Any(), "default-dockerfile").Return(nil) + return c + }, + op: func(t *testing.T) integration.Operation { + return integration.Operation{ + Inputs: resource.PropertyMap{ + "push": resource.NewBoolProperty(false), + "tags": resource.NewArrayProperty( + []resource.PropertyValue{ + resource.NewStringProperty("default-dockerfile"), + }, + ), + "context": resource.NewObjectProperty(resource.PropertyMap{ + "location": resource.NewStringProperty("testdata/noop"), + }), + }, + Hook: func(_, output resource.PropertyMap) { + dockerfile := output["dockerfile"] + require.NotNil(t, dockerfile) + require.True(t, dockerfile.IsObject()) + location := dockerfile.ObjectValue()["location"] + require.True(t, location.IsString()) + assert.Equal(t, "testdata/noop/Dockerfile", location.StringValue()) + }, + } + }, + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + lc := integration.LifeCycleTest{ + Resource: "docker-build:index:Image", + Create: tt.op(t), + } + s := newServer(tt.client(t)) + + err := s.Configure(provider.ConfigureRequest{}) + require.NoError(t, err) + + lc.Run(t, s) + }) + } +} + +type errNotFound struct{} + +func (errNotFound) NotFound() {} +func (errNotFound) Error() string { return "not found " } + +func TestDelete(t *testing.T) { + t.Parallel() + t.Run("image was already deleted", func(t *testing.T) { + t.Parallel() + ctrl := gomock.NewController(t) + client := NewMockClient(ctrl) + client.EXPECT(). + Delete(gomock.Any(), "docker.io/pulumi/test@sha256:foo"). + Return(errNotFound{}) + + s := newServer(client) + err := s.Configure(provider.ConfigureRequest{}) + require.NoError(t, err) + + err = s.Delete(provider.DeleteRequest{ + ID: "foo,bar", + Urn: _fakeURN, + Properties: resource.PropertyMap{ + "tags": resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewStringProperty("docker.io/pulumi/test:foo"), + }), + "push": resource.NewBoolProperty(true), + "digest": resource.NewStringProperty("sha256:foo"), + "contextHash": resource.NewStringProperty(""), + "ref": resource.NewStringProperty(""), + }, + }) + assert.NoError(t, err) + }) +} + +func TestRead(t *testing.T) { + t.Parallel() + tag := "docker.io/pulumi/pulumitest" + digest := "sha256:3be99cafdcd80a8e620da56bdc215acab6213bb608d3d492c0ba1807128786a1" + + ctrl := gomock.NewController(t) + client := NewMockClient(ctrl) + client.EXPECT().Inspect(gomock.Any(), fmt.Sprintf("%s:latest@%s", tag, digest)).Return( + []descriptor.Descriptor{ + { + Platform: &platform.Platform{Architecture: "arm64"}, + }, + { + Platform: &platform.Platform{Architecture: "unknown"}, + }, + }, nil) + + s := newServer(client) + err := s.Configure(provider.ConfigureRequest{}) + require.NoError(t, err) + + resp, err := s.Read(provider.ReadRequest{ + ID: "my-image", + Urn: _fakeURN, + Properties: resource.PropertyMap{ + "exports": resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewObjectProperty(resource.PropertyMap{ + "raw": resource.NewStringProperty("type=registry"), + }), + }), + "tags": resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewStringProperty(tag), + }), + "digest": resource.NewStringProperty(digest), + }, + }) + require.NoError(t, err) + assert.NotNil(t, resp.Properties["exports"].ArrayValue()[0].ObjectValue()["manifest"]) +} + +func TestImageDiff(t *testing.T) { + t.Parallel() + emptyDir := t.TempDir() + host := Host + + hash, err := hashBuildContext(emptyDir, "", nil) + require.NoError(t, err) + baseArgs := ImageArgs{ + Context: &BuildContext{Context: Context{Location: emptyDir}}, + Dockerfile: &Dockerfile{Location: "testdata/noop"}, + Tags: []string{}, + } + baseState := ImageState{ + ContextHash: hash, + ImageArgs: baseArgs, + } + + tests := []struct { + name string + olds func(*testing.T, ImageState) ImageState + news func(*testing.T, ImageArgs) ImageArgs + + wantChanges bool + }{ + { + name: "no diff if build context is unchanged", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(*testing.T, ImageArgs) ImageArgs { return baseArgs }, + wantChanges: false, + }, + { + name: "no diff if registry password changes", + olds: func(_ *testing.T, s ImageState) ImageState { + s.Registries = []Registry{{ + Address: "foo", + Username: "foo", + Password: "foo", + }} + return s + }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Registries = []Registry{{ + Address: "foo", + Username: "foo", + Password: "DIFFERENT PASSWORD", + }} + return a + }, + wantChanges: false, + }, + { + name: "no diff if pull=true but no exports", + olds: func(_ *testing.T, is ImageState) ImageState { + is.Pull = true + return is + }, + news: func(t *testing.T, ia ImageArgs) ImageArgs { + ia.Pull = true + return ia + }, + wantChanges: false, + }, + { + name: "diff if pull=true with exports", + olds: func(_ *testing.T, is ImageState) ImageState { + is.Pull = true + is.Load = true + return is + }, + news: func(t *testing.T, ia ImageArgs) ImageArgs { + ia.Pull = true + ia.Load = true + return ia + }, + wantChanges: true, + }, + { + name: "diff if build context changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(t *testing.T, a ImageArgs) ImageArgs { + tmp := filepath.Join(a.Context.Location, "tmp") + err := os.WriteFile(tmp, []byte{}, 0o600) + require.NoError(t, err) + t.Cleanup(func() { _ = os.Remove(tmp) }) + return a + }, + wantChanges: true, + }, + { + name: "diff if registry added", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Registries = []Registry{{}} + return a + }, + wantChanges: true, + }, + { + name: "diff if registry user changes", + olds: func(_ *testing.T, s ImageState) ImageState { + s.Registries = []Registry{{ + Address: "foo", + Username: "foo", + Password: "foo", + }} + return s + }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Registries = []Registry{{ + Address: "DIFFERENT USER", + Username: "foo", + Password: "foo", + }} + return a + }, + wantChanges: true, + }, + { + name: "diff if buildArgs changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.BuildArgs = map[string]string{ + "foo": "bar", + } + return a + }, + wantChanges: true, + }, + { + name: "diff if pull changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(t *testing.T, ia ImageArgs) ImageArgs { + ia.Pull = true + return ia + }, + wantChanges: true, + }, + { + name: "diff if load changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(t *testing.T, ia ImageArgs) ImageArgs { + ia.Load = true + return ia + }, + wantChanges: true, + }, + { + name: "diff if push changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(t *testing.T, ia ImageArgs) ImageArgs { + ia.Push = true + return ia + }, + wantChanges: true, + }, + { + name: "diff if buildOnPreview doesn't change", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(t *testing.T, ia ImageArgs) ImageArgs { + val := true + ia.BuildOnPreview = &val + return ia + }, + wantChanges: true, + }, + { + name: "diff if buildOnPreview changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(t *testing.T, ia ImageArgs) ImageArgs { + val := false + ia.BuildOnPreview = &val + return ia + }, + wantChanges: true, + }, + { + name: "diff if ssh changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(t *testing.T, ia ImageArgs) ImageArgs { + ia.SSH = []SSH{{ID: "default"}} + return ia + }, + wantChanges: true, + }, + { + name: "diff if hosts change", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(t *testing.T, ia ImageArgs) ImageArgs { + ia.AddHosts = []string{"localhost"} + return ia + }, + wantChanges: true, + }, + { + name: "diff if cacheFrom changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.CacheFrom = []CacheFrom{{Raw: "a"}} + return a + }, + wantChanges: true, + }, + { + name: "diff if cacheTo changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.CacheTo = []CacheTo{{Raw: "a"}} + return a + }, + wantChanges: true, + }, + { + name: "diff if context changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Context = &BuildContext{Context: Context{Location: "testdata/ignores"}} + return a + }, + wantChanges: true, + }, + { + name: "diff if named context changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Context = &BuildContext{Named: NamedContexts{"foo": Context{Location: "bar"}}} + return a + }, + wantChanges: true, + }, + { + name: "diff if network changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Network = &host + return a + }, + wantChanges: true, + }, + { + name: "diff if dockerfile location changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Dockerfile = &Dockerfile{Location: "testdata/ignores/basedir/Dockerfile"} + return a + }, + wantChanges: true, + }, + { + name: "diff if dockerfile inline changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Dockerfile = &Dockerfile{Inline: "FROM scratch"} + return a + }, + wantChanges: true, + }, + { + name: "diff if platforms change", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Platforms = []Platform{"linux/amd64"} + return a + }, + wantChanges: true, + }, + { + name: "diff if pull changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Pull = true + return a + }, + wantChanges: true, + }, + { + name: "diff if builder changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Builder = &BuilderConfig{Name: "foo"} + return a + }, + wantChanges: true, + }, + { + name: "diff if tags change", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Tags = []string{"foo"} + return a + }, + wantChanges: true, + }, + { + name: "diff if exports change", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Exports = []Export{{Raw: "foo"}} + return a + }, + wantChanges: true, + }, + { + name: "diff if target changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Target = "foo" + return a + }, + wantChanges: true, + }, + { + name: "diff if pulling", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Pull = true + return a + }, + wantChanges: true, + }, + { + name: "diff if noCache changes", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.NoCache = true + return a + }, + wantChanges: true, + }, + { + name: "diff if labels change", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Labels = map[string]string{"foo": "bar"} + return a + }, + wantChanges: true, + }, + { + name: "diff if secrets change", + olds: func(*testing.T, ImageState) ImageState { return baseState }, + news: func(_ *testing.T, a ImageArgs) ImageArgs { + a.Secrets = map[string]string{"foo": "bar"} + return a + }, + wantChanges: true, + }, + } + + s := newServer(nil) + + encode := func(t *testing.T, x any) resource.PropertyMap { + raw, err := mapper.New(&mapper.Opts{IgnoreMissing: true}).Encode(x) + require.NoError(t, err) + return resource.NewPropertyMapFromMap(raw) + } + + for _, tt := range tests { + tt := tt + baseState := baseState + baseArgs := baseArgs + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + resp, err := s.Diff(provider.DiffRequest{ + Urn: _fakeURN, + Olds: encode(t, tt.olds(t, baseState)), + News: encode(t, tt.news(t, baseArgs)), + }) + assert.NoError(t, err) + assert.Equal(t, tt.wantChanges, resp.HasChanges, resp.DetailedDiff) + }) + } +} + +func TestValidateImageArgs(t *testing.T) { + t.Parallel() + t.Run("invalid inputs", func(t *testing.T) { + t.Parallel() + args := ImageArgs{ + Tags: []string{"a/bad:tag:format"}, + Exports: []Export{{Raw: "badexport,-"}}, + Context: &BuildContext{Context: Context{Location: "./testdata"}}, + Platforms: []Platform{","}, + CacheFrom: []CacheFrom{{Raw: "=badcachefrom"}}, + CacheTo: []CacheTo{{Raw: "=badcacheto"}}, + } + + _, err := args.validate(false) + assert.ErrorContains(t, err, "invalid value badexport") + assert.ErrorContains(t, err, "platform specifier component must match") + assert.ErrorContains(t, err, "badcachefrom") + assert.ErrorContains(t, err, "badcacheto") + assert.ErrorContains(t, err, "invalid reference format") + assert.ErrorContains(t, err, "testdata/Dockerfile") + }) + + t.Run("buildOnPreview", func(t *testing.T) { + t.Parallel() + args := ImageArgs{ + Context: &BuildContext{Context: Context{Location: "testdata/noop"}}, + Tags: []string{"my-tag"}, + Exports: []Export{{Registry: &ExportRegistry{ExportImage{Push: pulumi.BoolRef(true)}}}}, + } + actual, err := args.validate(true) + assert.NoError(t, err) + assert.Equal(t, "image", actual.Exports[0].Type) + assert.Equal(t, "false", actual.Exports[0].Attrs["push"]) + + actual, err = args.validate(false) + assert.NoError(t, err) + assert.Equal(t, "image", actual.Exports[0].Type) + assert.Equal(t, "true", actual.Exports[0].Attrs["push"]) + }) + + t.Run("unknowns", func(t *testing.T) { + t.Parallel() + // pulumi-go-provider gives us zero-values when a property is unknown. + // We can't distinguish this from user-provided zero-values, but we + // should: + // - not fail previews due to these zero values, + // - not attempt builds with invalid zero values, + // - not allow invalid zero values in non-preview operations. + unknowns := ImageArgs{ + BuildArgs: map[string]string{ + "known": "value", + "": "", + }, + Builder: nil, + CacheFrom: []CacheFrom{{GHA: &CacheFromGitHubActions{}}, {Raw: ""}}, + CacheTo: []CacheTo{{GHA: &CacheToGitHubActions{}}, {Raw: ""}}, + Context: nil, + Exports: []Export{{Raw: ""}}, + Dockerfile: nil, + Platforms: []Platform{"linux/amd64", ""}, + Registries: []Registry{ + { + Address: "", + Password: "", + Username: "", + }, + }, + Tags: []string{"known", ""}, + } + + _, err := unknowns.validate(true) + assert.NoError(t, err) + assert.False(t, unknowns.buildable()) + + _, err = unknowns.validate(false) + assert.Error(t, err) + }) + + t.Run("disabled caches", func(t *testing.T) { + t.Parallel() + args := ImageArgs{ + Context: &BuildContext{Context: Context{Location: "testdata/noop"}}, + CacheFrom: []CacheFrom{{Raw: "type=registry", Disabled: true}}, + CacheTo: []CacheTo{{Raw: "type=registry", Disabled: true}}, + Exports: []Export{{Raw: "type=registry", Disabled: true}}, + } + + opts, err := args.validate(true) + assert.NoError(t, err) + assert.Len(t, opts.CacheTo, 0) + assert.Len(t, opts.CacheFrom, 0) + assert.Len(t, opts.Exports, 0) + + opts, err = args.validate(false) + assert.NoError(t, err) + assert.Len(t, opts.CacheTo, 0) + assert.Len(t, opts.CacheFrom, 0) + assert.Len(t, opts.Exports, 0) + }) + + t.Run("multiple exports aren't allowed yet", func(t *testing.T) { + t.Parallel() + args := ImageArgs{ + Exports: []Export{{Raw: "type=local"}, {Raw: "type=tar"}}, + } + _, err := args.validate(false) + assert.ErrorContains(t, err, "multiple exports are currently unsupported") + }) + + t.Run("cache and export entries are union-ish", func(t *testing.T) { + t.Parallel() + args := ImageArgs{ + Exports: []Export{{Tar: &ExportTar{}, Local: &ExportLocal{}}}, + CacheTo: []CacheTo{{Raw: "type=tar", Local: &CacheToLocal{Dest: "/foo"}}}, + CacheFrom: []CacheFrom{{Raw: "type=tar", Registry: &CacheFromRegistry{}}}, + } + _, err := args.validate(false) + assert.ErrorContains(t, err, "exports should only specify one export type") + assert.ErrorContains(t, err, "cacheFrom should only specify one cache type") + assert.ErrorContains(t, err, "cacheTo should only specify one cache type") + }) + + t.Run("dockerfile parsing", func(t *testing.T) { + t.Parallel() + path := "./testdata/Dockerfile.invalid" + data, err := os.ReadFile(path) + require.NoError(t, err) + + for _, d := range []Dockerfile{ + {Location: path}, {Inline: string(data)}, + } { + d := d + args := ImageArgs{Dockerfile: &d} + _, err := args.validate(false) + assert.ErrorContains(t, err, "unknown instruction: RUNN (did you mean RUN?)") + } + }) +} + +func TestBuildable(t *testing.T) { + t.Parallel() + + tests := []struct { + name string + args ImageArgs + + want bool + }{ + { + name: "unknown tags", + args: ImageArgs{Tags: []string{""}}, + want: false, + }, + { + name: "unknown exports", + args: ImageArgs{ + Tags: []string{"known"}, + Exports: []Export{{Raw: ""}}, + }, + want: false, + }, + { + name: "unknown registry", + args: ImageArgs{ + Tags: []string{"known"}, + Exports: []Export{{Docker: &ExportDocker{}}}, + Registries: []Registry{ + { + Address: "docker.io", + Username: "foo", + Password: "", + }, + }, + }, + want: false, + }, + { + name: "known tags", + args: ImageArgs{ + Tags: []string{"known"}, + }, + want: true, + }, + { + name: "known exports", + args: ImageArgs{ + Tags: []string{"known"}, + Exports: []Export{{Registry: &ExportRegistry{}}}, + }, + want: true, + }, + { + name: "known registry", + args: ImageArgs{ + Tags: []string{"known"}, + Exports: []Export{{Registry: &ExportRegistry{}}}, + Registries: []Registry{ + { + Address: "docker.io", + Username: "foo", + Password: "bar", + }, + }, + }, + want: true, + }, + } + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + actual := tt.args.buildable() + assert.Equal(t, tt.want, actual) + }) + } +} + +func TestToBuild(t *testing.T) { + t.Parallel() + ctrl := gomock.NewController(t) + pctx := NewMockProviderContext(ctrl) + pctx.EXPECT().Log(gomock.Any(), gomock.Any()).AnyTimes() + max := Max + + ia := ImageArgs{ + Tags: []string{"foo", "bar"}, + Platforms: []Platform{"linux/amd64"}, + Context: &BuildContext{Context: Context{Location: "testdata/noop"}}, + CacheTo: []CacheTo{ + {GHA: &CacheToGitHubActions{CacheWithMode: CacheWithMode{&max}}}, + { + Registry: &CacheToRegistry{ + CacheFromRegistry: CacheFromRegistry{Ref: "docker.io/foo/bar"}, + }, + }, + { + Registry: &CacheToRegistry{ + CacheFromRegistry: CacheFromRegistry{Ref: "docker.io/foo/bar:baz"}, + }, + }, + }, + CacheFrom: []CacheFrom{ + {S3: &CacheFromS3{Name: "bar"}}, + {Registry: &CacheFromRegistry{Ref: "docker.io/foo/bar"}}, + {Registry: &CacheFromRegistry{Ref: "docker.io/foo/bar:baz"}}, + }, + } + + _, err := ia.toBuild(pctx, false) + assert.NoError(t, err) +} diff --git a/provider/internal/index.go b/provider/internal/index.go new file mode 100644 index 0000000..d424210 --- /dev/null +++ b/provider/internal/index.go @@ -0,0 +1,335 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "fmt" + "reflect" + "strings" + + // For examples/docs. + _ "embed" + + provider "github.com/pulumi/pulumi-go-provider" + "github.com/pulumi/pulumi-go-provider/infer" + "github.com/pulumi/pulumi/sdk/v3/go/common/diag" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource" +) + +var ( + _ infer.Annotated = (*Index)(nil) + _ infer.Annotated = (*IndexArgs)(nil) + _ infer.Annotated = (*IndexState)(nil) + _ infer.CustomCheck[IndexArgs] = (*Index)(nil) + _ infer.CustomResource[IndexArgs, IndexState] = (*Index)(nil) + _ infer.CustomDelete[IndexState] = (*Index)(nil) + _ infer.CustomDiff[IndexArgs, IndexState] = (*Index)(nil) + _ infer.CustomRead[IndexArgs, IndexState] = (*Index)(nil) + _ infer.CustomUpdate[IndexArgs, IndexState] = (*Index)(nil) +) + +//go:embed embed/index-examples.md +var _indexExamples string + +// Index is an OCI index or manifest list on a remote registry. +type Index struct{} + +// IndexArgs instantiate an Index. +type IndexArgs struct { + Tag string `pulumi:"tag"` + Sources []string `pulumi:"sources"` + Push bool `pulumi:"push,optional"` + Registry *Registry `pulumi:"registry,optional"` +} + +// IndexState captures the state of an Index. +type IndexState struct { + IndexArgs + + Ref string `pulumi:"ref" provider:"output"` +} + +// Annotate sets docstrings and defaults on Index. +func (i *Index) Annotate(a infer.Annotator) { + a.Describe(&i, dedent(` + A wrapper around "docker buildx imagetools create" to create an index + (or manifest list) referencing one or more existing images. + + In most cases you do not need an "Index" to build a multi-platform + image -- specifying multiple platforms on the "Image" will handle this + for you automatically. + + However, as of April 2024, building multi-platform images _with + caching_ will only export a cache for one platform at a time (see [this + discussion](https://github.com/docker/buildx/discussions/1382) for more + details). + + Therefore this resource can be helpful if you are building + multi-platform images with caching: each platform can be built and + cached separately, and an "Index" can join them all together. An + example of this is shown below. + + This resource creates an OCI image index or a Docker manifest list + depending on the media types of the source images. + `)+ + "\n\n"+_indexExamples, + ) +} + +// Annotate sets docstrings and defaults on IndexArgs. +func (i *IndexArgs) Annotate(a infer.Annotator) { + a.Describe(&i.Registry, dedent(` + Authentication for the registry where the tagged index will be pushed. + + Credentials can also be included with the provider's configuration. + `)) + a.Describe(&i.Sources, dedent(` + Existing images to include in the index. + `)) + a.Describe(&i.Tag, dedent(` + The tag to apply to the index. + `)) + a.Describe(&i.Push, dedent(` + If true, push the index to the target registry. + + Defaults to "true". + `)) + + a.SetDefault(&i.Push, true) +} + +// Annotate sets docstrings on IndexState. +func (i *IndexState) Annotate(a infer.Annotator) { + a.Describe(&i.Ref, dedent(` + The pushed tag with digest. + + Identical to the tag if the index was not pushed. + `)) +} + +// Create is a passthrough to Update. +func (i *Index) Create( + ctx provider.Context, + name string, + input IndexArgs, + preview bool, +) (string, IndexState, error) { + state, err := i.Update(ctx, name, IndexState{}, input, preview) + return name, state, err +} + +// Update performs `buildx imagetools create` to create a new OCI index / +// manifest list. +func (i *Index) Update( + ctx provider.Context, + name string, + state IndexState, + input IndexArgs, + preview bool, +) (IndexState, error) { + state.IndexArgs = input + state.Ref = input.Tag + + cli, err := i.client(ctx, state, input) + if err != nil { + return state, err + } + + if preview { + return state, nil + } + + ctx.Log(diag.Debug, fmt.Sprintf("creating index with tag %s and sources %s", input.Tag, input.Sources)) + + err = cli.ManifestCreate(ctx, input.Push, input.Tag, input.Sources...) + if err != nil { + return state, fmt.Errorf("creating: %w", err) + } + + _, _, state, err = i.Read(ctx, name, input, state) + if err != nil { + return state, fmt.Errorf("reading: %w", err) + } + return state, nil +} + +func (i *Index) Read( + ctx provider.Context, + name string, + input IndexArgs, + state IndexState, +) (string, IndexArgs, IndexState, error) { + state.IndexArgs = input + state.Ref = input.Tag + + if !input.Push { + ctx.Log(diag.Debug, "skipping read because index was not pushed") + return name, input, state, nil // Nothing to read. + } + + cli, err := i.client(ctx, state, input) + if err != nil { + return name, input, state, err + } + + ctx.Log(diag.Debug, "reading index with tag "+input.Tag) + + digest, err := cli.ManifestInspect(ctx, input.Tag) + if err != nil && strings.Contains(err.Error(), "No such manifest:") && input.Push { + // A remote tag was expected but isn't there -- delete the resource. + return "", input, state, err + } + if err != nil && strings.Contains(err.Error(), "No such manifest:") && !input.Push { + // Nothing was pushed, so just use the tag without digest.. + return name, input, state, nil + } + if err != nil { + return name, input, state, err + } + + if ref, ok := addDigest(input.Tag, digest); ok { + state.Ref = ref + } + + return name, input, state, nil +} + +// Check confirms the Index's tag and source refs are all valid. This doesn't +// fully capture input requirements -- for example buildx requires refs to all +// exist on the same registry. This is sufficient to handle the most common +// cases for now. +func (i *Index) Check( + _ provider.Context, + _ string, + _ resource.PropertyMap, + news resource.PropertyMap, +) (IndexArgs, []provider.CheckFailure, error) { + args, failures, err := infer.DefaultCheck[IndexArgs](news) + if err != nil { + return args, failures, err + } + + if _, err := normalizeReference(args.Tag); args.Tag != "" && err != nil { + failures = append( + failures, + provider.CheckFailure{ + Property: "target", + Reason: err.Error(), + }, + ) + } + + for idx, s := range args.Sources { + if _, err := normalizeReference(s); s != "" && err != nil { + failures = append( + failures, + provider.CheckFailure{ + Property: fmt.Sprintf("refs[%d]", idx), + Reason: err.Error(), + }, + ) + } + } + + return args, failures, nil +} + +// Delete attempts to delete the remote manifest. +func (i *Index) Delete(ctx provider.Context, _ string, state IndexState) error { + if !state.Push { + return nil // Nothing to delete. + } + + cli, err := i.client(ctx, state, state.IndexArgs) + if err != nil { + return err + } + + err = cli.ManifestDelete(ctx, state.Ref) + // TODO: Upstream buildx swallows the error types we'd like to test for + // here. + if err != nil && strings.Contains(err.Error(), "No such manifest:") { + return nil + } + return err +} + +// Diff returns a diff of proposed changes against current state. Ideally we +// wouldn't need to implement all of this, but we currently have to in order to +// force `ignoreChanges`-style behavior on our registry password (which can +// change all the time due to short-lived AWS credentials). +func (i *Index) Diff( + _ provider.Context, + _ string, + olds IndexState, + news IndexArgs, +) (provider.DiffResponse, error) { + diff := map[string]provider.PropertyDiff{} + update := provider.PropertyDiff{Kind: provider.Update} + replace := provider.PropertyDiff{Kind: provider.UpdateReplace} + + if olds.Tag != news.Tag { + diff["tag"] = replace + } + if !reflect.DeepEqual(olds.Sources, news.Sources) { + diff["sources"] = update + } + if olds.Registry != nil && news.Registry != nil { + if olds.Registry.Address != news.Registry.Address { + diff["registry.address"] = update + if olds.Registry.Address != "" { + diff["registry.address"] = replace + } + } + if olds.Registry.Username != news.Registry.Username { + diff["registry.username"] = update + } + } + if (olds.Registry == nil && news.Registry != nil) || + (olds.Registry != nil && news.Registry == nil) { + diff["registry"] = update + } + // Intentionally ignore changes to registry.password + + return provider.DiffResponse{ + HasChanges: len(diff) > 0, + DetailedDiff: diff, + }, nil +} + +// client produces a CLI client with scoped to this resource and layered on top +// of any host-level credentials. +func (i *Index) client( + ctx provider.Context, + _ IndexState, + args IndexArgs, +) (Client, error) { + cfg := infer.GetConfig[Config](ctx) + + if cli, ok := ctx.Value(_mockClientKey).(Client); ok { + return cli, nil + } + + // We prefer auth from args, the provider, and state in that order. We + // build a slice in reverse order because wrap() will overwrite earlier + // entries with later ones. + auths := []Registry{} + auths = append(auths, cfg.Registries...) + if args.Registry != nil { + auths = append(auths, *args.Registry) + } + + return wrap(cfg.host, auths...) +} diff --git a/provider/internal/index_test.go b/provider/internal/index_test.go new file mode 100644 index 0000000..f5122fd --- /dev/null +++ b/provider/internal/index_test.go @@ -0,0 +1,210 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "os" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + provider "github.com/pulumi/pulumi-go-provider" + "github.com/pulumi/pulumi-go-provider/integration" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource" + "github.com/pulumi/pulumi/sdk/v3/go/common/util/mapper" +) + +func TestIndexLifecycle(t *testing.T) { + t.Parallel() + realClient := func(t *testing.T) Client { return nil } + + tests := []struct { + name string + skip bool + + op func(t *testing.T) integration.Operation + client func(t *testing.T) Client + }{ + { + name: "not pushed", + client: realClient, + op: func(t *testing.T) integration.Operation { + return integration.Operation{ + Inputs: resource.PropertyMap{ + "tag": resource.NewStringProperty( + "docker.io/pulumibot/buildkit-e2e:manifest-unit", + ), + "sources": resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewStringProperty("docker.io/pulumibot/buildkit-e2e:arm64"), + resource.NewStringProperty("docker.io/pulumibot/buildkit-e2e:amd64"), + }), + "push": resource.NewBoolProperty(false), + }, + } + }, + }, + { + name: "pushed", + skip: os.Getenv("DOCKER_HUB_PASSWORD") == "", + client: realClient, + op: func(t *testing.T) integration.Operation { + return integration.Operation{ + Inputs: resource.PropertyMap{ + "tag": resource.NewStringProperty( + "docker.io/pulumibot/buildkit-e2e:manifest", + ), + "sources": resource.NewArrayProperty([]resource.PropertyValue{ + resource.NewStringProperty("docker.io/pulumibot/buildkit-e2e:arm64"), + resource.NewStringProperty("docker.io/pulumibot/buildkit-e2e:amd64"), + }), + "push": resource.NewBoolProperty(true), + "registry": resource.NewObjectProperty(resource.PropertyMap{ + "address": resource.NewStringProperty("docker.io"), + "username": resource.NewStringProperty("pulumibot"), + "password": resource.NewSecretProperty(&resource.Secret{ + Element: resource.NewStringProperty( + os.Getenv("DOCKER_HUB_PASSWORD"), + ), + }), + }), + }, + } + }, + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + if tt.skip { + t.Skip("missing environment variables") + } + lc := integration.LifeCycleTest{ + Resource: "docker-build:index:Index", + Create: tt.op(t), + } + s := newServer(tt.client(t)) + + err := s.Configure(provider.ConfigureRequest{}) + require.NoError(t, err) + + lc.Run(t, s) + }) + } +} + +func TestIndexDiff(t *testing.T) { + t.Parallel() + urn := resource.NewURN("test", "provider", "a", "docker-build:index:Index", "test") + baseArgs := IndexArgs{Sources: []string{"docker.io/nginx:latest"}} + baseState := IndexState{IndexArgs: baseArgs} + + tests := []struct { + name string + olds func(*testing.T, IndexState) IndexState + news func(*testing.T, IndexArgs) IndexArgs + + wantChanges bool + }{ + { + name: "no diff if no changes", + olds: func(*testing.T, IndexState) IndexState { return baseState }, + news: func(*testing.T, IndexArgs) IndexArgs { return baseArgs }, + wantChanges: false, + }, + { + name: "diff if tag changes", + olds: func(*testing.T, IndexState) IndexState { return baseState }, + news: func(t *testing.T, a IndexArgs) IndexArgs { + a.Tag = "new-tag" + return a + }, + wantChanges: true, + }, + { + name: "no diff if registry password changes", + olds: func(_ *testing.T, s IndexState) IndexState { + s.Registry = &Registry{ + Address: "foo", + Username: "foo", + Password: "foo", + } + return s + }, + news: func(_ *testing.T, a IndexArgs) IndexArgs { + a.Registry = &Registry{ + Address: "foo", + Username: "foo", + Password: "DIFFERENT PASSWORD", + } + return a + }, + wantChanges: false, + }, + { + name: "diff if registry added", + olds: func(*testing.T, IndexState) IndexState { return baseState }, + news: func(_ *testing.T, a IndexArgs) IndexArgs { + a.Registry = &Registry{Address: "foo.com", Username: "foo", Password: "foo"} + return a + }, + wantChanges: true, + }, + { + name: "diff if registry user changes", + olds: func(_ *testing.T, s IndexState) IndexState { + s.Registry = &Registry{ + Address: "foo", + Username: "foo", + Password: "foo", + } + return s + }, + news: func(_ *testing.T, a IndexArgs) IndexArgs { + a.Registry = &Registry{ + Address: "DIFFERENT USER", + Username: "foo", + Password: "foo", + } + return a + }, + wantChanges: true, + }, + } + + s := newServer(nil) + + encode := func(t *testing.T, x any) resource.PropertyMap { + raw, err := mapper.New(&mapper.Opts{IgnoreMissing: true}).Encode(x) + require.NoError(t, err) + return resource.NewPropertyMapFromMap(raw) + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + resp, err := s.Diff(provider.DiffRequest{ + Urn: urn, + Olds: encode(t, tt.olds(t, baseState)), + News: encode(t, tt.news(t, baseArgs)), + }) + assert.NoError(t, err) + assert.Equal(t, tt.wantChanges, resp.HasChanges, resp.DetailedDiff) + }) + } +} diff --git a/provider/internal/metadata.json b/provider/internal/metadata.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/provider/internal/metadata.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/provider/internal/mockcli_test.go b/provider/internal/mockcli_test.go new file mode 100644 index 0000000..4293b99 --- /dev/null +++ b/provider/internal/mockcli_test.go @@ -0,0 +1,737 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: cli.go +// +// Generated by this command: +// +// mockgen -typed -package internal -source cli.go -destination mockcli_test.go --self_package github.com/pulumi/pulumi-docker-build/provider/internal +// +// Package internal is a generated GoMock package. +package internal + +import ( + io "io" + reflect "reflect" + + command "github.com/docker/cli/cli/command" + configfile "github.com/docker/cli/cli/config/configfile" + docker "github.com/docker/cli/cli/context/docker" + store "github.com/docker/cli/cli/context/store" + store0 "github.com/docker/cli/cli/manifest/store" + client "github.com/docker/cli/cli/registry/client" + streams "github.com/docker/cli/cli/streams" + trust "github.com/docker/cli/cli/trust" + client0 "github.com/docker/docker/client" + client1 "github.com/theupdateframework/notary/client" + gomock "go.uber.org/mock/gomock" +) + +// MockCli is a mock of Cli interface. +type MockCli struct { + ctrl *gomock.Controller + recorder *MockCliMockRecorder +} + +// MockCliMockRecorder is the mock recorder for MockCli. +type MockCliMockRecorder struct { + mock *MockCli +} + +// NewMockCli creates a new mock instance. +func NewMockCli(ctrl *gomock.Controller) *MockCli { + mock := &MockCli{ctrl: ctrl} + mock.recorder = &MockCliMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockCli) EXPECT() *MockCliMockRecorder { + return m.recorder +} + +// Apply mocks base method. +func (m *MockCli) Apply(ops ...command.CLIOption) error { + m.ctrl.T.Helper() + varargs := []any{} + for _, a := range ops { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "Apply", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// Apply indicates an expected call of Apply. +func (mr *MockCliMockRecorder) Apply(ops ...any) *CliApplyCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockCli)(nil).Apply), ops...) + return &CliApplyCall{Call: call} +} + +// CliApplyCall wrap *gomock.Call +type CliApplyCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliApplyCall) Return(arg0 error) *CliApplyCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliApplyCall) Do(f func(...command.CLIOption) error) *CliApplyCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliApplyCall) DoAndReturn(f func(...command.CLIOption) error) *CliApplyCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// BuildKitEnabled mocks base method. +func (m *MockCli) BuildKitEnabled() (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BuildKitEnabled") + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// BuildKitEnabled indicates an expected call of BuildKitEnabled. +func (mr *MockCliMockRecorder) BuildKitEnabled() *CliBuildKitEnabledCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildKitEnabled", reflect.TypeOf((*MockCli)(nil).BuildKitEnabled)) + return &CliBuildKitEnabledCall{Call: call} +} + +// CliBuildKitEnabledCall wrap *gomock.Call +type CliBuildKitEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliBuildKitEnabledCall) Return(arg0 bool, arg1 error) *CliBuildKitEnabledCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliBuildKitEnabledCall) Do(f func() (bool, error)) *CliBuildKitEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliBuildKitEnabledCall) DoAndReturn(f func() (bool, error)) *CliBuildKitEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Client mocks base method. +func (m *MockCli) Client() client0.APIClient { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Client") + ret0, _ := ret[0].(client0.APIClient) + return ret0 +} + +// Client indicates an expected call of Client. +func (mr *MockCliMockRecorder) Client() *CliClientCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Client", reflect.TypeOf((*MockCli)(nil).Client)) + return &CliClientCall{Call: call} +} + +// CliClientCall wrap *gomock.Call +type CliClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliClientCall) Return(arg0 client0.APIClient) *CliClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliClientCall) Do(f func() client0.APIClient) *CliClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliClientCall) DoAndReturn(f func() client0.APIClient) *CliClientCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ConfigFile mocks base method. +func (m *MockCli) ConfigFile() *configfile.ConfigFile { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ConfigFile") + ret0, _ := ret[0].(*configfile.ConfigFile) + return ret0 +} + +// ConfigFile indicates an expected call of ConfigFile. +func (mr *MockCliMockRecorder) ConfigFile() *CliConfigFileCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigFile", reflect.TypeOf((*MockCli)(nil).ConfigFile)) + return &CliConfigFileCall{Call: call} +} + +// CliConfigFileCall wrap *gomock.Call +type CliConfigFileCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliConfigFileCall) Return(arg0 *configfile.ConfigFile) *CliConfigFileCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliConfigFileCall) Do(f func() *configfile.ConfigFile) *CliConfigFileCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliConfigFileCall) DoAndReturn(f func() *configfile.ConfigFile) *CliConfigFileCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ContentTrustEnabled mocks base method. +func (m *MockCli) ContentTrustEnabled() bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ContentTrustEnabled") + ret0, _ := ret[0].(bool) + return ret0 +} + +// ContentTrustEnabled indicates an expected call of ContentTrustEnabled. +func (mr *MockCliMockRecorder) ContentTrustEnabled() *CliContentTrustEnabledCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentTrustEnabled", reflect.TypeOf((*MockCli)(nil).ContentTrustEnabled)) + return &CliContentTrustEnabledCall{Call: call} +} + +// CliContentTrustEnabledCall wrap *gomock.Call +type CliContentTrustEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliContentTrustEnabledCall) Return(arg0 bool) *CliContentTrustEnabledCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliContentTrustEnabledCall) Do(f func() bool) *CliContentTrustEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliContentTrustEnabledCall) DoAndReturn(f func() bool) *CliContentTrustEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ContextStore mocks base method. +func (m *MockCli) ContextStore() store.Store { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ContextStore") + ret0, _ := ret[0].(store.Store) + return ret0 +} + +// ContextStore indicates an expected call of ContextStore. +func (mr *MockCliMockRecorder) ContextStore() *CliContextStoreCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContextStore", reflect.TypeOf((*MockCli)(nil).ContextStore)) + return &CliContextStoreCall{Call: call} +} + +// CliContextStoreCall wrap *gomock.Call +type CliContextStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliContextStoreCall) Return(arg0 store.Store) *CliContextStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliContextStoreCall) Do(f func() store.Store) *CliContextStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliContextStoreCall) DoAndReturn(f func() store.Store) *CliContextStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// CurrentContext mocks base method. +func (m *MockCli) CurrentContext() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CurrentContext") + ret0, _ := ret[0].(string) + return ret0 +} + +// CurrentContext indicates an expected call of CurrentContext. +func (mr *MockCliMockRecorder) CurrentContext() *CliCurrentContextCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentContext", reflect.TypeOf((*MockCli)(nil).CurrentContext)) + return &CliCurrentContextCall{Call: call} +} + +// CliCurrentContextCall wrap *gomock.Call +type CliCurrentContextCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliCurrentContextCall) Return(arg0 string) *CliCurrentContextCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliCurrentContextCall) Do(f func() string) *CliCurrentContextCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliCurrentContextCall) DoAndReturn(f func() string) *CliCurrentContextCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// CurrentVersion mocks base method. +func (m *MockCli) CurrentVersion() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CurrentVersion") + ret0, _ := ret[0].(string) + return ret0 +} + +// CurrentVersion indicates an expected call of CurrentVersion. +func (mr *MockCliMockRecorder) CurrentVersion() *CliCurrentVersionCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentVersion", reflect.TypeOf((*MockCli)(nil).CurrentVersion)) + return &CliCurrentVersionCall{Call: call} +} + +// CliCurrentVersionCall wrap *gomock.Call +type CliCurrentVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliCurrentVersionCall) Return(arg0 string) *CliCurrentVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliCurrentVersionCall) Do(f func() string) *CliCurrentVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliCurrentVersionCall) DoAndReturn(f func() string) *CliCurrentVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// DefaultVersion mocks base method. +func (m *MockCli) DefaultVersion() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DefaultVersion") + ret0, _ := ret[0].(string) + return ret0 +} + +// DefaultVersion indicates an expected call of DefaultVersion. +func (mr *MockCliMockRecorder) DefaultVersion() *CliDefaultVersionCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultVersion", reflect.TypeOf((*MockCli)(nil).DefaultVersion)) + return &CliDefaultVersionCall{Call: call} +} + +// CliDefaultVersionCall wrap *gomock.Call +type CliDefaultVersionCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliDefaultVersionCall) Return(arg0 string) *CliDefaultVersionCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliDefaultVersionCall) Do(f func() string) *CliDefaultVersionCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliDefaultVersionCall) DoAndReturn(f func() string) *CliDefaultVersionCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// DockerEndpoint mocks base method. +func (m *MockCli) DockerEndpoint() docker.Endpoint { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "DockerEndpoint") + ret0, _ := ret[0].(docker.Endpoint) + return ret0 +} + +// DockerEndpoint indicates an expected call of DockerEndpoint. +func (mr *MockCliMockRecorder) DockerEndpoint() *CliDockerEndpointCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DockerEndpoint", reflect.TypeOf((*MockCli)(nil).DockerEndpoint)) + return &CliDockerEndpointCall{Call: call} +} + +// CliDockerEndpointCall wrap *gomock.Call +type CliDockerEndpointCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliDockerEndpointCall) Return(arg0 docker.Endpoint) *CliDockerEndpointCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliDockerEndpointCall) Do(f func() docker.Endpoint) *CliDockerEndpointCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliDockerEndpointCall) DoAndReturn(f func() docker.Endpoint) *CliDockerEndpointCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Err mocks base method. +func (m *MockCli) Err() io.Writer { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Err") + ret0, _ := ret[0].(io.Writer) + return ret0 +} + +// Err indicates an expected call of Err. +func (mr *MockCliMockRecorder) Err() *CliErrCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockCli)(nil).Err)) + return &CliErrCall{Call: call} +} + +// CliErrCall wrap *gomock.Call +type CliErrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliErrCall) Return(arg0 io.Writer) *CliErrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliErrCall) Do(f func() io.Writer) *CliErrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliErrCall) DoAndReturn(f func() io.Writer) *CliErrCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// In mocks base method. +func (m *MockCli) In() *streams.In { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "In") + ret0, _ := ret[0].(*streams.In) + return ret0 +} + +// In indicates an expected call of In. +func (mr *MockCliMockRecorder) In() *CliInCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "In", reflect.TypeOf((*MockCli)(nil).In)) + return &CliInCall{Call: call} +} + +// CliInCall wrap *gomock.Call +type CliInCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliInCall) Return(arg0 *streams.In) *CliInCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliInCall) Do(f func() *streams.In) *CliInCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliInCall) DoAndReturn(f func() *streams.In) *CliInCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ManifestStore mocks base method. +func (m *MockCli) ManifestStore() store0.Store { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ManifestStore") + ret0, _ := ret[0].(store0.Store) + return ret0 +} + +// ManifestStore indicates an expected call of ManifestStore. +func (mr *MockCliMockRecorder) ManifestStore() *CliManifestStoreCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ManifestStore", reflect.TypeOf((*MockCli)(nil).ManifestStore)) + return &CliManifestStoreCall{Call: call} +} + +// CliManifestStoreCall wrap *gomock.Call +type CliManifestStoreCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliManifestStoreCall) Return(arg0 store0.Store) *CliManifestStoreCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliManifestStoreCall) Do(f func() store0.Store) *CliManifestStoreCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliManifestStoreCall) DoAndReturn(f func() store0.Store) *CliManifestStoreCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// NotaryClient mocks base method. +func (m *MockCli) NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (client1.Repository, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "NotaryClient", imgRefAndAuth, actions) + ret0, _ := ret[0].(client1.Repository) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// NotaryClient indicates an expected call of NotaryClient. +func (mr *MockCliMockRecorder) NotaryClient(imgRefAndAuth, actions any) *CliNotaryClientCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotaryClient", reflect.TypeOf((*MockCli)(nil).NotaryClient), imgRefAndAuth, actions) + return &CliNotaryClientCall{Call: call} +} + +// CliNotaryClientCall wrap *gomock.Call +type CliNotaryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliNotaryClientCall) Return(arg0 client1.Repository, arg1 error) *CliNotaryClientCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliNotaryClientCall) Do(f func(trust.ImageRefAndAuth, []string) (client1.Repository, error)) *CliNotaryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliNotaryClientCall) DoAndReturn(f func(trust.ImageRefAndAuth, []string) (client1.Repository, error)) *CliNotaryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Out mocks base method. +func (m *MockCli) Out() *streams.Out { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Out") + ret0, _ := ret[0].(*streams.Out) + return ret0 +} + +// Out indicates an expected call of Out. +func (mr *MockCliMockRecorder) Out() *CliOutCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Out", reflect.TypeOf((*MockCli)(nil).Out)) + return &CliOutCall{Call: call} +} + +// CliOutCall wrap *gomock.Call +type CliOutCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliOutCall) Return(arg0 *streams.Out) *CliOutCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliOutCall) Do(f func() *streams.Out) *CliOutCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliOutCall) DoAndReturn(f func() *streams.Out) *CliOutCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// RegistryClient mocks base method. +func (m *MockCli) RegistryClient(arg0 bool) client.RegistryClient { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RegistryClient", arg0) + ret0, _ := ret[0].(client.RegistryClient) + return ret0 +} + +// RegistryClient indicates an expected call of RegistryClient. +func (mr *MockCliMockRecorder) RegistryClient(arg0 any) *CliRegistryClientCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegistryClient", reflect.TypeOf((*MockCli)(nil).RegistryClient), arg0) + return &CliRegistryClientCall{Call: call} +} + +// CliRegistryClientCall wrap *gomock.Call +type CliRegistryClientCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliRegistryClientCall) Return(arg0 client.RegistryClient) *CliRegistryClientCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliRegistryClientCall) Do(f func(bool) client.RegistryClient) *CliRegistryClientCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliRegistryClientCall) DoAndReturn(f func(bool) client.RegistryClient) *CliRegistryClientCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ServerInfo mocks base method. +func (m *MockCli) ServerInfo() command.ServerInfo { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ServerInfo") + ret0, _ := ret[0].(command.ServerInfo) + return ret0 +} + +// ServerInfo indicates an expected call of ServerInfo. +func (mr *MockCliMockRecorder) ServerInfo() *CliServerInfoCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerInfo", reflect.TypeOf((*MockCli)(nil).ServerInfo)) + return &CliServerInfoCall{Call: call} +} + +// CliServerInfoCall wrap *gomock.Call +type CliServerInfoCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliServerInfoCall) Return(arg0 command.ServerInfo) *CliServerInfoCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliServerInfoCall) Do(f func() command.ServerInfo) *CliServerInfoCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliServerInfoCall) DoAndReturn(f func() command.ServerInfo) *CliServerInfoCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// SetIn mocks base method. +func (m *MockCli) SetIn(in *streams.In) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetIn", in) +} + +// SetIn indicates an expected call of SetIn. +func (mr *MockCliMockRecorder) SetIn(in any) *CliSetInCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIn", reflect.TypeOf((*MockCli)(nil).SetIn), in) + return &CliSetInCall{Call: call} +} + +// CliSetInCall wrap *gomock.Call +type CliSetInCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *CliSetInCall) Return() *CliSetInCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *CliSetInCall) Do(f func(*streams.In)) *CliSetInCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *CliSetInCall) DoAndReturn(f func(*streams.In)) *CliSetInCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/provider/internal/mockclient_test.go b/provider/internal/mockclient_test.go new file mode 100644 index 0000000..da357ff --- /dev/null +++ b/provider/internal/mockclient_test.go @@ -0,0 +1,494 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: client.go +// +// Generated by this command: +// +// 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 + +import ( + context "context" + reflect "reflect" + + pb "github.com/docker/buildx/controller/pb" + client "github.com/moby/buildkit/client" + session "github.com/moby/buildkit/session" + provider "github.com/pulumi/pulumi-go-provider" + descriptor "github.com/regclient/regclient/types/descriptor" + gomock "go.uber.org/mock/gomock" +) + +// MockClient is a mock of Client interface. +type MockClient struct { + ctrl *gomock.Controller + recorder *MockClientMockRecorder +} + +// MockClientMockRecorder is the mock recorder for MockClient. +type MockClientMockRecorder struct { + mock *MockClient +} + +// NewMockClient creates a new mock instance. +func NewMockClient(ctrl *gomock.Controller) *MockClient { + mock := &MockClient{ctrl: ctrl} + mock.recorder = &MockClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockClient) EXPECT() *MockClientMockRecorder { + return m.recorder +} + +// Build mocks base method. +func (m *MockClient) Build(ctx provider.Context, b Build) (*client.SolveResponse, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Build", ctx, b) + ret0, _ := ret[0].(*client.SolveResponse) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Build indicates an expected call of Build. +func (mr *MockClientMockRecorder) Build(ctx, b any) *ClientBuildCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Build", reflect.TypeOf((*MockClient)(nil).Build), ctx, b) + return &ClientBuildCall{Call: call} +} + +// ClientBuildCall wrap *gomock.Call +type ClientBuildCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ClientBuildCall) Return(arg0 *client.SolveResponse, arg1 error) *ClientBuildCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ClientBuildCall) Do(f func(provider.Context, Build) (*client.SolveResponse, error)) *ClientBuildCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ClientBuildCall) DoAndReturn(f func(provider.Context, Build) (*client.SolveResponse, error)) *ClientBuildCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// BuildKitEnabled mocks base method. +func (m *MockClient) BuildKitEnabled() (bool, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BuildKitEnabled") + ret0, _ := ret[0].(bool) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// BuildKitEnabled indicates an expected call of BuildKitEnabled. +func (mr *MockClientMockRecorder) BuildKitEnabled() *ClientBuildKitEnabledCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildKitEnabled", reflect.TypeOf((*MockClient)(nil).BuildKitEnabled)) + return &ClientBuildKitEnabledCall{Call: call} +} + +// ClientBuildKitEnabledCall wrap *gomock.Call +type ClientBuildKitEnabledCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ClientBuildKitEnabledCall) Return(arg0 bool, arg1 error) *ClientBuildKitEnabledCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ClientBuildKitEnabledCall) Do(f func() (bool, error)) *ClientBuildKitEnabledCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ClientBuildKitEnabledCall) DoAndReturn(f func() (bool, error)) *ClientBuildKitEnabledCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Delete mocks base method. +func (m *MockClient) Delete(ctx context.Context, id string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Delete", ctx, id) + ret0, _ := ret[0].(error) + return ret0 +} + +// Delete indicates an expected call of Delete. +func (mr *MockClientMockRecorder) Delete(ctx, id any) *ClientDeleteCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClient)(nil).Delete), ctx, id) + return &ClientDeleteCall{Call: call} +} + +// ClientDeleteCall wrap *gomock.Call +type ClientDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ClientDeleteCall) Return(arg0 error) *ClientDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ClientDeleteCall) Do(f func(context.Context, string) error) *ClientDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ClientDeleteCall) DoAndReturn(f func(context.Context, string) error) *ClientDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Inspect mocks base method. +func (m *MockClient) Inspect(ctx context.Context, id string) ([]descriptor.Descriptor, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Inspect", ctx, id) + ret0, _ := ret[0].([]descriptor.Descriptor) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// Inspect indicates an expected call of Inspect. +func (mr *MockClientMockRecorder) Inspect(ctx, id any) *ClientInspectCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inspect", reflect.TypeOf((*MockClient)(nil).Inspect), ctx, id) + return &ClientInspectCall{Call: call} +} + +// ClientInspectCall wrap *gomock.Call +type ClientInspectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ClientInspectCall) Return(arg0 []descriptor.Descriptor, arg1 error) *ClientInspectCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ClientInspectCall) Do(f func(context.Context, string) ([]descriptor.Descriptor, error)) *ClientInspectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ClientInspectCall) DoAndReturn(f func(context.Context, string) ([]descriptor.Descriptor, error)) *ClientInspectCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ManifestCreate mocks base method. +func (m *MockClient) ManifestCreate(ctx provider.Context, push bool, target string, refs ...string) error { + m.ctrl.T.Helper() + varargs := []any{ctx, push, target} + for _, a := range refs { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "ManifestCreate", varargs...) + ret0, _ := ret[0].(error) + return ret0 +} + +// ManifestCreate indicates an expected call of ManifestCreate. +func (mr *MockClientMockRecorder) ManifestCreate(ctx, push, target any, refs ...any) *ClientManifestCreateCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{ctx, push, target}, refs...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ManifestCreate", reflect.TypeOf((*MockClient)(nil).ManifestCreate), varargs...) + return &ClientManifestCreateCall{Call: call} +} + +// ClientManifestCreateCall wrap *gomock.Call +type ClientManifestCreateCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ClientManifestCreateCall) Return(arg0 error) *ClientManifestCreateCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ClientManifestCreateCall) Do(f func(provider.Context, bool, string, ...string) error) *ClientManifestCreateCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ClientManifestCreateCall) DoAndReturn(f func(provider.Context, bool, string, ...string) error) *ClientManifestCreateCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ManifestDelete mocks base method. +func (m *MockClient) ManifestDelete(ctx provider.Context, target string) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ManifestDelete", ctx, target) + ret0, _ := ret[0].(error) + return ret0 +} + +// ManifestDelete indicates an expected call of ManifestDelete. +func (mr *MockClientMockRecorder) ManifestDelete(ctx, target any) *ClientManifestDeleteCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ManifestDelete", reflect.TypeOf((*MockClient)(nil).ManifestDelete), ctx, target) + return &ClientManifestDeleteCall{Call: call} +} + +// ClientManifestDeleteCall wrap *gomock.Call +type ClientManifestDeleteCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ClientManifestDeleteCall) Return(arg0 error) *ClientManifestDeleteCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ClientManifestDeleteCall) Do(f func(provider.Context, string) error) *ClientManifestDeleteCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ClientManifestDeleteCall) DoAndReturn(f func(provider.Context, string) error) *ClientManifestDeleteCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ManifestInspect mocks base method. +func (m *MockClient) ManifestInspect(ctx provider.Context, target string) (string, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ManifestInspect", ctx, target) + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ManifestInspect indicates an expected call of ManifestInspect. +func (mr *MockClientMockRecorder) ManifestInspect(ctx, target any) *ClientManifestInspectCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ManifestInspect", reflect.TypeOf((*MockClient)(nil).ManifestInspect), ctx, target) + return &ClientManifestInspectCall{Call: call} +} + +// ClientManifestInspectCall wrap *gomock.Call +type ClientManifestInspectCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ClientManifestInspectCall) Return(arg0 string, arg1 error) *ClientManifestInspectCall { + c.Call = c.Call.Return(arg0, arg1) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ClientManifestInspectCall) Do(f func(provider.Context, string) (string, error)) *ClientManifestInspectCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ClientManifestInspectCall) DoAndReturn(f func(provider.Context, string) (string, error)) *ClientManifestInspectCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// MockBuild is a mock of Build interface. +type MockBuild struct { + ctrl *gomock.Controller + recorder *MockBuildMockRecorder +} + +// MockBuildMockRecorder is the mock recorder for MockBuild. +type MockBuildMockRecorder struct { + mock *MockBuild +} + +// NewMockBuild creates a new mock instance. +func NewMockBuild(ctrl *gomock.Controller) *MockBuild { + mock := &MockBuild{ctrl: ctrl} + mock.recorder = &MockBuildMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBuild) EXPECT() *MockBuildMockRecorder { + return m.recorder +} + +// BuildOptions mocks base method. +func (m *MockBuild) BuildOptions() pb.BuildOptions { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "BuildOptions") + ret0, _ := ret[0].(pb.BuildOptions) + return ret0 +} + +// BuildOptions indicates an expected call of BuildOptions. +func (mr *MockBuildMockRecorder) BuildOptions() *BuildBuildOptionsCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildOptions", reflect.TypeOf((*MockBuild)(nil).BuildOptions)) + return &BuildBuildOptionsCall{Call: call} +} + +// BuildBuildOptionsCall wrap *gomock.Call +type BuildBuildOptionsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *BuildBuildOptionsCall) Return(arg0 pb.BuildOptions) *BuildBuildOptionsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *BuildBuildOptionsCall) Do(f func() pb.BuildOptions) *BuildBuildOptionsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *BuildBuildOptionsCall) DoAndReturn(f func() pb.BuildOptions) *BuildBuildOptionsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Inline mocks base method. +func (m *MockBuild) Inline() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Inline") + ret0, _ := ret[0].(string) + return ret0 +} + +// Inline indicates an expected call of Inline. +func (mr *MockBuildMockRecorder) Inline() *BuildInlineCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inline", reflect.TypeOf((*MockBuild)(nil).Inline)) + return &BuildInlineCall{Call: call} +} + +// BuildInlineCall wrap *gomock.Call +type BuildInlineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *BuildInlineCall) Return(arg0 string) *BuildInlineCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *BuildInlineCall) Do(f func() string) *BuildInlineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *BuildInlineCall) DoAndReturn(f func() string) *BuildInlineCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Secrets mocks base method. +func (m *MockBuild) Secrets() session.Attachable { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Secrets") + ret0, _ := ret[0].(session.Attachable) + return ret0 +} + +// Secrets indicates an expected call of Secrets. +func (mr *MockBuildMockRecorder) Secrets() *BuildSecretsCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secrets", reflect.TypeOf((*MockBuild)(nil).Secrets)) + return &BuildSecretsCall{Call: call} +} + +// BuildSecretsCall wrap *gomock.Call +type BuildSecretsCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *BuildSecretsCall) Return(arg0 session.Attachable) *BuildSecretsCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *BuildSecretsCall) Do(f func() session.Attachable) *BuildSecretsCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *BuildSecretsCall) DoAndReturn(f func() session.Attachable) *BuildSecretsCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// ShouldExec mocks base method. +func (m *MockBuild) ShouldExec() bool { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ShouldExec") + ret0, _ := ret[0].(bool) + return ret0 +} + +// ShouldExec indicates an expected call of ShouldExec. +func (mr *MockBuildMockRecorder) ShouldExec() *BuildShouldExecCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldExec", reflect.TypeOf((*MockBuild)(nil).ShouldExec)) + return &BuildShouldExecCall{Call: call} +} + +// BuildShouldExecCall wrap *gomock.Call +type BuildShouldExecCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *BuildShouldExecCall) Return(arg0 bool) *BuildShouldExecCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *BuildShouldExecCall) Do(f func() bool) *BuildShouldExecCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *BuildShouldExecCall) DoAndReturn(f func() bool) *BuildShouldExecCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/provider/internal/mockprovidercontext_test.go b/provider/internal/mockprovidercontext_test.go new file mode 100644 index 0000000..44b9983 --- /dev/null +++ b/provider/internal/mockprovidercontext_test.go @@ -0,0 +1,386 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: providercontext.go +// +// Generated by this command: +// +// mockgen -typed -package internal -source providercontext.go -destination mockprovidercontext_test.go --self_package github.com/pulumi/pulumi-docker/provider/v4/internal +// +// Package internal is a generated GoMock package. +package internal + +import ( + reflect "reflect" + time "time" + + provider "github.com/pulumi/pulumi-go-provider" + diag "github.com/pulumi/pulumi/sdk/v3/go/common/diag" + gomock "go.uber.org/mock/gomock" +) + +// MockProviderContext is a mock of ProviderContext interface. +type MockProviderContext struct { + ctrl *gomock.Controller + recorder *MockProviderContextMockRecorder +} + +// MockProviderContextMockRecorder is the mock recorder for MockProviderContext. +type MockProviderContextMockRecorder struct { + mock *MockProviderContext +} + +// NewMockProviderContext creates a new mock instance. +func NewMockProviderContext(ctrl *gomock.Controller) *MockProviderContext { + mock := &MockProviderContext{ctrl: ctrl} + mock.recorder = &MockProviderContextMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockProviderContext) EXPECT() *MockProviderContextMockRecorder { + return m.recorder +} + +// Deadline mocks base method. +func (m *MockProviderContext) Deadline() (time.Time, bool) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Deadline") + ret0, _ := ret[0].(time.Time) + ret1, _ := ret[1].(bool) + return ret0, ret1 +} + +// Deadline indicates an expected call of Deadline. +func (mr *MockProviderContextMockRecorder) Deadline() *ProviderContextDeadlineCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Deadline", reflect.TypeOf((*MockProviderContext)(nil).Deadline)) + return &ProviderContextDeadlineCall{Call: call} +} + +// ProviderContextDeadlineCall wrap *gomock.Call +type ProviderContextDeadlineCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ProviderContextDeadlineCall) Return(deadline time.Time, ok bool) *ProviderContextDeadlineCall { + c.Call = c.Call.Return(deadline, ok) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ProviderContextDeadlineCall) Do(f func() (time.Time, bool)) *ProviderContextDeadlineCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ProviderContextDeadlineCall) DoAndReturn(f func() (time.Time, bool)) *ProviderContextDeadlineCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Done mocks base method. +func (m *MockProviderContext) Done() <-chan struct{} { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Done") + ret0, _ := ret[0].(<-chan struct{}) + return ret0 +} + +// Done indicates an expected call of Done. +func (mr *MockProviderContextMockRecorder) Done() *ProviderContextDoneCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Done", reflect.TypeOf((*MockProviderContext)(nil).Done)) + return &ProviderContextDoneCall{Call: call} +} + +// ProviderContextDoneCall wrap *gomock.Call +type ProviderContextDoneCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ProviderContextDoneCall) Return(arg0 <-chan struct{}) *ProviderContextDoneCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ProviderContextDoneCall) Do(f func() <-chan struct{}) *ProviderContextDoneCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ProviderContextDoneCall) DoAndReturn(f func() <-chan struct{}) *ProviderContextDoneCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Err mocks base method. +func (m *MockProviderContext) Err() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Err") + ret0, _ := ret[0].(error) + return ret0 +} + +// Err indicates an expected call of Err. +func (mr *MockProviderContextMockRecorder) Err() *ProviderContextErrCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockProviderContext)(nil).Err)) + return &ProviderContextErrCall{Call: call} +} + +// ProviderContextErrCall wrap *gomock.Call +type ProviderContextErrCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ProviderContextErrCall) Return(arg0 error) *ProviderContextErrCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ProviderContextErrCall) Do(f func() error) *ProviderContextErrCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ProviderContextErrCall) DoAndReturn(f func() error) *ProviderContextErrCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Log mocks base method. +func (m *MockProviderContext) Log(severity diag.Severity, msg string) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "Log", severity, msg) +} + +// Log indicates an expected call of Log. +func (mr *MockProviderContextMockRecorder) Log(severity, msg any) *ProviderContextLogCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Log", reflect.TypeOf((*MockProviderContext)(nil).Log), severity, msg) + return &ProviderContextLogCall{Call: call} +} + +// ProviderContextLogCall wrap *gomock.Call +type ProviderContextLogCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ProviderContextLogCall) Return() *ProviderContextLogCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ProviderContextLogCall) Do(f func(diag.Severity, string)) *ProviderContextLogCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ProviderContextLogCall) DoAndReturn(f func(diag.Severity, string)) *ProviderContextLogCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// LogStatus mocks base method. +func (m *MockProviderContext) LogStatus(severity diag.Severity, msg string) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "LogStatus", severity, msg) +} + +// LogStatus indicates an expected call of LogStatus. +func (mr *MockProviderContextMockRecorder) LogStatus(severity, msg any) *ProviderContextLogStatusCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogStatus", reflect.TypeOf((*MockProviderContext)(nil).LogStatus), severity, msg) + return &ProviderContextLogStatusCall{Call: call} +} + +// ProviderContextLogStatusCall wrap *gomock.Call +type ProviderContextLogStatusCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ProviderContextLogStatusCall) Return() *ProviderContextLogStatusCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ProviderContextLogStatusCall) Do(f func(diag.Severity, string)) *ProviderContextLogStatusCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ProviderContextLogStatusCall) DoAndReturn(f func(diag.Severity, string)) *ProviderContextLogStatusCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// LogStatusf mocks base method. +func (m *MockProviderContext) LogStatusf(severity diag.Severity, msg string, args ...any) { + m.ctrl.T.Helper() + varargs := []any{severity, msg} + for _, a := range args { + varargs = append(varargs, a) + } + m.ctrl.Call(m, "LogStatusf", varargs...) +} + +// LogStatusf indicates an expected call of LogStatusf. +func (mr *MockProviderContextMockRecorder) LogStatusf(severity, msg any, args ...any) *ProviderContextLogStatusfCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{severity, msg}, args...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LogStatusf", reflect.TypeOf((*MockProviderContext)(nil).LogStatusf), varargs...) + return &ProviderContextLogStatusfCall{Call: call} +} + +// ProviderContextLogStatusfCall wrap *gomock.Call +type ProviderContextLogStatusfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ProviderContextLogStatusfCall) Return() *ProviderContextLogStatusfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ProviderContextLogStatusfCall) Do(f func(diag.Severity, string, ...any)) *ProviderContextLogStatusfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ProviderContextLogStatusfCall) DoAndReturn(f func(diag.Severity, string, ...any)) *ProviderContextLogStatusfCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Logf mocks base method. +func (m *MockProviderContext) Logf(severity diag.Severity, msg string, args ...any) { + m.ctrl.T.Helper() + varargs := []any{severity, msg} + for _, a := range args { + varargs = append(varargs, a) + } + m.ctrl.Call(m, "Logf", varargs...) +} + +// Logf indicates an expected call of Logf. +func (mr *MockProviderContextMockRecorder) Logf(severity, msg any, args ...any) *ProviderContextLogfCall { + mr.mock.ctrl.T.Helper() + varargs := append([]any{severity, msg}, args...) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Logf", reflect.TypeOf((*MockProviderContext)(nil).Logf), varargs...) + return &ProviderContextLogfCall{Call: call} +} + +// ProviderContextLogfCall wrap *gomock.Call +type ProviderContextLogfCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ProviderContextLogfCall) Return() *ProviderContextLogfCall { + c.Call = c.Call.Return() + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ProviderContextLogfCall) Do(f func(diag.Severity, string, ...any)) *ProviderContextLogfCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ProviderContextLogfCall) DoAndReturn(f func(diag.Severity, string, ...any)) *ProviderContextLogfCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// RuntimeInformation mocks base method. +func (m *MockProviderContext) RuntimeInformation() provider.RunInfo { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "RuntimeInformation") + ret0, _ := ret[0].(provider.RunInfo) + return ret0 +} + +// RuntimeInformation indicates an expected call of RuntimeInformation. +func (mr *MockProviderContextMockRecorder) RuntimeInformation() *ProviderContextRuntimeInformationCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RuntimeInformation", reflect.TypeOf((*MockProviderContext)(nil).RuntimeInformation)) + return &ProviderContextRuntimeInformationCall{Call: call} +} + +// ProviderContextRuntimeInformationCall wrap *gomock.Call +type ProviderContextRuntimeInformationCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ProviderContextRuntimeInformationCall) Return(arg0 provider.RunInfo) *ProviderContextRuntimeInformationCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ProviderContextRuntimeInformationCall) Do(f func() provider.RunInfo) *ProviderContextRuntimeInformationCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ProviderContextRuntimeInformationCall) DoAndReturn(f func() provider.RunInfo) *ProviderContextRuntimeInformationCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// Value mocks base method. +func (m *MockProviderContext) Value(key any) any { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "Value", key) + ret0, _ := ret[0].(any) + return ret0 +} + +// Value indicates an expected call of Value. +func (mr *MockProviderContextMockRecorder) Value(key any) *ProviderContextValueCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Value", reflect.TypeOf((*MockProviderContext)(nil).Value), key) + return &ProviderContextValueCall{Call: call} +} + +// ProviderContextValueCall wrap *gomock.Call +type ProviderContextValueCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *ProviderContextValueCall) Return(arg0 any) *ProviderContextValueCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *ProviderContextValueCall) Do(f func(any) any) *ProviderContextValueCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *ProviderContextValueCall) DoAndReturn(f func(any) any) *ProviderContextValueCall { + c.Call = c.Call.DoAndReturn(f) + return c +} diff --git a/provider/internal/network.go b/provider/internal/network.go new file mode 100644 index 0000000..50e2076 --- /dev/null +++ b/provider/internal/network.go @@ -0,0 +1,53 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import "github.com/pulumi/pulumi-go-provider/infer" + +var _ = (infer.Enum[NetworkMode])((*NetworkMode)(nil)) + +// NetworkMode is the --network parameter for a build. +type NetworkMode string + +const ( + Default NetworkMode = "default" // Default network mode. + Host NetworkMode = "host" // Host network mode. + None NetworkMode = "none" // None or no network mode. +) + +// Values returns all valid NetworkMode values for SDK generation. +func (NetworkMode) Values() []infer.EnumValue[NetworkMode] { + return []infer.EnumValue[NetworkMode]{ + { + Value: Default, + Description: "The default sandbox network mode.", + }, + { + Value: Host, + Description: "Host network mode.", + }, + { + Value: None, + Description: "Disable network access.", + }, + } +} + +func (n *NetworkMode) String() string { + if n == nil { + return string(Default) + } + return string(*n) +} diff --git a/provider/internal/platform.go b/provider/internal/platform.go new file mode 100644 index 0000000..eddefb9 --- /dev/null +++ b/provider/internal/platform.go @@ -0,0 +1,79 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "github.com/docker/buildx/util/platformutil" + + "github.com/pulumi/pulumi-go-provider/infer" +) + +// These enum values are derived from +// https://github.com/docker/cli/blob/d1b88930/cli/command/manifest/util.go#L22-L51 + +var _ = (infer.Enum[Platform])((*Platform)(nil)) + +// Platform is an enum capturing all available OS/architecture targets. +type Platform string + +// Values returns all valid Platform values for SDK generation. +func (Platform) Values() []infer.EnumValue[Platform] { + return []infer.EnumValue[Platform]{ + {Value: "darwin/386"}, + {Value: "darwin/amd64"}, + {Value: "darwin/arm"}, + {Value: "darwin/arm64"}, + {Value: "dragonfly/amd64"}, + {Value: "freebsd/386"}, + {Value: "freebsd/amd64"}, + {Value: "freebsd/arm"}, + {Value: "linux/386"}, + {Value: "linux/amd64"}, + {Value: "linux/arm"}, + {Value: "linux/arm64"}, + {Value: "linux/mips64"}, + {Value: "linux/mips64le"}, + {Value: "linux/ppc64le"}, + {Value: "linux/riscv64"}, + {Value: "linux/s390x"}, + {Value: "netbsd/386"}, + {Value: "netbsd/amd64"}, + {Value: "netbsd/arm"}, + {Value: "openbsd/386"}, + {Value: "openbsd/amd64"}, + {Value: "openbsd/arm"}, + {Value: "plan9/386"}, + {Value: "plan9/amd64"}, + {Value: "solaris/amd64"}, + {Value: "windows/386"}, + {Value: "windows/amd64"}, + } +} + +func (p Platform) String() string { + return string(p) +} + +func (p Platform) validate(preview bool) (string, error) { + if preview && p == "" { + // Unknown platform during preview -- nothing to do. + return "", nil + } + _, err := platformutil.Parse([]string{string(p)}) + if err != nil { + return "", err + } + return string(p), nil +} diff --git a/provider/internal/preview.go b/provider/internal/preview.go new file mode 100644 index 0000000..fc81d00 --- /dev/null +++ b/provider/internal/preview.go @@ -0,0 +1,117 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "fmt" +) + +// keeper decides whether an element should be included for a preview +// operation, optionally returning a mutated copy of that element. +type keeper[T any] interface { + keep(T) bool +} + +// filter applies a keeper to each element, returning a new slice. +func filter[T any](k keeper[T], elems ...T) []T { + if elems == nil { + return nil + } + result := make([]T, 0, len(elems)) + for _, e := range elems { + if !k.keep(e) { + continue + } + result = append(result, e) + } + return result +} + +// stringKeeper preserves any non-empty string values for preview. +type stringKeeper struct{ preview bool } + +func (k stringKeeper) keep(s string) bool { + if !k.preview { + return true + } + return s != "" +} + +//nolint:structcheck // False positive due to generics. +type stringerKeeper[T fmt.Stringer] struct{ preview bool } + +//nolint:unused // False positive due to generics. +func (k stringerKeeper[T]) keep(t T) bool { + if !k.preview { + return true + } + return stringKeeper(k).keep(t.String()) +} + +// registryKeeper preserves any registries with known values for address and +// password. This is imprecise and doesn't permit alternative auth strategies +// like registry tokens, email, etc. +type registryKeeper struct{ preview bool } + +//nolint:unused // False positive due to generics. +func (k registryKeeper) keep(r Registry) bool { + if !k.preview { + return true + } + return r.Password != "" && r.Address != "" +} + +// mapKeeper preserves map elements with known keys and values. +type mapKeeper struct{ preview bool } + +func (k mapKeeper) keep(m map[string]string) map[string]string { + if !k.preview || len(m) == 0 { + return m + } + kk := stringKeeper(k) + filtered := make(map[string]string) + for key, val := range m { + if !kk.keep(key) { + continue + } + if !kk.keep(val) { + continue + } + filtered[key] = val + } + return filtered +} + +type contextKeeper struct{ preview bool } + +func (k contextKeeper) keep(bc *BuildContext) *BuildContext { + if !k.preview || bc == nil || len(bc.Named) == 0 { + return bc + } + + named := NamedContexts{} + sk := stringKeeper(k) + for k, v := range bc.Named { + if !sk.keep(k) || !sk.keep(v.Location) { + continue + } + named[k] = v + } + + return &BuildContext{ + Context: Context{bc.Location}, + Named: named, + } +} diff --git a/provider/internal/provider.go b/provider/internal/provider.go new file mode 100644 index 0000000..bc44fa0 --- /dev/null +++ b/provider/internal/provider.go @@ -0,0 +1,135 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "context" + "fmt" + + provider "github.com/pulumi/pulumi-go-provider" + "github.com/pulumi/pulumi-go-provider/infer" + pschema "github.com/pulumi/pulumi-go-provider/middleware/schema" + "github.com/pulumi/pulumi-java/pkg/codegen/java" + csgen "github.com/pulumi/pulumi/pkg/v3/codegen/dotnet" + gogen "github.com/pulumi/pulumi/pkg/v3/codegen/go" + tsgen "github.com/pulumi/pulumi/pkg/v3/codegen/nodejs" + pygen "github.com/pulumi/pulumi/pkg/v3/codegen/python" + "github.com/pulumi/pulumi/pkg/v3/codegen/schema" + "github.com/pulumi/pulumi/sdk/v3/go/common/tokens" + "github.com/pulumi/pulumi/sdk/v3/go/common/util/contract" +) + +var ( + _ infer.CustomConfigure = (*Config)(nil) + _ infer.Annotated = (*Config)(nil) + _ infer.Annotated = (*Registry)(nil) +) + +// Config configures the buildx provider. +type Config struct { + Host string `pulumi:"host,optional"` + Registries []Registry `pulumi:"registries,optional"` + + host *host +} + +// _mockClientKey is used by tests to inject a mock Docker client. +var _mockClientKey struct{} + +// Annotate provides user-facing descriptions and defaults for Config's fields. +func (c *Config) Annotate(a infer.Annotator) { + a.Describe(&c.Host, "The build daemon's address.") + a.SetDefault(&c.Host, "", "DOCKER_HOST") +} + +// Configure validates and processes user-provided configuration values. +func (c *Config) Configure(_ provider.Context) error { + h, err := newHost(c) + if err != nil { + return fmt.Errorf("getting host: %w", err) + } + c.host = h + return nil +} + +// NewBuildxProvider returns a new buildx provider. +func NewBuildxProvider() provider.Provider { + return infer.Provider( + infer.Options{ + Metadata: pschema.Metadata{ + DisplayName: "docker-build", + Keywords: []string{"docker", "buildkit", "buildx", "kind/native"}, + Description: "A Pulumi provider for building modern Docker images with buildx and BuildKit.", + Homepage: "https://pulumi.com", + Publisher: "pulumi", + License: "Apache-2.0", + Repository: "https://github.com/pulumi/pulumi-docker-build", + LanguageMap: map[string]any{ + "go": gogen.GoPackageInfo{ + // GenerateResourceContainerTypes: true, + Generics: gogen.GenericsSettingSideBySide, + PackageImportAliases: map[string]string{ + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild": "dockerbuild", + }, + ImportBasePath: "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild", + }, + "csharp": csgen.CSharpPackageInfo{ + PackageReferences: map[string]string{ + "Pulumi": "3.*", + }, + }, + "java": java.PackageInfo{ + BuildFiles: "gradle", + GradleNexusPublishPluginVersion: "1.1.0", + Dependencies: map[string]string{ + "com.pulumi:pulumi": "0.9.9", + "com.google.code.gson:gson": "2.8.9", + "com.google.code.findbugs:jsr305": "3.0.2", + }, + }, + "nodejs": tsgen.NodePackageInfo{ + Dependencies: map[string]string{ + "@pulumi/pulumi": "^3.0.0", + }, + }, + "python": pygen.PackageInfo{ + PyProject: struct { + Enabled bool `json:"enabled,omitempty"` + }{Enabled: true}, + Requires: map[string]string{ + "pulumi": ">=3.0.0,<4.0.0", + }, + }, + }, + }, + Resources: []infer.InferredResource{ + infer.Resource[*Image](), + infer.Resource[*Index](), + }, + ModuleMap: map[tokens.ModuleName]tokens.ModuleName{ + "internal": "index", + }, + Config: infer.Config[*Config](), + }, + ) +} + +// Schema returns our package specification. +func Schema(ctx context.Context, version string) schema.PackageSpec { + p := NewBuildxProvider() + spec, err := provider.GetSchema(ctx, "docker-build", version, p) + contract.AssertNoErrorf(err, "missing schema") + return spec +} diff --git a/provider/internal/provider_test.go b/provider/internal/provider_test.go new file mode 100644 index 0000000..2cdb9e4 --- /dev/null +++ b/provider/internal/provider_test.go @@ -0,0 +1,82 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "context" + "testing" + + "github.com/blang/semver" + "github.com/stretchr/testify/assert" + + provider "github.com/pulumi/pulumi-go-provider" + "github.com/pulumi/pulumi-go-provider/infer" + "github.com/pulumi/pulumi-go-provider/integration" + mwcontext "github.com/pulumi/pulumi-go-provider/middleware/context" +) + +func TestConfigure(t *testing.T) { + t.Parallel() + + s := newServer(nil) + + err := s.Configure( + provider.ConfigureRequest{}, + ) + assert.NoError(t, err) +} + +// TestAnnotate sanity checks that our annotations don't panic. +func TestAnnotate(t *testing.T) { + t.Parallel() + + for _, tt := range []infer.Annotated{ + &Config{}, + &Image{}, + &ImageArgs{}, + &ImageState{}, + &Index{}, + &IndexArgs{}, + &IndexState{}, + } { + tt.Annotate(annotator{}) + } +} + +// TestSchema sanity checks that our schema doesn't panic. +func TestSchema(t *testing.T) { + t.Parallel() + + Schema(context.Background(), "v4") +} + +type annotator struct{} + +func (annotator) Describe(_ any, _ string) {} +func (annotator) SetDefault(_, _ any, _ ...string) {} +func (annotator) SetToken(_, _ string) {} + +func newServer(client Client) integration.Server { + p := NewBuildxProvider() + + // Inject a mock client if provided. + if client != nil { + p = mwcontext.Wrap(p, func(ctx provider.Context) provider.Context { + return provider.CtxWithValue(ctx, _mockClientKey, client) + }) + } + + return integration.NewServer("docker", semver.Version{Major: 4}, p) +} diff --git a/provider/internal/providercontext.go b/provider/internal/providercontext.go new file mode 100644 index 0000000..2aa5aaf --- /dev/null +++ b/provider/internal/providercontext.go @@ -0,0 +1,27 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:generate go run go.uber.org/mock/mockgen -typed -package internal -source providercontext.go -destination mockprovidercontext_test.go --self_package github.com/pulumi/pulumi-docker/provider/v4/internal + +package internal + +import ( + provider "github.com/pulumi/pulumi-go-provider" +) + +// ProviderContext is a workaround for +// https://github.com/pulumi/pulumi-go-provider/issues/159 +type ProviderContext interface { + provider.Context +} diff --git a/provider/internal/ssh.go b/provider/internal/ssh.go new file mode 100644 index 0000000..af649fb --- /dev/null +++ b/provider/internal/ssh.go @@ -0,0 +1,79 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "strings" + + controllerapi "github.com/docker/buildx/controller/pb" + "github.com/docker/buildx/util/buildflags" + + "github.com/pulumi/pulumi-go-provider/infer" +) + +// SSH is an SSH option. +type SSH struct { + ID string `pulumi:"id"` + Paths []string `pulumi:"paths,optional"` +} + +// Annotate sets docstrings on SSH. +func (s *SSH) Annotate(a infer.Annotator) { + a.Describe(&s.ID, dedent(` + Useful for distinguishing different servers that are part of the same + build. + + A value of "default" is appropriate if only dealing with a single host. + `)) + a.Describe(&s.Paths, dedent(` + SSH agent socket or private keys to expose to the build under the given + identifier. + + Defaults to "[$SSH_AUTH_SOCK]". + + Note that your keys are **not** automatically added when using an + agent. Run "ssh-add -l" locally to confirm which public keys are + visible to the agent; these will be exposed to your build. + `)) +} + +// String returns a CLI-encoded value for the SSH option, or an empty string if +// its ID is not known. +func (s SSH) String() string { + if s.ID == "" { + return "" + } + + r := s.ID + + if len(s.Paths) > 0 { + r += "=" + strings.Join(s.Paths, ",") + } + + return r +} + +func (s SSH) validate() (*controllerapi.SSH, error) { + parsed, err := buildflags.ParseSSHSpecs([]string{s.String()}) + if err != nil { + return nil, err + } + if len(parsed) == 0 { + return nil, nil + } + + _, err = controllerapi.CreateSSH([]*controllerapi.SSH{{ID: s.ID, Paths: s.Paths}}) + return parsed[0], err +} diff --git a/provider/internal/ssh_test.go b/provider/internal/ssh_test.go new file mode 100644 index 0000000..a93ec60 --- /dev/null +++ b/provider/internal/ssh_test.go @@ -0,0 +1,52 @@ +// Copyright 2024, Pulumi Corporation. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package internal + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestValidateSSH(t *testing.T) { + t.Parallel() + tests := []struct { + name string + ssh SSH + + wantErr string + }{ + { + name: "invalid path", + ssh: SSH{ID: "foo", Paths: []string{"/not/real"}}, + wantErr: "/not/real: no such file or directory", + }, + } + + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + t.Parallel() + + _, err := tt.ssh.validate() + + if tt.wantErr == "" { + assert.NoError(t, err) + } else { + assert.ErrorContains(t, err, tt.wantErr) + } + }) + } +} diff --git a/provider/internal/testdata/Dockerfile.invalid b/provider/internal/testdata/Dockerfile.invalid new file mode 100644 index 0000000..936fd2a --- /dev/null +++ b/provider/internal/testdata/Dockerfile.invalid @@ -0,0 +1,2 @@ +FROM scratch +RUNN diff --git a/provider/internal/testdata/dockerfile-location-irrelevant/app/foo.sh b/provider/internal/testdata/dockerfile-location-irrelevant/app/foo.sh new file mode 100644 index 0000000..86f1c62 --- /dev/null +++ b/provider/internal/testdata/dockerfile-location-irrelevant/app/foo.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo "Hello, World!" diff --git a/provider/internal/testdata/dockerfile-location-irrelevant/step1.Dockerfile b/provider/internal/testdata/dockerfile-location-irrelevant/step1.Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/dockerfile-location-irrelevant/step1.Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/dockerfile-location-irrelevant/step2.Dockerfile b/provider/internal/testdata/dockerfile-location-irrelevant/step2.Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/dockerfile-location-irrelevant/step2.Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/filemode-matters/step1/Dockerfile b/provider/internal/testdata/filemode-matters/step1/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/filemode-matters/step1/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/filemode-matters/step1/foo.sh b/provider/internal/testdata/filemode-matters/step1/foo.sh new file mode 100644 index 0000000..86f1c62 --- /dev/null +++ b/provider/internal/testdata/filemode-matters/step1/foo.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo "Hello, World!" diff --git a/provider/internal/testdata/filemode-matters/step2-chmod-x/Dockerfile b/provider/internal/testdata/filemode-matters/step2-chmod-x/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/filemode-matters/step2-chmod-x/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/filemode-matters/step2-chmod-x/foo.sh b/provider/internal/testdata/filemode-matters/step2-chmod-x/foo.sh new file mode 100755 index 0000000..86f1c62 --- /dev/null +++ b/provider/internal/testdata/filemode-matters/step2-chmod-x/foo.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo "Hello, World!" diff --git a/provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/.dockerignore b/provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/.dockerignore new file mode 100644 index 0000000..b3159b4 --- /dev/null +++ b/provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/.dockerignore @@ -0,0 +1,7 @@ +# Ignore everything! +* + +# Except changes to source data in this set of directories: +!projects/*/src + +# This should therefore IGNORE projects/*/dist diff --git a/provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/Dockerfile b/provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/projects/foo/src/app.js b/provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/projects/foo/src/app.js new file mode 100644 index 0000000..2254108 --- /dev/null +++ b/provider/internal/testdata/ignores-wildcard/basedir-modified-ignored-file/projects/foo/src/app.js @@ -0,0 +1 @@ +console.log("Pulumi 💜"); diff --git a/provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/.dockerignore b/provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/.dockerignore new file mode 100644 index 0000000..b3159b4 --- /dev/null +++ b/provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/.dockerignore @@ -0,0 +1,7 @@ +# Ignore everything! +* + +# Except changes to source data in this set of directories: +!projects/*/src + +# This should therefore IGNORE projects/*/dist diff --git a/provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/Dockerfile b/provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/projects/foo/src/app.js b/provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/projects/foo/src/app.js new file mode 100644 index 0000000..63d0f1a --- /dev/null +++ b/provider/internal/testdata/ignores-wildcard/basedir-modified-included-file/projects/foo/src/app.js @@ -0,0 +1 @@ +console.log("💜 Pulumi (included)"); diff --git a/provider/internal/testdata/ignores-wildcard/basedir/.dockerignore b/provider/internal/testdata/ignores-wildcard/basedir/.dockerignore new file mode 100644 index 0000000..b3159b4 --- /dev/null +++ b/provider/internal/testdata/ignores-wildcard/basedir/.dockerignore @@ -0,0 +1,7 @@ +# Ignore everything! +* + +# Except changes to source data in this set of directories: +!projects/*/src + +# This should therefore IGNORE projects/*/dist diff --git a/provider/internal/testdata/ignores-wildcard/basedir/Dockerfile b/provider/internal/testdata/ignores-wildcard/basedir/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/ignores-wildcard/basedir/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/ignores-wildcard/basedir/projects/foo/src/app.js b/provider/internal/testdata/ignores-wildcard/basedir/projects/foo/src/app.js new file mode 100644 index 0000000..2254108 --- /dev/null +++ b/provider/internal/testdata/ignores-wildcard/basedir/projects/foo/src/app.js @@ -0,0 +1 @@ +console.log("Pulumi 💜"); diff --git a/provider/internal/testdata/ignores/basedir-with-ignored-files/.dockerignore b/provider/internal/testdata/ignores/basedir-with-ignored-files/.dockerignore new file mode 100644 index 0000000..eb97a72 --- /dev/null +++ b/provider/internal/testdata/ignores/basedir-with-ignored-files/.dockerignore @@ -0,0 +1,3 @@ +.dockerignore +ignored.txt +bar/ignored.js diff --git a/provider/internal/testdata/ignores/basedir-with-ignored-files/Dockerfile b/provider/internal/testdata/ignores/basedir-with-ignored-files/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/ignores/basedir-with-ignored-files/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/ignores/basedir-with-ignored-files/bar/app.js b/provider/internal/testdata/ignores/basedir-with-ignored-files/bar/app.js new file mode 100644 index 0000000..2254108 --- /dev/null +++ b/provider/internal/testdata/ignores/basedir-with-ignored-files/bar/app.js @@ -0,0 +1 @@ +console.log("Pulumi 💜"); diff --git a/sdk/python/pulumi_dockerbuild/py.typed b/provider/internal/testdata/ignores/basedir-with-ignored-files/bar/ignored.js similarity index 100% rename from sdk/python/pulumi_dockerbuild/py.typed rename to provider/internal/testdata/ignores/basedir-with-ignored-files/bar/ignored.js diff --git a/provider/internal/testdata/ignores/basedir-with-ignored-files/foo.txt b/provider/internal/testdata/ignores/basedir-with-ignored-files/foo.txt new file mode 100644 index 0000000..5716ca5 --- /dev/null +++ b/provider/internal/testdata/ignores/basedir-with-ignored-files/foo.txt @@ -0,0 +1 @@ +bar diff --git a/provider/internal/testdata/ignores/basedir-with-ignored-files/ignored.txt b/provider/internal/testdata/ignores/basedir-with-ignored-files/ignored.txt new file mode 100644 index 0000000..e69de29 diff --git a/provider/internal/testdata/ignores/basedir/Dockerfile b/provider/internal/testdata/ignores/basedir/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/ignores/basedir/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/ignores/basedir/bar/app.js b/provider/internal/testdata/ignores/basedir/bar/app.js new file mode 100644 index 0000000..2254108 --- /dev/null +++ b/provider/internal/testdata/ignores/basedir/bar/app.js @@ -0,0 +1 @@ +console.log("Pulumi 💜"); diff --git a/provider/internal/testdata/ignores/basedir/foo.txt b/provider/internal/testdata/ignores/basedir/foo.txt new file mode 100644 index 0000000..5716ca5 --- /dev/null +++ b/provider/internal/testdata/ignores/basedir/foo.txt @@ -0,0 +1 @@ +bar diff --git a/provider/internal/testdata/noop/Dockerfile b/provider/internal/testdata/noop/Dockerfile new file mode 100644 index 0000000..c35f1b5 --- /dev/null +++ b/provider/internal/testdata/noop/Dockerfile @@ -0,0 +1 @@ +FROM scratch diff --git a/provider/internal/testdata/renaming-matters/step1/Dockerfile b/provider/internal/testdata/renaming-matters/step1/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/renaming-matters/step1/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/renaming-matters/step1/foo.a.txt b/provider/internal/testdata/renaming-matters/step1/foo.a.txt new file mode 100644 index 0000000..345e6ae --- /dev/null +++ b/provider/internal/testdata/renaming-matters/step1/foo.a.txt @@ -0,0 +1 @@ +Test diff --git a/provider/internal/testdata/renaming-matters/step2/Dockerfile b/provider/internal/testdata/renaming-matters/step2/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/renaming-matters/step2/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/renaming-matters/step2/foo.b.txt b/provider/internal/testdata/renaming-matters/step2/foo.b.txt new file mode 100644 index 0000000..345e6ae --- /dev/null +++ b/provider/internal/testdata/renaming-matters/step2/foo.b.txt @@ -0,0 +1 @@ +Test diff --git a/provider/internal/testdata/symlinks/Dockerfile b/provider/internal/testdata/symlinks/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/symlinks/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/symlinks/linkedFromDeep.txt b/provider/internal/testdata/symlinks/linkedFromDeep.txt new file mode 100644 index 0000000..552085f --- /dev/null +++ b/provider/internal/testdata/symlinks/linkedFromDeep.txt @@ -0,0 +1 @@ +Hello, diff --git a/provider/internal/testdata/symlinks/linkedToDeep.txt b/provider/internal/testdata/symlinks/linkedToDeep.txt new file mode 100644 index 0000000..496c875 --- /dev/null +++ b/provider/internal/testdata/symlinks/linkedToDeep.txt @@ -0,0 +1 @@ +World! diff --git a/provider/internal/testdata/symlinks/proxy-for-sub/dir/linkedFromTop.txt b/provider/internal/testdata/symlinks/proxy-for-sub/dir/linkedFromTop.txt new file mode 100644 index 0000000..496c875 --- /dev/null +++ b/provider/internal/testdata/symlinks/proxy-for-sub/dir/linkedFromTop.txt @@ -0,0 +1 @@ +World! diff --git a/provider/internal/testdata/symlinks/proxy-for-sub/dir/linkedToTop.txt b/provider/internal/testdata/symlinks/proxy-for-sub/dir/linkedToTop.txt new file mode 100644 index 0000000..552085f --- /dev/null +++ b/provider/internal/testdata/symlinks/proxy-for-sub/dir/linkedToTop.txt @@ -0,0 +1 @@ +Hello, diff --git a/provider/internal/testdata/symlinks/sub/dir/linkedFromTop.txt b/provider/internal/testdata/symlinks/sub/dir/linkedFromTop.txt new file mode 100644 index 0000000..496c875 --- /dev/null +++ b/provider/internal/testdata/symlinks/sub/dir/linkedFromTop.txt @@ -0,0 +1 @@ +World! diff --git a/provider/internal/testdata/symlinks/sub/dir/linkedToTop.txt b/provider/internal/testdata/symlinks/sub/dir/linkedToTop.txt new file mode 100644 index 0000000..552085f --- /dev/null +++ b/provider/internal/testdata/symlinks/sub/dir/linkedToTop.txt @@ -0,0 +1 @@ +Hello, diff --git a/provider/internal/testdata/unignores/basedir-with-unignored-files/.dockerignore b/provider/internal/testdata/unignores/basedir-with-unignored-files/.dockerignore new file mode 100644 index 0000000..e0ed9eb --- /dev/null +++ b/provider/internal/testdata/unignores/basedir-with-unignored-files/.dockerignore @@ -0,0 +1,6 @@ +# Ignore everything +* + +#Unignore everything +!Dockerfile +!top-dir diff --git a/provider/internal/testdata/unignores/basedir-with-unignored-files/Dockerfile b/provider/internal/testdata/unignores/basedir-with-unignored-files/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/unignores/basedir-with-unignored-files/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/unignores/basedir-with-unignored-files/top-dir/subdir/app.js b/provider/internal/testdata/unignores/basedir-with-unignored-files/top-dir/subdir/app.js new file mode 100644 index 0000000..2254108 --- /dev/null +++ b/provider/internal/testdata/unignores/basedir-with-unignored-files/top-dir/subdir/app.js @@ -0,0 +1 @@ +console.log("Pulumi 💜"); diff --git a/provider/internal/testdata/unignores/basedir-with-unignored-files/top-dir/subdir/ignored.js b/provider/internal/testdata/unignores/basedir-with-unignored-files/top-dir/subdir/ignored.js new file mode 100644 index 0000000..e69de29 diff --git a/provider/internal/testdata/unignores/basedir/Dockerfile b/provider/internal/testdata/unignores/basedir/Dockerfile new file mode 100644 index 0000000..a79d7c2 --- /dev/null +++ b/provider/internal/testdata/unignores/basedir/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +WORKDIR /app + +COPY ./bar . diff --git a/provider/internal/testdata/unignores/basedir/top-dir/subdir/app.js b/provider/internal/testdata/unignores/basedir/top-dir/subdir/app.js new file mode 100644 index 0000000..2254108 --- /dev/null +++ b/provider/internal/testdata/unignores/basedir/top-dir/subdir/app.js @@ -0,0 +1 @@ +console.log("Pulumi 💜"); diff --git a/provider/internal/testdata/unignores/basedir/top-dir/subdir/ignored.js b/provider/internal/testdata/unignores/basedir/top-dir/subdir/ignored.js new file mode 100644 index 0000000..e69de29 diff --git a/provider/provider.go b/provider/provider.go index 7b5781e..4820e79 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -1,4 +1,4 @@ -// Copyright 2016-2023, Pulumi Corporation. +// Copyright 2024, Pulumi Corporation. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,129 +15,65 @@ package provider import ( - "math/rand" - "time" + "context" + "fmt" - p "github.com/pulumi/pulumi-go-provider" - "github.com/pulumi/pulumi-go-provider/infer" - "github.com/pulumi/pulumi-go-provider/middleware/schema" - "github.com/pulumi/pulumi-java/pkg/codegen/java" - csgen "github.com/pulumi/pulumi/pkg/v3/codegen/dotnet" - gogen "github.com/pulumi/pulumi/pkg/v3/codegen/go" - tsgen "github.com/pulumi/pulumi/pkg/v3/codegen/nodejs" - pygen "github.com/pulumi/pulumi/pkg/v3/codegen/python" - "github.com/pulumi/pulumi/sdk/v3/go/common/tokens" + "github.com/pulumi/pulumi-docker-build/provider/internal" + "github.com/pulumi/pulumi-docker-build/provider/internal/deprecated" + gp "github.com/pulumi/pulumi-go-provider" + "github.com/pulumi/pulumi/pkg/v3/resource/provider" + "github.com/pulumi/pulumi/sdk/v3/go/common/resource/plugin" + rpc "github.com/pulumi/pulumi/sdk/v3/proto/go" ) // Version is initialized by the Go linker to contain the semver of this build. -var Version string +var Version = "0.0.1" -const Name string = "dockerbuild" // Needs to match $PACK in Makefile. +// Name needs to match $PACK in Makefile. +const Name string = "docker-build" -func Provider() p.Provider { - // We tell the provider what resources it needs to support. - // In this case, a single custom resource. - return infer.Provider(infer.Options{ - Metadata: schema.Metadata{ - DisplayName: "dockerbuild", - LanguageMap: map[string]any{ - "go": gogen.GoPackageInfo{ - // GenerateResourceContainerTypes: true, - Generics: gogen.GenericsSettingGenericsOnly, - PackageImportAliases: map[string]string{ - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild": "dockerbuild", - }, - ImportBasePath: "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild", - }, - "csharp": csgen.CSharpPackageInfo{ - PackageReferences: map[string]string{ - "Pulumi": "3.*", - }, - }, - "java": java.PackageInfo{ - BuildFiles: "gradle", - GradleNexusPublishPluginVersion: "1.1.0", - Dependencies: map[string]string{ - "com.pulumi:pulumi": "0.9.9", - "com.google.code.gson:gson": "2.8.9", - "com.google.code.findbugs:jsr305": "3.0.2", - }, - }, - "nodejs": tsgen.NodePackageInfo{ - Dependencies: map[string]string{ - "@pulumi/pulumi": "^3.0.0", - }, - }, - "python": pygen.PackageInfo{ - PyProject: struct { - Enabled bool `json:"enabled,omitempty"` - }{Enabled: true}, - Requires: map[string]string{ - "pulumi": ">=3.0.0,<4.0.0", - }, - }, - }, - Description: "Description", - Keywords: []string{"keywords"}, - Homepage: "pulumi.com", - Publisher: "pulumi", - Repository: "https://github.com/pulumi/pulumi-dockerbuild", - PluginDownloadURL: "github.com/pulumi/pulumi-dockerbuild", - }, - Resources: []infer.InferredResource{ - infer.Resource[Random, RandomArgs, RandomState](), - }, - ModuleMap: map[tokens.ModuleName]tokens.ModuleName{ - "provider": "index", - }, - }) +// Serve launches the gRPC server for the resource provider. +func Serve() error { + return provider.Main(Name, New) } -// Each resource has a controlling struct. -// Resource behavior is determined by implementing methods on the controlling struct. -// The `Create` method is mandatory, but other methods are optional. -// - Check: Remap inputs before they are typed. -// - Diff: Change how instances of a resource are compared. -// - Update: Mutate a resource in place. -// - Read: Get the state of a resource from the backing provider. -// - Delete: Custom logic when the resource is deleted. -// - Annotate: Describe fields and set defaults for a resource. -// - WireDependencies: Control how outputs and secrets flows through values. -type Random struct{} - -// Each resource has an input struct, defining what arguments it accepts. -type RandomArgs struct { - // Fields projected into Pulumi must be public and hava a `pulumi:"..."` tag. - // The pulumi tag doesn't need to match the field name, but it's generally a - // good idea. - Length int `pulumi:"length"` -} - -// Each resource has a state, describing the fields that exist on the created resource. -type RandomState struct { - // It is generally a good idea to embed args in outputs, but it isn't strictly necessary. - RandomArgs - // Here we define a required output called result. - Result string `pulumi:"result" provider:"output"` -} - -// All resources must implement Create at a minimum. -func (Random) Create(ctx p.Context, name string, input RandomArgs, preview bool) (string, RandomState, error) { - state := RandomState{RandomArgs: input} - if preview { - return name, state, nil +// New creates a new provider. +func New(host *provider.HostClient) (rpc.ResourceProviderServer, error) { + server, err := gp.RawServer(Name, Version, internal.NewBuildxProvider())(host) + if err != nil { + return nil, fmt.Errorf("building raw server: %w", err) } - state.Result = makeRandom(input.Length) - return name, state, nil + return &configurableProvider{ResourceProviderServer: server}, nil } -func makeRandom(length int) string { - seededRand := rand.New(rand.NewSource(time.Now().UnixNano())) //nolint: gosec - charset := []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") +// configurableProvider is a workaround for +// https://github.com/pulumi/pulumi-go-provider/issues/171 and +// In short, our SDKs send provider Configure requests as simple strings +// instead of rich objects. We don't want to preserve this behavior in +// pulumi-go-provider, but we also haven't updated SDKs yet to send rich types. +// +// If you find yourself in a position where you need to copy this -- STOP! +// https://github.com/pulumi/pulumi/pull/15032 should be merged with this fix. +type configurableProvider struct { + rpc.ResourceProviderServer +} - result := make([]rune, length) - for i := range result { - result[i] = charset[seededRand.Intn(len(charset))] +func (p configurableProvider) Configure( + ctx context.Context, + request *rpc.ConfigureRequest, +) (*rpc.ConfigureResponse, error) { + schema := internal.Schema(ctx, Version) + ce := deprecated.New(schema.Config) + buildxReq := request + if props, err := ce.UnmarshalProperties(request.Args); err == nil { + args, _ := plugin.MarshalProperties(props, plugin.MarshalOptions{ + Label: "config", + KeepUnknowns: true, + SkipNulls: true, + KeepSecrets: true, + RejectAssets: true, + }) + buildxReq.Args = args } - return string(result) + return p.ResourceProviderServer.Configure(ctx, buildxReq) } diff --git a/provider/provider_test.go b/provider/provider_test.go index 106c035..0e18dcb 100644 --- a/provider/provider_test.go +++ b/provider/provider_test.go @@ -1,4 +1,4 @@ -// Copyright 2016-2023, Pulumi Corporation. +// Copyright 2024, Pulumi Corporation. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,43 +15,54 @@ package provider import ( + "context" "testing" "github.com/blang/semver" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + emptypb "google.golang.org/protobuf/types/known/emptypb" + "google.golang.org/protobuf/types/known/structpb" - p "github.com/pulumi/pulumi-go-provider" - "github.com/pulumi/pulumi-go-provider/integration" - "github.com/pulumi/pulumi/sdk/v3/go/common/resource" - "github.com/pulumi/pulumi/sdk/v3/go/common/tokens" + pulumirpc "github.com/pulumi/pulumi/sdk/v3/proto/go" ) -func TestRandomCreate(t *testing.T) { +// TestConfigure checks backwards-compatibility with SDKs that still send +// provider config as JSON-encoded strings. This test can be removed once we +// upgrade to a version of pulumi that no longer generates SDKs with that +// behavior. +func TestConfigure(t *testing.T) { t.Parallel() - prov := provider() + ctx := context.Background() - response, err := prov.Create(p.CreateRequest{ - Urn: urn("Random"), - Properties: resource.PropertyMap{ - "length": resource.NewNumberProperty(12), - }, - Preview: false, + p, err := New(nil) + require.NoError(t, err) + + args, err := structpb.NewStruct(map[string]any{ + "registries": `[{"address": "docker.io"}]`, + }) + require.NoError(t, err) + + _, err = p.Configure(ctx, &pulumirpc.ConfigureRequest{ + Args: args, }) + assert.NoError(t, err) +} + +func TestVersion(t *testing.T) { + t.Parallel() + + _, err := semver.Parse(Version) + assert.NoError(t, err) + + p, err := New(nil) require.NoError(t, err) - result := response.Properties["result"].StringValue() - assert.Len(t, result, 12) -} -// urn is a helper function to build an urn for running integration tests. -func urn(typ string) resource.URN { - return resource.NewURN("stack", "proj", "", - tokens.Type("test:index:"+typ), "name") -} + info, err := p.GetPluginInfo(context.Background(), &emptypb.Empty{}) + assert.NoError(t, err) -// Create a test server. -func provider() integration.Server { - return integration.NewServer(Name, semver.MustParse("1.0.0"), Provider()) + require.NotEqual(t, "", Version) + assert.Equal(t, Version, info.Version) } diff --git a/sdk/dotnet/Config/Config.cs b/sdk/dotnet/Config/Config.cs new file mode 100644 index 0000000..d7a95be --- /dev/null +++ b/sdk/dotnet/Config/Config.cs @@ -0,0 +1,72 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Immutable; + +namespace Pulumi.DockerBuild +{ + public static class Config + { + [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "IDE1006", Justification = + "Double underscore prefix used to avoid conflicts with variable names.")] + private sealed class __Value + { + private readonly Func _getter; + private T _value = default!; + private bool _set; + + public __Value(Func getter) + { + _getter = getter; + } + + public T Get() => _set ? _value : _getter(); + + public void Set(T value) + { + _value = value; + _set = true; + } + } + + private static readonly global::Pulumi.Config __config = new global::Pulumi.Config("docker-build"); + + private static readonly __Value _host = new __Value(() => __config.Get("host") ?? Utilities.GetEnv("DOCKER_HOST") ?? ""); + /// + /// The build daemon's address. + /// + public static string? Host + { + get => _host.Get(); + set => _host.Set(value); + } + + private static readonly __Value> _registries = new __Value>(() => __config.GetObject>("registries")); + public static ImmutableArray Registries + { + get => _registries.Get(); + set => _registries.Set(value); + } + + public static class Types + { + + public class Registry + { + /// + /// The registry's address (e.g. "docker.io"). + /// + public string Address { get; set; } + /// + /// Password or token for the registry. + /// + public string? Password { get; set; } = null!; + /// + /// Username for the registry. + /// + public string? Username { get; set; } = null!; + } + } + } +} diff --git a/sdk/dotnet/Config/README.md b/sdk/dotnet/Config/README.md new file mode 100644 index 0000000..a778720 --- /dev/null +++ b/sdk/dotnet/Config/README.md @@ -0,0 +1 @@ +A Pulumi provider for building modern Docker images with buildx and BuildKit. diff --git a/sdk/dotnet/Enums.cs b/sdk/dotnet/Enums.cs new file mode 100644 index 0000000..3c68d7c --- /dev/null +++ b/sdk/dotnet/Enums.cs @@ -0,0 +1,173 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.ComponentModel; +using Pulumi; + +namespace Pulumi.DockerBuild +{ + [EnumType] + public readonly struct CacheMode : IEquatable + { + private readonly string _value; + + private CacheMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + /// + /// Only layers that are exported into the resulting image are cached. + /// + public static CacheMode Min { get; } = new CacheMode("min"); + /// + /// All layers are cached, even those of intermediate steps. + /// + public static CacheMode Max { get; } = new CacheMode("max"); + + public static bool operator ==(CacheMode left, CacheMode right) => left.Equals(right); + public static bool operator !=(CacheMode left, CacheMode right) => !left.Equals(right); + + public static explicit operator string(CacheMode value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is CacheMode other && Equals(other); + public bool Equals(CacheMode other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + [EnumType] + public readonly struct CompressionType : IEquatable + { + private readonly string _value; + + private CompressionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + /// + /// Use `gzip` for compression. + /// + public static CompressionType Gzip { get; } = new CompressionType("gzip"); + /// + /// Use `estargz` for compression. + /// + public static CompressionType Estargz { get; } = new CompressionType("estargz"); + /// + /// Use `zstd` for compression. + /// + public static CompressionType Zstd { get; } = new CompressionType("zstd"); + + public static bool operator ==(CompressionType left, CompressionType right) => left.Equals(right); + public static bool operator !=(CompressionType left, CompressionType right) => !left.Equals(right); + + public static explicit operator string(CompressionType value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is CompressionType other && Equals(other); + public bool Equals(CompressionType other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + [EnumType] + public readonly struct NetworkMode : IEquatable + { + private readonly string _value; + + private NetworkMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + /// + /// The default sandbox network mode. + /// + public static NetworkMode @Default { get; } = new NetworkMode("default"); + /// + /// Host network mode. + /// + public static NetworkMode Host { get; } = new NetworkMode("host"); + /// + /// Disable network access. + /// + public static NetworkMode None { get; } = new NetworkMode("none"); + + public static bool operator ==(NetworkMode left, NetworkMode right) => left.Equals(right); + public static bool operator !=(NetworkMode left, NetworkMode right) => !left.Equals(right); + + public static explicit operator string(NetworkMode value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is NetworkMode other && Equals(other); + public bool Equals(NetworkMode other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } + + [EnumType] + public readonly struct Platform : IEquatable + { + private readonly string _value; + + private Platform(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + public static Platform Darwin_386 { get; } = new Platform("darwin/386"); + public static Platform Darwin_amd64 { get; } = new Platform("darwin/amd64"); + public static Platform Darwin_arm { get; } = new Platform("darwin/arm"); + public static Platform Darwin_arm64 { get; } = new Platform("darwin/arm64"); + public static Platform Dragonfly_amd64 { get; } = new Platform("dragonfly/amd64"); + public static Platform Freebsd_386 { get; } = new Platform("freebsd/386"); + public static Platform Freebsd_amd64 { get; } = new Platform("freebsd/amd64"); + public static Platform Freebsd_arm { get; } = new Platform("freebsd/arm"); + public static Platform Linux_386 { get; } = new Platform("linux/386"); + public static Platform Linux_amd64 { get; } = new Platform("linux/amd64"); + public static Platform Linux_arm { get; } = new Platform("linux/arm"); + public static Platform Linux_arm64 { get; } = new Platform("linux/arm64"); + public static Platform Linux_mips64 { get; } = new Platform("linux/mips64"); + public static Platform Linux_mips64le { get; } = new Platform("linux/mips64le"); + public static Platform Linux_ppc64le { get; } = new Platform("linux/ppc64le"); + public static Platform Linux_riscv64 { get; } = new Platform("linux/riscv64"); + public static Platform Linux_s390x { get; } = new Platform("linux/s390x"); + public static Platform Netbsd_386 { get; } = new Platform("netbsd/386"); + public static Platform Netbsd_amd64 { get; } = new Platform("netbsd/amd64"); + public static Platform Netbsd_arm { get; } = new Platform("netbsd/arm"); + public static Platform Openbsd_386 { get; } = new Platform("openbsd/386"); + public static Platform Openbsd_amd64 { get; } = new Platform("openbsd/amd64"); + public static Platform Openbsd_arm { get; } = new Platform("openbsd/arm"); + public static Platform Plan9_386 { get; } = new Platform("plan9/386"); + public static Platform Plan9_amd64 { get; } = new Platform("plan9/amd64"); + public static Platform Solaris_amd64 { get; } = new Platform("solaris/amd64"); + public static Platform Windows_386 { get; } = new Platform("windows/386"); + public static Platform Windows_amd64 { get; } = new Platform("windows/amd64"); + + public static bool operator ==(Platform left, Platform right) => left.Equals(right); + public static bool operator !=(Platform left, Platform right) => !left.Equals(right); + + public static explicit operator string(Platform value) => value._value; + + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object? obj) => obj is Platform other && Equals(other); + public bool Equals(Platform other) => string.Equals(_value, other._value, StringComparison.Ordinal); + + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + + public override string ToString() => _value; + } +} diff --git a/sdk/dotnet/Image.cs b/sdk/dotnet/Image.cs new file mode 100644 index 0000000..5979dc1 --- /dev/null +++ b/sdk/dotnet/Image.cs @@ -0,0 +1,1120 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild +{ + /// + /// A Docker image built using buildx -- Docker's interface to the improved + /// BuildKit backend. + /// + /// ## Stability + /// + /// **This resource is pre-1.0 and in public preview.** + /// + /// We will strive to keep APIs and behavior as stable as possible, but we + /// cannot guarantee stability until version 1.0. + /// + /// ## Migrating Pulumi Docker v3 and v4 Image resources + /// + /// This provider's `Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider. + /// Existing `Image` resources can be converted to the docker-build `Image` resources with minor modifications. + /// + /// ### Behavioral differences + /// + /// There are several key behavioral differences to keep in mind when transitioning images to the new `Image` resource. + /// + /// #### Previews + /// + /// Version `3.x` of the Pulumi Docker provider always builds images during preview operations. + /// This is helpful as a safeguard to prevent "broken" images from merging, but users found the behavior unnecessarily redundant when running previews and updates locally. + /// + /// 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. + /// Several users reported outages due to the default behavior allowing bad images to accidentally sneak through CI. + /// + /// The default behavior of this provider's `Image` resource is similar to `3.x` and will build images during previews. + /// This behavior can be changed by specifying `buildOnPreview`. + /// + /// #### Push behavior + /// + /// 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. + /// + /// This provider's `Image` resource matches the Docker CLI's behavior and does not push images anywhere by default. + /// + /// To push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`). + /// Like Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally. + /// + /// #### Secrets + /// + /// Version `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field. + /// + /// Version `4.x` of the Pulumi Docker provider does not support secrets. + /// + /// The `Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables. + /// Instead, they should be passed directly as values. + /// (Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).) + /// Pulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments. + /// + /// #### Caching + /// + /// Version `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`. + /// It builds targets individually and pushes them to separate images for caching. + /// + /// Version `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches. + /// + /// Both versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior. + /// This can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc. + /// + /// The `Image` resource delegates all caching behavior to Docker. + /// `cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc. + /// + /// #### Outputs + /// + /// Versions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest. + /// In `4.x` this could also be a single sha256 hash if the image wasn't pushed. + /// + /// Unlike earlier providers the `Image` resource can push multiple tags. + /// As a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed. + /// If multiple tags were pushed this uses one at random. + /// + /// If you need more control over tag references you can use the `digest` output, which is always a single sha256 hash as long as the image was exported somewhere. + /// + /// #### Tag deletion and refreshes + /// + /// Versions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` resource is deleted, nor do they confirm expected tags exist during `refresh` operations. + /// + /// The `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist. + /// If any are missing a subsequent `update` will push them. + /// + /// When a `Image` is deleted, it will _attempt_ to also delete any pushed tags. + /// Deletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular). + /// Manifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace. + /// + /// Use the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted. + /// + /// ### Example migration + /// + /// Examples of "fully-featured" `v3` and `v4` `Image` resources are shown below, along with an example `Image` resource showing how they would look after migration. + /// + /// The `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`. + /// After migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`. + /// In almost all cases, properties of `Image` are named after the Docker CLI flag they correspond to. + /// + /// The `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`. + /// It it is shown with parameters similar to the `v3` example for completeness. + /// + /// ## Example Usage + /// + /// ## Example Usage + /// ### Push to AWS ECR with caching + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using Aws = Pulumi.Aws; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var ecrRepository = new Aws.Ecr.Repository("ecr-repository"); + /// + /// var authToken = Aws.Ecr.GetAuthorizationToken.Invoke(new() + /// { + /// RegistryId = ecrRepository.RegistryId, + /// }); + /// + /// var myImage = new DockerBuild.Image("my-image", new() + /// { + /// CacheFrom = new[] + /// { + /// new DockerBuild.Inputs.CacheFromArgs + /// { + /// Registry = new DockerBuild.Inputs.CacheFromRegistryArgs + /// { + /// Ref = ecrRepository.RepositoryUrl.Apply(repositoryUrl => $"{repositoryUrl}:cache"), + /// }, + /// }, + /// }, + /// CacheTo = new[] + /// { + /// new DockerBuild.Inputs.CacheToArgs + /// { + /// Registry = new DockerBuild.Inputs.CacheToRegistryArgs + /// { + /// ImageManifest = true, + /// OciMediaTypes = true, + /// Ref = ecrRepository.RepositoryUrl.Apply(repositoryUrl => $"{repositoryUrl}:cache"), + /// }, + /// }, + /// }, + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "./app", + /// }, + /// Push = true, + /// Registries = new[] + /// { + /// new DockerBuild.Inputs.RegistryArgs + /// { + /// Address = ecrRepository.RepositoryUrl, + /// Password = authToken.Apply(getAuthorizationTokenResult => getAuthorizationTokenResult.Password), + /// Username = authToken.Apply(getAuthorizationTokenResult => getAuthorizationTokenResult.UserName), + /// }, + /// }, + /// Tags = new[] + /// { + /// ecrRepository.RepositoryUrl.Apply(repositoryUrl => $"{repositoryUrl}:latest"), + /// }, + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["ref"] = myImage.Ref, + /// }; + /// }); + /// + /// ``` + /// ### Multi-platform image + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var image = new DockerBuild.Image("image", new() + /// { + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "app", + /// }, + /// Platforms = new[] + /// { + /// DockerBuild.Platform.Plan9_amd64, + /// DockerBuild.Platform.Plan9_386, + /// }, + /// Push = false, + /// }); + /// + /// }); + /// + /// ``` + /// ### Registry export + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var image = new DockerBuild.Image("image", new() + /// { + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "app", + /// }, + /// Push = true, + /// Registries = new[] + /// { + /// new DockerBuild.Inputs.RegistryArgs + /// { + /// Address = "docker.io", + /// Password = dockerHubPassword, + /// Username = "pulumibot", + /// }, + /// }, + /// Tags = new[] + /// { + /// "docker.io/pulumi/pulumi:3.107.0", + /// }, + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["ref"] = myImage.Ref, + /// }; + /// }); + /// + /// ``` + /// ### Caching + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var image = new DockerBuild.Image("image", new() + /// { + /// CacheFrom = new[] + /// { + /// new DockerBuild.Inputs.CacheFromArgs + /// { + /// Local = new DockerBuild.Inputs.CacheFromLocalArgs + /// { + /// Src = "tmp/cache", + /// }, + /// }, + /// }, + /// CacheTo = new[] + /// { + /// new DockerBuild.Inputs.CacheToArgs + /// { + /// Local = new DockerBuild.Inputs.CacheToLocalArgs + /// { + /// Dest = "tmp/cache", + /// Mode = DockerBuild.CacheMode.Max, + /// }, + /// }, + /// }, + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "app", + /// }, + /// Push = false, + /// }); + /// + /// }); + /// + /// ``` + /// ### Docker Build Cloud + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var image = new DockerBuild.Image("image", new() + /// { + /// Builder = new DockerBuild.Inputs.BuilderConfigArgs + /// { + /// Name = "cloud-builder-name", + /// }, + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "app", + /// }, + /// Exec = true, + /// Push = false, + /// }); + /// + /// }); + /// + /// ``` + /// ### Build arguments + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var image = new DockerBuild.Image("image", new() + /// { + /// BuildArgs = + /// { + /// { "SET_ME_TO_TRUE", "true" }, + /// }, + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "app", + /// }, + /// Push = false, + /// }); + /// + /// }); + /// + /// ``` + /// ### Build target + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var image = new DockerBuild.Image("image", new() + /// { + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "app", + /// }, + /// Push = false, + /// Target = "build-me", + /// }); + /// + /// }); + /// + /// ``` + /// ### Named contexts + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var image = new DockerBuild.Image("image", new() + /// { + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "app", + /// Named = + /// { + /// { "golang:latest", new DockerBuild.Inputs.ContextArgs + /// { + /// Location = "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", + /// } }, + /// }, + /// }, + /// Push = false, + /// }); + /// + /// }); + /// + /// ``` + /// ### Remote context + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var image = new DockerBuild.Image("image", new() + /// { + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + /// }, + /// Push = false, + /// }); + /// + /// }); + /// + /// ``` + /// ### Inline Dockerfile + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var image = new DockerBuild.Image("image", new() + /// { + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "app", + /// }, + /// Dockerfile = new DockerBuild.Inputs.DockerfileArgs + /// { + /// Inline = @"FROM busybox + /// COPY hello.c ./ + /// ", + /// }, + /// Push = false, + /// }); + /// + /// }); + /// + /// ``` + /// ### Remote context + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var image = new DockerBuild.Image("image", new() + /// { + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "https://github.com/docker-library/hello-world.git", + /// }, + /// Dockerfile = new DockerBuild.Inputs.DockerfileArgs + /// { + /// Location = "app/Dockerfile", + /// }, + /// Push = false, + /// }); + /// + /// }); + /// + /// ``` + /// ### Local export + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var image = new DockerBuild.Image("image", new() + /// { + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "app", + /// }, + /// Exports = new[] + /// { + /// new DockerBuild.Inputs.ExportArgs + /// { + /// Docker = new DockerBuild.Inputs.ExportDockerArgs + /// { + /// Tar = true, + /// }, + /// }, + /// }, + /// Push = false, + /// }); + /// + /// }); + /// + /// ``` + /// + [DockerBuildResourceType("docker-build:index:Image")] + public partial class Image : global::Pulumi.CustomResource + { + /// + /// Custom `host:ip` mappings to use during the build. + /// + /// Equivalent to Docker's `--add-host` flag. + /// + [Output("addHosts")] + public Output> AddHosts { get; private set; } = null!; + + /// + /// `ARG` names and values to set during the build. + /// + /// These variables are accessed like environment variables inside `RUN` + /// instructions. + /// + /// Build arguments are persisted in the image, so you should use `secrets` + /// if these arguments are sensitive. + /// + /// Equivalent to Docker's `--build-arg` flag. + /// + [Output("buildArgs")] + public Output?> BuildArgs { get; private set; } = null!; + + /// + /// Setting this to `false` will always skip image builds during previews, + /// and setting it to `true` will always build images during previews. + /// + /// Images built during previews are never exported to registries, however + /// cache manifests are still exported. + /// + /// On-disk Dockerfiles are always validated for syntactic correctness + /// regardless of this setting. + /// + /// Defaults to `true` as a safeguard against broken images merging as part + /// of CI pipelines. + /// + [Output("buildOnPreview")] + public Output BuildOnPreview { get; private set; } = null!; + + /// + /// Builder configuration. + /// + [Output("builder")] + public Output Builder { get; private set; } = null!; + + /// + /// Cache export configuration. + /// + /// Equivalent to Docker's `--cache-from` flag. + /// + [Output("cacheFrom")] + public Output> CacheFrom { get; private set; } = null!; + + /// + /// Cache import configuration. + /// + /// Equivalent to Docker's `--cache-to` flag. + /// + [Output("cacheTo")] + public Output> CacheTo { get; private set; } = null!; + + /// + /// Build context settings. + /// + /// Equivalent to Docker's `PATH | URL | -` positional argument. + /// + [Output("context")] + public Output Context { get; private set; } = null!; + + /// + /// A preliminary hash of the image's build context. + /// + /// Pulumi uses this to determine if an image _may_ need to be re-built. + /// + [Output("contextHash")] + public Output ContextHash { get; private set; } = null!; + + /// + /// A SHA256 digest of the image if it was exported to a registry or + /// elsewhere. + /// + /// Empty if the image was not exported. + /// + /// Registry images can be referenced precisely as `<tag>@<digest>`. The + /// `ref` output provides one such reference as a convenience. + /// + [Output("digest")] + public Output Digest { get; private set; } = null!; + + /// + /// Dockerfile settings. + /// + /// Equivalent to Docker's `--file` flag. + /// + [Output("dockerfile")] + public Output Dockerfile { get; private set; } = null!; + + /// + /// Use `exec` mode to build this image. + /// + /// By default the provider embeds a v25 Docker client with v0.12 buildx + /// support. This helps ensure consistent behavior across environments and + /// is compatible with alternative build backends (e.g. `buildkitd`), but + /// it may not be desirable if you require a specific version of buildx. + /// For example you may want to run a custom `docker-buildx` binary with + /// support for [Docker Build + /// Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + /// + /// When this is set to `true` the provider will instead execute the + /// `docker-buildx` binary directly to perform its operations. The user is + /// responsible for ensuring this binary exists, with correct permissions + /// and pre-configured builders, at a path Docker expects (e.g. + /// `~/.docker/cli-plugins`). + /// + /// Debugging `exec` mode may be more difficult as Pulumi will not be able + /// to surface fine-grained errors and warnings. Additionally credentials + /// are temporarily written to disk in order to provide them to the + /// `docker-buildx` binary. + /// + [Output("exec")] + public Output Exec { get; private set; } = null!; + + /// + /// Controls where images are persisted after building. + /// + /// Images are only stored in the local cache unless `exports` are + /// explicitly configured. + /// + /// Exporting to multiple destinations requires a daemon running BuildKit + /// 0.13 or later. + /// + /// Equivalent to Docker's `--output` flag. + /// + [Output("exports")] + public Output> Exports { get; private set; } = null!; + + /// + /// Attach arbitrary key/value metadata to the image. + /// + /// Equivalent to Docker's `--label` flag. + /// + [Output("labels")] + public Output?> Labels { get; private set; } = null!; + + /// + /// When `true` the build will automatically include a `docker` export. + /// + /// Defaults to `false`. + /// + /// Equivalent to Docker's `--load` flag. + /// + [Output("load")] + public Output Load { get; private set; } = null!; + + /// + /// Set the network mode for `RUN` instructions. Defaults to `default`. + /// + /// For custom networks, configure your builder with `--driver-opt network=...`. + /// + /// Equivalent to Docker's `--network` flag. + /// + [Output("network")] + public Output Network { get; private set; } = null!; + + /// + /// Do not import cache manifests when building the image. + /// + /// Equivalent to Docker's `--no-cache` flag. + /// + [Output("noCache")] + public Output NoCache { get; private set; } = null!; + + /// + /// Set target platform(s) for the build. Defaults to the host's platform. + /// + /// Equivalent to Docker's `--platform` flag. + /// + [Output("platforms")] + public Output> Platforms { get; private set; } = null!; + + /// + /// Always pull referenced images. + /// + /// Equivalent to Docker's `--pull` flag. + /// + [Output("pull")] + public Output Pull { get; private set; } = null!; + + /// + /// When `true` the build will automatically include a `registry` export. + /// + /// Defaults to `false`. + /// + /// Equivalent to Docker's `--push` flag. + /// + [Output("push")] + public Output Push { get; private set; } = null!; + + /// + /// If the image was pushed to any registries then this will contain a + /// single fully-qualified tag including the build's digest. + /// + /// If the image had tags but was not exported, this will take on a value + /// of one of those tags. + /// + /// This will be empty if the image had no exports and no tags. + /// + /// This is only for convenience and may not be appropriate for situations + /// where multiple tags or registries are involved. In those cases this + /// output is not guaranteed to be stable. + /// + /// For more control over tags consumed by downstream resources you should + /// use the `digest` output. + /// + [Output("ref")] + public Output Ref { get; private set; } = null!; + + /// + /// Registry credentials. Required if reading or exporting to private + /// repositories. + /// + /// Credentials are kept in-memory and do not pollute pre-existing + /// credentials on the host. + /// + /// Similar to `docker login`. + /// + [Output("registries")] + public Output> Registries { get; private set; } = null!; + + /// + /// A mapping of secret names to their corresponding values. + /// + /// Unlike the Docker CLI, these can be passed by value and do not need to + /// exist on-disk or in environment variables. + /// + /// Build arguments and environment variables are persistent in the final + /// image, so you should use this for sensitive values. + /// + /// Similar to Docker's `--secret` flag. + /// + [Output("secrets")] + public Output?> Secrets { get; private set; } = null!; + + /// + /// SSH agent socket or keys to expose to the build. + /// + /// Equivalent to Docker's `--ssh` flag. + /// + [Output("ssh")] + public Output> Ssh { get; private set; } = null!; + + /// + /// Name and optionally a tag (format: `name:tag`). + /// + /// If exporting to a registry, the name should include the fully qualified + /// registry address (e.g. `docker.io/pulumi/pulumi:latest`). + /// + /// Equivalent to Docker's `--tag` flag. + /// + [Output("tags")] + public Output> Tags { get; private set; } = null!; + + /// + /// Set the target build stage(s) to build. + /// + /// If not specified all targets will be built by default. + /// + /// Equivalent to Docker's `--target` flag. + /// + [Output("target")] + public Output Target { get; private set; } = null!; + + + /// + /// Create a Image resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public Image(string name, ImageArgs args, CustomResourceOptions? options = null) + : base("docker-build:index:Image", name, args ?? new ImageArgs(), MakeResourceOptions(options, "")) + { + } + + private Image(string name, Input id, CustomResourceOptions? options = null) + : base("docker-build:index:Image", name, null, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing Image resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static Image Get(string name, Input id, CustomResourceOptions? options = null) + { + return new Image(name, id, options); + } + } + + public sealed class ImageArgs : global::Pulumi.ResourceArgs + { + [Input("addHosts")] + private InputList? _addHosts; + + /// + /// Custom `host:ip` mappings to use during the build. + /// + /// Equivalent to Docker's `--add-host` flag. + /// + public InputList AddHosts + { + get => _addHosts ?? (_addHosts = new InputList()); + set => _addHosts = value; + } + + [Input("buildArgs")] + private InputMap? _buildArgs; + + /// + /// `ARG` names and values to set during the build. + /// + /// These variables are accessed like environment variables inside `RUN` + /// instructions. + /// + /// Build arguments are persisted in the image, so you should use `secrets` + /// if these arguments are sensitive. + /// + /// Equivalent to Docker's `--build-arg` flag. + /// + public InputMap BuildArgs + { + get => _buildArgs ?? (_buildArgs = new InputMap()); + set => _buildArgs = value; + } + + /// + /// Setting this to `false` will always skip image builds during previews, + /// and setting it to `true` will always build images during previews. + /// + /// Images built during previews are never exported to registries, however + /// cache manifests are still exported. + /// + /// On-disk Dockerfiles are always validated for syntactic correctness + /// regardless of this setting. + /// + /// Defaults to `true` as a safeguard against broken images merging as part + /// of CI pipelines. + /// + [Input("buildOnPreview")] + public Input? BuildOnPreview { get; set; } + + /// + /// Builder configuration. + /// + [Input("builder")] + public Input? Builder { get; set; } + + [Input("cacheFrom")] + private InputList? _cacheFrom; + + /// + /// Cache export configuration. + /// + /// Equivalent to Docker's `--cache-from` flag. + /// + public InputList CacheFrom + { + get => _cacheFrom ?? (_cacheFrom = new InputList()); + set => _cacheFrom = value; + } + + [Input("cacheTo")] + private InputList? _cacheTo; + + /// + /// Cache import configuration. + /// + /// Equivalent to Docker's `--cache-to` flag. + /// + public InputList CacheTo + { + get => _cacheTo ?? (_cacheTo = new InputList()); + set => _cacheTo = value; + } + + /// + /// Build context settings. + /// + /// Equivalent to Docker's `PATH | URL | -` positional argument. + /// + [Input("context")] + public Input? Context { get; set; } + + /// + /// Dockerfile settings. + /// + /// Equivalent to Docker's `--file` flag. + /// + [Input("dockerfile")] + public Input? Dockerfile { get; set; } + + /// + /// Use `exec` mode to build this image. + /// + /// By default the provider embeds a v25 Docker client with v0.12 buildx + /// support. This helps ensure consistent behavior across environments and + /// is compatible with alternative build backends (e.g. `buildkitd`), but + /// it may not be desirable if you require a specific version of buildx. + /// For example you may want to run a custom `docker-buildx` binary with + /// support for [Docker Build + /// Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + /// + /// When this is set to `true` the provider will instead execute the + /// `docker-buildx` binary directly to perform its operations. The user is + /// responsible for ensuring this binary exists, with correct permissions + /// and pre-configured builders, at a path Docker expects (e.g. + /// `~/.docker/cli-plugins`). + /// + /// Debugging `exec` mode may be more difficult as Pulumi will not be able + /// to surface fine-grained errors and warnings. Additionally credentials + /// are temporarily written to disk in order to provide them to the + /// `docker-buildx` binary. + /// + [Input("exec")] + public Input? Exec { get; set; } + + [Input("exports")] + private InputList? _exports; + + /// + /// Controls where images are persisted after building. + /// + /// Images are only stored in the local cache unless `exports` are + /// explicitly configured. + /// + /// Exporting to multiple destinations requires a daemon running BuildKit + /// 0.13 or later. + /// + /// Equivalent to Docker's `--output` flag. + /// + public InputList Exports + { + get => _exports ?? (_exports = new InputList()); + set => _exports = value; + } + + [Input("labels")] + private InputMap? _labels; + + /// + /// Attach arbitrary key/value metadata to the image. + /// + /// Equivalent to Docker's `--label` flag. + /// + public InputMap Labels + { + get => _labels ?? (_labels = new InputMap()); + set => _labels = value; + } + + /// + /// When `true` the build will automatically include a `docker` export. + /// + /// Defaults to `false`. + /// + /// Equivalent to Docker's `--load` flag. + /// + [Input("load")] + public Input? Load { get; set; } + + /// + /// Set the network mode for `RUN` instructions. Defaults to `default`. + /// + /// For custom networks, configure your builder with `--driver-opt network=...`. + /// + /// Equivalent to Docker's `--network` flag. + /// + [Input("network")] + public Input? Network { get; set; } + + /// + /// Do not import cache manifests when building the image. + /// + /// Equivalent to Docker's `--no-cache` flag. + /// + [Input("noCache")] + public Input? NoCache { get; set; } + + [Input("platforms")] + private InputList? _platforms; + + /// + /// Set target platform(s) for the build. Defaults to the host's platform. + /// + /// Equivalent to Docker's `--platform` flag. + /// + public InputList Platforms + { + get => _platforms ?? (_platforms = new InputList()); + set => _platforms = value; + } + + /// + /// Always pull referenced images. + /// + /// Equivalent to Docker's `--pull` flag. + /// + [Input("pull")] + public Input? Pull { get; set; } + + /// + /// When `true` the build will automatically include a `registry` export. + /// + /// Defaults to `false`. + /// + /// Equivalent to Docker's `--push` flag. + /// + [Input("push", required: true)] + public Input Push { get; set; } = null!; + + [Input("registries")] + private InputList? _registries; + + /// + /// Registry credentials. Required if reading or exporting to private + /// repositories. + /// + /// Credentials are kept in-memory and do not pollute pre-existing + /// credentials on the host. + /// + /// Similar to `docker login`. + /// + public InputList Registries + { + get => _registries ?? (_registries = new InputList()); + set => _registries = value; + } + + [Input("secrets")] + private InputMap? _secrets; + + /// + /// A mapping of secret names to their corresponding values. + /// + /// Unlike the Docker CLI, these can be passed by value and do not need to + /// exist on-disk or in environment variables. + /// + /// Build arguments and environment variables are persistent in the final + /// image, so you should use this for sensitive values. + /// + /// Similar to Docker's `--secret` flag. + /// + public InputMap Secrets + { + get => _secrets ?? (_secrets = new InputMap()); + set => _secrets = value; + } + + [Input("ssh")] + private InputList? _ssh; + + /// + /// SSH agent socket or keys to expose to the build. + /// + /// Equivalent to Docker's `--ssh` flag. + /// + public InputList Ssh + { + get => _ssh ?? (_ssh = new InputList()); + set => _ssh = value; + } + + [Input("tags")] + private InputList? _tags; + + /// + /// Name and optionally a tag (format: `name:tag`). + /// + /// If exporting to a registry, the name should include the fully qualified + /// registry address (e.g. `docker.io/pulumi/pulumi:latest`). + /// + /// Equivalent to Docker's `--tag` flag. + /// + public InputList Tags + { + get => _tags ?? (_tags = new InputList()); + set => _tags = value; + } + + /// + /// Set the target build stage(s) to build. + /// + /// If not specified all targets will be built by default. + /// + /// Equivalent to Docker's `--target` flag. + /// + [Input("target")] + public Input? Target { get; set; } + + public ImageArgs() + { + BuildOnPreview = true; + Network = Pulumi.DockerBuild.NetworkMode.@Default; + } + public static new ImageArgs Empty => new ImageArgs(); + } +} diff --git a/sdk/dotnet/Index.cs b/sdk/dotnet/Index.cs new file mode 100644 index 0000000..9d113b0 --- /dev/null +++ b/sdk/dotnet/Index.cs @@ -0,0 +1,259 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild +{ + /// + /// A wrapper around `docker buildx imagetools create` to create an index + /// (or manifest list) referencing one or more existing images. + /// + /// In most cases you do not need an `Index` to build a multi-platform + /// image -- specifying multiple platforms on the `Image` will handle this + /// for you automatically. + /// + /// However, as of April 2024, building multi-platform images _with + /// caching_ will only export a cache for one platform at a time (see [this + /// discussion](https://github.com/docker/buildx/discussions/1382) for more + /// details). + /// + /// Therefore this resource can be helpful if you are building + /// multi-platform images with caching: each platform can be built and + /// cached separately, and an `Index` can join them all together. An + /// example of this is shown below. + /// + /// This resource creates an OCI image index or a Docker manifest list + /// depending on the media types of the source images. + /// + /// ## Example Usage + /// ### Multi-platform registry caching + /// ```csharp + /// using System.Collections.Generic; + /// using System.Linq; + /// using Pulumi; + /// using DockerBuild = Pulumi.DockerBuild; + /// + /// return await Deployment.RunAsync(() => + /// { + /// var amd64 = new DockerBuild.Image("amd64", new() + /// { + /// CacheFrom = new[] + /// { + /// new DockerBuild.Inputs.CacheFromArgs + /// { + /// Registry = new DockerBuild.Inputs.CacheFromRegistryArgs + /// { + /// Ref = "docker.io/pulumi/pulumi:cache-amd64", + /// }, + /// }, + /// }, + /// CacheTo = new[] + /// { + /// new DockerBuild.Inputs.CacheToArgs + /// { + /// Registry = new DockerBuild.Inputs.CacheToRegistryArgs + /// { + /// Mode = DockerBuild.CacheMode.Max, + /// Ref = "docker.io/pulumi/pulumi:cache-amd64", + /// }, + /// }, + /// }, + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "app", + /// }, + /// Platforms = new[] + /// { + /// DockerBuild.Platform.Linux_amd64, + /// }, + /// Tags = new[] + /// { + /// "docker.io/pulumi/pulumi:3.107.0-amd64", + /// }, + /// }); + /// + /// var arm64 = new DockerBuild.Image("arm64", new() + /// { + /// CacheFrom = new[] + /// { + /// new DockerBuild.Inputs.CacheFromArgs + /// { + /// Registry = new DockerBuild.Inputs.CacheFromRegistryArgs + /// { + /// Ref = "docker.io/pulumi/pulumi:cache-arm64", + /// }, + /// }, + /// }, + /// CacheTo = new[] + /// { + /// new DockerBuild.Inputs.CacheToArgs + /// { + /// Registry = new DockerBuild.Inputs.CacheToRegistryArgs + /// { + /// Mode = DockerBuild.CacheMode.Max, + /// Ref = "docker.io/pulumi/pulumi:cache-arm64", + /// }, + /// }, + /// }, + /// Context = new DockerBuild.Inputs.BuildContextArgs + /// { + /// Location = "app", + /// }, + /// Platforms = new[] + /// { + /// DockerBuild.Platform.Linux_arm64, + /// }, + /// Tags = new[] + /// { + /// "docker.io/pulumi/pulumi:3.107.0-arm64", + /// }, + /// }); + /// + /// var index = new DockerBuild.Index("index", new() + /// { + /// Sources = new[] + /// { + /// amd64.Ref, + /// arm64.Ref, + /// }, + /// Tag = "docker.io/pulumi/pulumi:3.107.0", + /// }); + /// + /// return new Dictionary<string, object?> + /// { + /// ["ref"] = index.Ref, + /// }; + /// }); + /// + /// ``` + /// + [DockerBuildResourceType("docker-build:index:Index")] + public partial class Index : global::Pulumi.CustomResource + { + /// + /// If true, push the index to the target registry. + /// + /// Defaults to `true`. + /// + [Output("push")] + public Output Push { get; private set; } = null!; + + /// + /// The pushed tag with digest. + /// + /// Identical to the tag if the index was not pushed. + /// + [Output("ref")] + public Output Ref { get; private set; } = null!; + + /// + /// Authentication for the registry where the tagged index will be pushed. + /// + /// Credentials can also be included with the provider's configuration. + /// + [Output("registry")] + public Output Registry { get; private set; } = null!; + + /// + /// Existing images to include in the index. + /// + [Output("sources")] + public Output> Sources { get; private set; } = null!; + + /// + /// The tag to apply to the index. + /// + [Output("tag")] + public Output Tag { get; private set; } = null!; + + + /// + /// Create a Index resource with the given unique name, arguments, and options. + /// + /// + /// The unique name of the resource + /// The arguments used to populate this resource's properties + /// A bag of options that control this resource's behavior + public Index(string name, IndexArgs args, CustomResourceOptions? options = null) + : base("docker-build:index:Index", name, args ?? new IndexArgs(), MakeResourceOptions(options, "")) + { + } + + private Index(string name, Input id, CustomResourceOptions? options = null) + : base("docker-build:index:Index", name, null, MakeResourceOptions(options, id)) + { + } + + private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) + { + var defaultOptions = new CustomResourceOptions + { + Version = Utilities.Version, + }; + var merged = CustomResourceOptions.Merge(defaultOptions, options); + // Override the ID if one was specified for consistency with other language SDKs. + merged.Id = id ?? merged.Id; + return merged; + } + /// + /// Get an existing Index resource's state with the given name, ID, and optional extra + /// properties used to qualify the lookup. + /// + /// + /// The unique name of the resulting resource. + /// The unique provider ID of the resource to lookup. + /// A bag of options that control this resource's behavior + public static Index Get(string name, Input id, CustomResourceOptions? options = null) + { + return new Index(name, id, options); + } + } + + public sealed class IndexArgs : global::Pulumi.ResourceArgs + { + /// + /// If true, push the index to the target registry. + /// + /// Defaults to `true`. + /// + [Input("push")] + public Input? Push { get; set; } + + /// + /// Authentication for the registry where the tagged index will be pushed. + /// + /// Credentials can also be included with the provider's configuration. + /// + [Input("registry")] + public Input? Registry { get; set; } + + [Input("sources", required: true)] + private InputList? _sources; + + /// + /// Existing images to include in the index. + /// + public InputList Sources + { + get => _sources ?? (_sources = new InputList()); + set => _sources = value; + } + + /// + /// The tag to apply to the index. + /// + [Input("tag", required: true)] + public Input Tag { get; set; } = null!; + + public IndexArgs() + { + Push = true; + } + public static new IndexArgs Empty => new IndexArgs(); + } +} diff --git a/sdk/dotnet/Inputs/BuildContextArgs.cs b/sdk/dotnet/Inputs/BuildContextArgs.cs new file mode 100644 index 0000000..77120c7 --- /dev/null +++ b/sdk/dotnet/Inputs/BuildContextArgs.cs @@ -0,0 +1,50 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class BuildContextArgs : global::Pulumi.ResourceArgs + { + /// + /// Resources to use for build context. + /// + /// The location can be: + /// * A relative or absolute path to a local directory (`.`, `./app`, + /// `/app`, etc.). + /// * A remote URL of a Git repository, tarball, or plain text file + /// (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + /// etc.). + /// + [Input("location", required: true)] + public Input Location { get; set; } = null!; + + [Input("named")] + private InputMap? _named; + + /// + /// Additional build contexts to use. + /// + /// These contexts are accessed with `FROM name` or `--from=name` + /// statements when using Dockerfile 1.4+ syntax. + /// + /// Values can be local paths, HTTP URLs, or `docker-image://` images. + /// + public InputMap Named + { + get => _named ?? (_named = new InputMap()); + set => _named = value; + } + + public BuildContextArgs() + { + } + public static new BuildContextArgs Empty => new BuildContextArgs(); + } +} diff --git a/sdk/dotnet/Inputs/BuilderConfigArgs.cs b/sdk/dotnet/Inputs/BuilderConfigArgs.cs new file mode 100644 index 0000000..a252385 --- /dev/null +++ b/sdk/dotnet/Inputs/BuilderConfigArgs.cs @@ -0,0 +1,31 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class BuilderConfigArgs : global::Pulumi.ResourceArgs + { + /// + /// Name of an existing buildx builder to use. + /// + /// Only `docker-container`, `kubernetes`, or `remote` drivers are + /// supported. The legacy `docker` driver is not supported. + /// + /// Equivalent to Docker's `--builder` flag. + /// + [Input("name")] + public Input? Name { get; set; } + + public BuilderConfigArgs() + { + } + public static new BuilderConfigArgs Empty => new BuilderConfigArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheFromArgs.cs b/sdk/dotnet/Inputs/CacheFromArgs.cs new file mode 100644 index 0000000..f4de87a --- /dev/null +++ b/sdk/dotnet/Inputs/CacheFromArgs.cs @@ -0,0 +1,67 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheFromArgs : global::Pulumi.ResourceArgs + { + /// + /// Upload build caches to Azure's blob storage service. + /// + [Input("azblob")] + public Input? Azblob { get; set; } + + /// + /// When `true` this entry will be excluded. Defaults to `false`. + /// + [Input("disabled")] + public Input? Disabled { get; set; } + + /// + /// Recommended for use with GitHub Actions workflows. + /// + /// An action like `crazy-max/ghaction-github-runtime` is recommended to + /// expose appropriate credentials to your GitHub workflow. + /// + [Input("gha")] + public Input? Gha { get; set; } + + /// + /// A simple backend which caches images on your local filesystem. + /// + [Input("local")] + public Input? Local { get; set; } + + /// + /// A raw string as you would provide it to the Docker CLI (e.g., + /// `type=inline`). + /// + [Input("raw")] + public Input? Raw { get; set; } + + /// + /// Upload build caches to remote registries. + /// + [Input("registry")] + public Input? Registry { get; set; } + + /// + /// Upload build caches to AWS S3 or an S3-compatible services such as + /// MinIO. + /// + [Input("s3")] + public Input? S3 { get; set; } + + public CacheFromArgs() + { + } + public static new CacheFromArgs Empty => new CacheFromArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheFromAzureBlobArgs.cs b/sdk/dotnet/Inputs/CacheFromAzureBlobArgs.cs new file mode 100644 index 0000000..f5135f6 --- /dev/null +++ b/sdk/dotnet/Inputs/CacheFromAzureBlobArgs.cs @@ -0,0 +1,48 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheFromAzureBlobArgs : global::Pulumi.ResourceArgs + { + /// + /// Base URL of the storage account. + /// + [Input("accountUrl")] + public Input? AccountUrl { get; set; } + + /// + /// The name of the cache image. + /// + [Input("name", required: true)] + public Input Name { get; set; } = null!; + + [Input("secretAccessKey")] + private Input? _secretAccessKey; + + /// + /// Blob storage account key. + /// + public Input? SecretAccessKey + { + get => _secretAccessKey; + set + { + var emptySecret = Output.CreateSecret(0); + _secretAccessKey = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); + } + } + + public CacheFromAzureBlobArgs() + { + } + public static new CacheFromAzureBlobArgs Empty => new CacheFromAzureBlobArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs b/sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs new file mode 100644 index 0000000..e26500b --- /dev/null +++ b/sdk/dotnet/Inputs/CacheFromGitHubActionsArgs.cs @@ -0,0 +1,63 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheFromGitHubActionsArgs : global::Pulumi.ResourceArgs + { + /// + /// The scope to use for cache keys. Defaults to `buildkit`. + /// + /// This should be set if building and caching multiple images in one + /// workflow, otherwise caches will overwrite each other. + /// + [Input("scope")] + public Input? Scope { get; set; } + + [Input("token")] + private Input? _token; + + /// + /// The GitHub Actions token to use. This is not a personal access tokens + /// and is typically generated automatically as part of each job. + /// + /// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + /// `crazy-max/ghaction-github-runtime` is recommended to expose this + /// environment variable to your jobs. + /// + public Input? Token + { + get => _token; + set + { + var emptySecret = Output.CreateSecret(0); + _token = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); + } + } + + /// + /// The cache server URL to use for artifacts. + /// + /// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + /// `crazy-max/ghaction-github-runtime` is recommended to expose this + /// environment variable to your jobs. + /// + [Input("url")] + public Input? Url { get; set; } + + public CacheFromGitHubActionsArgs() + { + Scope = Utilities.GetEnv("buildkit") ?? ""; + Token = Utilities.GetEnv("ACTIONS_RUNTIME_TOKEN") ?? ""; + Url = Utilities.GetEnv("ACTIONS_RUNTIME_URL") ?? ""; + } + public static new CacheFromGitHubActionsArgs Empty => new CacheFromGitHubActionsArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheFromLocalArgs.cs b/sdk/dotnet/Inputs/CacheFromLocalArgs.cs new file mode 100644 index 0000000..e6e2b4d --- /dev/null +++ b/sdk/dotnet/Inputs/CacheFromLocalArgs.cs @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheFromLocalArgs : global::Pulumi.ResourceArgs + { + /// + /// Digest of manifest to import. + /// + [Input("digest")] + public Input? Digest { get; set; } + + /// + /// Path of the local directory where cache gets imported from. + /// + [Input("src", required: true)] + public Input Src { get; set; } = null!; + + public CacheFromLocalArgs() + { + } + public static new CacheFromLocalArgs Empty => new CacheFromLocalArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheFromRegistryArgs.cs b/sdk/dotnet/Inputs/CacheFromRegistryArgs.cs new file mode 100644 index 0000000..b55256f --- /dev/null +++ b/sdk/dotnet/Inputs/CacheFromRegistryArgs.cs @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheFromRegistryArgs : global::Pulumi.ResourceArgs + { + /// + /// Fully qualified name of the cache image to import. + /// + [Input("ref", required: true)] + public Input Ref { get; set; } = null!; + + public CacheFromRegistryArgs() + { + } + public static new CacheFromRegistryArgs Empty => new CacheFromRegistryArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheFromS3Args.cs b/sdk/dotnet/Inputs/CacheFromS3Args.cs new file mode 100644 index 0000000..9ee8132 --- /dev/null +++ b/sdk/dotnet/Inputs/CacheFromS3Args.cs @@ -0,0 +1,104 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheFromS3Args : global::Pulumi.ResourceArgs + { + /// + /// Defaults to `$AWS_ACCESS_KEY_ID`. + /// + [Input("accessKeyId")] + public Input? AccessKeyId { get; set; } + + /// + /// Prefix to prepend to blob filenames. + /// + [Input("blobsPrefix")] + public Input? BlobsPrefix { get; set; } + + /// + /// Name of the S3 bucket. + /// + [Input("bucket", required: true)] + public Input Bucket { get; set; } = null!; + + /// + /// Endpoint of the S3 bucket. + /// + [Input("endpointUrl")] + public Input? EndpointUrl { get; set; } + + /// + /// Prefix to prepend on manifest filenames. + /// + [Input("manifestsPrefix")] + public Input? ManifestsPrefix { get; set; } + + /// + /// Name of the cache image. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// The geographic location of the bucket. Defaults to `$AWS_REGION`. + /// + [Input("region", required: true)] + public Input Region { get; set; } = null!; + + [Input("secretAccessKey")] + private Input? _secretAccessKey; + + /// + /// Defaults to `$AWS_SECRET_ACCESS_KEY`. + /// + public Input? SecretAccessKey + { + get => _secretAccessKey; + set + { + var emptySecret = Output.CreateSecret(0); + _secretAccessKey = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); + } + } + + [Input("sessionToken")] + private Input? _sessionToken; + + /// + /// Defaults to `$AWS_SESSION_TOKEN`. + /// + public Input? SessionToken + { + get => _sessionToken; + set + { + var emptySecret = Output.CreateSecret(0); + _sessionToken = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); + } + } + + /// + /// Uses `bucket` in the URL instead of hostname when `true`. + /// + [Input("usePathStyle")] + public Input? UsePathStyle { get; set; } + + public CacheFromS3Args() + { + AccessKeyId = Utilities.GetEnv("AWS_ACCESS_KEY_ID") ?? ""; + Region = Utilities.GetEnv("AWS_REGION") ?? ""; + SecretAccessKey = Utilities.GetEnv("AWS_SECRET_ACCESS_KEY") ?? ""; + SessionToken = Utilities.GetEnv("AWS_SESSION_TOKEN") ?? ""; + } + public static new CacheFromS3Args Empty => new CacheFromS3Args(); + } +} diff --git a/sdk/dotnet/Inputs/CacheToArgs.cs b/sdk/dotnet/Inputs/CacheToArgs.cs new file mode 100644 index 0000000..5c0ede6 --- /dev/null +++ b/sdk/dotnet/Inputs/CacheToArgs.cs @@ -0,0 +1,75 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheToArgs : global::Pulumi.ResourceArgs + { + /// + /// Push cache to Azure's blob storage service. + /// + [Input("azblob")] + public Input? Azblob { get; set; } + + /// + /// When `true` this entry will be excluded. Defaults to `false`. + /// + [Input("disabled")] + public Input? Disabled { get; set; } + + /// + /// Recommended for use with GitHub Actions workflows. + /// + /// An action like `crazy-max/ghaction-github-runtime` is recommended to + /// expose appropriate credentials to your GitHub workflow. + /// + [Input("gha")] + public Input? Gha { get; set; } + + /// + /// The inline cache storage backend is the simplest implementation to get + /// started with, but it does not handle multi-stage builds. Consider the + /// `registry` cache backend instead. + /// + [Input("inline")] + public Input? Inline { get; set; } + + /// + /// A simple backend which caches imagines on your local filesystem. + /// + [Input("local")] + public Input? Local { get; set; } + + /// + /// A raw string as you would provide it to the Docker CLI (e.g., + /// `type=inline`) + /// + [Input("raw")] + public Input? Raw { get; set; } + + /// + /// Push caches to remote registries. Incompatible with the `docker` build + /// driver. + /// + [Input("registry")] + public Input? Registry { get; set; } + + /// + /// Push cache to AWS S3 or S3-compatible services such as MinIO. + /// + [Input("s3")] + public Input? S3 { get; set; } + + public CacheToArgs() + { + } + public static new CacheToArgs Empty => new CacheToArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheToAzureBlobArgs.cs b/sdk/dotnet/Inputs/CacheToAzureBlobArgs.cs new file mode 100644 index 0000000..5b85076 --- /dev/null +++ b/sdk/dotnet/Inputs/CacheToAzureBlobArgs.cs @@ -0,0 +1,62 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheToAzureBlobArgs : global::Pulumi.ResourceArgs + { + /// + /// Base URL of the storage account. + /// + [Input("accountUrl")] + public Input? AccountUrl { get; set; } + + /// + /// Ignore errors caused by failed cache exports. + /// + [Input("ignoreError")] + public Input? IgnoreError { get; set; } + + /// + /// The cache mode to use. Defaults to `min`. + /// + [Input("mode")] + public Input? Mode { get; set; } + + /// + /// The name of the cache image. + /// + [Input("name", required: true)] + public Input Name { get; set; } = null!; + + [Input("secretAccessKey")] + private Input? _secretAccessKey; + + /// + /// Blob storage account key. + /// + public Input? SecretAccessKey + { + get => _secretAccessKey; + set + { + var emptySecret = Output.CreateSecret(0); + _secretAccessKey = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); + } + } + + public CacheToAzureBlobArgs() + { + IgnoreError = false; + Mode = Pulumi.DockerBuild.CacheMode.Min; + } + public static new CacheToAzureBlobArgs Empty => new CacheToAzureBlobArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs b/sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs new file mode 100644 index 0000000..98b97eb --- /dev/null +++ b/sdk/dotnet/Inputs/CacheToGitHubActionsArgs.cs @@ -0,0 +1,77 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheToGitHubActionsArgs : global::Pulumi.ResourceArgs + { + /// + /// Ignore errors caused by failed cache exports. + /// + [Input("ignoreError")] + public Input? IgnoreError { get; set; } + + /// + /// The cache mode to use. Defaults to `min`. + /// + [Input("mode")] + public Input? Mode { get; set; } + + /// + /// The scope to use for cache keys. Defaults to `buildkit`. + /// + /// This should be set if building and caching multiple images in one + /// workflow, otherwise caches will overwrite each other. + /// + [Input("scope")] + public Input? Scope { get; set; } + + [Input("token")] + private Input? _token; + + /// + /// The GitHub Actions token to use. This is not a personal access tokens + /// and is typically generated automatically as part of each job. + /// + /// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + /// `crazy-max/ghaction-github-runtime` is recommended to expose this + /// environment variable to your jobs. + /// + public Input? Token + { + get => _token; + set + { + var emptySecret = Output.CreateSecret(0); + _token = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); + } + } + + /// + /// The cache server URL to use for artifacts. + /// + /// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + /// `crazy-max/ghaction-github-runtime` is recommended to expose this + /// environment variable to your jobs. + /// + [Input("url")] + public Input? Url { get; set; } + + public CacheToGitHubActionsArgs() + { + IgnoreError = false; + Mode = Pulumi.DockerBuild.CacheMode.Min; + Scope = Utilities.GetEnv("buildkit") ?? ""; + Token = Utilities.GetEnv("ACTIONS_RUNTIME_TOKEN") ?? ""; + Url = Utilities.GetEnv("ACTIONS_RUNTIME_URL") ?? ""; + } + public static new CacheToGitHubActionsArgs Empty => new CacheToGitHubActionsArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheToInlineArgs.cs b/sdk/dotnet/Inputs/CacheToInlineArgs.cs new file mode 100644 index 0000000..bb996af --- /dev/null +++ b/sdk/dotnet/Inputs/CacheToInlineArgs.cs @@ -0,0 +1,23 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + /// + /// Include an inline cache with the exported image. + /// + public sealed class CacheToInlineArgs : global::Pulumi.ResourceArgs + { + public CacheToInlineArgs() + { + } + public static new CacheToInlineArgs Empty => new CacheToInlineArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheToLocalArgs.cs b/sdk/dotnet/Inputs/CacheToLocalArgs.cs new file mode 100644 index 0000000..806b3fd --- /dev/null +++ b/sdk/dotnet/Inputs/CacheToLocalArgs.cs @@ -0,0 +1,61 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheToLocalArgs : global::Pulumi.ResourceArgs + { + /// + /// The compression type to use. + /// + [Input("compression")] + public Input? Compression { get; set; } + + /// + /// Compression level from 0 to 22. + /// + [Input("compressionLevel")] + public Input? CompressionLevel { get; set; } + + /// + /// Path of the local directory to export the cache. + /// + [Input("dest", required: true)] + public Input Dest { get; set; } = null!; + + /// + /// Forcefully apply compression. + /// + [Input("forceCompression")] + public Input? ForceCompression { get; set; } + + /// + /// Ignore errors caused by failed cache exports. + /// + [Input("ignoreError")] + public Input? IgnoreError { get; set; } + + /// + /// The cache mode to use. Defaults to `min`. + /// + [Input("mode")] + public Input? Mode { get; set; } + + public CacheToLocalArgs() + { + Compression = Pulumi.DockerBuild.CompressionType.Gzip; + CompressionLevel = 0; + ForceCompression = false; + IgnoreError = false; + Mode = Pulumi.DockerBuild.CacheMode.Min; + } + public static new CacheToLocalArgs Empty => new CacheToLocalArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheToRegistryArgs.cs b/sdk/dotnet/Inputs/CacheToRegistryArgs.cs new file mode 100644 index 0000000..e26cafb --- /dev/null +++ b/sdk/dotnet/Inputs/CacheToRegistryArgs.cs @@ -0,0 +1,82 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheToRegistryArgs : global::Pulumi.ResourceArgs + { + /// + /// The compression type to use. + /// + [Input("compression")] + public Input? Compression { get; set; } + + /// + /// Compression level from 0 to 22. + /// + [Input("compressionLevel")] + public Input? CompressionLevel { get; set; } + + /// + /// Forcefully apply compression. + /// + [Input("forceCompression")] + public Input? ForceCompression { get; set; } + + /// + /// Ignore errors caused by failed cache exports. + /// + [Input("ignoreError")] + public Input? IgnoreError { get; set; } + + /// + /// Export cache manifest as an OCI-compatible image manifest instead of a + /// manifest list. Requires `ociMediaTypes` to also be `true`. + /// + /// Some registries like AWS ECR will not work with caching if this is + /// `false`. + /// + /// Defaults to `false` to match Docker's default behavior. + /// + [Input("imageManifest")] + public Input? ImageManifest { get; set; } + + /// + /// The cache mode to use. Defaults to `min`. + /// + [Input("mode")] + public Input? Mode { get; set; } + + /// + /// Whether to use OCI media types in exported manifests. Defaults to + /// `true`. + /// + [Input("ociMediaTypes")] + public Input? OciMediaTypes { get; set; } + + /// + /// Fully qualified name of the cache image to import. + /// + [Input("ref", required: true)] + public Input Ref { get; set; } = null!; + + public CacheToRegistryArgs() + { + Compression = Pulumi.DockerBuild.CompressionType.Gzip; + CompressionLevel = 0; + ForceCompression = false; + IgnoreError = false; + ImageManifest = false; + Mode = Pulumi.DockerBuild.CacheMode.Min; + OciMediaTypes = true; + } + public static new CacheToRegistryArgs Empty => new CacheToRegistryArgs(); + } +} diff --git a/sdk/dotnet/Inputs/CacheToS3Args.cs b/sdk/dotnet/Inputs/CacheToS3Args.cs new file mode 100644 index 0000000..f0aa4a6 --- /dev/null +++ b/sdk/dotnet/Inputs/CacheToS3Args.cs @@ -0,0 +1,118 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class CacheToS3Args : global::Pulumi.ResourceArgs + { + /// + /// Defaults to `$AWS_ACCESS_KEY_ID`. + /// + [Input("accessKeyId")] + public Input? AccessKeyId { get; set; } + + /// + /// Prefix to prepend to blob filenames. + /// + [Input("blobsPrefix")] + public Input? BlobsPrefix { get; set; } + + /// + /// Name of the S3 bucket. + /// + [Input("bucket", required: true)] + public Input Bucket { get; set; } = null!; + + /// + /// Endpoint of the S3 bucket. + /// + [Input("endpointUrl")] + public Input? EndpointUrl { get; set; } + + /// + /// Ignore errors caused by failed cache exports. + /// + [Input("ignoreError")] + public Input? IgnoreError { get; set; } + + /// + /// Prefix to prepend on manifest filenames. + /// + [Input("manifestsPrefix")] + public Input? ManifestsPrefix { get; set; } + + /// + /// The cache mode to use. Defaults to `min`. + /// + [Input("mode")] + public Input? Mode { get; set; } + + /// + /// Name of the cache image. + /// + [Input("name")] + public Input? Name { get; set; } + + /// + /// The geographic location of the bucket. Defaults to `$AWS_REGION`. + /// + [Input("region", required: true)] + public Input Region { get; set; } = null!; + + [Input("secretAccessKey")] + private Input? _secretAccessKey; + + /// + /// Defaults to `$AWS_SECRET_ACCESS_KEY`. + /// + public Input? SecretAccessKey + { + get => _secretAccessKey; + set + { + var emptySecret = Output.CreateSecret(0); + _secretAccessKey = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); + } + } + + [Input("sessionToken")] + private Input? _sessionToken; + + /// + /// Defaults to `$AWS_SESSION_TOKEN`. + /// + public Input? SessionToken + { + get => _sessionToken; + set + { + var emptySecret = Output.CreateSecret(0); + _sessionToken = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); + } + } + + /// + /// Uses `bucket` in the URL instead of hostname when `true`. + /// + [Input("usePathStyle")] + public Input? UsePathStyle { get; set; } + + public CacheToS3Args() + { + AccessKeyId = Utilities.GetEnv("AWS_ACCESS_KEY_ID") ?? ""; + IgnoreError = false; + Mode = Pulumi.DockerBuild.CacheMode.Min; + Region = Utilities.GetEnv("AWS_REGION") ?? ""; + SecretAccessKey = Utilities.GetEnv("AWS_SECRET_ACCESS_KEY") ?? ""; + SessionToken = Utilities.GetEnv("AWS_SESSION_TOKEN") ?? ""; + } + public static new CacheToS3Args Empty => new CacheToS3Args(); + } +} diff --git a/sdk/dotnet/Inputs/ContextArgs.cs b/sdk/dotnet/Inputs/ContextArgs.cs new file mode 100644 index 0000000..e567e23 --- /dev/null +++ b/sdk/dotnet/Inputs/ContextArgs.cs @@ -0,0 +1,33 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class ContextArgs : global::Pulumi.ResourceArgs + { + /// + /// Resources to use for build context. + /// + /// The location can be: + /// * A relative or absolute path to a local directory (`.`, `./app`, + /// `/app`, etc.). + /// * A remote URL of a Git repository, tarball, or plain text file + /// (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + /// etc.). + /// + [Input("location", required: true)] + public Input Location { get; set; } = null!; + + public ContextArgs() + { + } + public static new ContextArgs Empty => new ContextArgs(); + } +} diff --git a/sdk/dotnet/Inputs/DockerfileArgs.cs b/sdk/dotnet/Inputs/DockerfileArgs.cs new file mode 100644 index 0000000..e787b5a --- /dev/null +++ b/sdk/dotnet/Inputs/DockerfileArgs.cs @@ -0,0 +1,42 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class DockerfileArgs : global::Pulumi.ResourceArgs + { + /// + /// Raw Dockerfile contents. + /// + /// Conflicts with `location`. + /// + /// Equivalent to invoking Docker with `-f -`. + /// + [Input("inline")] + public Input? Inline { get; set; } + + /// + /// Location of the Dockerfile to use. + /// + /// Can be a relative or absolute path to a local file, or a remote URL. + /// + /// Defaults to `${context.location}/Dockerfile` if context is on-disk. + /// + /// Conflicts with `inline`. + /// + [Input("location")] + public Input? Location { get; set; } + + public DockerfileArgs() + { + } + public static new DockerfileArgs Empty => new DockerfileArgs(); + } +} diff --git a/sdk/dotnet/Inputs/ExportArgs.cs b/sdk/dotnet/Inputs/ExportArgs.cs new file mode 100644 index 0000000..7ac5b81 --- /dev/null +++ b/sdk/dotnet/Inputs/ExportArgs.cs @@ -0,0 +1,76 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class ExportArgs : global::Pulumi.ResourceArgs + { + /// + /// A no-op export. Helpful for silencing the 'no exports' warning if you + /// just want to populate caches. + /// + [Input("cacheonly")] + public Input? Cacheonly { get; set; } + + /// + /// When `true` this entry will be excluded. Defaults to `false`. + /// + [Input("disabled")] + public Input? Disabled { get; set; } + + /// + /// Export as a Docker image layout. + /// + [Input("docker")] + public Input? Docker { get; set; } + + /// + /// Outputs the build result into a container image format. + /// + [Input("image")] + public Input? Image { get; set; } + + /// + /// Export to a local directory as files and directories. + /// + [Input("local")] + public Input? Local { get; set; } + + /// + /// Identical to the Docker exporter but uses OCI media types by default. + /// + [Input("oci")] + public Input? Oci { get; set; } + + /// + /// A raw string as you would provide it to the Docker CLI (e.g., + /// `type=docker`) + /// + [Input("raw")] + public Input? Raw { get; set; } + + /// + /// Identical to the Image exporter, but pushes by default. + /// + [Input("registry")] + public Input? Registry { get; set; } + + /// + /// Export to a local directory as a tarball. + /// + [Input("tar")] + public Input? Tar { get; set; } + + public ExportArgs() + { + } + public static new ExportArgs Empty => new ExportArgs(); + } +} diff --git a/sdk/dotnet/Inputs/ExportCacheOnlyArgs.cs b/sdk/dotnet/Inputs/ExportCacheOnlyArgs.cs new file mode 100644 index 0000000..213dde1 --- /dev/null +++ b/sdk/dotnet/Inputs/ExportCacheOnlyArgs.cs @@ -0,0 +1,20 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class ExportCacheOnlyArgs : global::Pulumi.ResourceArgs + { + public ExportCacheOnlyArgs() + { + } + public static new ExportCacheOnlyArgs Empty => new ExportCacheOnlyArgs(); + } +} diff --git a/sdk/dotnet/Inputs/ExportDockerArgs.cs b/sdk/dotnet/Inputs/ExportDockerArgs.cs new file mode 100644 index 0000000..194723a --- /dev/null +++ b/sdk/dotnet/Inputs/ExportDockerArgs.cs @@ -0,0 +1,85 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class ExportDockerArgs : global::Pulumi.ResourceArgs + { + [Input("annotations")] + private InputMap? _annotations; + + /// + /// Attach an arbitrary key/value annotation to the image. + /// + public InputMap Annotations + { + get => _annotations ?? (_annotations = new InputMap()); + set => _annotations = value; + } + + /// + /// The compression type to use. + /// + [Input("compression")] + public Input? Compression { get; set; } + + /// + /// Compression level from 0 to 22. + /// + [Input("compressionLevel")] + public Input? CompressionLevel { get; set; } + + /// + /// The local export path. + /// + [Input("dest")] + public Input? Dest { get; set; } + + /// + /// Forcefully apply compression. + /// + [Input("forceCompression")] + public Input? ForceCompression { get; set; } + + [Input("names")] + private InputList? _names; + + /// + /// Specify images names to export. This is overridden if tags are already specified. + /// + public InputList Names + { + get => _names ?? (_names = new InputList()); + set => _names = value; + } + + /// + /// Use OCI media types in exporter manifests. + /// + [Input("ociMediaTypes")] + public Input? OciMediaTypes { get; set; } + + /// + /// Bundle the output into a tarball layout. + /// + [Input("tar")] + public Input? Tar { get; set; } + + public ExportDockerArgs() + { + Compression = Pulumi.DockerBuild.CompressionType.Gzip; + CompressionLevel = 0; + ForceCompression = false; + OciMediaTypes = false; + Tar = true; + } + public static new ExportDockerArgs Empty => new ExportDockerArgs(); + } +} diff --git a/sdk/dotnet/Inputs/ExportImageArgs.cs b/sdk/dotnet/Inputs/ExportImageArgs.cs new file mode 100644 index 0000000..25bd9bf --- /dev/null +++ b/sdk/dotnet/Inputs/ExportImageArgs.cs @@ -0,0 +1,122 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class ExportImageArgs : global::Pulumi.ResourceArgs + { + [Input("annotations")] + private InputMap? _annotations; + + /// + /// Attach an arbitrary key/value annotation to the image. + /// + public InputMap Annotations + { + get => _annotations ?? (_annotations = new InputMap()); + set => _annotations = value; + } + + /// + /// The compression type to use. + /// + [Input("compression")] + public Input? Compression { get; set; } + + /// + /// Compression level from 0 to 22. + /// + [Input("compressionLevel")] + public Input? CompressionLevel { get; set; } + + /// + /// Name image with `prefix@<digest>`, used for anonymous images. + /// + [Input("danglingNamePrefix")] + public Input? DanglingNamePrefix { get; set; } + + /// + /// Forcefully apply compression. + /// + [Input("forceCompression")] + public Input? ForceCompression { get; set; } + + /// + /// Allow pushing to an insecure registry. + /// + [Input("insecure")] + public Input? Insecure { get; set; } + + /// + /// Add additional canonical name (`name@<digest>`). + /// + [Input("nameCanonical")] + public Input? NameCanonical { get; set; } + + [Input("names")] + private InputList? _names; + + /// + /// Specify images names to export. This is overridden if tags are already specified. + /// + public InputList Names + { + get => _names ?? (_names = new InputList()); + set => _names = value; + } + + /// + /// Use OCI media types in exporter manifests. + /// + [Input("ociMediaTypes")] + public Input? OciMediaTypes { get; set; } + + /// + /// Push after creating the image. Defaults to `false`. + /// + [Input("push")] + public Input? Push { get; set; } + + /// + /// Push image without name. + /// + [Input("pushByDigest")] + public Input? PushByDigest { get; set; } + + /// + /// Store resulting images to the worker's image store and ensure all of + /// its blobs are in the content store. + /// + /// Defaults to `true`. + /// + /// Ignored if the worker doesn't have image store (when using OCI workers, + /// for example). + /// + [Input("store")] + public Input? Store { get; set; } + + /// + /// Unpack image after creation (for use with containerd). Defaults to + /// `false`. + /// + [Input("unpack")] + public Input? Unpack { get; set; } + + public ExportImageArgs() + { + Compression = Pulumi.DockerBuild.CompressionType.Gzip; + CompressionLevel = 0; + ForceCompression = false; + OciMediaTypes = false; + Store = true; + } + public static new ExportImageArgs Empty => new ExportImageArgs(); + } +} diff --git a/sdk/dotnet/Inputs/ExportLocalArgs.cs b/sdk/dotnet/Inputs/ExportLocalArgs.cs new file mode 100644 index 0000000..cb29334 --- /dev/null +++ b/sdk/dotnet/Inputs/ExportLocalArgs.cs @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class ExportLocalArgs : global::Pulumi.ResourceArgs + { + /// + /// Output path. + /// + [Input("dest", required: true)] + public Input Dest { get; set; } = null!; + + public ExportLocalArgs() + { + } + public static new ExportLocalArgs Empty => new ExportLocalArgs(); + } +} diff --git a/sdk/dotnet/Inputs/ExportOCIArgs.cs b/sdk/dotnet/Inputs/ExportOCIArgs.cs new file mode 100644 index 0000000..1699dc0 --- /dev/null +++ b/sdk/dotnet/Inputs/ExportOCIArgs.cs @@ -0,0 +1,85 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class ExportOCIArgs : global::Pulumi.ResourceArgs + { + [Input("annotations")] + private InputMap? _annotations; + + /// + /// Attach an arbitrary key/value annotation to the image. + /// + public InputMap Annotations + { + get => _annotations ?? (_annotations = new InputMap()); + set => _annotations = value; + } + + /// + /// The compression type to use. + /// + [Input("compression")] + public Input? Compression { get; set; } + + /// + /// Compression level from 0 to 22. + /// + [Input("compressionLevel")] + public Input? CompressionLevel { get; set; } + + /// + /// The local export path. + /// + [Input("dest")] + public Input? Dest { get; set; } + + /// + /// Forcefully apply compression. + /// + [Input("forceCompression")] + public Input? ForceCompression { get; set; } + + [Input("names")] + private InputList? _names; + + /// + /// Specify images names to export. This is overridden if tags are already specified. + /// + public InputList Names + { + get => _names ?? (_names = new InputList()); + set => _names = value; + } + + /// + /// Use OCI media types in exporter manifests. + /// + [Input("ociMediaTypes")] + public Input? OciMediaTypes { get; set; } + + /// + /// Bundle the output into a tarball layout. + /// + [Input("tar")] + public Input? Tar { get; set; } + + public ExportOCIArgs() + { + Compression = Pulumi.DockerBuild.CompressionType.Gzip; + CompressionLevel = 0; + ForceCompression = false; + OciMediaTypes = true; + Tar = true; + } + public static new ExportOCIArgs Empty => new ExportOCIArgs(); + } +} diff --git a/sdk/dotnet/Inputs/ExportRegistryArgs.cs b/sdk/dotnet/Inputs/ExportRegistryArgs.cs new file mode 100644 index 0000000..5884a30 --- /dev/null +++ b/sdk/dotnet/Inputs/ExportRegistryArgs.cs @@ -0,0 +1,123 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class ExportRegistryArgs : global::Pulumi.ResourceArgs + { + [Input("annotations")] + private InputMap? _annotations; + + /// + /// Attach an arbitrary key/value annotation to the image. + /// + public InputMap Annotations + { + get => _annotations ?? (_annotations = new InputMap()); + set => _annotations = value; + } + + /// + /// The compression type to use. + /// + [Input("compression")] + public Input? Compression { get; set; } + + /// + /// Compression level from 0 to 22. + /// + [Input("compressionLevel")] + public Input? CompressionLevel { get; set; } + + /// + /// Name image with `prefix@<digest>`, used for anonymous images. + /// + [Input("danglingNamePrefix")] + public Input? DanglingNamePrefix { get; set; } + + /// + /// Forcefully apply compression. + /// + [Input("forceCompression")] + public Input? ForceCompression { get; set; } + + /// + /// Allow pushing to an insecure registry. + /// + [Input("insecure")] + public Input? Insecure { get; set; } + + /// + /// Add additional canonical name (`name@<digest>`). + /// + [Input("nameCanonical")] + public Input? NameCanonical { get; set; } + + [Input("names")] + private InputList? _names; + + /// + /// Specify images names to export. This is overridden if tags are already specified. + /// + public InputList Names + { + get => _names ?? (_names = new InputList()); + set => _names = value; + } + + /// + /// Use OCI media types in exporter manifests. + /// + [Input("ociMediaTypes")] + public Input? OciMediaTypes { get; set; } + + /// + /// Push after creating the image. Defaults to `true`. + /// + [Input("push")] + public Input? Push { get; set; } + + /// + /// Push image without name. + /// + [Input("pushByDigest")] + public Input? PushByDigest { get; set; } + + /// + /// Store resulting images to the worker's image store and ensure all of + /// its blobs are in the content store. + /// + /// Defaults to `true`. + /// + /// Ignored if the worker doesn't have image store (when using OCI workers, + /// for example). + /// + [Input("store")] + public Input? Store { get; set; } + + /// + /// Unpack image after creation (for use with containerd). Defaults to + /// `false`. + /// + [Input("unpack")] + public Input? Unpack { get; set; } + + public ExportRegistryArgs() + { + Compression = Pulumi.DockerBuild.CompressionType.Gzip; + CompressionLevel = 0; + ForceCompression = false; + OciMediaTypes = false; + Push = true; + Store = true; + } + public static new ExportRegistryArgs Empty => new ExportRegistryArgs(); + } +} diff --git a/sdk/dotnet/Inputs/ExportTarArgs.cs b/sdk/dotnet/Inputs/ExportTarArgs.cs new file mode 100644 index 0000000..376d4c9 --- /dev/null +++ b/sdk/dotnet/Inputs/ExportTarArgs.cs @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class ExportTarArgs : global::Pulumi.ResourceArgs + { + /// + /// Output path. + /// + [Input("dest", required: true)] + public Input Dest { get; set; } = null!; + + public ExportTarArgs() + { + } + public static new ExportTarArgs Empty => new ExportTarArgs(); + } +} diff --git a/sdk/dotnet/Inputs/RegistryArgs.cs b/sdk/dotnet/Inputs/RegistryArgs.cs new file mode 100644 index 0000000..d058be0 --- /dev/null +++ b/sdk/dotnet/Inputs/RegistryArgs.cs @@ -0,0 +1,48 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class RegistryArgs : global::Pulumi.ResourceArgs + { + /// + /// The registry's address (e.g. "docker.io"). + /// + [Input("address", required: true)] + public Input Address { get; set; } = null!; + + [Input("password")] + private Input? _password; + + /// + /// Password or token for the registry. + /// + public Input? Password + { + get => _password; + set + { + var emptySecret = Output.CreateSecret(0); + _password = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); + } + } + + /// + /// Username for the registry. + /// + [Input("username")] + public Input? Username { get; set; } + + public RegistryArgs() + { + } + public static new RegistryArgs Empty => new RegistryArgs(); + } +} diff --git a/sdk/dotnet/Inputs/SSHArgs.cs b/sdk/dotnet/Inputs/SSHArgs.cs new file mode 100644 index 0000000..c9def6e --- /dev/null +++ b/sdk/dotnet/Inputs/SSHArgs.cs @@ -0,0 +1,48 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Inputs +{ + + public sealed class SSHArgs : global::Pulumi.ResourceArgs + { + /// + /// Useful for distinguishing different servers that are part of the same + /// build. + /// + /// A value of `default` is appropriate if only dealing with a single host. + /// + [Input("id", required: true)] + public Input Id { get; set; } = null!; + + [Input("paths")] + private InputList? _paths; + + /// + /// SSH agent socket or private keys to expose to the build under the given + /// identifier. + /// + /// Defaults to `[$SSH_AUTH_SOCK]`. + /// + /// Note that your keys are **not** automatically added when using an + /// agent. Run `ssh-add -l` locally to confirm which public keys are + /// visible to the agent; these will be exposed to your build. + /// + public InputList Paths + { + get => _paths ?? (_paths = new InputList()); + set => _paths = value; + } + + public SSHArgs() + { + } + public static new SSHArgs Empty => new SSHArgs(); + } +} diff --git a/sdk/dotnet/Outputs/BuildContext.cs b/sdk/dotnet/Outputs/BuildContext.cs new file mode 100644 index 0000000..db1e183 --- /dev/null +++ b/sdk/dotnet/Outputs/BuildContext.cs @@ -0,0 +1,47 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class BuildContext + { + /// + /// Resources to use for build context. + /// + /// The location can be: + /// * A relative or absolute path to a local directory (`.`, `./app`, + /// `/app`, etc.). + /// * A remote URL of a Git repository, tarball, or plain text file + /// (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + /// etc.). + /// + public readonly string Location; + /// + /// Additional build contexts to use. + /// + /// These contexts are accessed with `FROM name` or `--from=name` + /// statements when using Dockerfile 1.4+ syntax. + /// + /// Values can be local paths, HTTP URLs, or `docker-image://` images. + /// + public readonly ImmutableDictionary? Named; + + [OutputConstructor] + private BuildContext( + string location, + + ImmutableDictionary? named) + { + Location = location; + Named = named; + } + } +} diff --git a/sdk/dotnet/Outputs/BuilderConfig.cs b/sdk/dotnet/Outputs/BuilderConfig.cs new file mode 100644 index 0000000..9504359 --- /dev/null +++ b/sdk/dotnet/Outputs/BuilderConfig.cs @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class BuilderConfig + { + /// + /// Name of an existing buildx builder to use. + /// + /// Only `docker-container`, `kubernetes`, or `remote` drivers are + /// supported. The legacy `docker` driver is not supported. + /// + /// Equivalent to Docker's `--builder` flag. + /// + public readonly string? Name; + + [OutputConstructor] + private BuilderConfig(string? name) + { + Name = name; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheFrom.cs b/sdk/dotnet/Outputs/CacheFrom.cs new file mode 100644 index 0000000..def5872 --- /dev/null +++ b/sdk/dotnet/Outputs/CacheFrom.cs @@ -0,0 +1,75 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheFrom + { + /// + /// Upload build caches to Azure's blob storage service. + /// + public readonly Outputs.CacheFromAzureBlob? Azblob; + /// + /// When `true` this entry will be excluded. Defaults to `false`. + /// + public readonly bool? Disabled; + /// + /// Recommended for use with GitHub Actions workflows. + /// + /// An action like `crazy-max/ghaction-github-runtime` is recommended to + /// expose appropriate credentials to your GitHub workflow. + /// + public readonly Outputs.CacheFromGitHubActions? Gha; + /// + /// A simple backend which caches images on your local filesystem. + /// + public readonly Outputs.CacheFromLocal? Local; + /// + /// A raw string as you would provide it to the Docker CLI (e.g., + /// `type=inline`). + /// + public readonly string? Raw; + /// + /// Upload build caches to remote registries. + /// + public readonly Outputs.CacheFromRegistry? Registry; + /// + /// Upload build caches to AWS S3 or an S3-compatible services such as + /// MinIO. + /// + public readonly Outputs.CacheFromS3? S3; + + [OutputConstructor] + private CacheFrom( + Outputs.CacheFromAzureBlob? azblob, + + bool? disabled, + + Outputs.CacheFromGitHubActions? gha, + + Outputs.CacheFromLocal? local, + + string? raw, + + Outputs.CacheFromRegistry? registry, + + Outputs.CacheFromS3? s3) + { + Azblob = azblob; + Disabled = disabled; + Gha = gha; + Local = local; + Raw = raw; + Registry = registry; + S3 = s3; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheFromAzureBlob.cs b/sdk/dotnet/Outputs/CacheFromAzureBlob.cs new file mode 100644 index 0000000..5f14148 --- /dev/null +++ b/sdk/dotnet/Outputs/CacheFromAzureBlob.cs @@ -0,0 +1,42 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheFromAzureBlob + { + /// + /// Base URL of the storage account. + /// + public readonly string? AccountUrl; + /// + /// The name of the cache image. + /// + public readonly string Name; + /// + /// Blob storage account key. + /// + public readonly string? SecretAccessKey; + + [OutputConstructor] + private CacheFromAzureBlob( + string? accountUrl, + + string name, + + string? secretAccessKey) + { + AccountUrl = accountUrl; + Name = name; + SecretAccessKey = secretAccessKey; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheFromGitHubActions.cs b/sdk/dotnet/Outputs/CacheFromGitHubActions.cs new file mode 100644 index 0000000..4501da8 --- /dev/null +++ b/sdk/dotnet/Outputs/CacheFromGitHubActions.cs @@ -0,0 +1,54 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheFromGitHubActions + { + /// + /// The scope to use for cache keys. Defaults to `buildkit`. + /// + /// This should be set if building and caching multiple images in one + /// workflow, otherwise caches will overwrite each other. + /// + public readonly string? Scope; + /// + /// The GitHub Actions token to use. This is not a personal access tokens + /// and is typically generated automatically as part of each job. + /// + /// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + /// `crazy-max/ghaction-github-runtime` is recommended to expose this + /// environment variable to your jobs. + /// + public readonly string? Token; + /// + /// The cache server URL to use for artifacts. + /// + /// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + /// `crazy-max/ghaction-github-runtime` is recommended to expose this + /// environment variable to your jobs. + /// + public readonly string? Url; + + [OutputConstructor] + private CacheFromGitHubActions( + string? scope, + + string? token, + + string? url) + { + Scope = scope; + Token = token; + Url = url; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheFromLocal.cs b/sdk/dotnet/Outputs/CacheFromLocal.cs new file mode 100644 index 0000000..dca9d07 --- /dev/null +++ b/sdk/dotnet/Outputs/CacheFromLocal.cs @@ -0,0 +1,35 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheFromLocal + { + /// + /// Digest of manifest to import. + /// + public readonly string? Digest; + /// + /// Path of the local directory where cache gets imported from. + /// + public readonly string Src; + + [OutputConstructor] + private CacheFromLocal( + string? digest, + + string src) + { + Digest = digest; + Src = src; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheFromRegistry.cs b/sdk/dotnet/Outputs/CacheFromRegistry.cs new file mode 100644 index 0000000..0215928 --- /dev/null +++ b/sdk/dotnet/Outputs/CacheFromRegistry.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheFromRegistry + { + /// + /// Fully qualified name of the cache image to import. + /// + public readonly string Ref; + + [OutputConstructor] + private CacheFromRegistry(string @ref) + { + Ref = @ref; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheFromS3.cs b/sdk/dotnet/Outputs/CacheFromS3.cs new file mode 100644 index 0000000..4e62d0d --- /dev/null +++ b/sdk/dotnet/Outputs/CacheFromS3.cs @@ -0,0 +1,91 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheFromS3 + { + /// + /// Defaults to `$AWS_ACCESS_KEY_ID`. + /// + public readonly string? AccessKeyId; + /// + /// Prefix to prepend to blob filenames. + /// + public readonly string? BlobsPrefix; + /// + /// Name of the S3 bucket. + /// + public readonly string Bucket; + /// + /// Endpoint of the S3 bucket. + /// + public readonly string? EndpointUrl; + /// + /// Prefix to prepend on manifest filenames. + /// + public readonly string? ManifestsPrefix; + /// + /// Name of the cache image. + /// + public readonly string? Name; + /// + /// The geographic location of the bucket. Defaults to `$AWS_REGION`. + /// + public readonly string Region; + /// + /// Defaults to `$AWS_SECRET_ACCESS_KEY`. + /// + public readonly string? SecretAccessKey; + /// + /// Defaults to `$AWS_SESSION_TOKEN`. + /// + public readonly string? SessionToken; + /// + /// Uses `bucket` in the URL instead of hostname when `true`. + /// + public readonly bool? UsePathStyle; + + [OutputConstructor] + private CacheFromS3( + string? accessKeyId, + + string? blobsPrefix, + + string bucket, + + string? endpointUrl, + + string? manifestsPrefix, + + string? name, + + string region, + + string? secretAccessKey, + + string? sessionToken, + + bool? usePathStyle) + { + AccessKeyId = accessKeyId; + BlobsPrefix = blobsPrefix; + Bucket = bucket; + EndpointUrl = endpointUrl; + ManifestsPrefix = manifestsPrefix; + Name = name; + Region = region; + SecretAccessKey = secretAccessKey; + SessionToken = sessionToken; + UsePathStyle = usePathStyle; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheTo.cs b/sdk/dotnet/Outputs/CacheTo.cs new file mode 100644 index 0000000..7a2aa23 --- /dev/null +++ b/sdk/dotnet/Outputs/CacheTo.cs @@ -0,0 +1,84 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheTo + { + /// + /// Push cache to Azure's blob storage service. + /// + public readonly Outputs.CacheToAzureBlob? Azblob; + /// + /// When `true` this entry will be excluded. Defaults to `false`. + /// + public readonly bool? Disabled; + /// + /// Recommended for use with GitHub Actions workflows. + /// + /// An action like `crazy-max/ghaction-github-runtime` is recommended to + /// expose appropriate credentials to your GitHub workflow. + /// + public readonly Outputs.CacheToGitHubActions? Gha; + /// + /// The inline cache storage backend is the simplest implementation to get + /// started with, but it does not handle multi-stage builds. Consider the + /// `registry` cache backend instead. + /// + public readonly Outputs.CacheToInline? Inline; + /// + /// A simple backend which caches imagines on your local filesystem. + /// + public readonly Outputs.CacheToLocal? Local; + /// + /// A raw string as you would provide it to the Docker CLI (e.g., + /// `type=inline`) + /// + public readonly string? Raw; + /// + /// Push caches to remote registries. Incompatible with the `docker` build + /// driver. + /// + public readonly Outputs.CacheToRegistry? Registry; + /// + /// Push cache to AWS S3 or S3-compatible services such as MinIO. + /// + public readonly Outputs.CacheToS3? S3; + + [OutputConstructor] + private CacheTo( + Outputs.CacheToAzureBlob? azblob, + + bool? disabled, + + Outputs.CacheToGitHubActions? gha, + + Outputs.CacheToInline? inline, + + Outputs.CacheToLocal? local, + + string? raw, + + Outputs.CacheToRegistry? registry, + + Outputs.CacheToS3? s3) + { + Azblob = azblob; + Disabled = disabled; + Gha = gha; + Inline = inline; + Local = local; + Raw = raw; + Registry = registry; + S3 = s3; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheToAzureBlob.cs b/sdk/dotnet/Outputs/CacheToAzureBlob.cs new file mode 100644 index 0000000..25cb62e --- /dev/null +++ b/sdk/dotnet/Outputs/CacheToAzureBlob.cs @@ -0,0 +1,56 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheToAzureBlob + { + /// + /// Base URL of the storage account. + /// + public readonly string? AccountUrl; + /// + /// Ignore errors caused by failed cache exports. + /// + public readonly bool? IgnoreError; + /// + /// The cache mode to use. Defaults to `min`. + /// + public readonly Pulumi.DockerBuild.CacheMode? Mode; + /// + /// The name of the cache image. + /// + public readonly string Name; + /// + /// Blob storage account key. + /// + public readonly string? SecretAccessKey; + + [OutputConstructor] + private CacheToAzureBlob( + string? accountUrl, + + bool? ignoreError, + + Pulumi.DockerBuild.CacheMode? mode, + + string name, + + string? secretAccessKey) + { + AccountUrl = accountUrl; + IgnoreError = ignoreError; + Mode = mode; + Name = name; + SecretAccessKey = secretAccessKey; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheToGitHubActions.cs b/sdk/dotnet/Outputs/CacheToGitHubActions.cs new file mode 100644 index 0000000..a280288 --- /dev/null +++ b/sdk/dotnet/Outputs/CacheToGitHubActions.cs @@ -0,0 +1,68 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheToGitHubActions + { + /// + /// Ignore errors caused by failed cache exports. + /// + public readonly bool? IgnoreError; + /// + /// The cache mode to use. Defaults to `min`. + /// + public readonly Pulumi.DockerBuild.CacheMode? Mode; + /// + /// The scope to use for cache keys. Defaults to `buildkit`. + /// + /// This should be set if building and caching multiple images in one + /// workflow, otherwise caches will overwrite each other. + /// + public readonly string? Scope; + /// + /// The GitHub Actions token to use. This is not a personal access tokens + /// and is typically generated automatically as part of each job. + /// + /// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + /// `crazy-max/ghaction-github-runtime` is recommended to expose this + /// environment variable to your jobs. + /// + public readonly string? Token; + /// + /// The cache server URL to use for artifacts. + /// + /// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + /// `crazy-max/ghaction-github-runtime` is recommended to expose this + /// environment variable to your jobs. + /// + public readonly string? Url; + + [OutputConstructor] + private CacheToGitHubActions( + bool? ignoreError, + + Pulumi.DockerBuild.CacheMode? mode, + + string? scope, + + string? token, + + string? url) + { + IgnoreError = ignoreError; + Mode = mode; + Scope = scope; + Token = token; + Url = url; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheToInline.cs b/sdk/dotnet/Outputs/CacheToInline.cs new file mode 100644 index 0000000..4a37cd5 --- /dev/null +++ b/sdk/dotnet/Outputs/CacheToInline.cs @@ -0,0 +1,24 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + /// + /// Include an inline cache with the exported image. + /// + [OutputType] + public sealed class CacheToInline + { + [OutputConstructor] + private CacheToInline() + { + } + } +} diff --git a/sdk/dotnet/Outputs/CacheToLocal.cs b/sdk/dotnet/Outputs/CacheToLocal.cs new file mode 100644 index 0000000..23ee20f --- /dev/null +++ b/sdk/dotnet/Outputs/CacheToLocal.cs @@ -0,0 +1,63 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheToLocal + { + /// + /// The compression type to use. + /// + public readonly Pulumi.DockerBuild.CompressionType? Compression; + /// + /// Compression level from 0 to 22. + /// + public readonly int? CompressionLevel; + /// + /// Path of the local directory to export the cache. + /// + public readonly string Dest; + /// + /// Forcefully apply compression. + /// + public readonly bool? ForceCompression; + /// + /// Ignore errors caused by failed cache exports. + /// + public readonly bool? IgnoreError; + /// + /// The cache mode to use. Defaults to `min`. + /// + public readonly Pulumi.DockerBuild.CacheMode? Mode; + + [OutputConstructor] + private CacheToLocal( + Pulumi.DockerBuild.CompressionType? compression, + + int? compressionLevel, + + string dest, + + bool? forceCompression, + + bool? ignoreError, + + Pulumi.DockerBuild.CacheMode? mode) + { + Compression = compression; + CompressionLevel = compressionLevel; + Dest = dest; + ForceCompression = forceCompression; + IgnoreError = ignoreError; + Mode = mode; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheToRegistry.cs b/sdk/dotnet/Outputs/CacheToRegistry.cs new file mode 100644 index 0000000..f8197a6 --- /dev/null +++ b/sdk/dotnet/Outputs/CacheToRegistry.cs @@ -0,0 +1,84 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheToRegistry + { + /// + /// The compression type to use. + /// + public readonly Pulumi.DockerBuild.CompressionType? Compression; + /// + /// Compression level from 0 to 22. + /// + public readonly int? CompressionLevel; + /// + /// Forcefully apply compression. + /// + public readonly bool? ForceCompression; + /// + /// Ignore errors caused by failed cache exports. + /// + public readonly bool? IgnoreError; + /// + /// Export cache manifest as an OCI-compatible image manifest instead of a + /// manifest list. Requires `ociMediaTypes` to also be `true`. + /// + /// Some registries like AWS ECR will not work with caching if this is + /// `false`. + /// + /// Defaults to `false` to match Docker's default behavior. + /// + public readonly bool? ImageManifest; + /// + /// The cache mode to use. Defaults to `min`. + /// + public readonly Pulumi.DockerBuild.CacheMode? Mode; + /// + /// Whether to use OCI media types in exported manifests. Defaults to + /// `true`. + /// + public readonly bool? OciMediaTypes; + /// + /// Fully qualified name of the cache image to import. + /// + public readonly string Ref; + + [OutputConstructor] + private CacheToRegistry( + Pulumi.DockerBuild.CompressionType? compression, + + int? compressionLevel, + + bool? forceCompression, + + bool? ignoreError, + + bool? imageManifest, + + Pulumi.DockerBuild.CacheMode? mode, + + bool? ociMediaTypes, + + string @ref) + { + Compression = compression; + CompressionLevel = compressionLevel; + ForceCompression = forceCompression; + IgnoreError = ignoreError; + ImageManifest = imageManifest; + Mode = mode; + OciMediaTypes = ociMediaTypes; + Ref = @ref; + } + } +} diff --git a/sdk/dotnet/Outputs/CacheToS3.cs b/sdk/dotnet/Outputs/CacheToS3.cs new file mode 100644 index 0000000..b6c94ca --- /dev/null +++ b/sdk/dotnet/Outputs/CacheToS3.cs @@ -0,0 +1,105 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class CacheToS3 + { + /// + /// Defaults to `$AWS_ACCESS_KEY_ID`. + /// + public readonly string? AccessKeyId; + /// + /// Prefix to prepend to blob filenames. + /// + public readonly string? BlobsPrefix; + /// + /// Name of the S3 bucket. + /// + public readonly string Bucket; + /// + /// Endpoint of the S3 bucket. + /// + public readonly string? EndpointUrl; + /// + /// Ignore errors caused by failed cache exports. + /// + public readonly bool? IgnoreError; + /// + /// Prefix to prepend on manifest filenames. + /// + public readonly string? ManifestsPrefix; + /// + /// The cache mode to use. Defaults to `min`. + /// + public readonly Pulumi.DockerBuild.CacheMode? Mode; + /// + /// Name of the cache image. + /// + public readonly string? Name; + /// + /// The geographic location of the bucket. Defaults to `$AWS_REGION`. + /// + public readonly string Region; + /// + /// Defaults to `$AWS_SECRET_ACCESS_KEY`. + /// + public readonly string? SecretAccessKey; + /// + /// Defaults to `$AWS_SESSION_TOKEN`. + /// + public readonly string? SessionToken; + /// + /// Uses `bucket` in the URL instead of hostname when `true`. + /// + public readonly bool? UsePathStyle; + + [OutputConstructor] + private CacheToS3( + string? accessKeyId, + + string? blobsPrefix, + + string bucket, + + string? endpointUrl, + + bool? ignoreError, + + string? manifestsPrefix, + + Pulumi.DockerBuild.CacheMode? mode, + + string? name, + + string region, + + string? secretAccessKey, + + string? sessionToken, + + bool? usePathStyle) + { + AccessKeyId = accessKeyId; + BlobsPrefix = blobsPrefix; + Bucket = bucket; + EndpointUrl = endpointUrl; + IgnoreError = ignoreError; + ManifestsPrefix = manifestsPrefix; + Mode = mode; + Name = name; + Region = region; + SecretAccessKey = secretAccessKey; + SessionToken = sessionToken; + UsePathStyle = usePathStyle; + } + } +} diff --git a/sdk/dotnet/Outputs/Context.cs b/sdk/dotnet/Outputs/Context.cs new file mode 100644 index 0000000..afd954d --- /dev/null +++ b/sdk/dotnet/Outputs/Context.cs @@ -0,0 +1,34 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class Context + { + /// + /// Resources to use for build context. + /// + /// The location can be: + /// * A relative or absolute path to a local directory (`.`, `./app`, + /// `/app`, etc.). + /// * A remote URL of a Git repository, tarball, or plain text file + /// (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + /// etc.). + /// + public readonly string Location; + + [OutputConstructor] + private Context(string location) + { + Location = location; + } + } +} diff --git a/sdk/dotnet/Outputs/Dockerfile.cs b/sdk/dotnet/Outputs/Dockerfile.cs new file mode 100644 index 0000000..141e32d --- /dev/null +++ b/sdk/dotnet/Outputs/Dockerfile.cs @@ -0,0 +1,45 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class Dockerfile + { + /// + /// Raw Dockerfile contents. + /// + /// Conflicts with `location`. + /// + /// Equivalent to invoking Docker with `-f -`. + /// + public readonly string? Inline; + /// + /// Location of the Dockerfile to use. + /// + /// Can be a relative or absolute path to a local file, or a remote URL. + /// + /// Defaults to `${context.location}/Dockerfile` if context is on-disk. + /// + /// Conflicts with `inline`. + /// + public readonly string? Location; + + [OutputConstructor] + private Dockerfile( + string? inline, + + string? location) + { + Inline = inline; + Location = location; + } + } +} diff --git a/sdk/dotnet/Outputs/Export.cs b/sdk/dotnet/Outputs/Export.cs new file mode 100644 index 0000000..2620d7e --- /dev/null +++ b/sdk/dotnet/Outputs/Export.cs @@ -0,0 +1,86 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class Export + { + /// + /// A no-op export. Helpful for silencing the 'no exports' warning if you + /// just want to populate caches. + /// + public readonly Outputs.ExportCacheOnly? Cacheonly; + /// + /// When `true` this entry will be excluded. Defaults to `false`. + /// + public readonly bool? Disabled; + /// + /// Export as a Docker image layout. + /// + public readonly Outputs.ExportDocker? Docker; + /// + /// Outputs the build result into a container image format. + /// + public readonly Outputs.ExportImage? Image; + /// + /// Export to a local directory as files and directories. + /// + public readonly Outputs.ExportLocal? Local; + /// + /// Identical to the Docker exporter but uses OCI media types by default. + /// + public readonly Outputs.ExportOCI? Oci; + /// + /// A raw string as you would provide it to the Docker CLI (e.g., + /// `type=docker`) + /// + public readonly string? Raw; + /// + /// Identical to the Image exporter, but pushes by default. + /// + public readonly Outputs.ExportRegistry? Registry; + /// + /// Export to a local directory as a tarball. + /// + public readonly Outputs.ExportTar? Tar; + + [OutputConstructor] + private Export( + Outputs.ExportCacheOnly? cacheonly, + + bool? disabled, + + Outputs.ExportDocker? docker, + + Outputs.ExportImage? image, + + Outputs.ExportLocal? local, + + Outputs.ExportOCI? oci, + + string? raw, + + Outputs.ExportRegistry? registry, + + Outputs.ExportTar? tar) + { + Cacheonly = cacheonly; + Disabled = disabled; + Docker = docker; + Image = image; + Local = local; + Oci = oci; + Raw = raw; + Registry = registry; + Tar = tar; + } + } +} diff --git a/sdk/dotnet/Outputs/ExportCacheOnly.cs b/sdk/dotnet/Outputs/ExportCacheOnly.cs new file mode 100644 index 0000000..74eb8df --- /dev/null +++ b/sdk/dotnet/Outputs/ExportCacheOnly.cs @@ -0,0 +1,21 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class ExportCacheOnly + { + [OutputConstructor] + private ExportCacheOnly() + { + } + } +} diff --git a/sdk/dotnet/Outputs/ExportDocker.cs b/sdk/dotnet/Outputs/ExportDocker.cs new file mode 100644 index 0000000..e6f7723 --- /dev/null +++ b/sdk/dotnet/Outputs/ExportDocker.cs @@ -0,0 +1,77 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class ExportDocker + { + /// + /// Attach an arbitrary key/value annotation to the image. + /// + public readonly ImmutableDictionary? Annotations; + /// + /// The compression type to use. + /// + public readonly Pulumi.DockerBuild.CompressionType? Compression; + /// + /// Compression level from 0 to 22. + /// + public readonly int? CompressionLevel; + /// + /// The local export path. + /// + public readonly string? Dest; + /// + /// Forcefully apply compression. + /// + public readonly bool? ForceCompression; + /// + /// Specify images names to export. This is overridden if tags are already specified. + /// + public readonly ImmutableArray Names; + /// + /// Use OCI media types in exporter manifests. + /// + public readonly bool? OciMediaTypes; + /// + /// Bundle the output into a tarball layout. + /// + public readonly bool? Tar; + + [OutputConstructor] + private ExportDocker( + ImmutableDictionary? annotations, + + Pulumi.DockerBuild.CompressionType? compression, + + int? compressionLevel, + + string? dest, + + bool? forceCompression, + + ImmutableArray names, + + bool? ociMediaTypes, + + bool? tar) + { + Annotations = annotations; + Compression = compression; + CompressionLevel = compressionLevel; + Dest = dest; + ForceCompression = forceCompression; + Names = names; + OciMediaTypes = ociMediaTypes; + Tar = tar; + } + } +} diff --git a/sdk/dotnet/Outputs/ExportImage.cs b/sdk/dotnet/Outputs/ExportImage.cs new file mode 100644 index 0000000..f6fee83 --- /dev/null +++ b/sdk/dotnet/Outputs/ExportImage.cs @@ -0,0 +1,119 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class ExportImage + { + /// + /// Attach an arbitrary key/value annotation to the image. + /// + public readonly ImmutableDictionary? Annotations; + /// + /// The compression type to use. + /// + public readonly Pulumi.DockerBuild.CompressionType? Compression; + /// + /// Compression level from 0 to 22. + /// + public readonly int? CompressionLevel; + /// + /// Name image with `prefix@<digest>`, used for anonymous images. + /// + public readonly string? DanglingNamePrefix; + /// + /// Forcefully apply compression. + /// + public readonly bool? ForceCompression; + /// + /// Allow pushing to an insecure registry. + /// + public readonly bool? Insecure; + /// + /// Add additional canonical name (`name@<digest>`). + /// + public readonly bool? NameCanonical; + /// + /// Specify images names to export. This is overridden if tags are already specified. + /// + public readonly ImmutableArray Names; + /// + /// Use OCI media types in exporter manifests. + /// + public readonly bool? OciMediaTypes; + /// + /// Push after creating the image. Defaults to `false`. + /// + public readonly bool? Push; + /// + /// Push image without name. + /// + public readonly bool? PushByDigest; + /// + /// Store resulting images to the worker's image store and ensure all of + /// its blobs are in the content store. + /// + /// Defaults to `true`. + /// + /// Ignored if the worker doesn't have image store (when using OCI workers, + /// for example). + /// + public readonly bool? Store; + /// + /// Unpack image after creation (for use with containerd). Defaults to + /// `false`. + /// + public readonly bool? Unpack; + + [OutputConstructor] + private ExportImage( + ImmutableDictionary? annotations, + + Pulumi.DockerBuild.CompressionType? compression, + + int? compressionLevel, + + string? danglingNamePrefix, + + bool? forceCompression, + + bool? insecure, + + bool? nameCanonical, + + ImmutableArray names, + + bool? ociMediaTypes, + + bool? push, + + bool? pushByDigest, + + bool? store, + + bool? unpack) + { + Annotations = annotations; + Compression = compression; + CompressionLevel = compressionLevel; + DanglingNamePrefix = danglingNamePrefix; + ForceCompression = forceCompression; + Insecure = insecure; + NameCanonical = nameCanonical; + Names = names; + OciMediaTypes = ociMediaTypes; + Push = push; + PushByDigest = pushByDigest; + Store = store; + Unpack = unpack; + } + } +} diff --git a/sdk/dotnet/Outputs/ExportLocal.cs b/sdk/dotnet/Outputs/ExportLocal.cs new file mode 100644 index 0000000..3612deb --- /dev/null +++ b/sdk/dotnet/Outputs/ExportLocal.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class ExportLocal + { + /// + /// Output path. + /// + public readonly string Dest; + + [OutputConstructor] + private ExportLocal(string dest) + { + Dest = dest; + } + } +} diff --git a/sdk/dotnet/Outputs/ExportOCI.cs b/sdk/dotnet/Outputs/ExportOCI.cs new file mode 100644 index 0000000..14dd1d6 --- /dev/null +++ b/sdk/dotnet/Outputs/ExportOCI.cs @@ -0,0 +1,77 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class ExportOCI + { + /// + /// Attach an arbitrary key/value annotation to the image. + /// + public readonly ImmutableDictionary? Annotations; + /// + /// The compression type to use. + /// + public readonly Pulumi.DockerBuild.CompressionType? Compression; + /// + /// Compression level from 0 to 22. + /// + public readonly int? CompressionLevel; + /// + /// The local export path. + /// + public readonly string? Dest; + /// + /// Forcefully apply compression. + /// + public readonly bool? ForceCompression; + /// + /// Specify images names to export. This is overridden if tags are already specified. + /// + public readonly ImmutableArray Names; + /// + /// Use OCI media types in exporter manifests. + /// + public readonly bool? OciMediaTypes; + /// + /// Bundle the output into a tarball layout. + /// + public readonly bool? Tar; + + [OutputConstructor] + private ExportOCI( + ImmutableDictionary? annotations, + + Pulumi.DockerBuild.CompressionType? compression, + + int? compressionLevel, + + string? dest, + + bool? forceCompression, + + ImmutableArray names, + + bool? ociMediaTypes, + + bool? tar) + { + Annotations = annotations; + Compression = compression; + CompressionLevel = compressionLevel; + Dest = dest; + ForceCompression = forceCompression; + Names = names; + OciMediaTypes = ociMediaTypes; + Tar = tar; + } + } +} diff --git a/sdk/dotnet/Outputs/ExportRegistry.cs b/sdk/dotnet/Outputs/ExportRegistry.cs new file mode 100644 index 0000000..6a96dc8 --- /dev/null +++ b/sdk/dotnet/Outputs/ExportRegistry.cs @@ -0,0 +1,119 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class ExportRegistry + { + /// + /// Attach an arbitrary key/value annotation to the image. + /// + public readonly ImmutableDictionary? Annotations; + /// + /// The compression type to use. + /// + public readonly Pulumi.DockerBuild.CompressionType? Compression; + /// + /// Compression level from 0 to 22. + /// + public readonly int? CompressionLevel; + /// + /// Name image with `prefix@<digest>`, used for anonymous images. + /// + public readonly string? DanglingNamePrefix; + /// + /// Forcefully apply compression. + /// + public readonly bool? ForceCompression; + /// + /// Allow pushing to an insecure registry. + /// + public readonly bool? Insecure; + /// + /// Add additional canonical name (`name@<digest>`). + /// + public readonly bool? NameCanonical; + /// + /// Specify images names to export. This is overridden if tags are already specified. + /// + public readonly ImmutableArray Names; + /// + /// Use OCI media types in exporter manifests. + /// + public readonly bool? OciMediaTypes; + /// + /// Push after creating the image. Defaults to `true`. + /// + public readonly bool? Push; + /// + /// Push image without name. + /// + public readonly bool? PushByDigest; + /// + /// Store resulting images to the worker's image store and ensure all of + /// its blobs are in the content store. + /// + /// Defaults to `true`. + /// + /// Ignored if the worker doesn't have image store (when using OCI workers, + /// for example). + /// + public readonly bool? Store; + /// + /// Unpack image after creation (for use with containerd). Defaults to + /// `false`. + /// + public readonly bool? Unpack; + + [OutputConstructor] + private ExportRegistry( + ImmutableDictionary? annotations, + + Pulumi.DockerBuild.CompressionType? compression, + + int? compressionLevel, + + string? danglingNamePrefix, + + bool? forceCompression, + + bool? insecure, + + bool? nameCanonical, + + ImmutableArray names, + + bool? ociMediaTypes, + + bool? push, + + bool? pushByDigest, + + bool? store, + + bool? unpack) + { + Annotations = annotations; + Compression = compression; + CompressionLevel = compressionLevel; + DanglingNamePrefix = danglingNamePrefix; + ForceCompression = forceCompression; + Insecure = insecure; + NameCanonical = nameCanonical; + Names = names; + OciMediaTypes = ociMediaTypes; + Push = push; + PushByDigest = pushByDigest; + Store = store; + Unpack = unpack; + } + } +} diff --git a/sdk/dotnet/Outputs/ExportTar.cs b/sdk/dotnet/Outputs/ExportTar.cs new file mode 100644 index 0000000..8bba255 --- /dev/null +++ b/sdk/dotnet/Outputs/ExportTar.cs @@ -0,0 +1,27 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class ExportTar + { + /// + /// Output path. + /// + public readonly string Dest; + + [OutputConstructor] + private ExportTar(string dest) + { + Dest = dest; + } + } +} diff --git a/sdk/dotnet/Outputs/Registry.cs b/sdk/dotnet/Outputs/Registry.cs new file mode 100644 index 0000000..2bf1996 --- /dev/null +++ b/sdk/dotnet/Outputs/Registry.cs @@ -0,0 +1,42 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class Registry + { + /// + /// The registry's address (e.g. "docker.io"). + /// + public readonly string Address; + /// + /// Password or token for the registry. + /// + public readonly string? Password; + /// + /// Username for the registry. + /// + public readonly string? Username; + + [OutputConstructor] + private Registry( + string address, + + string? password, + + string? username) + { + Address = address; + Password = password; + Username = username; + } + } +} diff --git a/sdk/dotnet/Outputs/SSH.cs b/sdk/dotnet/Outputs/SSH.cs new file mode 100644 index 0000000..b111110 --- /dev/null +++ b/sdk/dotnet/Outputs/SSH.cs @@ -0,0 +1,45 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Threading.Tasks; +using Pulumi.Serialization; + +namespace Pulumi.DockerBuild.Outputs +{ + + [OutputType] + public sealed class SSH + { + /// + /// Useful for distinguishing different servers that are part of the same + /// build. + /// + /// A value of `default` is appropriate if only dealing with a single host. + /// + public readonly string Id; + /// + /// SSH agent socket or private keys to expose to the build under the given + /// identifier. + /// + /// Defaults to `[$SSH_AUTH_SOCK]`. + /// + /// Note that your keys are **not** automatically added when using an + /// agent. Run `ssh-add -l` locally to confirm which public keys are + /// visible to the agent; these will be exposed to your build. + /// + public readonly ImmutableArray Paths; + + [OutputConstructor] + private SSH( + string id, + + ImmutableArray paths) + { + Id = id; + Paths = paths; + } + } +} diff --git a/sdk/dotnet/Provider.cs b/sdk/dotnet/Provider.cs index 7bdaa8a..3801824 100644 --- a/sdk/dotnet/Provider.cs +++ b/sdk/dotnet/Provider.cs @@ -7,11 +7,18 @@ using System.Collections.Immutable; using System.Threading.Tasks; using Pulumi.Serialization; -namespace Pulumi.Dockerbuild +namespace Pulumi.DockerBuild { - [DockerbuildResourceType("pulumi:providers:dockerbuild")] + [DockerBuildResourceType("pulumi:providers:docker-build")] public partial class Provider : global::Pulumi.ProviderResource { + /// + /// The build daemon's address. + /// + [Output("host")] + public Output Host { get; private set; } = null!; + + /// /// Create a Provider resource with the given unique name, arguments, and options. /// @@ -20,7 +27,7 @@ namespace Pulumi.Dockerbuild /// The arguments used to populate this resource's properties /// A bag of options that control this resource's behavior public Provider(string name, ProviderArgs? args = null, CustomResourceOptions? options = null) - : base("dockerbuild", name, args ?? new ProviderArgs(), MakeResourceOptions(options, "")) + : base("docker-build", name, args ?? new ProviderArgs(), MakeResourceOptions(options, "")) { } @@ -29,7 +36,6 @@ namespace Pulumi.Dockerbuild var defaultOptions = new CustomResourceOptions { Version = Utilities.Version, - PluginDownloadURL = "github.com/pulumi/pulumi-dockerbuild", }; var merged = CustomResourceOptions.Merge(defaultOptions, options); // Override the ID if one was specified for consistency with other language SDKs. @@ -40,8 +46,23 @@ namespace Pulumi.Dockerbuild public sealed class ProviderArgs : global::Pulumi.ResourceArgs { + /// + /// The build daemon's address. + /// + [Input("host")] + public Input? Host { get; set; } + + [Input("registries", json: true)] + private InputList? _registries; + public InputList Registries + { + get => _registries ?? (_registries = new InputList()); + set => _registries = value; + } + public ProviderArgs() { + Host = Utilities.GetEnv("DOCKER_HOST") ?? ""; } public static new ProviderArgs Empty => new ProviderArgs(); } diff --git a/sdk/dotnet/Pulumi.Dockerbuild.csproj b/sdk/dotnet/Pulumi.DockerBuild.csproj similarity index 83% rename from sdk/dotnet/Pulumi.Dockerbuild.csproj rename to sdk/dotnet/Pulumi.DockerBuild.csproj index f799e62..2e4fe71 100644 --- a/sdk/dotnet/Pulumi.Dockerbuild.csproj +++ b/sdk/dotnet/Pulumi.DockerBuild.csproj @@ -4,10 +4,10 @@ true pulumi pulumi - Description - - pulumi.com - https://github.com/pulumi/pulumi-dockerbuild + A Pulumi provider for building modern Docker images with buildx and BuildKit. + Apache-2.0 + https://pulumi.com + https://github.com/pulumi/pulumi-docker-build logo.png net6.0 diff --git a/sdk/dotnet/README.md b/sdk/dotnet/README.md index 6e37fcc..a778720 100644 --- a/sdk/dotnet/README.md +++ b/sdk/dotnet/README.md @@ -1 +1 @@ -Description +A Pulumi provider for building modern Docker images with buildx and BuildKit. diff --git a/sdk/dotnet/Random.cs b/sdk/dotnet/Random.cs deleted file mode 100644 index e23fdba..0000000 --- a/sdk/dotnet/Random.cs +++ /dev/null @@ -1,75 +0,0 @@ -// *** WARNING: this file was generated by pulumi. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -using System; -using System.Collections.Generic; -using System.Collections.Immutable; -using System.Threading.Tasks; -using Pulumi.Serialization; - -namespace Pulumi.Dockerbuild -{ - [DockerbuildResourceType("dockerbuild:index:Random")] - public partial class Random : global::Pulumi.CustomResource - { - [Output("length")] - public Output Length { get; private set; } = null!; - - [Output("result")] - public Output Result { get; private set; } = null!; - - - /// - /// Create a Random resource with the given unique name, arguments, and options. - /// - /// - /// The unique name of the resource - /// The arguments used to populate this resource's properties - /// A bag of options that control this resource's behavior - public Random(string name, RandomArgs args, CustomResourceOptions? options = null) - : base("dockerbuild:index:Random", name, args ?? new RandomArgs(), MakeResourceOptions(options, "")) - { - } - - private Random(string name, Input id, CustomResourceOptions? options = null) - : base("dockerbuild:index:Random", name, null, MakeResourceOptions(options, id)) - { - } - - private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input? id) - { - var defaultOptions = new CustomResourceOptions - { - Version = Utilities.Version, - PluginDownloadURL = "github.com/pulumi/pulumi-dockerbuild", - }; - var merged = CustomResourceOptions.Merge(defaultOptions, options); - // Override the ID if one was specified for consistency with other language SDKs. - merged.Id = id ?? merged.Id; - return merged; - } - /// - /// Get an existing Random resource's state with the given name, ID, and optional extra - /// properties used to qualify the lookup. - /// - /// - /// The unique name of the resulting resource. - /// The unique provider ID of the resource to lookup. - /// A bag of options that control this resource's behavior - public static Random Get(string name, Input id, CustomResourceOptions? options = null) - { - return new Random(name, id, options); - } - } - - public sealed class RandomArgs : global::Pulumi.ResourceArgs - { - [Input("length", required: true)] - public Input Length { get; set; } = null!; - - public RandomArgs() - { - } - public static new RandomArgs Empty => new RandomArgs(); - } -} diff --git a/sdk/dotnet/Utilities.cs b/sdk/dotnet/Utilities.cs index a1cb27d..41c642f 100644 --- a/sdk/dotnet/Utilities.cs +++ b/sdk/dotnet/Utilities.cs @@ -1,7 +1,7 @@ // *** WARNING: this file was generated by pulumi. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** -namespace Pulumi.Dockerbuild +namespace Pulumi.DockerBuild { static class Utilities { @@ -53,7 +53,6 @@ namespace Pulumi.Dockerbuild { var dst = src ?? new global::Pulumi.InvokeOptions{}; dst.Version = src?.Version ?? Version; - dst.PluginDownloadURL = src?.PluginDownloadURL ?? "github.com/pulumi/pulumi-dockerbuild"; return dst; } @@ -63,7 +62,7 @@ namespace Pulumi.Dockerbuild static Utilities() { var assembly = global::System.Reflection.IntrospectionExtensions.GetTypeInfo(typeof(Utilities)).Assembly; - using var stream = assembly.GetManifestResourceStream("Pulumi.Dockerbuild.version.txt"); + using var stream = assembly.GetManifestResourceStream("Pulumi.DockerBuild.version.txt"); using var reader = new global::System.IO.StreamReader(stream ?? throw new global::System.NotSupportedException("Missing embedded version.txt file")); version = reader.ReadToEnd().Trim(); var parts = version.Split("\n"); @@ -75,9 +74,9 @@ namespace Pulumi.Dockerbuild } } - internal sealed class DockerbuildResourceTypeAttribute : global::Pulumi.ResourceTypeAttribute + internal sealed class DockerBuildResourceTypeAttribute : global::Pulumi.ResourceTypeAttribute { - public DockerbuildResourceTypeAttribute(string type) : base(type, Utilities.Version) + public DockerBuildResourceTypeAttribute(string type) : base(type, Utilities.Version) { } } diff --git a/sdk/dotnet/pulumi-plugin.json b/sdk/dotnet/pulumi-plugin.json index e716637..4580097 100644 --- a/sdk/dotnet/pulumi-plugin.json +++ b/sdk/dotnet/pulumi-plugin.json @@ -1,5 +1,4 @@ { "resource": true, - "name": "dockerbuild", - "server": "github.com/pulumi/pulumi-dockerbuild" + "name": "docker-build" } diff --git a/sdk/go/dockerbuild/config/config.go b/sdk/go/dockerbuild/config/config.go new file mode 100644 index 0000000..26bba90 --- /dev/null +++ b/sdk/go/dockerbuild/config/config.go @@ -0,0 +1,28 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package config + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +) + +var _ = internal.GetEnvOrDefault + +// The build daemon's address. +func GetHost(ctx *pulumi.Context) string { + v, err := config.Try(ctx, "docker-build:host") + if err == nil { + return v + } + var value string + if d := internal.GetEnvOrDefault("", nil, "DOCKER_HOST"); d != nil { + value = d.(string) + } + return value +} +func GetRegistries(ctx *pulumi.Context) string { + return config.Get(ctx, "docker-build:registries") +} diff --git a/sdk/go/dockerbuild/doc.go b/sdk/go/dockerbuild/doc.go index 3fd0b80..e798e27 100644 --- a/sdk/go/dockerbuild/doc.go +++ b/sdk/go/dockerbuild/doc.go @@ -1,2 +1,2 @@ -// Description +// A Pulumi provider for building modern Docker images with buildx and BuildKit. package dockerbuild diff --git a/sdk/go/dockerbuild/go.mod b/sdk/go/dockerbuild/go.mod index 37ef1a6..16f8b0e 100644 --- a/sdk/go/dockerbuild/go.mod +++ b/sdk/go/dockerbuild/go.mod @@ -1,10 +1,10 @@ -module github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild +module github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild go 1.21.7 require ( github.com/blang/semver v3.5.1+incompatible - github.com/pulumi/pulumi/sdk/v3 v3.111.1 + github.com/pulumi/pulumi/sdk/v3 v3.113.0 ) require ( @@ -21,27 +21,30 @@ require ( github.com/charmbracelet/lipgloss v0.7.1 // indirect github.com/cheggaaa/pb v1.0.29 // indirect github.com/cloudflare/circl v1.3.7 // indirect - github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect + github.com/containerd/console v1.0.4 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/djherbis/times v1.5.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect + github.com/fatih/color v1.16.0 // indirect + github.com/frankban/quicktest v1.14.6 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-git/go-git/v5 v5.11.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.2 // indirect + github.com/golang/glog v1.2.0 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.3 // indirect - github.com/google/uuid v1.4.0 // indirect + github.com/golang/protobuf v1.5.4 // indirect + github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/hcl/v2 v2.18.0 // indirect + github.com/hashicorp/hcl/v2 v2.19.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.15 // indirect github.com/mitchellh/go-ps v1.0.0 // indirect @@ -50,6 +53,7 @@ require ( github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/reflow v0.3.0 // indirect github.com/muesli/termenv v0.15.2 // indirect + github.com/onsi/gomega v1.31.1 // indirect github.com/opentracing/basictracer-go v1.1.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/pgavlin/fx v0.1.6 // indirect @@ -59,33 +63,34 @@ require ( github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 // indirect github.com/pulumi/esc v0.6.2 // indirect github.com/rivo/uniseg v0.4.4 // indirect - github.com/rogpeppe/go-internal v1.11.0 // indirect + github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 // indirect github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/skeema/knownhosts v1.2.1 // indirect - github.com/spf13/cobra v1.7.0 // indirect + github.com/spf13/cast v1.5.0 // indirect + github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/objx v0.5.0 // indirect + github.com/stretchr/testify v1.9.0 // indirect github.com/texttheater/golang-levenshtein v1.0.1 // indirect github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect - github.com/zclconf/go-cty v1.14.0 // indirect - go.uber.org/atomic v1.11.0 // indirect - golang.org/x/crypto v0.17.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect - golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.19.0 // indirect - golang.org/x/sync v0.5.0 // indirect - golang.org/x/sys v0.15.0 // indirect - golang.org/x/term v0.15.0 // indirect + github.com/zclconf/go-cty v1.14.1 // indirect + go.uber.org/atomic v1.10.0 // indirect + golang.org/x/crypto v0.21.0 // indirect + golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 // indirect + golang.org/x/mod v0.16.0 // indirect + golang.org/x/net v0.22.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.18.0 // indirect + golang.org/x/term v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.15.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect - google.golang.org/grpc v1.59.0 // indirect - google.golang.org/protobuf v1.31.0 // indirect + golang.org/x/tools v0.19.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7 // indirect + google.golang.org/grpc v1.62.1 // indirect + google.golang.org/protobuf v1.33.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect lukechampine.com/frand v1.4.2 // indirect diff --git a/sdk/go/dockerbuild/go.sum b/sdk/go/dockerbuild/go.sum index ed70cb0..1ca4500 100644 --- a/sdk/go/dockerbuild/go.sum +++ b/sdk/go/dockerbuild/go.sum @@ -35,9 +35,10 @@ github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuP github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU= github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA= -github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= -github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn4ro= +github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -50,8 +51,10 @@ github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a/go.mod h1:Ro8st/El github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= +github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= +github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/gliderlabs/ssh v0.3.5/go.mod h1:8XB4KraRrX39qHhT6yxPsHedjA08I/uBVwj4xC+/+z4= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= @@ -65,18 +68,17 @@ github.com/go-git/go-git/v5 v5.11.0/go.mod h1:6GFcX2P3NM7FPBfpePbpLd21XxsgdAt+lK github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= -github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= +github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= +github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= -github.com/google/uuid v1.4.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -84,8 +86,8 @@ github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/hcl/v2 v2.18.0 h1:wYnG7Lt31t2zYkcquwgKo6MWXzRUDIeIVU5naZwHLl8= -github.com/hashicorp/hcl/v2 v2.18.0/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= +github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= +github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= @@ -105,12 +107,13 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= -github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= @@ -129,8 +132,8 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= -github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= -github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= +github.com/onsi/gomega v1.31.1 h1:KYppCUK+bUgAZwHOu7EXVBKyQA6ILvOESHkn/tgoqvo= +github.com/onsi/gomega v1.31.1/go.mod h1:y40C95dwAD1Nz36SsEnxvfFe8FFfNxzI5eJ0EYGyAy0= github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0= github.com/opentracing/basictracer-go v1.1.0/go.mod h1:V2HZueSJEp879yv285Aap1BS69fQMD+MNP1mRs6mBQc= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -140,6 +143,7 @@ github.com/pgavlin/fx v0.1.6 h1:r9jEg69DhNoCd3Xh0+5mIbdbS3PqWrVWujkY76MFRTU= github.com/pgavlin/fx v0.1.6/go.mod h1:KWZJ6fqBBSh8GxHYqwYCf3rYE7Gp2p0N8tJp8xv9u9M= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk= @@ -150,14 +154,15 @@ github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231 h1:vkHw5I/plNdTr435 github.com/pulumi/appdash v0.0.0-20231130102222-75f619a67231/go.mod h1:murToZ2N9hNJzewjHBgfFdXhZKjY3z5cYC1VXk+lbFE= github.com/pulumi/esc v0.6.2 h1:+z+l8cuwIauLSwXQS0uoI3rqB+YG4SzsZYtHfNoXBvw= github.com/pulumi/esc v0.6.2/go.mod h1:jNnYNjzsOgVTjCp0LL24NsCk8ZJxq4IoLQdCT0X7l8k= -github.com/pulumi/pulumi/sdk/v3 v3.111.1 h1:uOeG/b6YxBuL59xHtmFPspMa8BB6ovjHelL7sVCGJZw= -github.com/pulumi/pulumi/sdk/v3 v3.111.1/go.mod h1:5A6GHUwAJlRY1SSLZh84aDIbsBShcrfcmHzI50ecSBg= +github.com/pulumi/pulumi/sdk/v3 v3.113.0 h1:CIlmxJZdjxpPPoFe/rrP1dWTwh3CB7ahs/dA6SHcbuE= +github.com/pulumi/pulumi/sdk/v3 v3.113.0/go.mod h1:JWSzKBoHd8rlncC1DhXLf7YdV+Bk/Qf+hSZOOQh0WwQ= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= +github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI= github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs= @@ -168,23 +173,22 @@ github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NF github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/skeema/knownhosts v1.2.1 h1:SHWdIUa82uGZz+F+47k8SY4QhhI291cXCpopT1lK2AQ= github.com/skeema/knownhosts v1.2.1/go.mod h1:xYbVRSPxqBZFrdmDyMmsOs+uX1UZC3nTN3ThzgDxUwo= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 h1:X9dsIWPuuEJlPX//UmRKophhOKCGXc46RVIGuttks68= @@ -198,10 +202,10 @@ github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zclconf/go-cty v1.14.0 h1:/Xrd39K7DXbHzlisFP9c4pHao4yyf+/Ug9LEz+Y/yhc= -github.com/zclconf/go-cty v1.14.0/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA= +github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= +go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= +go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -209,18 +213,18 @@ golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= +golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3 h1:hNQpMuAJe5CtcUqCXaWga3FHu+kQvCqcsoVaQgSV60o= +golang.org/x/exp v0.0.0-20240112132812-db7319d0e0e3/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= -golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= +golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -232,15 +236,15 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= -golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= +golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc= +golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= -golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -256,20 +260,21 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= +golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= +golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= +golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -287,20 +292,18 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= +golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= -google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= -google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= -google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= -google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7 h1:8EeVk1VKMD+GD/neyEHGmz7pFblqPjHoi+PGQIlLx2s= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240311173647-c811ad7063a7/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= +google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= +google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= diff --git a/sdk/go/dockerbuild/image.go b/sdk/go/dockerbuild/image.go new file mode 100644 index 0000000..834b794 --- /dev/null +++ b/sdk/go/dockerbuild/image.go @@ -0,0 +1,1363 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dockerbuild + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +// A Docker image built using buildx -- Docker's interface to the improved +// BuildKit backend. +// +// ## Stability +// +// **This resource is pre-1.0 and in public preview.** +// +// We will strive to keep APIs and behavior as stable as possible, but we +// cannot guarantee stability until version 1.0. +// +// ## Migrating Pulumi Docker v3 and v4 Image resources +// +// This provider's `Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider. +// Existing `Image` resources can be converted to the docker-build `Image` resources with minor modifications. +// +// ### Behavioral differences +// +// There are several key behavioral differences to keep in mind when transitioning images to the new `Image` resource. +// +// #### Previews +// +// Version `3.x` of the Pulumi Docker provider always builds images during preview operations. +// This is helpful as a safeguard to prevent "broken" images from merging, but users found the behavior unnecessarily redundant when running previews and updates locally. +// +// 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. +// Several users reported outages due to the default behavior allowing bad images to accidentally sneak through CI. +// +// The default behavior of this provider's `Image` resource is similar to `3.x` and will build images during previews. +// This behavior can be changed by specifying `buildOnPreview`. +// +// #### Push behavior +// +// 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. +// +// This provider's `Image` resource matches the Docker CLI's behavior and does not push images anywhere by default. +// +// To push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`). +// Like Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally. +// +// #### Secrets +// +// Version `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field. +// +// Version `4.x` of the Pulumi Docker provider does not support secrets. +// +// The `Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables. +// Instead, they should be passed directly as values. +// (Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).) +// Pulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments. +// +// #### Caching +// +// Version `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`. +// It builds targets individually and pushes them to separate images for caching. +// +// Version `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches. +// +// Both versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior. +// This can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc. +// +// The `Image` resource delegates all caching behavior to Docker. +// `cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc. +// +// #### Outputs +// +// Versions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest. +// In `4.x` this could also be a single sha256 hash if the image wasn't pushed. +// +// Unlike earlier providers the `Image` resource can push multiple tags. +// As a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed. +// If multiple tags were pushed this uses one at random. +// +// If you need more control over tag references you can use the `digest` output, which is always a single sha256 hash as long as the image was exported somewhere. +// +// #### Tag deletion and refreshes +// +// Versions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` resource is deleted, nor do they confirm expected tags exist during `refresh` operations. +// +// The `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist. +// If any are missing a subsequent `update` will push them. +// +// When a `Image` is deleted, it will _attempt_ to also delete any pushed tags. +// Deletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular). +// Manifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace. +// +// Use the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted. +// +// ### Example migration +// +// Examples of "fully-featured" `v3` and `v4` `Image` resources are shown below, along with an example `Image` resource showing how they would look after migration. +// +// The `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`. +// After migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`. +// In almost all cases, properties of `Image` are named after the Docker CLI flag they correspond to. +// +// The `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`. +// It it is shown with parameters similar to the `v3` example for completeness. +// +// ## Example Usage +// +// ## Example Usage +// ### Push to AWS ECR with caching +// ```go +// package main +// +// import ( +// +// "fmt" +// +// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr" +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// ecrRepository, err := ecr.NewRepository(ctx, "ecr-repository", nil) +// if err != nil { +// return err +// } +// authToken := ecr.GetAuthorizationTokenOutput(ctx, ecr.GetAuthorizationTokenOutputArgs{ +// RegistryId: ecrRepository.RegistryId, +// }, nil) +// myImage, err := dockerbuild.NewImage(ctx, "my-image", &dockerbuild.ImageArgs{ +// CacheFrom: dockerbuild.CacheFromArray{ +// &dockerbuild.CacheFromArgs{ +// Registry: &dockerbuild.CacheFromRegistryArgs{ +// Ref: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) { +// return fmt.Sprintf("%v:cache", repositoryUrl), nil +// }).(pulumi.StringOutput), +// }, +// }, +// }, +// CacheTo: dockerbuild.CacheToArray{ +// &dockerbuild.CacheToArgs{ +// Registry: &dockerbuild.CacheToRegistryArgs{ +// ImageManifest: pulumi.Bool(true), +// OciMediaTypes: pulumi.Bool(true), +// Ref: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) { +// return fmt.Sprintf("%v:cache", repositoryUrl), nil +// }).(pulumi.StringOutput), +// }, +// }, +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("./app"), +// }, +// Push: pulumi.Bool(true), +// Registries: dockerbuild.RegistryArray{ +// &dockerbuild.RegistryArgs{ +// Address: ecrRepository.RepositoryUrl, +// Password: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) { +// return &authToken.Password, nil +// }).(pulumi.StringPtrOutput), +// Username: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) { +// return &authToken.UserName, nil +// }).(pulumi.StringPtrOutput), +// }, +// }, +// Tags: pulumi.StringArray{ +// ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) { +// return fmt.Sprintf("%v:latest", repositoryUrl), nil +// }).(pulumi.StringOutput), +// }, +// }) +// if err != nil { +// return err +// } +// ctx.Export("ref", myImage.Ref) +// return nil +// }) +// } +// +// ``` +// ### Multi-platform image +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Platforms: docker - build.PlatformArray{ +// dockerbuild.Platform_Plan9_amd64, +// dockerbuild.Platform_Plan9_386, +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Registry export +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Push: pulumi.Bool(true), +// Registries: dockerbuild.RegistryArray{ +// &dockerbuild.RegistryArgs{ +// Address: pulumi.String("docker.io"), +// Password: pulumi.Any(dockerHubPassword), +// Username: pulumi.String("pulumibot"), +// }, +// }, +// Tags: pulumi.StringArray{ +// pulumi.String("docker.io/pulumi/pulumi:3.107.0"), +// }, +// }) +// if err != nil { +// return err +// } +// ctx.Export("ref", myImage.Ref) +// return nil +// }) +// } +// +// ``` +// ### Caching +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// CacheFrom: dockerbuild.CacheFromArray{ +// &dockerbuild.CacheFromArgs{ +// Local: &dockerbuild.CacheFromLocalArgs{ +// Src: pulumi.String("tmp/cache"), +// }, +// }, +// }, +// CacheTo: dockerbuild.CacheToArray{ +// &dockerbuild.CacheToArgs{ +// Local: &dockerbuild.CacheToLocalArgs{ +// Dest: pulumi.String("tmp/cache"), +// Mode: dockerbuild.CacheModeMax, +// }, +// }, +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Docker Build Cloud +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Builder: &dockerbuild.BuilderConfigArgs{ +// Name: pulumi.String("cloud-builder-name"), +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Exec: pulumi.Bool(true), +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Build arguments +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// BuildArgs: pulumi.StringMap{ +// "SET_ME_TO_TRUE": pulumi.String("true"), +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Build target +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Push: pulumi.Bool(false), +// Target: pulumi.String("build-me"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Named contexts +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// Named: dockerbuild.ContextMap{ +// "golang:latest": &dockerbuild.ContextArgs{ +// Location: pulumi.String("docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"), +// }, +// }, +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Remote context +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"), +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Inline Dockerfile +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Dockerfile: &dockerbuild.DockerfileArgs{ +// Inline: pulumi.String("FROM busybox\nCOPY hello.c ./\n"), +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Remote context +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("https://github.com/docker-library/hello-world.git"), +// }, +// Dockerfile: &dockerbuild.DockerfileArgs{ +// Location: pulumi.String("app/Dockerfile"), +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Local export +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Exports: dockerbuild.ExportArray{ +// &dockerbuild.ExportArgs{ +// Docker: &dockerbuild.ExportDockerArgs{ +// Tar: pulumi.Bool(true), +// }, +// }, +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +type Image struct { + pulumi.CustomResourceState + + // Custom `host:ip` mappings to use during the build. + // + // Equivalent to Docker's `--add-host` flag. + AddHosts pulumi.StringArrayOutput `pulumi:"addHosts"` + // `ARG` names and values to set during the build. + // + // These variables are accessed like environment variables inside `RUN` + // instructions. + // + // Build arguments are persisted in the image, so you should use `secrets` + // if these arguments are sensitive. + // + // Equivalent to Docker's `--build-arg` flag. + BuildArgs pulumi.StringMapOutput `pulumi:"buildArgs"` + // Setting this to `false` will always skip image builds during previews, + // and setting it to `true` will always build images during previews. + // + // Images built during previews are never exported to registries, however + // cache manifests are still exported. + // + // On-disk Dockerfiles are always validated for syntactic correctness + // regardless of this setting. + // + // Defaults to `true` as a safeguard against broken images merging as part + // of CI pipelines. + BuildOnPreview pulumi.BoolPtrOutput `pulumi:"buildOnPreview"` + // Builder configuration. + Builder BuilderConfigPtrOutput `pulumi:"builder"` + // Cache export configuration. + // + // Equivalent to Docker's `--cache-from` flag. + CacheFrom CacheFromArrayOutput `pulumi:"cacheFrom"` + // Cache import configuration. + // + // Equivalent to Docker's `--cache-to` flag. + CacheTo CacheToArrayOutput `pulumi:"cacheTo"` + // Build context settings. + // + // Equivalent to Docker's `PATH | URL | -` positional argument. + Context BuildContextPtrOutput `pulumi:"context"` + // A preliminary hash of the image's build context. + // + // Pulumi uses this to determine if an image _may_ need to be re-built. + ContextHash pulumi.StringOutput `pulumi:"contextHash"` + // A SHA256 digest of the image if it was exported to a registry or + // elsewhere. + // + // Empty if the image was not exported. + // + // Registry images can be referenced precisely as `@`. The + // `ref` output provides one such reference as a convenience. + Digest pulumi.StringOutput `pulumi:"digest"` + // Dockerfile settings. + // + // Equivalent to Docker's `--file` flag. + Dockerfile DockerfilePtrOutput `pulumi:"dockerfile"` + // Use `exec` mode to build this image. + // + // By default the provider embeds a v25 Docker client with v0.12 buildx + // support. This helps ensure consistent behavior across environments and + // is compatible with alternative build backends (e.g. `buildkitd`), but + // it may not be desirable if you require a specific version of buildx. + // For example you may want to run a custom `docker-buildx` binary with + // support for [Docker Build + // Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + // + // When this is set to `true` the provider will instead execute the + // `docker-buildx` binary directly to perform its operations. The user is + // responsible for ensuring this binary exists, with correct permissions + // and pre-configured builders, at a path Docker expects (e.g. + // `~/.docker/cli-plugins`). + // + // Debugging `exec` mode may be more difficult as Pulumi will not be able + // to surface fine-grained errors and warnings. Additionally credentials + // are temporarily written to disk in order to provide them to the + // `docker-buildx` binary. + Exec pulumi.BoolPtrOutput `pulumi:"exec"` + // Controls where images are persisted after building. + // + // Images are only stored in the local cache unless `exports` are + // explicitly configured. + // + // Exporting to multiple destinations requires a daemon running BuildKit + // 0.13 or later. + // + // Equivalent to Docker's `--output` flag. + Exports ExportArrayOutput `pulumi:"exports"` + // Attach arbitrary key/value metadata to the image. + // + // Equivalent to Docker's `--label` flag. + Labels pulumi.StringMapOutput `pulumi:"labels"` + // When `true` the build will automatically include a `docker` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--load` flag. + Load pulumi.BoolPtrOutput `pulumi:"load"` + // Set the network mode for `RUN` instructions. Defaults to `default`. + // + // For custom networks, configure your builder with `--driver-opt network=...`. + // + // Equivalent to Docker's `--network` flag. + Network NetworkModePtrOutput `pulumi:"network"` + // Do not import cache manifests when building the image. + // + // Equivalent to Docker's `--no-cache` flag. + NoCache pulumi.BoolPtrOutput `pulumi:"noCache"` + // Set target platform(s) for the build. Defaults to the host's platform. + // + // Equivalent to Docker's `--platform` flag. + Platforms PlatformArrayOutput `pulumi:"platforms"` + // Always pull referenced images. + // + // Equivalent to Docker's `--pull` flag. + Pull pulumi.BoolPtrOutput `pulumi:"pull"` + // When `true` the build will automatically include a `registry` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--push` flag. + Push pulumi.BoolOutput `pulumi:"push"` + // If the image was pushed to any registries then this will contain a + // single fully-qualified tag including the build's digest. + // + // If the image had tags but was not exported, this will take on a value + // of one of those tags. + // + // This will be empty if the image had no exports and no tags. + // + // This is only for convenience and may not be appropriate for situations + // where multiple tags or registries are involved. In those cases this + // output is not guaranteed to be stable. + // + // For more control over tags consumed by downstream resources you should + // use the `digest` output. + Ref pulumi.StringOutput `pulumi:"ref"` + // Registry credentials. Required if reading or exporting to private + // repositories. + // + // Credentials are kept in-memory and do not pollute pre-existing + // credentials on the host. + // + // Similar to `docker login`. + Registries RegistryArrayOutput `pulumi:"registries"` + // A mapping of secret names to their corresponding values. + // + // Unlike the Docker CLI, these can be passed by value and do not need to + // exist on-disk or in environment variables. + // + // Build arguments and environment variables are persistent in the final + // image, so you should use this for sensitive values. + // + // Similar to Docker's `--secret` flag. + Secrets pulumi.StringMapOutput `pulumi:"secrets"` + // SSH agent socket or keys to expose to the build. + // + // Equivalent to Docker's `--ssh` flag. + Ssh SSHArrayOutput `pulumi:"ssh"` + // Name and optionally a tag (format: `name:tag`). + // + // If exporting to a registry, the name should include the fully qualified + // registry address (e.g. `docker.io/pulumi/pulumi:latest`). + // + // Equivalent to Docker's `--tag` flag. + Tags pulumi.StringArrayOutput `pulumi:"tags"` + // Set the target build stage(s) to build. + // + // If not specified all targets will be built by default. + // + // Equivalent to Docker's `--target` flag. + Target pulumi.StringPtrOutput `pulumi:"target"` +} + +// NewImage registers a new resource with the given unique name, arguments, and options. +func NewImage(ctx *pulumi.Context, + name string, args *ImageArgs, opts ...pulumi.ResourceOption) (*Image, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Push == nil { + return nil, errors.New("invalid value for required argument 'Push'") + } + if args.BuildOnPreview == nil { + args.BuildOnPreview = pulumi.BoolPtr(true) + } + if args.Network == nil { + args.Network = NetworkMode("default") + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource Image + err := ctx.RegisterResource("docker-build:index:Image", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetImage gets an existing Image resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetImage(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *ImageState, opts ...pulumi.ResourceOption) (*Image, error) { + var resource Image + err := ctx.ReadResource("docker-build:index:Image", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering Image resources. +type imageState struct { +} + +type ImageState struct { +} + +func (ImageState) ElementType() reflect.Type { + return reflect.TypeOf((*imageState)(nil)).Elem() +} + +type imageArgs struct { + // Custom `host:ip` mappings to use during the build. + // + // Equivalent to Docker's `--add-host` flag. + AddHosts []string `pulumi:"addHosts"` + // `ARG` names and values to set during the build. + // + // These variables are accessed like environment variables inside `RUN` + // instructions. + // + // Build arguments are persisted in the image, so you should use `secrets` + // if these arguments are sensitive. + // + // Equivalent to Docker's `--build-arg` flag. + BuildArgs map[string]string `pulumi:"buildArgs"` + // Setting this to `false` will always skip image builds during previews, + // and setting it to `true` will always build images during previews. + // + // Images built during previews are never exported to registries, however + // cache manifests are still exported. + // + // On-disk Dockerfiles are always validated for syntactic correctness + // regardless of this setting. + // + // Defaults to `true` as a safeguard against broken images merging as part + // of CI pipelines. + BuildOnPreview *bool `pulumi:"buildOnPreview"` + // Builder configuration. + Builder *BuilderConfig `pulumi:"builder"` + // Cache export configuration. + // + // Equivalent to Docker's `--cache-from` flag. + CacheFrom []CacheFrom `pulumi:"cacheFrom"` + // Cache import configuration. + // + // Equivalent to Docker's `--cache-to` flag. + CacheTo []CacheTo `pulumi:"cacheTo"` + // Build context settings. + // + // Equivalent to Docker's `PATH | URL | -` positional argument. + Context *BuildContext `pulumi:"context"` + // Dockerfile settings. + // + // Equivalent to Docker's `--file` flag. + Dockerfile *Dockerfile `pulumi:"dockerfile"` + // Use `exec` mode to build this image. + // + // By default the provider embeds a v25 Docker client with v0.12 buildx + // support. This helps ensure consistent behavior across environments and + // is compatible with alternative build backends (e.g. `buildkitd`), but + // it may not be desirable if you require a specific version of buildx. + // For example you may want to run a custom `docker-buildx` binary with + // support for [Docker Build + // Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + // + // When this is set to `true` the provider will instead execute the + // `docker-buildx` binary directly to perform its operations. The user is + // responsible for ensuring this binary exists, with correct permissions + // and pre-configured builders, at a path Docker expects (e.g. + // `~/.docker/cli-plugins`). + // + // Debugging `exec` mode may be more difficult as Pulumi will not be able + // to surface fine-grained errors and warnings. Additionally credentials + // are temporarily written to disk in order to provide them to the + // `docker-buildx` binary. + Exec *bool `pulumi:"exec"` + // Controls where images are persisted after building. + // + // Images are only stored in the local cache unless `exports` are + // explicitly configured. + // + // Exporting to multiple destinations requires a daemon running BuildKit + // 0.13 or later. + // + // Equivalent to Docker's `--output` flag. + Exports []Export `pulumi:"exports"` + // Attach arbitrary key/value metadata to the image. + // + // Equivalent to Docker's `--label` flag. + Labels map[string]string `pulumi:"labels"` + // When `true` the build will automatically include a `docker` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--load` flag. + Load *bool `pulumi:"load"` + // Set the network mode for `RUN` instructions. Defaults to `default`. + // + // For custom networks, configure your builder with `--driver-opt network=...`. + // + // Equivalent to Docker's `--network` flag. + Network *NetworkMode `pulumi:"network"` + // Do not import cache manifests when building the image. + // + // Equivalent to Docker's `--no-cache` flag. + NoCache *bool `pulumi:"noCache"` + // Set target platform(s) for the build. Defaults to the host's platform. + // + // Equivalent to Docker's `--platform` flag. + Platforms []Platform `pulumi:"platforms"` + // Always pull referenced images. + // + // Equivalent to Docker's `--pull` flag. + Pull *bool `pulumi:"pull"` + // When `true` the build will automatically include a `registry` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--push` flag. + Push bool `pulumi:"push"` + // Registry credentials. Required if reading or exporting to private + // repositories. + // + // Credentials are kept in-memory and do not pollute pre-existing + // credentials on the host. + // + // Similar to `docker login`. + Registries []Registry `pulumi:"registries"` + // A mapping of secret names to their corresponding values. + // + // Unlike the Docker CLI, these can be passed by value and do not need to + // exist on-disk or in environment variables. + // + // Build arguments and environment variables are persistent in the final + // image, so you should use this for sensitive values. + // + // Similar to Docker's `--secret` flag. + Secrets map[string]string `pulumi:"secrets"` + // SSH agent socket or keys to expose to the build. + // + // Equivalent to Docker's `--ssh` flag. + Ssh []SSH `pulumi:"ssh"` + // Name and optionally a tag (format: `name:tag`). + // + // If exporting to a registry, the name should include the fully qualified + // registry address (e.g. `docker.io/pulumi/pulumi:latest`). + // + // Equivalent to Docker's `--tag` flag. + Tags []string `pulumi:"tags"` + // Set the target build stage(s) to build. + // + // If not specified all targets will be built by default. + // + // Equivalent to Docker's `--target` flag. + Target *string `pulumi:"target"` +} + +// The set of arguments for constructing a Image resource. +type ImageArgs struct { + // Custom `host:ip` mappings to use during the build. + // + // Equivalent to Docker's `--add-host` flag. + AddHosts pulumi.StringArrayInput + // `ARG` names and values to set during the build. + // + // These variables are accessed like environment variables inside `RUN` + // instructions. + // + // Build arguments are persisted in the image, so you should use `secrets` + // if these arguments are sensitive. + // + // Equivalent to Docker's `--build-arg` flag. + BuildArgs pulumi.StringMapInput + // Setting this to `false` will always skip image builds during previews, + // and setting it to `true` will always build images during previews. + // + // Images built during previews are never exported to registries, however + // cache manifests are still exported. + // + // On-disk Dockerfiles are always validated for syntactic correctness + // regardless of this setting. + // + // Defaults to `true` as a safeguard against broken images merging as part + // of CI pipelines. + BuildOnPreview pulumi.BoolPtrInput + // Builder configuration. + Builder BuilderConfigPtrInput + // Cache export configuration. + // + // Equivalent to Docker's `--cache-from` flag. + CacheFrom CacheFromArrayInput + // Cache import configuration. + // + // Equivalent to Docker's `--cache-to` flag. + CacheTo CacheToArrayInput + // Build context settings. + // + // Equivalent to Docker's `PATH | URL | -` positional argument. + Context BuildContextPtrInput + // Dockerfile settings. + // + // Equivalent to Docker's `--file` flag. + Dockerfile DockerfilePtrInput + // Use `exec` mode to build this image. + // + // By default the provider embeds a v25 Docker client with v0.12 buildx + // support. This helps ensure consistent behavior across environments and + // is compatible with alternative build backends (e.g. `buildkitd`), but + // it may not be desirable if you require a specific version of buildx. + // For example you may want to run a custom `docker-buildx` binary with + // support for [Docker Build + // Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + // + // When this is set to `true` the provider will instead execute the + // `docker-buildx` binary directly to perform its operations. The user is + // responsible for ensuring this binary exists, with correct permissions + // and pre-configured builders, at a path Docker expects (e.g. + // `~/.docker/cli-plugins`). + // + // Debugging `exec` mode may be more difficult as Pulumi will not be able + // to surface fine-grained errors and warnings. Additionally credentials + // are temporarily written to disk in order to provide them to the + // `docker-buildx` binary. + Exec pulumi.BoolPtrInput + // Controls where images are persisted after building. + // + // Images are only stored in the local cache unless `exports` are + // explicitly configured. + // + // Exporting to multiple destinations requires a daemon running BuildKit + // 0.13 or later. + // + // Equivalent to Docker's `--output` flag. + Exports ExportArrayInput + // Attach arbitrary key/value metadata to the image. + // + // Equivalent to Docker's `--label` flag. + Labels pulumi.StringMapInput + // When `true` the build will automatically include a `docker` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--load` flag. + Load pulumi.BoolPtrInput + // Set the network mode for `RUN` instructions. Defaults to `default`. + // + // For custom networks, configure your builder with `--driver-opt network=...`. + // + // Equivalent to Docker's `--network` flag. + Network NetworkModePtrInput + // Do not import cache manifests when building the image. + // + // Equivalent to Docker's `--no-cache` flag. + NoCache pulumi.BoolPtrInput + // Set target platform(s) for the build. Defaults to the host's platform. + // + // Equivalent to Docker's `--platform` flag. + Platforms PlatformArrayInput + // Always pull referenced images. + // + // Equivalent to Docker's `--pull` flag. + Pull pulumi.BoolPtrInput + // When `true` the build will automatically include a `registry` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--push` flag. + Push pulumi.BoolInput + // Registry credentials. Required if reading or exporting to private + // repositories. + // + // Credentials are kept in-memory and do not pollute pre-existing + // credentials on the host. + // + // Similar to `docker login`. + Registries RegistryArrayInput + // A mapping of secret names to their corresponding values. + // + // Unlike the Docker CLI, these can be passed by value and do not need to + // exist on-disk or in environment variables. + // + // Build arguments and environment variables are persistent in the final + // image, so you should use this for sensitive values. + // + // Similar to Docker's `--secret` flag. + Secrets pulumi.StringMapInput + // SSH agent socket or keys to expose to the build. + // + // Equivalent to Docker's `--ssh` flag. + Ssh SSHArrayInput + // Name and optionally a tag (format: `name:tag`). + // + // If exporting to a registry, the name should include the fully qualified + // registry address (e.g. `docker.io/pulumi/pulumi:latest`). + // + // Equivalent to Docker's `--tag` flag. + Tags pulumi.StringArrayInput + // Set the target build stage(s) to build. + // + // If not specified all targets will be built by default. + // + // Equivalent to Docker's `--target` flag. + Target pulumi.StringPtrInput +} + +func (ImageArgs) ElementType() reflect.Type { + return reflect.TypeOf((*imageArgs)(nil)).Elem() +} + +type ImageInput interface { + pulumi.Input + + ToImageOutput() ImageOutput + ToImageOutputWithContext(ctx context.Context) ImageOutput +} + +func (*Image) ElementType() reflect.Type { + return reflect.TypeOf((**Image)(nil)).Elem() +} + +func (i *Image) ToImageOutput() ImageOutput { + return i.ToImageOutputWithContext(context.Background()) +} + +func (i *Image) ToImageOutputWithContext(ctx context.Context) ImageOutput { + return pulumi.ToOutputWithContext(ctx, i).(ImageOutput) +} + +func (i *Image) ToOutput(ctx context.Context) pulumix.Output[*Image] { + return pulumix.Output[*Image]{ + OutputState: i.ToImageOutputWithContext(ctx).OutputState, + } +} + +type ImageOutput struct{ *pulumi.OutputState } + +func (ImageOutput) ElementType() reflect.Type { + return reflect.TypeOf((**Image)(nil)).Elem() +} + +func (o ImageOutput) ToImageOutput() ImageOutput { + return o +} + +func (o ImageOutput) ToImageOutputWithContext(ctx context.Context) ImageOutput { + return o +} + +func (o ImageOutput) ToOutput(ctx context.Context) pulumix.Output[*Image] { + return pulumix.Output[*Image]{ + OutputState: o.OutputState, + } +} + +// Custom `host:ip` mappings to use during the build. +// +// Equivalent to Docker's `--add-host` flag. +func (o ImageOutput) AddHosts() pulumi.StringArrayOutput { + return o.ApplyT(func(v *Image) pulumi.StringArrayOutput { return v.AddHosts }).(pulumi.StringArrayOutput) +} + +// `ARG` names and values to set during the build. +// +// These variables are accessed like environment variables inside `RUN` +// instructions. +// +// Build arguments are persisted in the image, so you should use `secrets` +// if these arguments are sensitive. +// +// Equivalent to Docker's `--build-arg` flag. +func (o ImageOutput) BuildArgs() pulumi.StringMapOutput { + return o.ApplyT(func(v *Image) pulumi.StringMapOutput { return v.BuildArgs }).(pulumi.StringMapOutput) +} + +// Setting this to `false` will always skip image builds during previews, +// and setting it to `true` will always build images during previews. +// +// Images built during previews are never exported to registries, however +// cache manifests are still exported. +// +// On-disk Dockerfiles are always validated for syntactic correctness +// regardless of this setting. +// +// Defaults to `true` as a safeguard against broken images merging as part +// of CI pipelines. +func (o ImageOutput) BuildOnPreview() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *Image) pulumi.BoolPtrOutput { return v.BuildOnPreview }).(pulumi.BoolPtrOutput) +} + +// Builder configuration. +func (o ImageOutput) Builder() BuilderConfigPtrOutput { + return o.ApplyT(func(v *Image) BuilderConfigPtrOutput { return v.Builder }).(BuilderConfigPtrOutput) +} + +// Cache export configuration. +// +// Equivalent to Docker's `--cache-from` flag. +func (o ImageOutput) CacheFrom() CacheFromArrayOutput { + return o.ApplyT(func(v *Image) CacheFromArrayOutput { return v.CacheFrom }).(CacheFromArrayOutput) +} + +// Cache import configuration. +// +// Equivalent to Docker's `--cache-to` flag. +func (o ImageOutput) CacheTo() CacheToArrayOutput { + return o.ApplyT(func(v *Image) CacheToArrayOutput { return v.CacheTo }).(CacheToArrayOutput) +} + +// Build context settings. +// +// Equivalent to Docker's `PATH | URL | -` positional argument. +func (o ImageOutput) Context() BuildContextPtrOutput { + return o.ApplyT(func(v *Image) BuildContextPtrOutput { return v.Context }).(BuildContextPtrOutput) +} + +// A preliminary hash of the image's build context. +// +// Pulumi uses this to determine if an image _may_ need to be re-built. +func (o ImageOutput) ContextHash() pulumi.StringOutput { + return o.ApplyT(func(v *Image) pulumi.StringOutput { return v.ContextHash }).(pulumi.StringOutput) +} + +// A SHA256 digest of the image if it was exported to a registry or +// elsewhere. +// +// Empty if the image was not exported. +// +// Registry images can be referenced precisely as `@`. The +// `ref` output provides one such reference as a convenience. +func (o ImageOutput) Digest() pulumi.StringOutput { + return o.ApplyT(func(v *Image) pulumi.StringOutput { return v.Digest }).(pulumi.StringOutput) +} + +// Dockerfile settings. +// +// Equivalent to Docker's `--file` flag. +func (o ImageOutput) Dockerfile() DockerfilePtrOutput { + return o.ApplyT(func(v *Image) DockerfilePtrOutput { return v.Dockerfile }).(DockerfilePtrOutput) +} + +// Use `exec` mode to build this image. +// +// By default the provider embeds a v25 Docker client with v0.12 buildx +// support. This helps ensure consistent behavior across environments and +// is compatible with alternative build backends (e.g. `buildkitd`), but +// it may not be desirable if you require a specific version of buildx. +// For example you may want to run a custom `docker-buildx` binary with +// support for [Docker Build +// Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). +// +// When this is set to `true` the provider will instead execute the +// `docker-buildx` binary directly to perform its operations. The user is +// responsible for ensuring this binary exists, with correct permissions +// and pre-configured builders, at a path Docker expects (e.g. +// `~/.docker/cli-plugins`). +// +// Debugging `exec` mode may be more difficult as Pulumi will not be able +// to surface fine-grained errors and warnings. Additionally credentials +// are temporarily written to disk in order to provide them to the +// `docker-buildx` binary. +func (o ImageOutput) Exec() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *Image) pulumi.BoolPtrOutput { return v.Exec }).(pulumi.BoolPtrOutput) +} + +// Controls where images are persisted after building. +// +// Images are only stored in the local cache unless `exports` are +// explicitly configured. +// +// Exporting to multiple destinations requires a daemon running BuildKit +// 0.13 or later. +// +// Equivalent to Docker's `--output` flag. +func (o ImageOutput) Exports() ExportArrayOutput { + return o.ApplyT(func(v *Image) ExportArrayOutput { return v.Exports }).(ExportArrayOutput) +} + +// Attach arbitrary key/value metadata to the image. +// +// Equivalent to Docker's `--label` flag. +func (o ImageOutput) Labels() pulumi.StringMapOutput { + return o.ApplyT(func(v *Image) pulumi.StringMapOutput { return v.Labels }).(pulumi.StringMapOutput) +} + +// When `true` the build will automatically include a `docker` export. +// +// Defaults to `false`. +// +// Equivalent to Docker's `--load` flag. +func (o ImageOutput) Load() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *Image) pulumi.BoolPtrOutput { return v.Load }).(pulumi.BoolPtrOutput) +} + +// Set the network mode for `RUN` instructions. Defaults to `default`. +// +// For custom networks, configure your builder with `--driver-opt network=...`. +// +// Equivalent to Docker's `--network` flag. +func (o ImageOutput) Network() NetworkModePtrOutput { + return o.ApplyT(func(v *Image) NetworkModePtrOutput { return v.Network }).(NetworkModePtrOutput) +} + +// Do not import cache manifests when building the image. +// +// Equivalent to Docker's `--no-cache` flag. +func (o ImageOutput) NoCache() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *Image) pulumi.BoolPtrOutput { return v.NoCache }).(pulumi.BoolPtrOutput) +} + +// Set target platform(s) for the build. Defaults to the host's platform. +// +// Equivalent to Docker's `--platform` flag. +func (o ImageOutput) Platforms() PlatformArrayOutput { + return o.ApplyT(func(v *Image) PlatformArrayOutput { return v.Platforms }).(PlatformArrayOutput) +} + +// Always pull referenced images. +// +// Equivalent to Docker's `--pull` flag. +func (o ImageOutput) Pull() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *Image) pulumi.BoolPtrOutput { return v.Pull }).(pulumi.BoolPtrOutput) +} + +// When `true` the build will automatically include a `registry` export. +// +// Defaults to `false`. +// +// Equivalent to Docker's `--push` flag. +func (o ImageOutput) Push() pulumi.BoolOutput { + return o.ApplyT(func(v *Image) pulumi.BoolOutput { return v.Push }).(pulumi.BoolOutput) +} + +// If the image was pushed to any registries then this will contain a +// single fully-qualified tag including the build's digest. +// +// If the image had tags but was not exported, this will take on a value +// of one of those tags. +// +// This will be empty if the image had no exports and no tags. +// +// This is only for convenience and may not be appropriate for situations +// where multiple tags or registries are involved. In those cases this +// output is not guaranteed to be stable. +// +// For more control over tags consumed by downstream resources you should +// use the `digest` output. +func (o ImageOutput) Ref() pulumi.StringOutput { + return o.ApplyT(func(v *Image) pulumi.StringOutput { return v.Ref }).(pulumi.StringOutput) +} + +// Registry credentials. Required if reading or exporting to private +// repositories. +// +// Credentials are kept in-memory and do not pollute pre-existing +// credentials on the host. +// +// Similar to `docker login`. +func (o ImageOutput) Registries() RegistryArrayOutput { + return o.ApplyT(func(v *Image) RegistryArrayOutput { return v.Registries }).(RegistryArrayOutput) +} + +// A mapping of secret names to their corresponding values. +// +// Unlike the Docker CLI, these can be passed by value and do not need to +// exist on-disk or in environment variables. +// +// Build arguments and environment variables are persistent in the final +// image, so you should use this for sensitive values. +// +// Similar to Docker's `--secret` flag. +func (o ImageOutput) Secrets() pulumi.StringMapOutput { + return o.ApplyT(func(v *Image) pulumi.StringMapOutput { return v.Secrets }).(pulumi.StringMapOutput) +} + +// SSH agent socket or keys to expose to the build. +// +// Equivalent to Docker's `--ssh` flag. +func (o ImageOutput) Ssh() SSHArrayOutput { + return o.ApplyT(func(v *Image) SSHArrayOutput { return v.Ssh }).(SSHArrayOutput) +} + +// Name and optionally a tag (format: `name:tag`). +// +// If exporting to a registry, the name should include the fully qualified +// registry address (e.g. `docker.io/pulumi/pulumi:latest`). +// +// Equivalent to Docker's `--tag` flag. +func (o ImageOutput) Tags() pulumi.StringArrayOutput { + return o.ApplyT(func(v *Image) pulumi.StringArrayOutput { return v.Tags }).(pulumi.StringArrayOutput) +} + +// Set the target build stage(s) to build. +// +// If not specified all targets will be built by default. +// +// Equivalent to Docker's `--target` flag. +func (o ImageOutput) Target() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Image) pulumi.StringPtrOutput { return v.Target }).(pulumi.StringPtrOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*ImageInput)(nil)).Elem(), &Image{}) + pulumi.RegisterOutputType(ImageOutput{}) +} diff --git a/sdk/go/dockerbuild/index.go b/sdk/go/dockerbuild/index.go new file mode 100644 index 0000000..2429e89 --- /dev/null +++ b/sdk/go/dockerbuild/index.go @@ -0,0 +1,307 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dockerbuild + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +// A wrapper around `docker buildx imagetools create` to create an index +// (or manifest list) referencing one or more existing images. +// +// In most cases you do not need an `Index` to build a multi-platform +// image -- specifying multiple platforms on the `Image` will handle this +// for you automatically. +// +// However, as of April 2024, building multi-platform images _with +// caching_ will only export a cache for one platform at a time (see [this +// discussion](https://github.com/docker/buildx/discussions/1382) for more +// details). +// +// Therefore this resource can be helpful if you are building +// multi-platform images with caching: each platform can be built and +// cached separately, and an `Index` can join them all together. An +// example of this is shown below. +// +// This resource creates an OCI image index or a Docker manifest list +// depending on the media types of the source images. +// +// ## Example Usage +// ### Multi-platform registry caching +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// amd64, err := dockerbuild.NewImage(ctx, "amd64", &dockerbuild.ImageArgs{ +// CacheFrom: dockerbuild.CacheFromArray{ +// &dockerbuild.CacheFromArgs{ +// Registry: &dockerbuild.CacheFromRegistryArgs{ +// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-amd64"), +// }, +// }, +// }, +// CacheTo: dockerbuild.CacheToArray{ +// &dockerbuild.CacheToArgs{ +// Registry: &dockerbuild.CacheToRegistryArgs{ +// Mode: dockerbuild.CacheModeMax, +// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-amd64"), +// }, +// }, +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Platforms: docker - build.PlatformArray{ +// dockerbuild.Platform_Linux_amd64, +// }, +// Tags: pulumi.StringArray{ +// pulumi.String("docker.io/pulumi/pulumi:3.107.0-amd64"), +// }, +// }) +// if err != nil { +// return err +// } +// arm64, err := dockerbuild.NewImage(ctx, "arm64", &dockerbuild.ImageArgs{ +// CacheFrom: dockerbuild.CacheFromArray{ +// &dockerbuild.CacheFromArgs{ +// Registry: &dockerbuild.CacheFromRegistryArgs{ +// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-arm64"), +// }, +// }, +// }, +// CacheTo: dockerbuild.CacheToArray{ +// &dockerbuild.CacheToArgs{ +// Registry: &dockerbuild.CacheToRegistryArgs{ +// Mode: dockerbuild.CacheModeMax, +// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-arm64"), +// }, +// }, +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Platforms: docker - build.PlatformArray{ +// dockerbuild.Platform_Linux_arm64, +// }, +// Tags: pulumi.StringArray{ +// pulumi.String("docker.io/pulumi/pulumi:3.107.0-arm64"), +// }, +// }) +// if err != nil { +// return err +// } +// index, err := dockerbuild.NewIndex(ctx, "index", &dockerbuild.IndexArgs{ +// Sources: pulumi.StringArray{ +// amd64.Ref, +// arm64.Ref, +// }, +// Tag: pulumi.String("docker.io/pulumi/pulumi:3.107.0"), +// }) +// if err != nil { +// return err +// } +// ctx.Export("ref", index.Ref) +// return nil +// }) +// } +// +// ``` +type Index struct { + pulumi.CustomResourceState + + // If true, push the index to the target registry. + // + // Defaults to `true`. + Push pulumi.BoolPtrOutput `pulumi:"push"` + // The pushed tag with digest. + // + // Identical to the tag if the index was not pushed. + Ref pulumi.StringOutput `pulumi:"ref"` + // Authentication for the registry where the tagged index will be pushed. + // + // Credentials can also be included with the provider's configuration. + Registry RegistryPtrOutput `pulumi:"registry"` + // Existing images to include in the index. + Sources pulumi.StringArrayOutput `pulumi:"sources"` + // The tag to apply to the index. + Tag pulumi.StringOutput `pulumi:"tag"` +} + +// NewIndex registers a new resource with the given unique name, arguments, and options. +func NewIndex(ctx *pulumi.Context, + name string, args *IndexArgs, opts ...pulumi.ResourceOption) (*Index, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Sources == nil { + return nil, errors.New("invalid value for required argument 'Sources'") + } + if args.Tag == nil { + return nil, errors.New("invalid value for required argument 'Tag'") + } + if args.Push == nil { + args.Push = pulumi.BoolPtr(true) + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource Index + err := ctx.RegisterResource("docker-build:index:Index", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetIndex gets an existing Index resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetIndex(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *IndexState, opts ...pulumi.ResourceOption) (*Index, error) { + var resource Index + err := ctx.ReadResource("docker-build:index:Index", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering Index resources. +type indexState struct { +} + +type IndexState struct { +} + +func (IndexState) ElementType() reflect.Type { + return reflect.TypeOf((*indexState)(nil)).Elem() +} + +type indexArgs struct { + // If true, push the index to the target registry. + // + // Defaults to `true`. + Push *bool `pulumi:"push"` + // Authentication for the registry where the tagged index will be pushed. + // + // Credentials can also be included with the provider's configuration. + Registry *Registry `pulumi:"registry"` + // Existing images to include in the index. + Sources []string `pulumi:"sources"` + // The tag to apply to the index. + Tag string `pulumi:"tag"` +} + +// The set of arguments for constructing a Index resource. +type IndexArgs struct { + // If true, push the index to the target registry. + // + // Defaults to `true`. + Push pulumi.BoolPtrInput + // Authentication for the registry where the tagged index will be pushed. + // + // Credentials can also be included with the provider's configuration. + Registry RegistryPtrInput + // Existing images to include in the index. + Sources pulumi.StringArrayInput + // The tag to apply to the index. + Tag pulumi.StringInput +} + +func (IndexArgs) ElementType() reflect.Type { + return reflect.TypeOf((*indexArgs)(nil)).Elem() +} + +type IndexInput interface { + pulumi.Input + + ToIndexOutput() IndexOutput + ToIndexOutputWithContext(ctx context.Context) IndexOutput +} + +func (*Index) ElementType() reflect.Type { + return reflect.TypeOf((**Index)(nil)).Elem() +} + +func (i *Index) ToIndexOutput() IndexOutput { + return i.ToIndexOutputWithContext(context.Background()) +} + +func (i *Index) ToIndexOutputWithContext(ctx context.Context) IndexOutput { + return pulumi.ToOutputWithContext(ctx, i).(IndexOutput) +} + +func (i *Index) ToOutput(ctx context.Context) pulumix.Output[*Index] { + return pulumix.Output[*Index]{ + OutputState: i.ToIndexOutputWithContext(ctx).OutputState, + } +} + +type IndexOutput struct{ *pulumi.OutputState } + +func (IndexOutput) ElementType() reflect.Type { + return reflect.TypeOf((**Index)(nil)).Elem() +} + +func (o IndexOutput) ToIndexOutput() IndexOutput { + return o +} + +func (o IndexOutput) ToIndexOutputWithContext(ctx context.Context) IndexOutput { + return o +} + +func (o IndexOutput) ToOutput(ctx context.Context) pulumix.Output[*Index] { + return pulumix.Output[*Index]{ + OutputState: o.OutputState, + } +} + +// If true, push the index to the target registry. +// +// Defaults to `true`. +func (o IndexOutput) Push() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *Index) pulumi.BoolPtrOutput { return v.Push }).(pulumi.BoolPtrOutput) +} + +// The pushed tag with digest. +// +// Identical to the tag if the index was not pushed. +func (o IndexOutput) Ref() pulumi.StringOutput { + return o.ApplyT(func(v *Index) pulumi.StringOutput { return v.Ref }).(pulumi.StringOutput) +} + +// Authentication for the registry where the tagged index will be pushed. +// +// Credentials can also be included with the provider's configuration. +func (o IndexOutput) Registry() RegistryPtrOutput { + return o.ApplyT(func(v *Index) RegistryPtrOutput { return v.Registry }).(RegistryPtrOutput) +} + +// Existing images to include in the index. +func (o IndexOutput) Sources() pulumi.StringArrayOutput { + return o.ApplyT(func(v *Index) pulumi.StringArrayOutput { return v.Sources }).(pulumi.StringArrayOutput) +} + +// The tag to apply to the index. +func (o IndexOutput) Tag() pulumi.StringOutput { + return o.ApplyT(func(v *Index) pulumi.StringOutput { return v.Tag }).(pulumi.StringOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*IndexInput)(nil)).Elem(), &Index{}) + pulumi.RegisterOutputType(IndexOutput{}) +} diff --git a/sdk/go/dockerbuild/init.go b/sdk/go/dockerbuild/init.go index dfc6461..33469af 100644 --- a/sdk/go/dockerbuild/init.go +++ b/sdk/go/dockerbuild/init.go @@ -7,7 +7,7 @@ import ( "fmt" "github.com/blang/semver" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -21,8 +21,10 @@ func (m *module) Version() semver.Version { func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { switch typ { - case "dockerbuild:index:Random": - r = &Random{} + case "docker-build:index:Image": + r = &Image{} + case "docker-build:index:Index": + r = &Index{} default: return nil, fmt.Errorf("unknown resource type: %s", typ) } @@ -40,7 +42,7 @@ func (p *pkg) Version() semver.Version { } func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) { - if typ != "pulumi:providers:dockerbuild" { + if typ != "pulumi:providers:docker-build" { return nil, fmt.Errorf("unknown provider type: %s", typ) } @@ -55,12 +57,12 @@ func init() { version = semver.Version{Major: 1} } pulumi.RegisterResourceModule( - "dockerbuild", + "docker-build", "index", &module{version}, ) pulumi.RegisterResourcePackage( - "dockerbuild", + "docker-build", &pkg{version}, ) } diff --git a/sdk/go/dockerbuild/internal/pulumiUtilities.go b/sdk/go/dockerbuild/internal/pulumiUtilities.go index 14e763f..cb9ddd8 100644 --- a/sdk/go/dockerbuild/internal/pulumiUtilities.go +++ b/sdk/go/dockerbuild/internal/pulumiUtilities.go @@ -75,7 +75,7 @@ func PkgVersion() (semver.Version, error) { } type sentinal struct{} pkgPath := reflect.TypeOf(sentinal{}).PkgPath() - re := regexp.MustCompile("^.*/pulumi-dockerbuild/sdk(/v\\d+)?") + re := regexp.MustCompile("^.*/pulumi-docker-build/sdk(/v\\d+)?") if match := re.FindStringSubmatch(pkgPath); match != nil { vStr := match[1] if len(vStr) == 0 { // If the version capture group was empty, default to v1. @@ -164,7 +164,7 @@ func callPlainInner( // PkgResourceDefaultOpts provides package level defaults to pulumi.OptionResource. func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOption { defaults := []pulumi.ResourceOption{} - defaults = append(defaults, pulumi.PluginDownloadURL("github.com/pulumi/pulumi-dockerbuild")) + version := SdkVersion if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) @@ -175,7 +175,7 @@ func PkgResourceDefaultOpts(opts []pulumi.ResourceOption) []pulumi.ResourceOptio // PkgInvokeDefaultOpts provides package level defaults to pulumi.OptionInvoke. func PkgInvokeDefaultOpts(opts []pulumi.InvokeOption) []pulumi.InvokeOption { defaults := []pulumi.InvokeOption{} - defaults = append(defaults, pulumi.PluginDownloadURL("github.com/pulumi/pulumi-dockerbuild")) + version := SdkVersion if !version.Equals(semver.Version{}) { defaults = append(defaults, pulumi.Version(version.String())) diff --git a/sdk/go/dockerbuild/provider.go b/sdk/go/dockerbuild/provider.go index b4ff669..15b1b77 100644 --- a/sdk/go/dockerbuild/provider.go +++ b/sdk/go/dockerbuild/provider.go @@ -7,13 +7,16 @@ import ( "context" "reflect" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" "github.com/pulumi/pulumi/sdk/v3/go/pulumix" ) type Provider struct { pulumi.ProviderResourceState + + // The build daemon's address. + Host pulumi.StringPtrOutput `pulumi:"host"` } // NewProvider registers a new resource with the given unique name, arguments, and options. @@ -23,9 +26,14 @@ func NewProvider(ctx *pulumi.Context, args = &ProviderArgs{} } + if args.Host == nil { + if d := internal.GetEnvOrDefault("", nil, "DOCKER_HOST"); d != nil { + args.Host = pulumi.StringPtr(d.(string)) + } + } opts = internal.PkgResourceDefaultOpts(opts) var resource Provider - err := ctx.RegisterResource("pulumi:providers:dockerbuild", name, args, &resource, opts...) + err := ctx.RegisterResource("pulumi:providers:docker-build", name, args, &resource, opts...) if err != nil { return nil, err } @@ -33,20 +41,51 @@ func NewProvider(ctx *pulumi.Context, } type providerArgs struct { + // The build daemon's address. + Host *string `pulumi:"host"` + Registries []Registry `pulumi:"registries"` } // The set of arguments for constructing a Provider resource. type ProviderArgs struct { + // The build daemon's address. + Host pulumi.StringPtrInput + Registries RegistryArrayInput } func (ProviderArgs) ElementType() reflect.Type { return reflect.TypeOf((*providerArgs)(nil)).Elem() } +type ProviderInput interface { + pulumi.Input + + ToProviderOutput() ProviderOutput + ToProviderOutputWithContext(ctx context.Context) ProviderOutput +} + +func (*Provider) ElementType() reflect.Type { + return reflect.TypeOf((**Provider)(nil)).Elem() +} + +func (i *Provider) ToProviderOutput() ProviderOutput { + return i.ToProviderOutputWithContext(context.Background()) +} + +func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput { + return pulumi.ToOutputWithContext(ctx, i).(ProviderOutput) +} + +func (i *Provider) ToOutput(ctx context.Context) pulumix.Output[*Provider] { + return pulumix.Output[*Provider]{ + OutputState: i.ToProviderOutputWithContext(ctx).OutputState, + } +} + type ProviderOutput struct{ *pulumi.OutputState } func (ProviderOutput) ElementType() reflect.Type { - return reflect.TypeOf((*Provider)(nil)).Elem() + return reflect.TypeOf((**Provider)(nil)).Elem() } func (o ProviderOutput) ToProviderOutput() ProviderOutput { @@ -57,12 +96,18 @@ func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) Provide return o } -func (o ProviderOutput) ToOutput(ctx context.Context) pulumix.Output[Provider] { - return pulumix.Output[Provider]{ +func (o ProviderOutput) ToOutput(ctx context.Context) pulumix.Output[*Provider] { + return pulumix.Output[*Provider]{ OutputState: o.OutputState, } } +// The build daemon's address. +func (o ProviderOutput) Host() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Provider) pulumi.StringPtrOutput { return v.Host }).(pulumi.StringPtrOutput) +} + func init() { + pulumi.RegisterInputType(reflect.TypeOf((*ProviderInput)(nil)).Elem(), &Provider{}) pulumi.RegisterOutputType(ProviderOutput{}) } diff --git a/sdk/go/dockerbuild/pulumi-plugin.json b/sdk/go/dockerbuild/pulumi-plugin.json index e716637..4580097 100644 --- a/sdk/go/dockerbuild/pulumi-plugin.json +++ b/sdk/go/dockerbuild/pulumi-plugin.json @@ -1,5 +1,4 @@ { "resource": true, - "name": "dockerbuild", - "server": "github.com/pulumi/pulumi-dockerbuild" + "name": "docker-build" } diff --git a/sdk/go/dockerbuild/pulumiEnums.go b/sdk/go/dockerbuild/pulumiEnums.go new file mode 100644 index 0000000..a5a8a3b --- /dev/null +++ b/sdk/go/dockerbuild/pulumiEnums.go @@ -0,0 +1,886 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dockerbuild + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +type CacheMode string + +const ( + // Only layers that are exported into the resulting image are cached. + CacheModeMin = CacheMode("min") + // All layers are cached, even those of intermediate steps. + CacheModeMax = CacheMode("max") +) + +func (CacheMode) ElementType() reflect.Type { + return reflect.TypeOf((*CacheMode)(nil)).Elem() +} + +func (e CacheMode) ToCacheModeOutput() CacheModeOutput { + return pulumi.ToOutput(e).(CacheModeOutput) +} + +func (e CacheMode) ToCacheModeOutputWithContext(ctx context.Context) CacheModeOutput { + return pulumi.ToOutputWithContext(ctx, e).(CacheModeOutput) +} + +func (e CacheMode) ToCacheModePtrOutput() CacheModePtrOutput { + return e.ToCacheModePtrOutputWithContext(context.Background()) +} + +func (e CacheMode) ToCacheModePtrOutputWithContext(ctx context.Context) CacheModePtrOutput { + return CacheMode(e).ToCacheModeOutputWithContext(ctx).ToCacheModePtrOutputWithContext(ctx) +} + +func (e CacheMode) ToStringOutput() pulumi.StringOutput { + return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput) +} + +func (e CacheMode) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput { + return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput) +} + +func (e CacheMode) ToStringPtrOutput() pulumi.StringPtrOutput { + return pulumi.String(e).ToStringPtrOutputWithContext(context.Background()) +} + +func (e CacheMode) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx) +} + +type CacheModeOutput struct{ *pulumi.OutputState } + +func (CacheModeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheMode)(nil)).Elem() +} + +func (o CacheModeOutput) ToCacheModeOutput() CacheModeOutput { + return o +} + +func (o CacheModeOutput) ToCacheModeOutputWithContext(ctx context.Context) CacheModeOutput { + return o +} + +func (o CacheModeOutput) ToCacheModePtrOutput() CacheModePtrOutput { + return o.ToCacheModePtrOutputWithContext(context.Background()) +} + +func (o CacheModeOutput) ToCacheModePtrOutputWithContext(ctx context.Context) CacheModePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheMode) *CacheMode { + return &v + }).(CacheModePtrOutput) +} + +func (o CacheModeOutput) ToOutput(ctx context.Context) pulumix.Output[CacheMode] { + return pulumix.Output[CacheMode]{ + OutputState: o.OutputState, + } +} + +func (o CacheModeOutput) ToStringOutput() pulumi.StringOutput { + return o.ToStringOutputWithContext(context.Background()) +} + +func (o CacheModeOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e CacheMode) string { + return string(e) + }).(pulumi.StringOutput) +} + +func (o CacheModeOutput) ToStringPtrOutput() pulumi.StringPtrOutput { + return o.ToStringPtrOutputWithContext(context.Background()) +} + +func (o CacheModeOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e CacheMode) *string { + v := string(e) + return &v + }).(pulumi.StringPtrOutput) +} + +type CacheModePtrOutput struct{ *pulumi.OutputState } + +func (CacheModePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheMode)(nil)).Elem() +} + +func (o CacheModePtrOutput) ToCacheModePtrOutput() CacheModePtrOutput { + return o +} + +func (o CacheModePtrOutput) ToCacheModePtrOutputWithContext(ctx context.Context) CacheModePtrOutput { + return o +} + +func (o CacheModePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheMode] { + return pulumix.Output[*CacheMode]{ + OutputState: o.OutputState, + } +} + +func (o CacheModePtrOutput) Elem() CacheModeOutput { + return o.ApplyT(func(v *CacheMode) CacheMode { + if v != nil { + return *v + } + var ret CacheMode + return ret + }).(CacheModeOutput) +} + +func (o CacheModePtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput { + return o.ToStringPtrOutputWithContext(context.Background()) +} + +func (o CacheModePtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e *CacheMode) *string { + if e == nil { + return nil + } + v := string(*e) + return &v + }).(pulumi.StringPtrOutput) +} + +// CacheModeInput is an input type that accepts values of the CacheMode enum +// A concrete instance of `CacheModeInput` can be one of the following: +// +// CacheModeMin +// CacheModeMax +type CacheModeInput interface { + pulumi.Input + + ToCacheModeOutput() CacheModeOutput + ToCacheModeOutputWithContext(context.Context) CacheModeOutput +} + +var cacheModePtrType = reflect.TypeOf((**CacheMode)(nil)).Elem() + +type CacheModePtrInput interface { + pulumi.Input + + ToCacheModePtrOutput() CacheModePtrOutput + ToCacheModePtrOutputWithContext(context.Context) CacheModePtrOutput +} + +type cacheModePtr string + +func CacheModePtr(v string) CacheModePtrInput { + return (*cacheModePtr)(&v) +} + +func (*cacheModePtr) ElementType() reflect.Type { + return cacheModePtrType +} + +func (in *cacheModePtr) ToCacheModePtrOutput() CacheModePtrOutput { + return pulumi.ToOutput(in).(CacheModePtrOutput) +} + +func (in *cacheModePtr) ToCacheModePtrOutputWithContext(ctx context.Context) CacheModePtrOutput { + return pulumi.ToOutputWithContext(ctx, in).(CacheModePtrOutput) +} + +func (in *cacheModePtr) ToOutput(ctx context.Context) pulumix.Output[*CacheMode] { + return pulumix.Output[*CacheMode]{ + OutputState: in.ToCacheModePtrOutputWithContext(ctx).OutputState, + } +} + +type CompressionType string + +const ( + // Use `gzip` for compression. + CompressionTypeGzip = CompressionType("gzip") + // Use `estargz` for compression. + CompressionTypeEstargz = CompressionType("estargz") + // Use `zstd` for compression. + CompressionTypeZstd = CompressionType("zstd") +) + +func (CompressionType) ElementType() reflect.Type { + return reflect.TypeOf((*CompressionType)(nil)).Elem() +} + +func (e CompressionType) ToCompressionTypeOutput() CompressionTypeOutput { + return pulumi.ToOutput(e).(CompressionTypeOutput) +} + +func (e CompressionType) ToCompressionTypeOutputWithContext(ctx context.Context) CompressionTypeOutput { + return pulumi.ToOutputWithContext(ctx, e).(CompressionTypeOutput) +} + +func (e CompressionType) ToCompressionTypePtrOutput() CompressionTypePtrOutput { + return e.ToCompressionTypePtrOutputWithContext(context.Background()) +} + +func (e CompressionType) ToCompressionTypePtrOutputWithContext(ctx context.Context) CompressionTypePtrOutput { + return CompressionType(e).ToCompressionTypeOutputWithContext(ctx).ToCompressionTypePtrOutputWithContext(ctx) +} + +func (e CompressionType) ToStringOutput() pulumi.StringOutput { + return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput) +} + +func (e CompressionType) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput { + return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput) +} + +func (e CompressionType) ToStringPtrOutput() pulumi.StringPtrOutput { + return pulumi.String(e).ToStringPtrOutputWithContext(context.Background()) +} + +func (e CompressionType) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx) +} + +type CompressionTypeOutput struct{ *pulumi.OutputState } + +func (CompressionTypeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CompressionType)(nil)).Elem() +} + +func (o CompressionTypeOutput) ToCompressionTypeOutput() CompressionTypeOutput { + return o +} + +func (o CompressionTypeOutput) ToCompressionTypeOutputWithContext(ctx context.Context) CompressionTypeOutput { + return o +} + +func (o CompressionTypeOutput) ToCompressionTypePtrOutput() CompressionTypePtrOutput { + return o.ToCompressionTypePtrOutputWithContext(context.Background()) +} + +func (o CompressionTypeOutput) ToCompressionTypePtrOutputWithContext(ctx context.Context) CompressionTypePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CompressionType) *CompressionType { + return &v + }).(CompressionTypePtrOutput) +} + +func (o CompressionTypeOutput) ToOutput(ctx context.Context) pulumix.Output[CompressionType] { + return pulumix.Output[CompressionType]{ + OutputState: o.OutputState, + } +} + +func (o CompressionTypeOutput) ToStringOutput() pulumi.StringOutput { + return o.ToStringOutputWithContext(context.Background()) +} + +func (o CompressionTypeOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e CompressionType) string { + return string(e) + }).(pulumi.StringOutput) +} + +func (o CompressionTypeOutput) ToStringPtrOutput() pulumi.StringPtrOutput { + return o.ToStringPtrOutputWithContext(context.Background()) +} + +func (o CompressionTypeOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e CompressionType) *string { + v := string(e) + return &v + }).(pulumi.StringPtrOutput) +} + +type CompressionTypePtrOutput struct{ *pulumi.OutputState } + +func (CompressionTypePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CompressionType)(nil)).Elem() +} + +func (o CompressionTypePtrOutput) ToCompressionTypePtrOutput() CompressionTypePtrOutput { + return o +} + +func (o CompressionTypePtrOutput) ToCompressionTypePtrOutputWithContext(ctx context.Context) CompressionTypePtrOutput { + return o +} + +func (o CompressionTypePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CompressionType] { + return pulumix.Output[*CompressionType]{ + OutputState: o.OutputState, + } +} + +func (o CompressionTypePtrOutput) Elem() CompressionTypeOutput { + return o.ApplyT(func(v *CompressionType) CompressionType { + if v != nil { + return *v + } + var ret CompressionType + return ret + }).(CompressionTypeOutput) +} + +func (o CompressionTypePtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput { + return o.ToStringPtrOutputWithContext(context.Background()) +} + +func (o CompressionTypePtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e *CompressionType) *string { + if e == nil { + return nil + } + v := string(*e) + return &v + }).(pulumi.StringPtrOutput) +} + +// CompressionTypeInput is an input type that accepts values of the CompressionType enum +// A concrete instance of `CompressionTypeInput` can be one of the following: +// +// CompressionTypeGzip +// CompressionTypeEstargz +// CompressionTypeZstd +type CompressionTypeInput interface { + pulumi.Input + + ToCompressionTypeOutput() CompressionTypeOutput + ToCompressionTypeOutputWithContext(context.Context) CompressionTypeOutput +} + +var compressionTypePtrType = reflect.TypeOf((**CompressionType)(nil)).Elem() + +type CompressionTypePtrInput interface { + pulumi.Input + + ToCompressionTypePtrOutput() CompressionTypePtrOutput + ToCompressionTypePtrOutputWithContext(context.Context) CompressionTypePtrOutput +} + +type compressionTypePtr string + +func CompressionTypePtr(v string) CompressionTypePtrInput { + return (*compressionTypePtr)(&v) +} + +func (*compressionTypePtr) ElementType() reflect.Type { + return compressionTypePtrType +} + +func (in *compressionTypePtr) ToCompressionTypePtrOutput() CompressionTypePtrOutput { + return pulumi.ToOutput(in).(CompressionTypePtrOutput) +} + +func (in *compressionTypePtr) ToCompressionTypePtrOutputWithContext(ctx context.Context) CompressionTypePtrOutput { + return pulumi.ToOutputWithContext(ctx, in).(CompressionTypePtrOutput) +} + +func (in *compressionTypePtr) ToOutput(ctx context.Context) pulumix.Output[*CompressionType] { + return pulumix.Output[*CompressionType]{ + OutputState: in.ToCompressionTypePtrOutputWithContext(ctx).OutputState, + } +} + +type NetworkMode string + +const ( + // The default sandbox network mode. + NetworkModeDefault = NetworkMode("default") + // Host network mode. + NetworkModeHost = NetworkMode("host") + // Disable network access. + NetworkModeNone = NetworkMode("none") +) + +func (NetworkMode) ElementType() reflect.Type { + return reflect.TypeOf((*NetworkMode)(nil)).Elem() +} + +func (e NetworkMode) ToNetworkModeOutput() NetworkModeOutput { + return pulumi.ToOutput(e).(NetworkModeOutput) +} + +func (e NetworkMode) ToNetworkModeOutputWithContext(ctx context.Context) NetworkModeOutput { + return pulumi.ToOutputWithContext(ctx, e).(NetworkModeOutput) +} + +func (e NetworkMode) ToNetworkModePtrOutput() NetworkModePtrOutput { + return e.ToNetworkModePtrOutputWithContext(context.Background()) +} + +func (e NetworkMode) ToNetworkModePtrOutputWithContext(ctx context.Context) NetworkModePtrOutput { + return NetworkMode(e).ToNetworkModeOutputWithContext(ctx).ToNetworkModePtrOutputWithContext(ctx) +} + +func (e NetworkMode) ToStringOutput() pulumi.StringOutput { + return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput) +} + +func (e NetworkMode) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput { + return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput) +} + +func (e NetworkMode) ToStringPtrOutput() pulumi.StringPtrOutput { + return pulumi.String(e).ToStringPtrOutputWithContext(context.Background()) +} + +func (e NetworkMode) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx) +} + +type NetworkModeOutput struct{ *pulumi.OutputState } + +func (NetworkModeOutput) ElementType() reflect.Type { + return reflect.TypeOf((*NetworkMode)(nil)).Elem() +} + +func (o NetworkModeOutput) ToNetworkModeOutput() NetworkModeOutput { + return o +} + +func (o NetworkModeOutput) ToNetworkModeOutputWithContext(ctx context.Context) NetworkModeOutput { + return o +} + +func (o NetworkModeOutput) ToNetworkModePtrOutput() NetworkModePtrOutput { + return o.ToNetworkModePtrOutputWithContext(context.Background()) +} + +func (o NetworkModeOutput) ToNetworkModePtrOutputWithContext(ctx context.Context) NetworkModePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v NetworkMode) *NetworkMode { + return &v + }).(NetworkModePtrOutput) +} + +func (o NetworkModeOutput) ToOutput(ctx context.Context) pulumix.Output[NetworkMode] { + return pulumix.Output[NetworkMode]{ + OutputState: o.OutputState, + } +} + +func (o NetworkModeOutput) ToStringOutput() pulumi.StringOutput { + return o.ToStringOutputWithContext(context.Background()) +} + +func (o NetworkModeOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e NetworkMode) string { + return string(e) + }).(pulumi.StringOutput) +} + +func (o NetworkModeOutput) ToStringPtrOutput() pulumi.StringPtrOutput { + return o.ToStringPtrOutputWithContext(context.Background()) +} + +func (o NetworkModeOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e NetworkMode) *string { + v := string(e) + return &v + }).(pulumi.StringPtrOutput) +} + +type NetworkModePtrOutput struct{ *pulumi.OutputState } + +func (NetworkModePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**NetworkMode)(nil)).Elem() +} + +func (o NetworkModePtrOutput) ToNetworkModePtrOutput() NetworkModePtrOutput { + return o +} + +func (o NetworkModePtrOutput) ToNetworkModePtrOutputWithContext(ctx context.Context) NetworkModePtrOutput { + return o +} + +func (o NetworkModePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*NetworkMode] { + return pulumix.Output[*NetworkMode]{ + OutputState: o.OutputState, + } +} + +func (o NetworkModePtrOutput) Elem() NetworkModeOutput { + return o.ApplyT(func(v *NetworkMode) NetworkMode { + if v != nil { + return *v + } + var ret NetworkMode + return ret + }).(NetworkModeOutput) +} + +func (o NetworkModePtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput { + return o.ToStringPtrOutputWithContext(context.Background()) +} + +func (o NetworkModePtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e *NetworkMode) *string { + if e == nil { + return nil + } + v := string(*e) + return &v + }).(pulumi.StringPtrOutput) +} + +// NetworkModeInput is an input type that accepts values of the NetworkMode enum +// A concrete instance of `NetworkModeInput` can be one of the following: +// +// NetworkModeDefault +// NetworkModeHost +// NetworkModeNone +type NetworkModeInput interface { + pulumi.Input + + ToNetworkModeOutput() NetworkModeOutput + ToNetworkModeOutputWithContext(context.Context) NetworkModeOutput +} + +var networkModePtrType = reflect.TypeOf((**NetworkMode)(nil)).Elem() + +type NetworkModePtrInput interface { + pulumi.Input + + ToNetworkModePtrOutput() NetworkModePtrOutput + ToNetworkModePtrOutputWithContext(context.Context) NetworkModePtrOutput +} + +type networkModePtr string + +func NetworkModePtr(v string) NetworkModePtrInput { + return (*networkModePtr)(&v) +} + +func (*networkModePtr) ElementType() reflect.Type { + return networkModePtrType +} + +func (in *networkModePtr) ToNetworkModePtrOutput() NetworkModePtrOutput { + return pulumi.ToOutput(in).(NetworkModePtrOutput) +} + +func (in *networkModePtr) ToNetworkModePtrOutputWithContext(ctx context.Context) NetworkModePtrOutput { + return pulumi.ToOutputWithContext(ctx, in).(NetworkModePtrOutput) +} + +func (in *networkModePtr) ToOutput(ctx context.Context) pulumix.Output[*NetworkMode] { + return pulumix.Output[*NetworkMode]{ + OutputState: in.ToNetworkModePtrOutputWithContext(ctx).OutputState, + } +} + +type Platform string + +const ( + Platform_Darwin_386 = Platform("darwin/386") + Platform_Darwin_amd64 = Platform("darwin/amd64") + Platform_Darwin_arm = Platform("darwin/arm") + Platform_Darwin_arm64 = Platform("darwin/arm64") + Platform_Dragonfly_amd64 = Platform("dragonfly/amd64") + Platform_Freebsd_386 = Platform("freebsd/386") + Platform_Freebsd_amd64 = Platform("freebsd/amd64") + Platform_Freebsd_arm = Platform("freebsd/arm") + Platform_Linux_386 = Platform("linux/386") + Platform_Linux_amd64 = Platform("linux/amd64") + Platform_Linux_arm = Platform("linux/arm") + Platform_Linux_arm64 = Platform("linux/arm64") + Platform_Linux_mips64 = Platform("linux/mips64") + Platform_Linux_mips64le = Platform("linux/mips64le") + Platform_Linux_ppc64le = Platform("linux/ppc64le") + Platform_Linux_riscv64 = Platform("linux/riscv64") + Platform_Linux_s390x = Platform("linux/s390x") + Platform_Netbsd_386 = Platform("netbsd/386") + Platform_Netbsd_amd64 = Platform("netbsd/amd64") + Platform_Netbsd_arm = Platform("netbsd/arm") + Platform_Openbsd_386 = Platform("openbsd/386") + Platform_Openbsd_amd64 = Platform("openbsd/amd64") + Platform_Openbsd_arm = Platform("openbsd/arm") + Platform_Plan9_386 = Platform("plan9/386") + Platform_Plan9_amd64 = Platform("plan9/amd64") + Platform_Solaris_amd64 = Platform("solaris/amd64") + Platform_Windows_386 = Platform("windows/386") + Platform_Windows_amd64 = Platform("windows/amd64") +) + +func (Platform) ElementType() reflect.Type { + return reflect.TypeOf((*Platform)(nil)).Elem() +} + +func (e Platform) ToPlatformOutput() PlatformOutput { + return pulumi.ToOutput(e).(PlatformOutput) +} + +func (e Platform) ToPlatformOutputWithContext(ctx context.Context) PlatformOutput { + return pulumi.ToOutputWithContext(ctx, e).(PlatformOutput) +} + +func (e Platform) ToPlatformPtrOutput() PlatformPtrOutput { + return e.ToPlatformPtrOutputWithContext(context.Background()) +} + +func (e Platform) ToPlatformPtrOutputWithContext(ctx context.Context) PlatformPtrOutput { + return Platform(e).ToPlatformOutputWithContext(ctx).ToPlatformPtrOutputWithContext(ctx) +} + +func (e Platform) ToStringOutput() pulumi.StringOutput { + return pulumi.ToOutput(pulumi.String(e)).(pulumi.StringOutput) +} + +func (e Platform) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput { + return pulumi.ToOutputWithContext(ctx, pulumi.String(e)).(pulumi.StringOutput) +} + +func (e Platform) ToStringPtrOutput() pulumi.StringPtrOutput { + return pulumi.String(e).ToStringPtrOutputWithContext(context.Background()) +} + +func (e Platform) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return pulumi.String(e).ToStringOutputWithContext(ctx).ToStringPtrOutputWithContext(ctx) +} + +type PlatformOutput struct{ *pulumi.OutputState } + +func (PlatformOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Platform)(nil)).Elem() +} + +func (o PlatformOutput) ToPlatformOutput() PlatformOutput { + return o +} + +func (o PlatformOutput) ToPlatformOutputWithContext(ctx context.Context) PlatformOutput { + return o +} + +func (o PlatformOutput) ToPlatformPtrOutput() PlatformPtrOutput { + return o.ToPlatformPtrOutputWithContext(context.Background()) +} + +func (o PlatformOutput) ToPlatformPtrOutputWithContext(ctx context.Context) PlatformPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v Platform) *Platform { + return &v + }).(PlatformPtrOutput) +} + +func (o PlatformOutput) ToOutput(ctx context.Context) pulumix.Output[Platform] { + return pulumix.Output[Platform]{ + OutputState: o.OutputState, + } +} + +func (o PlatformOutput) ToStringOutput() pulumi.StringOutput { + return o.ToStringOutputWithContext(context.Background()) +} + +func (o PlatformOutput) ToStringOutputWithContext(ctx context.Context) pulumi.StringOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e Platform) string { + return string(e) + }).(pulumi.StringOutput) +} + +func (o PlatformOutput) ToStringPtrOutput() pulumi.StringPtrOutput { + return o.ToStringPtrOutputWithContext(context.Background()) +} + +func (o PlatformOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e Platform) *string { + v := string(e) + return &v + }).(pulumi.StringPtrOutput) +} + +type PlatformPtrOutput struct{ *pulumi.OutputState } + +func (PlatformPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**Platform)(nil)).Elem() +} + +func (o PlatformPtrOutput) ToPlatformPtrOutput() PlatformPtrOutput { + return o +} + +func (o PlatformPtrOutput) ToPlatformPtrOutputWithContext(ctx context.Context) PlatformPtrOutput { + return o +} + +func (o PlatformPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*Platform] { + return pulumix.Output[*Platform]{ + OutputState: o.OutputState, + } +} + +func (o PlatformPtrOutput) Elem() PlatformOutput { + return o.ApplyT(func(v *Platform) Platform { + if v != nil { + return *v + } + var ret Platform + return ret + }).(PlatformOutput) +} + +func (o PlatformPtrOutput) ToStringPtrOutput() pulumi.StringPtrOutput { + return o.ToStringPtrOutputWithContext(context.Background()) +} + +func (o PlatformPtrOutput) ToStringPtrOutputWithContext(ctx context.Context) pulumi.StringPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, e *Platform) *string { + if e == nil { + return nil + } + v := string(*e) + return &v + }).(pulumi.StringPtrOutput) +} + +// PlatformInput is an input type that accepts values of the Platform enum +// A concrete instance of `PlatformInput` can be one of the following: +// +// Platform_Darwin_386 +// Platform_Darwin_amd64 +// Platform_Darwin_arm +// Platform_Darwin_arm64 +// Platform_Dragonfly_amd64 +// Platform_Freebsd_386 +// Platform_Freebsd_amd64 +// Platform_Freebsd_arm +// Platform_Linux_386 +// Platform_Linux_amd64 +// Platform_Linux_arm +// Platform_Linux_arm64 +// Platform_Linux_mips64 +// Platform_Linux_mips64le +// Platform_Linux_ppc64le +// Platform_Linux_riscv64 +// Platform_Linux_s390x +// Platform_Netbsd_386 +// Platform_Netbsd_amd64 +// Platform_Netbsd_arm +// Platform_Openbsd_386 +// Platform_Openbsd_amd64 +// Platform_Openbsd_arm +// Platform_Plan9_386 +// Platform_Plan9_amd64 +// Platform_Solaris_amd64 +// Platform_Windows_386 +// Platform_Windows_amd64 +type PlatformInput interface { + pulumi.Input + + ToPlatformOutput() PlatformOutput + ToPlatformOutputWithContext(context.Context) PlatformOutput +} + +var platformPtrType = reflect.TypeOf((**Platform)(nil)).Elem() + +type PlatformPtrInput interface { + pulumi.Input + + ToPlatformPtrOutput() PlatformPtrOutput + ToPlatformPtrOutputWithContext(context.Context) PlatformPtrOutput +} + +type platformPtr string + +func PlatformPtr(v string) PlatformPtrInput { + return (*platformPtr)(&v) +} + +func (*platformPtr) ElementType() reflect.Type { + return platformPtrType +} + +func (in *platformPtr) ToPlatformPtrOutput() PlatformPtrOutput { + return pulumi.ToOutput(in).(PlatformPtrOutput) +} + +func (in *platformPtr) ToPlatformPtrOutputWithContext(ctx context.Context) PlatformPtrOutput { + return pulumi.ToOutputWithContext(ctx, in).(PlatformPtrOutput) +} + +func (in *platformPtr) ToOutput(ctx context.Context) pulumix.Output[*Platform] { + return pulumix.Output[*Platform]{ + OutputState: in.ToPlatformPtrOutputWithContext(ctx).OutputState, + } +} + +// PlatformArrayInput is an input type that accepts PlatformArray and PlatformArrayOutput values. +// You can construct a concrete instance of `PlatformArrayInput` via: +// +// PlatformArray{ PlatformArgs{...} } +type PlatformArrayInput interface { + pulumi.Input + + ToPlatformArrayOutput() PlatformArrayOutput + ToPlatformArrayOutputWithContext(context.Context) PlatformArrayOutput +} + +type PlatformArray []Platform + +func (PlatformArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]Platform)(nil)).Elem() +} + +func (i PlatformArray) ToPlatformArrayOutput() PlatformArrayOutput { + return i.ToPlatformArrayOutputWithContext(context.Background()) +} + +func (i PlatformArray) ToPlatformArrayOutputWithContext(ctx context.Context) PlatformArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(PlatformArrayOutput) +} + +func (i PlatformArray) ToOutput(ctx context.Context) pulumix.Output[[]Platform] { + return pulumix.Output[[]Platform]{ + OutputState: i.ToPlatformArrayOutputWithContext(ctx).OutputState, + } +} + +type PlatformArrayOutput struct{ *pulumi.OutputState } + +func (PlatformArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]Platform)(nil)).Elem() +} + +func (o PlatformArrayOutput) ToPlatformArrayOutput() PlatformArrayOutput { + return o +} + +func (o PlatformArrayOutput) ToPlatformArrayOutputWithContext(ctx context.Context) PlatformArrayOutput { + return o +} + +func (o PlatformArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]Platform] { + return pulumix.Output[[]Platform]{ + OutputState: o.OutputState, + } +} + +func (o PlatformArrayOutput) Index(i pulumi.IntInput) PlatformOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) Platform { + return vs[0].([]Platform)[vs[1].(int)] + }).(PlatformOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*CacheModeInput)(nil)).Elem(), CacheMode("min")) + pulumi.RegisterInputType(reflect.TypeOf((*CacheModePtrInput)(nil)).Elem(), CacheMode("min")) + pulumi.RegisterInputType(reflect.TypeOf((*CompressionTypeInput)(nil)).Elem(), CompressionType("gzip")) + pulumi.RegisterInputType(reflect.TypeOf((*CompressionTypePtrInput)(nil)).Elem(), CompressionType("gzip")) + pulumi.RegisterInputType(reflect.TypeOf((*NetworkModeInput)(nil)).Elem(), NetworkMode("default")) + pulumi.RegisterInputType(reflect.TypeOf((*NetworkModePtrInput)(nil)).Elem(), NetworkMode("default")) + pulumi.RegisterInputType(reflect.TypeOf((*PlatformInput)(nil)).Elem(), Platform("darwin/386")) + pulumi.RegisterInputType(reflect.TypeOf((*PlatformPtrInput)(nil)).Elem(), Platform("darwin/386")) + pulumi.RegisterInputType(reflect.TypeOf((*PlatformArrayInput)(nil)).Elem(), PlatformArray{}) + pulumi.RegisterOutputType(CacheModeOutput{}) + pulumi.RegisterOutputType(CacheModePtrOutput{}) + pulumi.RegisterOutputType(CompressionTypeOutput{}) + pulumi.RegisterOutputType(CompressionTypePtrOutput{}) + pulumi.RegisterOutputType(NetworkModeOutput{}) + pulumi.RegisterOutputType(NetworkModePtrOutput{}) + pulumi.RegisterOutputType(PlatformOutput{}) + pulumi.RegisterOutputType(PlatformPtrOutput{}) + pulumi.RegisterOutputType(PlatformArrayOutput{}) +} diff --git a/sdk/go/dockerbuild/pulumiTypes.go b/sdk/go/dockerbuild/pulumiTypes.go new file mode 100644 index 0000000..48c01e0 --- /dev/null +++ b/sdk/go/dockerbuild/pulumiTypes.go @@ -0,0 +1,7217 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dockerbuild + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +var _ = internal.GetEnvOrDefault + +type BuildContext struct { + // Resources to use for build context. + // + // The location can be: + // * A relative or absolute path to a local directory (`.`, `./app`, + // `/app`, etc.). + // * A remote URL of a Git repository, tarball, or plain text file + // (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + // etc.). + Location string `pulumi:"location"` + // Additional build contexts to use. + // + // These contexts are accessed with `FROM name` or `--from=name` + // statements when using Dockerfile 1.4+ syntax. + // + // Values can be local paths, HTTP URLs, or `docker-image://` images. + Named map[string]Context `pulumi:"named"` +} + +// BuildContextInput is an input type that accepts BuildContextArgs and BuildContextOutput values. +// You can construct a concrete instance of `BuildContextInput` via: +// +// BuildContextArgs{...} +type BuildContextInput interface { + pulumi.Input + + ToBuildContextOutput() BuildContextOutput + ToBuildContextOutputWithContext(context.Context) BuildContextOutput +} + +type BuildContextArgs struct { + // Resources to use for build context. + // + // The location can be: + // * A relative or absolute path to a local directory (`.`, `./app`, + // `/app`, etc.). + // * A remote URL of a Git repository, tarball, or plain text file + // (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + // etc.). + Location pulumi.StringInput `pulumi:"location"` + // Additional build contexts to use. + // + // These contexts are accessed with `FROM name` or `--from=name` + // statements when using Dockerfile 1.4+ syntax. + // + // Values can be local paths, HTTP URLs, or `docker-image://` images. + Named ContextMapInput `pulumi:"named"` +} + +func (BuildContextArgs) ElementType() reflect.Type { + return reflect.TypeOf((*BuildContext)(nil)).Elem() +} + +func (i BuildContextArgs) ToBuildContextOutput() BuildContextOutput { + return i.ToBuildContextOutputWithContext(context.Background()) +} + +func (i BuildContextArgs) ToBuildContextOutputWithContext(ctx context.Context) BuildContextOutput { + return pulumi.ToOutputWithContext(ctx, i).(BuildContextOutput) +} + +func (i BuildContextArgs) ToOutput(ctx context.Context) pulumix.Output[BuildContext] { + return pulumix.Output[BuildContext]{ + OutputState: i.ToBuildContextOutputWithContext(ctx).OutputState, + } +} + +func (i BuildContextArgs) ToBuildContextPtrOutput() BuildContextPtrOutput { + return i.ToBuildContextPtrOutputWithContext(context.Background()) +} + +func (i BuildContextArgs) ToBuildContextPtrOutputWithContext(ctx context.Context) BuildContextPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(BuildContextOutput).ToBuildContextPtrOutputWithContext(ctx) +} + +// BuildContextPtrInput is an input type that accepts BuildContextArgs, BuildContextPtr and BuildContextPtrOutput values. +// You can construct a concrete instance of `BuildContextPtrInput` via: +// +// BuildContextArgs{...} +// +// or: +// +// nil +type BuildContextPtrInput interface { + pulumi.Input + + ToBuildContextPtrOutput() BuildContextPtrOutput + ToBuildContextPtrOutputWithContext(context.Context) BuildContextPtrOutput +} + +type buildContextPtrType BuildContextArgs + +func BuildContextPtr(v *BuildContextArgs) BuildContextPtrInput { + return (*buildContextPtrType)(v) +} + +func (*buildContextPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**BuildContext)(nil)).Elem() +} + +func (i *buildContextPtrType) ToBuildContextPtrOutput() BuildContextPtrOutput { + return i.ToBuildContextPtrOutputWithContext(context.Background()) +} + +func (i *buildContextPtrType) ToBuildContextPtrOutputWithContext(ctx context.Context) BuildContextPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(BuildContextPtrOutput) +} + +func (i *buildContextPtrType) ToOutput(ctx context.Context) pulumix.Output[*BuildContext] { + return pulumix.Output[*BuildContext]{ + OutputState: i.ToBuildContextPtrOutputWithContext(ctx).OutputState, + } +} + +type BuildContextOutput struct{ *pulumi.OutputState } + +func (BuildContextOutput) ElementType() reflect.Type { + return reflect.TypeOf((*BuildContext)(nil)).Elem() +} + +func (o BuildContextOutput) ToBuildContextOutput() BuildContextOutput { + return o +} + +func (o BuildContextOutput) ToBuildContextOutputWithContext(ctx context.Context) BuildContextOutput { + return o +} + +func (o BuildContextOutput) ToBuildContextPtrOutput() BuildContextPtrOutput { + return o.ToBuildContextPtrOutputWithContext(context.Background()) +} + +func (o BuildContextOutput) ToBuildContextPtrOutputWithContext(ctx context.Context) BuildContextPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v BuildContext) *BuildContext { + return &v + }).(BuildContextPtrOutput) +} + +func (o BuildContextOutput) ToOutput(ctx context.Context) pulumix.Output[BuildContext] { + return pulumix.Output[BuildContext]{ + OutputState: o.OutputState, + } +} + +// Resources to use for build context. +// +// The location can be: +// - A relative or absolute path to a local directory (`.`, `./app`, +// `/app`, etc.). +// - A remote URL of a Git repository, tarball, or plain text file +// (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, +// etc.). +func (o BuildContextOutput) Location() pulumi.StringOutput { + return o.ApplyT(func(v BuildContext) string { return v.Location }).(pulumi.StringOutput) +} + +// Additional build contexts to use. +// +// These contexts are accessed with `FROM name` or `--from=name` +// statements when using Dockerfile 1.4+ syntax. +// +// Values can be local paths, HTTP URLs, or `docker-image://` images. +func (o BuildContextOutput) Named() ContextMapOutput { + return o.ApplyT(func(v BuildContext) map[string]Context { return v.Named }).(ContextMapOutput) +} + +type BuildContextPtrOutput struct{ *pulumi.OutputState } + +func (BuildContextPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**BuildContext)(nil)).Elem() +} + +func (o BuildContextPtrOutput) ToBuildContextPtrOutput() BuildContextPtrOutput { + return o +} + +func (o BuildContextPtrOutput) ToBuildContextPtrOutputWithContext(ctx context.Context) BuildContextPtrOutput { + return o +} + +func (o BuildContextPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*BuildContext] { + return pulumix.Output[*BuildContext]{ + OutputState: o.OutputState, + } +} + +func (o BuildContextPtrOutput) Elem() BuildContextOutput { + return o.ApplyT(func(v *BuildContext) BuildContext { + if v != nil { + return *v + } + var ret BuildContext + return ret + }).(BuildContextOutput) +} + +// Resources to use for build context. +// +// The location can be: +// - A relative or absolute path to a local directory (`.`, `./app`, +// `/app`, etc.). +// - A remote URL of a Git repository, tarball, or plain text file +// (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, +// etc.). +func (o BuildContextPtrOutput) Location() pulumi.StringPtrOutput { + return o.ApplyT(func(v *BuildContext) *string { + if v == nil { + return nil + } + return &v.Location + }).(pulumi.StringPtrOutput) +} + +// Additional build contexts to use. +// +// These contexts are accessed with `FROM name` or `--from=name` +// statements when using Dockerfile 1.4+ syntax. +// +// Values can be local paths, HTTP URLs, or `docker-image://` images. +func (o BuildContextPtrOutput) Named() ContextMapOutput { + return o.ApplyT(func(v *BuildContext) map[string]Context { + if v == nil { + return nil + } + return v.Named + }).(ContextMapOutput) +} + +type BuilderConfig struct { + // Name of an existing buildx builder to use. + // + // Only `docker-container`, `kubernetes`, or `remote` drivers are + // supported. The legacy `docker` driver is not supported. + // + // Equivalent to Docker's `--builder` flag. + Name *string `pulumi:"name"` +} + +// BuilderConfigInput is an input type that accepts BuilderConfigArgs and BuilderConfigOutput values. +// You can construct a concrete instance of `BuilderConfigInput` via: +// +// BuilderConfigArgs{...} +type BuilderConfigInput interface { + pulumi.Input + + ToBuilderConfigOutput() BuilderConfigOutput + ToBuilderConfigOutputWithContext(context.Context) BuilderConfigOutput +} + +type BuilderConfigArgs struct { + // Name of an existing buildx builder to use. + // + // Only `docker-container`, `kubernetes`, or `remote` drivers are + // supported. The legacy `docker` driver is not supported. + // + // Equivalent to Docker's `--builder` flag. + Name pulumi.StringPtrInput `pulumi:"name"` +} + +func (BuilderConfigArgs) ElementType() reflect.Type { + return reflect.TypeOf((*BuilderConfig)(nil)).Elem() +} + +func (i BuilderConfigArgs) ToBuilderConfigOutput() BuilderConfigOutput { + return i.ToBuilderConfigOutputWithContext(context.Background()) +} + +func (i BuilderConfigArgs) ToBuilderConfigOutputWithContext(ctx context.Context) BuilderConfigOutput { + return pulumi.ToOutputWithContext(ctx, i).(BuilderConfigOutput) +} + +func (i BuilderConfigArgs) ToOutput(ctx context.Context) pulumix.Output[BuilderConfig] { + return pulumix.Output[BuilderConfig]{ + OutputState: i.ToBuilderConfigOutputWithContext(ctx).OutputState, + } +} + +func (i BuilderConfigArgs) ToBuilderConfigPtrOutput() BuilderConfigPtrOutput { + return i.ToBuilderConfigPtrOutputWithContext(context.Background()) +} + +func (i BuilderConfigArgs) ToBuilderConfigPtrOutputWithContext(ctx context.Context) BuilderConfigPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(BuilderConfigOutput).ToBuilderConfigPtrOutputWithContext(ctx) +} + +// BuilderConfigPtrInput is an input type that accepts BuilderConfigArgs, BuilderConfigPtr and BuilderConfigPtrOutput values. +// You can construct a concrete instance of `BuilderConfigPtrInput` via: +// +// BuilderConfigArgs{...} +// +// or: +// +// nil +type BuilderConfigPtrInput interface { + pulumi.Input + + ToBuilderConfigPtrOutput() BuilderConfigPtrOutput + ToBuilderConfigPtrOutputWithContext(context.Context) BuilderConfigPtrOutput +} + +type builderConfigPtrType BuilderConfigArgs + +func BuilderConfigPtr(v *BuilderConfigArgs) BuilderConfigPtrInput { + return (*builderConfigPtrType)(v) +} + +func (*builderConfigPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**BuilderConfig)(nil)).Elem() +} + +func (i *builderConfigPtrType) ToBuilderConfigPtrOutput() BuilderConfigPtrOutput { + return i.ToBuilderConfigPtrOutputWithContext(context.Background()) +} + +func (i *builderConfigPtrType) ToBuilderConfigPtrOutputWithContext(ctx context.Context) BuilderConfigPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(BuilderConfigPtrOutput) +} + +func (i *builderConfigPtrType) ToOutput(ctx context.Context) pulumix.Output[*BuilderConfig] { + return pulumix.Output[*BuilderConfig]{ + OutputState: i.ToBuilderConfigPtrOutputWithContext(ctx).OutputState, + } +} + +type BuilderConfigOutput struct{ *pulumi.OutputState } + +func (BuilderConfigOutput) ElementType() reflect.Type { + return reflect.TypeOf((*BuilderConfig)(nil)).Elem() +} + +func (o BuilderConfigOutput) ToBuilderConfigOutput() BuilderConfigOutput { + return o +} + +func (o BuilderConfigOutput) ToBuilderConfigOutputWithContext(ctx context.Context) BuilderConfigOutput { + return o +} + +func (o BuilderConfigOutput) ToBuilderConfigPtrOutput() BuilderConfigPtrOutput { + return o.ToBuilderConfigPtrOutputWithContext(context.Background()) +} + +func (o BuilderConfigOutput) ToBuilderConfigPtrOutputWithContext(ctx context.Context) BuilderConfigPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v BuilderConfig) *BuilderConfig { + return &v + }).(BuilderConfigPtrOutput) +} + +func (o BuilderConfigOutput) ToOutput(ctx context.Context) pulumix.Output[BuilderConfig] { + return pulumix.Output[BuilderConfig]{ + OutputState: o.OutputState, + } +} + +// Name of an existing buildx builder to use. +// +// Only `docker-container`, `kubernetes`, or `remote` drivers are +// supported. The legacy `docker` driver is not supported. +// +// Equivalent to Docker's `--builder` flag. +func (o BuilderConfigOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v BuilderConfig) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +type BuilderConfigPtrOutput struct{ *pulumi.OutputState } + +func (BuilderConfigPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**BuilderConfig)(nil)).Elem() +} + +func (o BuilderConfigPtrOutput) ToBuilderConfigPtrOutput() BuilderConfigPtrOutput { + return o +} + +func (o BuilderConfigPtrOutput) ToBuilderConfigPtrOutputWithContext(ctx context.Context) BuilderConfigPtrOutput { + return o +} + +func (o BuilderConfigPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*BuilderConfig] { + return pulumix.Output[*BuilderConfig]{ + OutputState: o.OutputState, + } +} + +func (o BuilderConfigPtrOutput) Elem() BuilderConfigOutput { + return o.ApplyT(func(v *BuilderConfig) BuilderConfig { + if v != nil { + return *v + } + var ret BuilderConfig + return ret + }).(BuilderConfigOutput) +} + +// Name of an existing buildx builder to use. +// +// Only `docker-container`, `kubernetes`, or `remote` drivers are +// supported. The legacy `docker` driver is not supported. +// +// Equivalent to Docker's `--builder` flag. +func (o BuilderConfigPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *BuilderConfig) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +type CacheFrom struct { + // Upload build caches to Azure's blob storage service. + Azblob *CacheFromAzureBlob `pulumi:"azblob"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled *bool `pulumi:"disabled"` + // Recommended for use with GitHub Actions workflows. + // + // An action like `crazy-max/ghaction-github-runtime` is recommended to + // expose appropriate credentials to your GitHub workflow. + Gha *CacheFromGitHubActions `pulumi:"gha"` + // A simple backend which caches images on your local filesystem. + Local *CacheFromLocal `pulumi:"local"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=inline`). + Raw *string `pulumi:"raw"` + // Upload build caches to remote registries. + Registry *CacheFromRegistry `pulumi:"registry"` + // Upload build caches to AWS S3 or an S3-compatible services such as + // MinIO. + S3 *CacheFromS3 `pulumi:"s3"` +} + +// Defaults sets the appropriate defaults for CacheFrom +func (val *CacheFrom) Defaults() *CacheFrom { + if val == nil { + return nil + } + tmp := *val + tmp.Gha = tmp.Gha.Defaults() + + tmp.S3 = tmp.S3.Defaults() + + return &tmp +} + +// CacheFromInput is an input type that accepts CacheFromArgs and CacheFromOutput values. +// You can construct a concrete instance of `CacheFromInput` via: +// +// CacheFromArgs{...} +type CacheFromInput interface { + pulumi.Input + + ToCacheFromOutput() CacheFromOutput + ToCacheFromOutputWithContext(context.Context) CacheFromOutput +} + +type CacheFromArgs struct { + // Upload build caches to Azure's blob storage service. + Azblob CacheFromAzureBlobPtrInput `pulumi:"azblob"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled pulumi.BoolPtrInput `pulumi:"disabled"` + // Recommended for use with GitHub Actions workflows. + // + // An action like `crazy-max/ghaction-github-runtime` is recommended to + // expose appropriate credentials to your GitHub workflow. + Gha CacheFromGitHubActionsPtrInput `pulumi:"gha"` + // A simple backend which caches images on your local filesystem. + Local CacheFromLocalPtrInput `pulumi:"local"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=inline`). + Raw pulumi.StringPtrInput `pulumi:"raw"` + // Upload build caches to remote registries. + Registry CacheFromRegistryPtrInput `pulumi:"registry"` + // Upload build caches to AWS S3 or an S3-compatible services such as + // MinIO. + S3 CacheFromS3PtrInput `pulumi:"s3"` +} + +// Defaults sets the appropriate defaults for CacheFromArgs +func (val *CacheFromArgs) Defaults() *CacheFromArgs { + if val == nil { + return nil + } + tmp := *val + + return &tmp +} +func (CacheFromArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFrom)(nil)).Elem() +} + +func (i CacheFromArgs) ToCacheFromOutput() CacheFromOutput { + return i.ToCacheFromOutputWithContext(context.Background()) +} + +func (i CacheFromArgs) ToCacheFromOutputWithContext(ctx context.Context) CacheFromOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromOutput) +} + +func (i CacheFromArgs) ToOutput(ctx context.Context) pulumix.Output[CacheFrom] { + return pulumix.Output[CacheFrom]{ + OutputState: i.ToCacheFromOutputWithContext(ctx).OutputState, + } +} + +// CacheFromArrayInput is an input type that accepts CacheFromArray and CacheFromArrayOutput values. +// You can construct a concrete instance of `CacheFromArrayInput` via: +// +// CacheFromArray{ CacheFromArgs{...} } +type CacheFromArrayInput interface { + pulumi.Input + + ToCacheFromArrayOutput() CacheFromArrayOutput + ToCacheFromArrayOutputWithContext(context.Context) CacheFromArrayOutput +} + +type CacheFromArray []CacheFromInput + +func (CacheFromArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]CacheFrom)(nil)).Elem() +} + +func (i CacheFromArray) ToCacheFromArrayOutput() CacheFromArrayOutput { + return i.ToCacheFromArrayOutputWithContext(context.Background()) +} + +func (i CacheFromArray) ToCacheFromArrayOutputWithContext(ctx context.Context) CacheFromArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromArrayOutput) +} + +func (i CacheFromArray) ToOutput(ctx context.Context) pulumix.Output[[]CacheFrom] { + return pulumix.Output[[]CacheFrom]{ + OutputState: i.ToCacheFromArrayOutputWithContext(ctx).OutputState, + } +} + +type CacheFromOutput struct{ *pulumi.OutputState } + +func (CacheFromOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFrom)(nil)).Elem() +} + +func (o CacheFromOutput) ToCacheFromOutput() CacheFromOutput { + return o +} + +func (o CacheFromOutput) ToCacheFromOutputWithContext(ctx context.Context) CacheFromOutput { + return o +} + +func (o CacheFromOutput) ToOutput(ctx context.Context) pulumix.Output[CacheFrom] { + return pulumix.Output[CacheFrom]{ + OutputState: o.OutputState, + } +} + +// Upload build caches to Azure's blob storage service. +func (o CacheFromOutput) Azblob() CacheFromAzureBlobPtrOutput { + return o.ApplyT(func(v CacheFrom) *CacheFromAzureBlob { return v.Azblob }).(CacheFromAzureBlobPtrOutput) +} + +// When `true` this entry will be excluded. Defaults to `false`. +func (o CacheFromOutput) Disabled() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheFrom) *bool { return v.Disabled }).(pulumi.BoolPtrOutput) +} + +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to +// expose appropriate credentials to your GitHub workflow. +func (o CacheFromOutput) Gha() CacheFromGitHubActionsPtrOutput { + return o.ApplyT(func(v CacheFrom) *CacheFromGitHubActions { return v.Gha }).(CacheFromGitHubActionsPtrOutput) +} + +// A simple backend which caches images on your local filesystem. +func (o CacheFromOutput) Local() CacheFromLocalPtrOutput { + return o.ApplyT(func(v CacheFrom) *CacheFromLocal { return v.Local }).(CacheFromLocalPtrOutput) +} + +// A raw string as you would provide it to the Docker CLI (e.g., +// `type=inline`). +func (o CacheFromOutput) Raw() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFrom) *string { return v.Raw }).(pulumi.StringPtrOutput) +} + +// Upload build caches to remote registries. +func (o CacheFromOutput) Registry() CacheFromRegistryPtrOutput { + return o.ApplyT(func(v CacheFrom) *CacheFromRegistry { return v.Registry }).(CacheFromRegistryPtrOutput) +} + +// Upload build caches to AWS S3 or an S3-compatible services such as +// MinIO. +func (o CacheFromOutput) S3() CacheFromS3PtrOutput { + return o.ApplyT(func(v CacheFrom) *CacheFromS3 { return v.S3 }).(CacheFromS3PtrOutput) +} + +type CacheFromArrayOutput struct{ *pulumi.OutputState } + +func (CacheFromArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]CacheFrom)(nil)).Elem() +} + +func (o CacheFromArrayOutput) ToCacheFromArrayOutput() CacheFromArrayOutput { + return o +} + +func (o CacheFromArrayOutput) ToCacheFromArrayOutputWithContext(ctx context.Context) CacheFromArrayOutput { + return o +} + +func (o CacheFromArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]CacheFrom] { + return pulumix.Output[[]CacheFrom]{ + OutputState: o.OutputState, + } +} + +func (o CacheFromArrayOutput) Index(i pulumi.IntInput) CacheFromOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) CacheFrom { + return vs[0].([]CacheFrom)[vs[1].(int)] + }).(CacheFromOutput) +} + +type CacheFromAzureBlob struct { + // Base URL of the storage account. + AccountUrl *string `pulumi:"accountUrl"` + // The name of the cache image. + Name string `pulumi:"name"` + // Blob storage account key. + SecretAccessKey *string `pulumi:"secretAccessKey"` +} + +// CacheFromAzureBlobInput is an input type that accepts CacheFromAzureBlobArgs and CacheFromAzureBlobOutput values. +// You can construct a concrete instance of `CacheFromAzureBlobInput` via: +// +// CacheFromAzureBlobArgs{...} +type CacheFromAzureBlobInput interface { + pulumi.Input + + ToCacheFromAzureBlobOutput() CacheFromAzureBlobOutput + ToCacheFromAzureBlobOutputWithContext(context.Context) CacheFromAzureBlobOutput +} + +type CacheFromAzureBlobArgs struct { + // Base URL of the storage account. + AccountUrl pulumi.StringPtrInput `pulumi:"accountUrl"` + // The name of the cache image. + Name pulumi.StringInput `pulumi:"name"` + // Blob storage account key. + SecretAccessKey pulumi.StringPtrInput `pulumi:"secretAccessKey"` +} + +func (CacheFromAzureBlobArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromAzureBlob)(nil)).Elem() +} + +func (i CacheFromAzureBlobArgs) ToCacheFromAzureBlobOutput() CacheFromAzureBlobOutput { + return i.ToCacheFromAzureBlobOutputWithContext(context.Background()) +} + +func (i CacheFromAzureBlobArgs) ToCacheFromAzureBlobOutputWithContext(ctx context.Context) CacheFromAzureBlobOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromAzureBlobOutput) +} + +func (i CacheFromAzureBlobArgs) ToOutput(ctx context.Context) pulumix.Output[CacheFromAzureBlob] { + return pulumix.Output[CacheFromAzureBlob]{ + OutputState: i.ToCacheFromAzureBlobOutputWithContext(ctx).OutputState, + } +} + +func (i CacheFromAzureBlobArgs) ToCacheFromAzureBlobPtrOutput() CacheFromAzureBlobPtrOutput { + return i.ToCacheFromAzureBlobPtrOutputWithContext(context.Background()) +} + +func (i CacheFromAzureBlobArgs) ToCacheFromAzureBlobPtrOutputWithContext(ctx context.Context) CacheFromAzureBlobPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromAzureBlobOutput).ToCacheFromAzureBlobPtrOutputWithContext(ctx) +} + +// CacheFromAzureBlobPtrInput is an input type that accepts CacheFromAzureBlobArgs, CacheFromAzureBlobPtr and CacheFromAzureBlobPtrOutput values. +// You can construct a concrete instance of `CacheFromAzureBlobPtrInput` via: +// +// CacheFromAzureBlobArgs{...} +// +// or: +// +// nil +type CacheFromAzureBlobPtrInput interface { + pulumi.Input + + ToCacheFromAzureBlobPtrOutput() CacheFromAzureBlobPtrOutput + ToCacheFromAzureBlobPtrOutputWithContext(context.Context) CacheFromAzureBlobPtrOutput +} + +type cacheFromAzureBlobPtrType CacheFromAzureBlobArgs + +func CacheFromAzureBlobPtr(v *CacheFromAzureBlobArgs) CacheFromAzureBlobPtrInput { + return (*cacheFromAzureBlobPtrType)(v) +} + +func (*cacheFromAzureBlobPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CacheFromAzureBlob)(nil)).Elem() +} + +func (i *cacheFromAzureBlobPtrType) ToCacheFromAzureBlobPtrOutput() CacheFromAzureBlobPtrOutput { + return i.ToCacheFromAzureBlobPtrOutputWithContext(context.Background()) +} + +func (i *cacheFromAzureBlobPtrType) ToCacheFromAzureBlobPtrOutputWithContext(ctx context.Context) CacheFromAzureBlobPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromAzureBlobPtrOutput) +} + +func (i *cacheFromAzureBlobPtrType) ToOutput(ctx context.Context) pulumix.Output[*CacheFromAzureBlob] { + return pulumix.Output[*CacheFromAzureBlob]{ + OutputState: i.ToCacheFromAzureBlobPtrOutputWithContext(ctx).OutputState, + } +} + +type CacheFromAzureBlobOutput struct{ *pulumi.OutputState } + +func (CacheFromAzureBlobOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromAzureBlob)(nil)).Elem() +} + +func (o CacheFromAzureBlobOutput) ToCacheFromAzureBlobOutput() CacheFromAzureBlobOutput { + return o +} + +func (o CacheFromAzureBlobOutput) ToCacheFromAzureBlobOutputWithContext(ctx context.Context) CacheFromAzureBlobOutput { + return o +} + +func (o CacheFromAzureBlobOutput) ToCacheFromAzureBlobPtrOutput() CacheFromAzureBlobPtrOutput { + return o.ToCacheFromAzureBlobPtrOutputWithContext(context.Background()) +} + +func (o CacheFromAzureBlobOutput) ToCacheFromAzureBlobPtrOutputWithContext(ctx context.Context) CacheFromAzureBlobPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheFromAzureBlob) *CacheFromAzureBlob { + return &v + }).(CacheFromAzureBlobPtrOutput) +} + +func (o CacheFromAzureBlobOutput) ToOutput(ctx context.Context) pulumix.Output[CacheFromAzureBlob] { + return pulumix.Output[CacheFromAzureBlob]{ + OutputState: o.OutputState, + } +} + +// Base URL of the storage account. +func (o CacheFromAzureBlobOutput) AccountUrl() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromAzureBlob) *string { return v.AccountUrl }).(pulumi.StringPtrOutput) +} + +// The name of the cache image. +func (o CacheFromAzureBlobOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v CacheFromAzureBlob) string { return v.Name }).(pulumi.StringOutput) +} + +// Blob storage account key. +func (o CacheFromAzureBlobOutput) SecretAccessKey() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromAzureBlob) *string { return v.SecretAccessKey }).(pulumi.StringPtrOutput) +} + +type CacheFromAzureBlobPtrOutput struct{ *pulumi.OutputState } + +func (CacheFromAzureBlobPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheFromAzureBlob)(nil)).Elem() +} + +func (o CacheFromAzureBlobPtrOutput) ToCacheFromAzureBlobPtrOutput() CacheFromAzureBlobPtrOutput { + return o +} + +func (o CacheFromAzureBlobPtrOutput) ToCacheFromAzureBlobPtrOutputWithContext(ctx context.Context) CacheFromAzureBlobPtrOutput { + return o +} + +func (o CacheFromAzureBlobPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheFromAzureBlob] { + return pulumix.Output[*CacheFromAzureBlob]{ + OutputState: o.OutputState, + } +} + +func (o CacheFromAzureBlobPtrOutput) Elem() CacheFromAzureBlobOutput { + return o.ApplyT(func(v *CacheFromAzureBlob) CacheFromAzureBlob { + if v != nil { + return *v + } + var ret CacheFromAzureBlob + return ret + }).(CacheFromAzureBlobOutput) +} + +// Base URL of the storage account. +func (o CacheFromAzureBlobPtrOutput) AccountUrl() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromAzureBlob) *string { + if v == nil { + return nil + } + return v.AccountUrl + }).(pulumi.StringPtrOutput) +} + +// The name of the cache image. +func (o CacheFromAzureBlobPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromAzureBlob) *string { + if v == nil { + return nil + } + return &v.Name + }).(pulumi.StringPtrOutput) +} + +// Blob storage account key. +func (o CacheFromAzureBlobPtrOutput) SecretAccessKey() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromAzureBlob) *string { + if v == nil { + return nil + } + return v.SecretAccessKey + }).(pulumi.StringPtrOutput) +} + +type CacheFromGitHubActions struct { + // The scope to use for cache keys. Defaults to `buildkit`. + // + // This should be set if building and caching multiple images in one + // workflow, otherwise caches will overwrite each other. + Scope *string `pulumi:"scope"` + // The GitHub Actions token to use. This is not a personal access tokens + // and is typically generated automatically as part of each job. + // + // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Token *string `pulumi:"token"` + // The cache server URL to use for artifacts. + // + // Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Url *string `pulumi:"url"` +} + +// Defaults sets the appropriate defaults for CacheFromGitHubActions +func (val *CacheFromGitHubActions) Defaults() *CacheFromGitHubActions { + if val == nil { + return nil + } + tmp := *val + if tmp.Scope == nil { + if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil { + scope_ := d.(string) + tmp.Scope = &scope_ + } + } + if tmp.Token == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { + token_ := d.(string) + tmp.Token = &token_ + } + } + if tmp.Url == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil { + url_ := d.(string) + tmp.Url = &url_ + } + } + return &tmp +} + +// CacheFromGitHubActionsInput is an input type that accepts CacheFromGitHubActionsArgs and CacheFromGitHubActionsOutput values. +// You can construct a concrete instance of `CacheFromGitHubActionsInput` via: +// +// CacheFromGitHubActionsArgs{...} +type CacheFromGitHubActionsInput interface { + pulumi.Input + + ToCacheFromGitHubActionsOutput() CacheFromGitHubActionsOutput + ToCacheFromGitHubActionsOutputWithContext(context.Context) CacheFromGitHubActionsOutput +} + +type CacheFromGitHubActionsArgs struct { + // The scope to use for cache keys. Defaults to `buildkit`. + // + // This should be set if building and caching multiple images in one + // workflow, otherwise caches will overwrite each other. + Scope pulumi.StringPtrInput `pulumi:"scope"` + // The GitHub Actions token to use. This is not a personal access tokens + // and is typically generated automatically as part of each job. + // + // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Token pulumi.StringPtrInput `pulumi:"token"` + // The cache server URL to use for artifacts. + // + // Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Url pulumi.StringPtrInput `pulumi:"url"` +} + +// Defaults sets the appropriate defaults for CacheFromGitHubActionsArgs +func (val *CacheFromGitHubActionsArgs) Defaults() *CacheFromGitHubActionsArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Scope == nil { + if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil { + tmp.Scope = pulumi.StringPtr(d.(string)) + } + } + if tmp.Token == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { + tmp.Token = pulumi.StringPtr(d.(string)) + } + } + if tmp.Url == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil { + tmp.Url = pulumi.StringPtr(d.(string)) + } + } + return &tmp +} +func (CacheFromGitHubActionsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromGitHubActions)(nil)).Elem() +} + +func (i CacheFromGitHubActionsArgs) ToCacheFromGitHubActionsOutput() CacheFromGitHubActionsOutput { + return i.ToCacheFromGitHubActionsOutputWithContext(context.Background()) +} + +func (i CacheFromGitHubActionsArgs) ToCacheFromGitHubActionsOutputWithContext(ctx context.Context) CacheFromGitHubActionsOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromGitHubActionsOutput) +} + +func (i CacheFromGitHubActionsArgs) ToOutput(ctx context.Context) pulumix.Output[CacheFromGitHubActions] { + return pulumix.Output[CacheFromGitHubActions]{ + OutputState: i.ToCacheFromGitHubActionsOutputWithContext(ctx).OutputState, + } +} + +func (i CacheFromGitHubActionsArgs) ToCacheFromGitHubActionsPtrOutput() CacheFromGitHubActionsPtrOutput { + return i.ToCacheFromGitHubActionsPtrOutputWithContext(context.Background()) +} + +func (i CacheFromGitHubActionsArgs) ToCacheFromGitHubActionsPtrOutputWithContext(ctx context.Context) CacheFromGitHubActionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromGitHubActionsOutput).ToCacheFromGitHubActionsPtrOutputWithContext(ctx) +} + +// CacheFromGitHubActionsPtrInput is an input type that accepts CacheFromGitHubActionsArgs, CacheFromGitHubActionsPtr and CacheFromGitHubActionsPtrOutput values. +// You can construct a concrete instance of `CacheFromGitHubActionsPtrInput` via: +// +// CacheFromGitHubActionsArgs{...} +// +// or: +// +// nil +type CacheFromGitHubActionsPtrInput interface { + pulumi.Input + + ToCacheFromGitHubActionsPtrOutput() CacheFromGitHubActionsPtrOutput + ToCacheFromGitHubActionsPtrOutputWithContext(context.Context) CacheFromGitHubActionsPtrOutput +} + +type cacheFromGitHubActionsPtrType CacheFromGitHubActionsArgs + +func CacheFromGitHubActionsPtr(v *CacheFromGitHubActionsArgs) CacheFromGitHubActionsPtrInput { + return (*cacheFromGitHubActionsPtrType)(v) +} + +func (*cacheFromGitHubActionsPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CacheFromGitHubActions)(nil)).Elem() +} + +func (i *cacheFromGitHubActionsPtrType) ToCacheFromGitHubActionsPtrOutput() CacheFromGitHubActionsPtrOutput { + return i.ToCacheFromGitHubActionsPtrOutputWithContext(context.Background()) +} + +func (i *cacheFromGitHubActionsPtrType) ToCacheFromGitHubActionsPtrOutputWithContext(ctx context.Context) CacheFromGitHubActionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromGitHubActionsPtrOutput) +} + +func (i *cacheFromGitHubActionsPtrType) ToOutput(ctx context.Context) pulumix.Output[*CacheFromGitHubActions] { + return pulumix.Output[*CacheFromGitHubActions]{ + OutputState: i.ToCacheFromGitHubActionsPtrOutputWithContext(ctx).OutputState, + } +} + +type CacheFromGitHubActionsOutput struct{ *pulumi.OutputState } + +func (CacheFromGitHubActionsOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromGitHubActions)(nil)).Elem() +} + +func (o CacheFromGitHubActionsOutput) ToCacheFromGitHubActionsOutput() CacheFromGitHubActionsOutput { + return o +} + +func (o CacheFromGitHubActionsOutput) ToCacheFromGitHubActionsOutputWithContext(ctx context.Context) CacheFromGitHubActionsOutput { + return o +} + +func (o CacheFromGitHubActionsOutput) ToCacheFromGitHubActionsPtrOutput() CacheFromGitHubActionsPtrOutput { + return o.ToCacheFromGitHubActionsPtrOutputWithContext(context.Background()) +} + +func (o CacheFromGitHubActionsOutput) ToCacheFromGitHubActionsPtrOutputWithContext(ctx context.Context) CacheFromGitHubActionsPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheFromGitHubActions) *CacheFromGitHubActions { + return &v + }).(CacheFromGitHubActionsPtrOutput) +} + +func (o CacheFromGitHubActionsOutput) ToOutput(ctx context.Context) pulumix.Output[CacheFromGitHubActions] { + return pulumix.Output[CacheFromGitHubActions]{ + OutputState: o.OutputState, + } +} + +// The scope to use for cache keys. Defaults to `buildkit`. +// +// This should be set if building and caching multiple images in one +// workflow, otherwise caches will overwrite each other. +func (o CacheFromGitHubActionsOutput) Scope() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromGitHubActions) *string { return v.Scope }).(pulumi.StringPtrOutput) +} + +// The GitHub Actions token to use. This is not a personal access tokens +// and is typically generated automatically as part of each job. +// +// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheFromGitHubActionsOutput) Token() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromGitHubActions) *string { return v.Token }).(pulumi.StringPtrOutput) +} + +// The cache server URL to use for artifacts. +// +// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheFromGitHubActionsOutput) Url() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromGitHubActions) *string { return v.Url }).(pulumi.StringPtrOutput) +} + +type CacheFromGitHubActionsPtrOutput struct{ *pulumi.OutputState } + +func (CacheFromGitHubActionsPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheFromGitHubActions)(nil)).Elem() +} + +func (o CacheFromGitHubActionsPtrOutput) ToCacheFromGitHubActionsPtrOutput() CacheFromGitHubActionsPtrOutput { + return o +} + +func (o CacheFromGitHubActionsPtrOutput) ToCacheFromGitHubActionsPtrOutputWithContext(ctx context.Context) CacheFromGitHubActionsPtrOutput { + return o +} + +func (o CacheFromGitHubActionsPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheFromGitHubActions] { + return pulumix.Output[*CacheFromGitHubActions]{ + OutputState: o.OutputState, + } +} + +func (o CacheFromGitHubActionsPtrOutput) Elem() CacheFromGitHubActionsOutput { + return o.ApplyT(func(v *CacheFromGitHubActions) CacheFromGitHubActions { + if v != nil { + return *v + } + var ret CacheFromGitHubActions + return ret + }).(CacheFromGitHubActionsOutput) +} + +// The scope to use for cache keys. Defaults to `buildkit`. +// +// This should be set if building and caching multiple images in one +// workflow, otherwise caches will overwrite each other. +func (o CacheFromGitHubActionsPtrOutput) Scope() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromGitHubActions) *string { + if v == nil { + return nil + } + return v.Scope + }).(pulumi.StringPtrOutput) +} + +// The GitHub Actions token to use. This is not a personal access tokens +// and is typically generated automatically as part of each job. +// +// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheFromGitHubActionsPtrOutput) Token() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromGitHubActions) *string { + if v == nil { + return nil + } + return v.Token + }).(pulumi.StringPtrOutput) +} + +// The cache server URL to use for artifacts. +// +// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheFromGitHubActionsPtrOutput) Url() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromGitHubActions) *string { + if v == nil { + return nil + } + return v.Url + }).(pulumi.StringPtrOutput) +} + +type CacheFromLocal struct { + // Digest of manifest to import. + Digest *string `pulumi:"digest"` + // Path of the local directory where cache gets imported from. + Src string `pulumi:"src"` +} + +// CacheFromLocalInput is an input type that accepts CacheFromLocalArgs and CacheFromLocalOutput values. +// You can construct a concrete instance of `CacheFromLocalInput` via: +// +// CacheFromLocalArgs{...} +type CacheFromLocalInput interface { + pulumi.Input + + ToCacheFromLocalOutput() CacheFromLocalOutput + ToCacheFromLocalOutputWithContext(context.Context) CacheFromLocalOutput +} + +type CacheFromLocalArgs struct { + // Digest of manifest to import. + Digest pulumi.StringPtrInput `pulumi:"digest"` + // Path of the local directory where cache gets imported from. + Src pulumi.StringInput `pulumi:"src"` +} + +func (CacheFromLocalArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromLocal)(nil)).Elem() +} + +func (i CacheFromLocalArgs) ToCacheFromLocalOutput() CacheFromLocalOutput { + return i.ToCacheFromLocalOutputWithContext(context.Background()) +} + +func (i CacheFromLocalArgs) ToCacheFromLocalOutputWithContext(ctx context.Context) CacheFromLocalOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromLocalOutput) +} + +func (i CacheFromLocalArgs) ToOutput(ctx context.Context) pulumix.Output[CacheFromLocal] { + return pulumix.Output[CacheFromLocal]{ + OutputState: i.ToCacheFromLocalOutputWithContext(ctx).OutputState, + } +} + +func (i CacheFromLocalArgs) ToCacheFromLocalPtrOutput() CacheFromLocalPtrOutput { + return i.ToCacheFromLocalPtrOutputWithContext(context.Background()) +} + +func (i CacheFromLocalArgs) ToCacheFromLocalPtrOutputWithContext(ctx context.Context) CacheFromLocalPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromLocalOutput).ToCacheFromLocalPtrOutputWithContext(ctx) +} + +// CacheFromLocalPtrInput is an input type that accepts CacheFromLocalArgs, CacheFromLocalPtr and CacheFromLocalPtrOutput values. +// You can construct a concrete instance of `CacheFromLocalPtrInput` via: +// +// CacheFromLocalArgs{...} +// +// or: +// +// nil +type CacheFromLocalPtrInput interface { + pulumi.Input + + ToCacheFromLocalPtrOutput() CacheFromLocalPtrOutput + ToCacheFromLocalPtrOutputWithContext(context.Context) CacheFromLocalPtrOutput +} + +type cacheFromLocalPtrType CacheFromLocalArgs + +func CacheFromLocalPtr(v *CacheFromLocalArgs) CacheFromLocalPtrInput { + return (*cacheFromLocalPtrType)(v) +} + +func (*cacheFromLocalPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CacheFromLocal)(nil)).Elem() +} + +func (i *cacheFromLocalPtrType) ToCacheFromLocalPtrOutput() CacheFromLocalPtrOutput { + return i.ToCacheFromLocalPtrOutputWithContext(context.Background()) +} + +func (i *cacheFromLocalPtrType) ToCacheFromLocalPtrOutputWithContext(ctx context.Context) CacheFromLocalPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromLocalPtrOutput) +} + +func (i *cacheFromLocalPtrType) ToOutput(ctx context.Context) pulumix.Output[*CacheFromLocal] { + return pulumix.Output[*CacheFromLocal]{ + OutputState: i.ToCacheFromLocalPtrOutputWithContext(ctx).OutputState, + } +} + +type CacheFromLocalOutput struct{ *pulumi.OutputState } + +func (CacheFromLocalOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromLocal)(nil)).Elem() +} + +func (o CacheFromLocalOutput) ToCacheFromLocalOutput() CacheFromLocalOutput { + return o +} + +func (o CacheFromLocalOutput) ToCacheFromLocalOutputWithContext(ctx context.Context) CacheFromLocalOutput { + return o +} + +func (o CacheFromLocalOutput) ToCacheFromLocalPtrOutput() CacheFromLocalPtrOutput { + return o.ToCacheFromLocalPtrOutputWithContext(context.Background()) +} + +func (o CacheFromLocalOutput) ToCacheFromLocalPtrOutputWithContext(ctx context.Context) CacheFromLocalPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheFromLocal) *CacheFromLocal { + return &v + }).(CacheFromLocalPtrOutput) +} + +func (o CacheFromLocalOutput) ToOutput(ctx context.Context) pulumix.Output[CacheFromLocal] { + return pulumix.Output[CacheFromLocal]{ + OutputState: o.OutputState, + } +} + +// Digest of manifest to import. +func (o CacheFromLocalOutput) Digest() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromLocal) *string { return v.Digest }).(pulumi.StringPtrOutput) +} + +// Path of the local directory where cache gets imported from. +func (o CacheFromLocalOutput) Src() pulumi.StringOutput { + return o.ApplyT(func(v CacheFromLocal) string { return v.Src }).(pulumi.StringOutput) +} + +type CacheFromLocalPtrOutput struct{ *pulumi.OutputState } + +func (CacheFromLocalPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheFromLocal)(nil)).Elem() +} + +func (o CacheFromLocalPtrOutput) ToCacheFromLocalPtrOutput() CacheFromLocalPtrOutput { + return o +} + +func (o CacheFromLocalPtrOutput) ToCacheFromLocalPtrOutputWithContext(ctx context.Context) CacheFromLocalPtrOutput { + return o +} + +func (o CacheFromLocalPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheFromLocal] { + return pulumix.Output[*CacheFromLocal]{ + OutputState: o.OutputState, + } +} + +func (o CacheFromLocalPtrOutput) Elem() CacheFromLocalOutput { + return o.ApplyT(func(v *CacheFromLocal) CacheFromLocal { + if v != nil { + return *v + } + var ret CacheFromLocal + return ret + }).(CacheFromLocalOutput) +} + +// Digest of manifest to import. +func (o CacheFromLocalPtrOutput) Digest() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromLocal) *string { + if v == nil { + return nil + } + return v.Digest + }).(pulumi.StringPtrOutput) +} + +// Path of the local directory where cache gets imported from. +func (o CacheFromLocalPtrOutput) Src() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromLocal) *string { + if v == nil { + return nil + } + return &v.Src + }).(pulumi.StringPtrOutput) +} + +type CacheFromRegistry struct { + // Fully qualified name of the cache image to import. + Ref string `pulumi:"ref"` +} + +// CacheFromRegistryInput is an input type that accepts CacheFromRegistryArgs and CacheFromRegistryOutput values. +// You can construct a concrete instance of `CacheFromRegistryInput` via: +// +// CacheFromRegistryArgs{...} +type CacheFromRegistryInput interface { + pulumi.Input + + ToCacheFromRegistryOutput() CacheFromRegistryOutput + ToCacheFromRegistryOutputWithContext(context.Context) CacheFromRegistryOutput +} + +type CacheFromRegistryArgs struct { + // Fully qualified name of the cache image to import. + Ref pulumi.StringInput `pulumi:"ref"` +} + +func (CacheFromRegistryArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromRegistry)(nil)).Elem() +} + +func (i CacheFromRegistryArgs) ToCacheFromRegistryOutput() CacheFromRegistryOutput { + return i.ToCacheFromRegistryOutputWithContext(context.Background()) +} + +func (i CacheFromRegistryArgs) ToCacheFromRegistryOutputWithContext(ctx context.Context) CacheFromRegistryOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromRegistryOutput) +} + +func (i CacheFromRegistryArgs) ToOutput(ctx context.Context) pulumix.Output[CacheFromRegistry] { + return pulumix.Output[CacheFromRegistry]{ + OutputState: i.ToCacheFromRegistryOutputWithContext(ctx).OutputState, + } +} + +func (i CacheFromRegistryArgs) ToCacheFromRegistryPtrOutput() CacheFromRegistryPtrOutput { + return i.ToCacheFromRegistryPtrOutputWithContext(context.Background()) +} + +func (i CacheFromRegistryArgs) ToCacheFromRegistryPtrOutputWithContext(ctx context.Context) CacheFromRegistryPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromRegistryOutput).ToCacheFromRegistryPtrOutputWithContext(ctx) +} + +// CacheFromRegistryPtrInput is an input type that accepts CacheFromRegistryArgs, CacheFromRegistryPtr and CacheFromRegistryPtrOutput values. +// You can construct a concrete instance of `CacheFromRegistryPtrInput` via: +// +// CacheFromRegistryArgs{...} +// +// or: +// +// nil +type CacheFromRegistryPtrInput interface { + pulumi.Input + + ToCacheFromRegistryPtrOutput() CacheFromRegistryPtrOutput + ToCacheFromRegistryPtrOutputWithContext(context.Context) CacheFromRegistryPtrOutput +} + +type cacheFromRegistryPtrType CacheFromRegistryArgs + +func CacheFromRegistryPtr(v *CacheFromRegistryArgs) CacheFromRegistryPtrInput { + return (*cacheFromRegistryPtrType)(v) +} + +func (*cacheFromRegistryPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CacheFromRegistry)(nil)).Elem() +} + +func (i *cacheFromRegistryPtrType) ToCacheFromRegistryPtrOutput() CacheFromRegistryPtrOutput { + return i.ToCacheFromRegistryPtrOutputWithContext(context.Background()) +} + +func (i *cacheFromRegistryPtrType) ToCacheFromRegistryPtrOutputWithContext(ctx context.Context) CacheFromRegistryPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromRegistryPtrOutput) +} + +func (i *cacheFromRegistryPtrType) ToOutput(ctx context.Context) pulumix.Output[*CacheFromRegistry] { + return pulumix.Output[*CacheFromRegistry]{ + OutputState: i.ToCacheFromRegistryPtrOutputWithContext(ctx).OutputState, + } +} + +type CacheFromRegistryOutput struct{ *pulumi.OutputState } + +func (CacheFromRegistryOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromRegistry)(nil)).Elem() +} + +func (o CacheFromRegistryOutput) ToCacheFromRegistryOutput() CacheFromRegistryOutput { + return o +} + +func (o CacheFromRegistryOutput) ToCacheFromRegistryOutputWithContext(ctx context.Context) CacheFromRegistryOutput { + return o +} + +func (o CacheFromRegistryOutput) ToCacheFromRegistryPtrOutput() CacheFromRegistryPtrOutput { + return o.ToCacheFromRegistryPtrOutputWithContext(context.Background()) +} + +func (o CacheFromRegistryOutput) ToCacheFromRegistryPtrOutputWithContext(ctx context.Context) CacheFromRegistryPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheFromRegistry) *CacheFromRegistry { + return &v + }).(CacheFromRegistryPtrOutput) +} + +func (o CacheFromRegistryOutput) ToOutput(ctx context.Context) pulumix.Output[CacheFromRegistry] { + return pulumix.Output[CacheFromRegistry]{ + OutputState: o.OutputState, + } +} + +// Fully qualified name of the cache image to import. +func (o CacheFromRegistryOutput) Ref() pulumi.StringOutput { + return o.ApplyT(func(v CacheFromRegistry) string { return v.Ref }).(pulumi.StringOutput) +} + +type CacheFromRegistryPtrOutput struct{ *pulumi.OutputState } + +func (CacheFromRegistryPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheFromRegistry)(nil)).Elem() +} + +func (o CacheFromRegistryPtrOutput) ToCacheFromRegistryPtrOutput() CacheFromRegistryPtrOutput { + return o +} + +func (o CacheFromRegistryPtrOutput) ToCacheFromRegistryPtrOutputWithContext(ctx context.Context) CacheFromRegistryPtrOutput { + return o +} + +func (o CacheFromRegistryPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheFromRegistry] { + return pulumix.Output[*CacheFromRegistry]{ + OutputState: o.OutputState, + } +} + +func (o CacheFromRegistryPtrOutput) Elem() CacheFromRegistryOutput { + return o.ApplyT(func(v *CacheFromRegistry) CacheFromRegistry { + if v != nil { + return *v + } + var ret CacheFromRegistry + return ret + }).(CacheFromRegistryOutput) +} + +// Fully qualified name of the cache image to import. +func (o CacheFromRegistryPtrOutput) Ref() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromRegistry) *string { + if v == nil { + return nil + } + return &v.Ref + }).(pulumi.StringPtrOutput) +} + +type CacheFromS3 struct { + // Defaults to `$AWS_ACCESS_KEY_ID`. + AccessKeyId *string `pulumi:"accessKeyId"` + // Prefix to prepend to blob filenames. + BlobsPrefix *string `pulumi:"blobsPrefix"` + // Name of the S3 bucket. + Bucket string `pulumi:"bucket"` + // Endpoint of the S3 bucket. + EndpointUrl *string `pulumi:"endpointUrl"` + // Prefix to prepend on manifest filenames. + ManifestsPrefix *string `pulumi:"manifestsPrefix"` + // Name of the cache image. + Name *string `pulumi:"name"` + // The geographic location of the bucket. Defaults to `$AWS_REGION`. + Region string `pulumi:"region"` + // Defaults to `$AWS_SECRET_ACCESS_KEY`. + SecretAccessKey *string `pulumi:"secretAccessKey"` + // Defaults to `$AWS_SESSION_TOKEN`. + SessionToken *string `pulumi:"sessionToken"` + // Uses `bucket` in the URL instead of hostname when `true`. + UsePathStyle *bool `pulumi:"usePathStyle"` +} + +// Defaults sets the appropriate defaults for CacheFromS3 +func (val *CacheFromS3) Defaults() *CacheFromS3 { + if val == nil { + return nil + } + tmp := *val + if tmp.AccessKeyId == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_ACCESS_KEY_ID"); d != nil { + accessKeyId_ := d.(string) + tmp.AccessKeyId = &accessKeyId_ + } + } + if internal.IsZero(tmp.Region) { + if d := internal.GetEnvOrDefault("", nil, "AWS_REGION"); d != nil { + tmp.Region = d.(string) + } + } + if tmp.SecretAccessKey == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SECRET_ACCESS_KEY"); d != nil { + secretAccessKey_ := d.(string) + tmp.SecretAccessKey = &secretAccessKey_ + } + } + if tmp.SessionToken == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SESSION_TOKEN"); d != nil { + sessionToken_ := d.(string) + tmp.SessionToken = &sessionToken_ + } + } + return &tmp +} + +// CacheFromS3Input is an input type that accepts CacheFromS3Args and CacheFromS3Output values. +// You can construct a concrete instance of `CacheFromS3Input` via: +// +// CacheFromS3Args{...} +type CacheFromS3Input interface { + pulumi.Input + + ToCacheFromS3Output() CacheFromS3Output + ToCacheFromS3OutputWithContext(context.Context) CacheFromS3Output +} + +type CacheFromS3Args struct { + // Defaults to `$AWS_ACCESS_KEY_ID`. + AccessKeyId pulumi.StringPtrInput `pulumi:"accessKeyId"` + // Prefix to prepend to blob filenames. + BlobsPrefix pulumi.StringPtrInput `pulumi:"blobsPrefix"` + // Name of the S3 bucket. + Bucket pulumi.StringInput `pulumi:"bucket"` + // Endpoint of the S3 bucket. + EndpointUrl pulumi.StringPtrInput `pulumi:"endpointUrl"` + // Prefix to prepend on manifest filenames. + ManifestsPrefix pulumi.StringPtrInput `pulumi:"manifestsPrefix"` + // Name of the cache image. + Name pulumi.StringPtrInput `pulumi:"name"` + // The geographic location of the bucket. Defaults to `$AWS_REGION`. + Region pulumi.StringInput `pulumi:"region"` + // Defaults to `$AWS_SECRET_ACCESS_KEY`. + SecretAccessKey pulumi.StringPtrInput `pulumi:"secretAccessKey"` + // Defaults to `$AWS_SESSION_TOKEN`. + SessionToken pulumi.StringPtrInput `pulumi:"sessionToken"` + // Uses `bucket` in the URL instead of hostname when `true`. + UsePathStyle pulumi.BoolPtrInput `pulumi:"usePathStyle"` +} + +// Defaults sets the appropriate defaults for CacheFromS3Args +func (val *CacheFromS3Args) Defaults() *CacheFromS3Args { + if val == nil { + return nil + } + tmp := *val + if tmp.AccessKeyId == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_ACCESS_KEY_ID"); d != nil { + tmp.AccessKeyId = pulumi.StringPtr(d.(string)) + } + } + if tmp.Region == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_REGION"); d != nil { + tmp.Region = pulumi.String(d.(string)) + } + } + if tmp.SecretAccessKey == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SECRET_ACCESS_KEY"); d != nil { + tmp.SecretAccessKey = pulumi.StringPtr(d.(string)) + } + } + if tmp.SessionToken == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SESSION_TOKEN"); d != nil { + tmp.SessionToken = pulumi.StringPtr(d.(string)) + } + } + return &tmp +} +func (CacheFromS3Args) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromS3)(nil)).Elem() +} + +func (i CacheFromS3Args) ToCacheFromS3Output() CacheFromS3Output { + return i.ToCacheFromS3OutputWithContext(context.Background()) +} + +func (i CacheFromS3Args) ToCacheFromS3OutputWithContext(ctx context.Context) CacheFromS3Output { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromS3Output) +} + +func (i CacheFromS3Args) ToOutput(ctx context.Context) pulumix.Output[CacheFromS3] { + return pulumix.Output[CacheFromS3]{ + OutputState: i.ToCacheFromS3OutputWithContext(ctx).OutputState, + } +} + +func (i CacheFromS3Args) ToCacheFromS3PtrOutput() CacheFromS3PtrOutput { + return i.ToCacheFromS3PtrOutputWithContext(context.Background()) +} + +func (i CacheFromS3Args) ToCacheFromS3PtrOutputWithContext(ctx context.Context) CacheFromS3PtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromS3Output).ToCacheFromS3PtrOutputWithContext(ctx) +} + +// CacheFromS3PtrInput is an input type that accepts CacheFromS3Args, CacheFromS3Ptr and CacheFromS3PtrOutput values. +// You can construct a concrete instance of `CacheFromS3PtrInput` via: +// +// CacheFromS3Args{...} +// +// or: +// +// nil +type CacheFromS3PtrInput interface { + pulumi.Input + + ToCacheFromS3PtrOutput() CacheFromS3PtrOutput + ToCacheFromS3PtrOutputWithContext(context.Context) CacheFromS3PtrOutput +} + +type cacheFromS3PtrType CacheFromS3Args + +func CacheFromS3Ptr(v *CacheFromS3Args) CacheFromS3PtrInput { + return (*cacheFromS3PtrType)(v) +} + +func (*cacheFromS3PtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CacheFromS3)(nil)).Elem() +} + +func (i *cacheFromS3PtrType) ToCacheFromS3PtrOutput() CacheFromS3PtrOutput { + return i.ToCacheFromS3PtrOutputWithContext(context.Background()) +} + +func (i *cacheFromS3PtrType) ToCacheFromS3PtrOutputWithContext(ctx context.Context) CacheFromS3PtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromS3PtrOutput) +} + +func (i *cacheFromS3PtrType) ToOutput(ctx context.Context) pulumix.Output[*CacheFromS3] { + return pulumix.Output[*CacheFromS3]{ + OutputState: i.ToCacheFromS3PtrOutputWithContext(ctx).OutputState, + } +} + +type CacheFromS3Output struct{ *pulumi.OutputState } + +func (CacheFromS3Output) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromS3)(nil)).Elem() +} + +func (o CacheFromS3Output) ToCacheFromS3Output() CacheFromS3Output { + return o +} + +func (o CacheFromS3Output) ToCacheFromS3OutputWithContext(ctx context.Context) CacheFromS3Output { + return o +} + +func (o CacheFromS3Output) ToCacheFromS3PtrOutput() CacheFromS3PtrOutput { + return o.ToCacheFromS3PtrOutputWithContext(context.Background()) +} + +func (o CacheFromS3Output) ToCacheFromS3PtrOutputWithContext(ctx context.Context) CacheFromS3PtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheFromS3) *CacheFromS3 { + return &v + }).(CacheFromS3PtrOutput) +} + +func (o CacheFromS3Output) ToOutput(ctx context.Context) pulumix.Output[CacheFromS3] { + return pulumix.Output[CacheFromS3]{ + OutputState: o.OutputState, + } +} + +// Defaults to `$AWS_ACCESS_KEY_ID`. +func (o CacheFromS3Output) AccessKeyId() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromS3) *string { return v.AccessKeyId }).(pulumi.StringPtrOutput) +} + +// Prefix to prepend to blob filenames. +func (o CacheFromS3Output) BlobsPrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromS3) *string { return v.BlobsPrefix }).(pulumi.StringPtrOutput) +} + +// Name of the S3 bucket. +func (o CacheFromS3Output) Bucket() pulumi.StringOutput { + return o.ApplyT(func(v CacheFromS3) string { return v.Bucket }).(pulumi.StringOutput) +} + +// Endpoint of the S3 bucket. +func (o CacheFromS3Output) EndpointUrl() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromS3) *string { return v.EndpointUrl }).(pulumi.StringPtrOutput) +} + +// Prefix to prepend on manifest filenames. +func (o CacheFromS3Output) ManifestsPrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromS3) *string { return v.ManifestsPrefix }).(pulumi.StringPtrOutput) +} + +// Name of the cache image. +func (o CacheFromS3Output) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromS3) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// The geographic location of the bucket. Defaults to `$AWS_REGION`. +func (o CacheFromS3Output) Region() pulumi.StringOutput { + return o.ApplyT(func(v CacheFromS3) string { return v.Region }).(pulumi.StringOutput) +} + +// Defaults to `$AWS_SECRET_ACCESS_KEY`. +func (o CacheFromS3Output) SecretAccessKey() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromS3) *string { return v.SecretAccessKey }).(pulumi.StringPtrOutput) +} + +// Defaults to `$AWS_SESSION_TOKEN`. +func (o CacheFromS3Output) SessionToken() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheFromS3) *string { return v.SessionToken }).(pulumi.StringPtrOutput) +} + +// Uses `bucket` in the URL instead of hostname when `true`. +func (o CacheFromS3Output) UsePathStyle() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheFromS3) *bool { return v.UsePathStyle }).(pulumi.BoolPtrOutput) +} + +type CacheFromS3PtrOutput struct{ *pulumi.OutputState } + +func (CacheFromS3PtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheFromS3)(nil)).Elem() +} + +func (o CacheFromS3PtrOutput) ToCacheFromS3PtrOutput() CacheFromS3PtrOutput { + return o +} + +func (o CacheFromS3PtrOutput) ToCacheFromS3PtrOutputWithContext(ctx context.Context) CacheFromS3PtrOutput { + return o +} + +func (o CacheFromS3PtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheFromS3] { + return pulumix.Output[*CacheFromS3]{ + OutputState: o.OutputState, + } +} + +func (o CacheFromS3PtrOutput) Elem() CacheFromS3Output { + return o.ApplyT(func(v *CacheFromS3) CacheFromS3 { + if v != nil { + return *v + } + var ret CacheFromS3 + return ret + }).(CacheFromS3Output) +} + +// Defaults to `$AWS_ACCESS_KEY_ID`. +func (o CacheFromS3PtrOutput) AccessKeyId() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromS3) *string { + if v == nil { + return nil + } + return v.AccessKeyId + }).(pulumi.StringPtrOutput) +} + +// Prefix to prepend to blob filenames. +func (o CacheFromS3PtrOutput) BlobsPrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromS3) *string { + if v == nil { + return nil + } + return v.BlobsPrefix + }).(pulumi.StringPtrOutput) +} + +// Name of the S3 bucket. +func (o CacheFromS3PtrOutput) Bucket() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromS3) *string { + if v == nil { + return nil + } + return &v.Bucket + }).(pulumi.StringPtrOutput) +} + +// Endpoint of the S3 bucket. +func (o CacheFromS3PtrOutput) EndpointUrl() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromS3) *string { + if v == nil { + return nil + } + return v.EndpointUrl + }).(pulumi.StringPtrOutput) +} + +// Prefix to prepend on manifest filenames. +func (o CacheFromS3PtrOutput) ManifestsPrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromS3) *string { + if v == nil { + return nil + } + return v.ManifestsPrefix + }).(pulumi.StringPtrOutput) +} + +// Name of the cache image. +func (o CacheFromS3PtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromS3) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +// The geographic location of the bucket. Defaults to `$AWS_REGION`. +func (o CacheFromS3PtrOutput) Region() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromS3) *string { + if v == nil { + return nil + } + return &v.Region + }).(pulumi.StringPtrOutput) +} + +// Defaults to `$AWS_SECRET_ACCESS_KEY`. +func (o CacheFromS3PtrOutput) SecretAccessKey() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromS3) *string { + if v == nil { + return nil + } + return v.SecretAccessKey + }).(pulumi.StringPtrOutput) +} + +// Defaults to `$AWS_SESSION_TOKEN`. +func (o CacheFromS3PtrOutput) SessionToken() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheFromS3) *string { + if v == nil { + return nil + } + return v.SessionToken + }).(pulumi.StringPtrOutput) +} + +// Uses `bucket` in the URL instead of hostname when `true`. +func (o CacheFromS3PtrOutput) UsePathStyle() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CacheFromS3) *bool { + if v == nil { + return nil + } + return v.UsePathStyle + }).(pulumi.BoolPtrOutput) +} + +type CacheTo struct { + // Push cache to Azure's blob storage service. + Azblob *CacheToAzureBlob `pulumi:"azblob"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled *bool `pulumi:"disabled"` + // Recommended for use with GitHub Actions workflows. + // + // An action like `crazy-max/ghaction-github-runtime` is recommended to + // expose appropriate credentials to your GitHub workflow. + Gha *CacheToGitHubActions `pulumi:"gha"` + // The inline cache storage backend is the simplest implementation to get + // started with, but it does not handle multi-stage builds. Consider the + // `registry` cache backend instead. + Inline *CacheToInline `pulumi:"inline"` + // A simple backend which caches imagines on your local filesystem. + Local *CacheToLocal `pulumi:"local"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=inline`) + Raw *string `pulumi:"raw"` + // Push caches to remote registries. Incompatible with the `docker` build + // driver. + Registry *CacheToRegistry `pulumi:"registry"` + // Push cache to AWS S3 or S3-compatible services such as MinIO. + S3 *CacheToS3 `pulumi:"s3"` +} + +// Defaults sets the appropriate defaults for CacheTo +func (val *CacheTo) Defaults() *CacheTo { + if val == nil { + return nil + } + tmp := *val + tmp.Azblob = tmp.Azblob.Defaults() + + tmp.Gha = tmp.Gha.Defaults() + + tmp.Local = tmp.Local.Defaults() + + tmp.Registry = tmp.Registry.Defaults() + + tmp.S3 = tmp.S3.Defaults() + + return &tmp +} + +// CacheToInput is an input type that accepts CacheToArgs and CacheToOutput values. +// You can construct a concrete instance of `CacheToInput` via: +// +// CacheToArgs{...} +type CacheToInput interface { + pulumi.Input + + ToCacheToOutput() CacheToOutput + ToCacheToOutputWithContext(context.Context) CacheToOutput +} + +type CacheToArgs struct { + // Push cache to Azure's blob storage service. + Azblob CacheToAzureBlobPtrInput `pulumi:"azblob"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled pulumi.BoolPtrInput `pulumi:"disabled"` + // Recommended for use with GitHub Actions workflows. + // + // An action like `crazy-max/ghaction-github-runtime` is recommended to + // expose appropriate credentials to your GitHub workflow. + Gha CacheToGitHubActionsPtrInput `pulumi:"gha"` + // The inline cache storage backend is the simplest implementation to get + // started with, but it does not handle multi-stage builds. Consider the + // `registry` cache backend instead. + Inline CacheToInlinePtrInput `pulumi:"inline"` + // A simple backend which caches imagines on your local filesystem. + Local CacheToLocalPtrInput `pulumi:"local"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=inline`) + Raw pulumi.StringPtrInput `pulumi:"raw"` + // Push caches to remote registries. Incompatible with the `docker` build + // driver. + Registry CacheToRegistryPtrInput `pulumi:"registry"` + // Push cache to AWS S3 or S3-compatible services such as MinIO. + S3 CacheToS3PtrInput `pulumi:"s3"` +} + +// Defaults sets the appropriate defaults for CacheToArgs +func (val *CacheToArgs) Defaults() *CacheToArgs { + if val == nil { + return nil + } + tmp := *val + + return &tmp +} +func (CacheToArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheTo)(nil)).Elem() +} + +func (i CacheToArgs) ToCacheToOutput() CacheToOutput { + return i.ToCacheToOutputWithContext(context.Background()) +} + +func (i CacheToArgs) ToCacheToOutputWithContext(ctx context.Context) CacheToOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToOutput) +} + +func (i CacheToArgs) ToOutput(ctx context.Context) pulumix.Output[CacheTo] { + return pulumix.Output[CacheTo]{ + OutputState: i.ToCacheToOutputWithContext(ctx).OutputState, + } +} + +// CacheToArrayInput is an input type that accepts CacheToArray and CacheToArrayOutput values. +// You can construct a concrete instance of `CacheToArrayInput` via: +// +// CacheToArray{ CacheToArgs{...} } +type CacheToArrayInput interface { + pulumi.Input + + ToCacheToArrayOutput() CacheToArrayOutput + ToCacheToArrayOutputWithContext(context.Context) CacheToArrayOutput +} + +type CacheToArray []CacheToInput + +func (CacheToArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]CacheTo)(nil)).Elem() +} + +func (i CacheToArray) ToCacheToArrayOutput() CacheToArrayOutput { + return i.ToCacheToArrayOutputWithContext(context.Background()) +} + +func (i CacheToArray) ToCacheToArrayOutputWithContext(ctx context.Context) CacheToArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToArrayOutput) +} + +func (i CacheToArray) ToOutput(ctx context.Context) pulumix.Output[[]CacheTo] { + return pulumix.Output[[]CacheTo]{ + OutputState: i.ToCacheToArrayOutputWithContext(ctx).OutputState, + } +} + +type CacheToOutput struct{ *pulumi.OutputState } + +func (CacheToOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheTo)(nil)).Elem() +} + +func (o CacheToOutput) ToCacheToOutput() CacheToOutput { + return o +} + +func (o CacheToOutput) ToCacheToOutputWithContext(ctx context.Context) CacheToOutput { + return o +} + +func (o CacheToOutput) ToOutput(ctx context.Context) pulumix.Output[CacheTo] { + return pulumix.Output[CacheTo]{ + OutputState: o.OutputState, + } +} + +// Push cache to Azure's blob storage service. +func (o CacheToOutput) Azblob() CacheToAzureBlobPtrOutput { + return o.ApplyT(func(v CacheTo) *CacheToAzureBlob { return v.Azblob }).(CacheToAzureBlobPtrOutput) +} + +// When `true` this entry will be excluded. Defaults to `false`. +func (o CacheToOutput) Disabled() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheTo) *bool { return v.Disabled }).(pulumi.BoolPtrOutput) +} + +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to +// expose appropriate credentials to your GitHub workflow. +func (o CacheToOutput) Gha() CacheToGitHubActionsPtrOutput { + return o.ApplyT(func(v CacheTo) *CacheToGitHubActions { return v.Gha }).(CacheToGitHubActionsPtrOutput) +} + +// The inline cache storage backend is the simplest implementation to get +// started with, but it does not handle multi-stage builds. Consider the +// `registry` cache backend instead. +func (o CacheToOutput) Inline() CacheToInlinePtrOutput { + return o.ApplyT(func(v CacheTo) *CacheToInline { return v.Inline }).(CacheToInlinePtrOutput) +} + +// A simple backend which caches imagines on your local filesystem. +func (o CacheToOutput) Local() CacheToLocalPtrOutput { + return o.ApplyT(func(v CacheTo) *CacheToLocal { return v.Local }).(CacheToLocalPtrOutput) +} + +// A raw string as you would provide it to the Docker CLI (e.g., +// `type=inline`) +func (o CacheToOutput) Raw() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheTo) *string { return v.Raw }).(pulumi.StringPtrOutput) +} + +// Push caches to remote registries. Incompatible with the `docker` build +// driver. +func (o CacheToOutput) Registry() CacheToRegistryPtrOutput { + return o.ApplyT(func(v CacheTo) *CacheToRegistry { return v.Registry }).(CacheToRegistryPtrOutput) +} + +// Push cache to AWS S3 or S3-compatible services such as MinIO. +func (o CacheToOutput) S3() CacheToS3PtrOutput { + return o.ApplyT(func(v CacheTo) *CacheToS3 { return v.S3 }).(CacheToS3PtrOutput) +} + +type CacheToArrayOutput struct{ *pulumi.OutputState } + +func (CacheToArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]CacheTo)(nil)).Elem() +} + +func (o CacheToArrayOutput) ToCacheToArrayOutput() CacheToArrayOutput { + return o +} + +func (o CacheToArrayOutput) ToCacheToArrayOutputWithContext(ctx context.Context) CacheToArrayOutput { + return o +} + +func (o CacheToArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]CacheTo] { + return pulumix.Output[[]CacheTo]{ + OutputState: o.OutputState, + } +} + +func (o CacheToArrayOutput) Index(i pulumi.IntInput) CacheToOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) CacheTo { + return vs[0].([]CacheTo)[vs[1].(int)] + }).(CacheToOutput) +} + +type CacheToAzureBlob struct { + // Base URL of the storage account. + AccountUrl *string `pulumi:"accountUrl"` + // Ignore errors caused by failed cache exports. + IgnoreError *bool `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode *CacheMode `pulumi:"mode"` + // The name of the cache image. + Name string `pulumi:"name"` + // Blob storage account key. + SecretAccessKey *string `pulumi:"secretAccessKey"` +} + +// Defaults sets the appropriate defaults for CacheToAzureBlob +func (val *CacheToAzureBlob) Defaults() *CacheToAzureBlob { + if val == nil { + return nil + } + tmp := *val + if tmp.IgnoreError == nil { + ignoreError_ := false + tmp.IgnoreError = &ignoreError_ + } + if tmp.Mode == nil { + mode_ := CacheMode("min") + tmp.Mode = &mode_ + } + return &tmp +} + +// CacheToAzureBlobInput is an input type that accepts CacheToAzureBlobArgs and CacheToAzureBlobOutput values. +// You can construct a concrete instance of `CacheToAzureBlobInput` via: +// +// CacheToAzureBlobArgs{...} +type CacheToAzureBlobInput interface { + pulumi.Input + + ToCacheToAzureBlobOutput() CacheToAzureBlobOutput + ToCacheToAzureBlobOutputWithContext(context.Context) CacheToAzureBlobOutput +} + +type CacheToAzureBlobArgs struct { + // Base URL of the storage account. + AccountUrl pulumi.StringPtrInput `pulumi:"accountUrl"` + // Ignore errors caused by failed cache exports. + IgnoreError pulumi.BoolPtrInput `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode CacheModePtrInput `pulumi:"mode"` + // The name of the cache image. + Name pulumi.StringInput `pulumi:"name"` + // Blob storage account key. + SecretAccessKey pulumi.StringPtrInput `pulumi:"secretAccessKey"` +} + +// Defaults sets the appropriate defaults for CacheToAzureBlobArgs +func (val *CacheToAzureBlobArgs) Defaults() *CacheToAzureBlobArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.IgnoreError == nil { + tmp.IgnoreError = pulumi.BoolPtr(false) + } + if tmp.Mode == nil { + tmp.Mode = CacheMode("min") + } + return &tmp +} +func (CacheToAzureBlobArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToAzureBlob)(nil)).Elem() +} + +func (i CacheToAzureBlobArgs) ToCacheToAzureBlobOutput() CacheToAzureBlobOutput { + return i.ToCacheToAzureBlobOutputWithContext(context.Background()) +} + +func (i CacheToAzureBlobArgs) ToCacheToAzureBlobOutputWithContext(ctx context.Context) CacheToAzureBlobOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToAzureBlobOutput) +} + +func (i CacheToAzureBlobArgs) ToOutput(ctx context.Context) pulumix.Output[CacheToAzureBlob] { + return pulumix.Output[CacheToAzureBlob]{ + OutputState: i.ToCacheToAzureBlobOutputWithContext(ctx).OutputState, + } +} + +func (i CacheToAzureBlobArgs) ToCacheToAzureBlobPtrOutput() CacheToAzureBlobPtrOutput { + return i.ToCacheToAzureBlobPtrOutputWithContext(context.Background()) +} + +func (i CacheToAzureBlobArgs) ToCacheToAzureBlobPtrOutputWithContext(ctx context.Context) CacheToAzureBlobPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToAzureBlobOutput).ToCacheToAzureBlobPtrOutputWithContext(ctx) +} + +// CacheToAzureBlobPtrInput is an input type that accepts CacheToAzureBlobArgs, CacheToAzureBlobPtr and CacheToAzureBlobPtrOutput values. +// You can construct a concrete instance of `CacheToAzureBlobPtrInput` via: +// +// CacheToAzureBlobArgs{...} +// +// or: +// +// nil +type CacheToAzureBlobPtrInput interface { + pulumi.Input + + ToCacheToAzureBlobPtrOutput() CacheToAzureBlobPtrOutput + ToCacheToAzureBlobPtrOutputWithContext(context.Context) CacheToAzureBlobPtrOutput +} + +type cacheToAzureBlobPtrType CacheToAzureBlobArgs + +func CacheToAzureBlobPtr(v *CacheToAzureBlobArgs) CacheToAzureBlobPtrInput { + return (*cacheToAzureBlobPtrType)(v) +} + +func (*cacheToAzureBlobPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToAzureBlob)(nil)).Elem() +} + +func (i *cacheToAzureBlobPtrType) ToCacheToAzureBlobPtrOutput() CacheToAzureBlobPtrOutput { + return i.ToCacheToAzureBlobPtrOutputWithContext(context.Background()) +} + +func (i *cacheToAzureBlobPtrType) ToCacheToAzureBlobPtrOutputWithContext(ctx context.Context) CacheToAzureBlobPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToAzureBlobPtrOutput) +} + +func (i *cacheToAzureBlobPtrType) ToOutput(ctx context.Context) pulumix.Output[*CacheToAzureBlob] { + return pulumix.Output[*CacheToAzureBlob]{ + OutputState: i.ToCacheToAzureBlobPtrOutputWithContext(ctx).OutputState, + } +} + +type CacheToAzureBlobOutput struct{ *pulumi.OutputState } + +func (CacheToAzureBlobOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToAzureBlob)(nil)).Elem() +} + +func (o CacheToAzureBlobOutput) ToCacheToAzureBlobOutput() CacheToAzureBlobOutput { + return o +} + +func (o CacheToAzureBlobOutput) ToCacheToAzureBlobOutputWithContext(ctx context.Context) CacheToAzureBlobOutput { + return o +} + +func (o CacheToAzureBlobOutput) ToCacheToAzureBlobPtrOutput() CacheToAzureBlobPtrOutput { + return o.ToCacheToAzureBlobPtrOutputWithContext(context.Background()) +} + +func (o CacheToAzureBlobOutput) ToCacheToAzureBlobPtrOutputWithContext(ctx context.Context) CacheToAzureBlobPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheToAzureBlob) *CacheToAzureBlob { + return &v + }).(CacheToAzureBlobPtrOutput) +} + +func (o CacheToAzureBlobOutput) ToOutput(ctx context.Context) pulumix.Output[CacheToAzureBlob] { + return pulumix.Output[CacheToAzureBlob]{ + OutputState: o.OutputState, + } +} + +// Base URL of the storage account. +func (o CacheToAzureBlobOutput) AccountUrl() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToAzureBlob) *string { return v.AccountUrl }).(pulumi.StringPtrOutput) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToAzureBlobOutput) IgnoreError() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheToAzureBlob) *bool { return v.IgnoreError }).(pulumi.BoolPtrOutput) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToAzureBlobOutput) Mode() CacheModePtrOutput { + return o.ApplyT(func(v CacheToAzureBlob) *CacheMode { return v.Mode }).(CacheModePtrOutput) +} + +// The name of the cache image. +func (o CacheToAzureBlobOutput) Name() pulumi.StringOutput { + return o.ApplyT(func(v CacheToAzureBlob) string { return v.Name }).(pulumi.StringOutput) +} + +// Blob storage account key. +func (o CacheToAzureBlobOutput) SecretAccessKey() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToAzureBlob) *string { return v.SecretAccessKey }).(pulumi.StringPtrOutput) +} + +type CacheToAzureBlobPtrOutput struct{ *pulumi.OutputState } + +func (CacheToAzureBlobPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToAzureBlob)(nil)).Elem() +} + +func (o CacheToAzureBlobPtrOutput) ToCacheToAzureBlobPtrOutput() CacheToAzureBlobPtrOutput { + return o +} + +func (o CacheToAzureBlobPtrOutput) ToCacheToAzureBlobPtrOutputWithContext(ctx context.Context) CacheToAzureBlobPtrOutput { + return o +} + +func (o CacheToAzureBlobPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheToAzureBlob] { + return pulumix.Output[*CacheToAzureBlob]{ + OutputState: o.OutputState, + } +} + +func (o CacheToAzureBlobPtrOutput) Elem() CacheToAzureBlobOutput { + return o.ApplyT(func(v *CacheToAzureBlob) CacheToAzureBlob { + if v != nil { + return *v + } + var ret CacheToAzureBlob + return ret + }).(CacheToAzureBlobOutput) +} + +// Base URL of the storage account. +func (o CacheToAzureBlobPtrOutput) AccountUrl() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToAzureBlob) *string { + if v == nil { + return nil + } + return v.AccountUrl + }).(pulumi.StringPtrOutput) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToAzureBlobPtrOutput) IgnoreError() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CacheToAzureBlob) *bool { + if v == nil { + return nil + } + return v.IgnoreError + }).(pulumi.BoolPtrOutput) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToAzureBlobPtrOutput) Mode() CacheModePtrOutput { + return o.ApplyT(func(v *CacheToAzureBlob) *CacheMode { + if v == nil { + return nil + } + return v.Mode + }).(CacheModePtrOutput) +} + +// The name of the cache image. +func (o CacheToAzureBlobPtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToAzureBlob) *string { + if v == nil { + return nil + } + return &v.Name + }).(pulumi.StringPtrOutput) +} + +// Blob storage account key. +func (o CacheToAzureBlobPtrOutput) SecretAccessKey() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToAzureBlob) *string { + if v == nil { + return nil + } + return v.SecretAccessKey + }).(pulumi.StringPtrOutput) +} + +type CacheToGitHubActions struct { + // Ignore errors caused by failed cache exports. + IgnoreError *bool `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode *CacheMode `pulumi:"mode"` + // The scope to use for cache keys. Defaults to `buildkit`. + // + // This should be set if building and caching multiple images in one + // workflow, otherwise caches will overwrite each other. + Scope *string `pulumi:"scope"` + // The GitHub Actions token to use. This is not a personal access tokens + // and is typically generated automatically as part of each job. + // + // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Token *string `pulumi:"token"` + // The cache server URL to use for artifacts. + // + // Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Url *string `pulumi:"url"` +} + +// Defaults sets the appropriate defaults for CacheToGitHubActions +func (val *CacheToGitHubActions) Defaults() *CacheToGitHubActions { + if val == nil { + return nil + } + tmp := *val + if tmp.IgnoreError == nil { + ignoreError_ := false + tmp.IgnoreError = &ignoreError_ + } + if tmp.Mode == nil { + mode_ := CacheMode("min") + tmp.Mode = &mode_ + } + if tmp.Scope == nil { + if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil { + scope_ := d.(string) + tmp.Scope = &scope_ + } + } + if tmp.Token == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { + token_ := d.(string) + tmp.Token = &token_ + } + } + if tmp.Url == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil { + url_ := d.(string) + tmp.Url = &url_ + } + } + return &tmp +} + +// CacheToGitHubActionsInput is an input type that accepts CacheToGitHubActionsArgs and CacheToGitHubActionsOutput values. +// You can construct a concrete instance of `CacheToGitHubActionsInput` via: +// +// CacheToGitHubActionsArgs{...} +type CacheToGitHubActionsInput interface { + pulumi.Input + + ToCacheToGitHubActionsOutput() CacheToGitHubActionsOutput + ToCacheToGitHubActionsOutputWithContext(context.Context) CacheToGitHubActionsOutput +} + +type CacheToGitHubActionsArgs struct { + // Ignore errors caused by failed cache exports. + IgnoreError pulumi.BoolPtrInput `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode CacheModePtrInput `pulumi:"mode"` + // The scope to use for cache keys. Defaults to `buildkit`. + // + // This should be set if building and caching multiple images in one + // workflow, otherwise caches will overwrite each other. + Scope pulumi.StringPtrInput `pulumi:"scope"` + // The GitHub Actions token to use. This is not a personal access tokens + // and is typically generated automatically as part of each job. + // + // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Token pulumi.StringPtrInput `pulumi:"token"` + // The cache server URL to use for artifacts. + // + // Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Url pulumi.StringPtrInput `pulumi:"url"` +} + +// Defaults sets the appropriate defaults for CacheToGitHubActionsArgs +func (val *CacheToGitHubActionsArgs) Defaults() *CacheToGitHubActionsArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.IgnoreError == nil { + tmp.IgnoreError = pulumi.BoolPtr(false) + } + if tmp.Mode == nil { + tmp.Mode = CacheMode("min") + } + if tmp.Scope == nil { + if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil { + tmp.Scope = pulumi.StringPtr(d.(string)) + } + } + if tmp.Token == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { + tmp.Token = pulumi.StringPtr(d.(string)) + } + } + if tmp.Url == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil { + tmp.Url = pulumi.StringPtr(d.(string)) + } + } + return &tmp +} +func (CacheToGitHubActionsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToGitHubActions)(nil)).Elem() +} + +func (i CacheToGitHubActionsArgs) ToCacheToGitHubActionsOutput() CacheToGitHubActionsOutput { + return i.ToCacheToGitHubActionsOutputWithContext(context.Background()) +} + +func (i CacheToGitHubActionsArgs) ToCacheToGitHubActionsOutputWithContext(ctx context.Context) CacheToGitHubActionsOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToGitHubActionsOutput) +} + +func (i CacheToGitHubActionsArgs) ToOutput(ctx context.Context) pulumix.Output[CacheToGitHubActions] { + return pulumix.Output[CacheToGitHubActions]{ + OutputState: i.ToCacheToGitHubActionsOutputWithContext(ctx).OutputState, + } +} + +func (i CacheToGitHubActionsArgs) ToCacheToGitHubActionsPtrOutput() CacheToGitHubActionsPtrOutput { + return i.ToCacheToGitHubActionsPtrOutputWithContext(context.Background()) +} + +func (i CacheToGitHubActionsArgs) ToCacheToGitHubActionsPtrOutputWithContext(ctx context.Context) CacheToGitHubActionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToGitHubActionsOutput).ToCacheToGitHubActionsPtrOutputWithContext(ctx) +} + +// CacheToGitHubActionsPtrInput is an input type that accepts CacheToGitHubActionsArgs, CacheToGitHubActionsPtr and CacheToGitHubActionsPtrOutput values. +// You can construct a concrete instance of `CacheToGitHubActionsPtrInput` via: +// +// CacheToGitHubActionsArgs{...} +// +// or: +// +// nil +type CacheToGitHubActionsPtrInput interface { + pulumi.Input + + ToCacheToGitHubActionsPtrOutput() CacheToGitHubActionsPtrOutput + ToCacheToGitHubActionsPtrOutputWithContext(context.Context) CacheToGitHubActionsPtrOutput +} + +type cacheToGitHubActionsPtrType CacheToGitHubActionsArgs + +func CacheToGitHubActionsPtr(v *CacheToGitHubActionsArgs) CacheToGitHubActionsPtrInput { + return (*cacheToGitHubActionsPtrType)(v) +} + +func (*cacheToGitHubActionsPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToGitHubActions)(nil)).Elem() +} + +func (i *cacheToGitHubActionsPtrType) ToCacheToGitHubActionsPtrOutput() CacheToGitHubActionsPtrOutput { + return i.ToCacheToGitHubActionsPtrOutputWithContext(context.Background()) +} + +func (i *cacheToGitHubActionsPtrType) ToCacheToGitHubActionsPtrOutputWithContext(ctx context.Context) CacheToGitHubActionsPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToGitHubActionsPtrOutput) +} + +func (i *cacheToGitHubActionsPtrType) ToOutput(ctx context.Context) pulumix.Output[*CacheToGitHubActions] { + return pulumix.Output[*CacheToGitHubActions]{ + OutputState: i.ToCacheToGitHubActionsPtrOutputWithContext(ctx).OutputState, + } +} + +type CacheToGitHubActionsOutput struct{ *pulumi.OutputState } + +func (CacheToGitHubActionsOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToGitHubActions)(nil)).Elem() +} + +func (o CacheToGitHubActionsOutput) ToCacheToGitHubActionsOutput() CacheToGitHubActionsOutput { + return o +} + +func (o CacheToGitHubActionsOutput) ToCacheToGitHubActionsOutputWithContext(ctx context.Context) CacheToGitHubActionsOutput { + return o +} + +func (o CacheToGitHubActionsOutput) ToCacheToGitHubActionsPtrOutput() CacheToGitHubActionsPtrOutput { + return o.ToCacheToGitHubActionsPtrOutputWithContext(context.Background()) +} + +func (o CacheToGitHubActionsOutput) ToCacheToGitHubActionsPtrOutputWithContext(ctx context.Context) CacheToGitHubActionsPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheToGitHubActions) *CacheToGitHubActions { + return &v + }).(CacheToGitHubActionsPtrOutput) +} + +func (o CacheToGitHubActionsOutput) ToOutput(ctx context.Context) pulumix.Output[CacheToGitHubActions] { + return pulumix.Output[CacheToGitHubActions]{ + OutputState: o.OutputState, + } +} + +// Ignore errors caused by failed cache exports. +func (o CacheToGitHubActionsOutput) IgnoreError() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheToGitHubActions) *bool { return v.IgnoreError }).(pulumi.BoolPtrOutput) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToGitHubActionsOutput) Mode() CacheModePtrOutput { + return o.ApplyT(func(v CacheToGitHubActions) *CacheMode { return v.Mode }).(CacheModePtrOutput) +} + +// The scope to use for cache keys. Defaults to `buildkit`. +// +// This should be set if building and caching multiple images in one +// workflow, otherwise caches will overwrite each other. +func (o CacheToGitHubActionsOutput) Scope() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToGitHubActions) *string { return v.Scope }).(pulumi.StringPtrOutput) +} + +// The GitHub Actions token to use. This is not a personal access tokens +// and is typically generated automatically as part of each job. +// +// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheToGitHubActionsOutput) Token() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToGitHubActions) *string { return v.Token }).(pulumi.StringPtrOutput) +} + +// The cache server URL to use for artifacts. +// +// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheToGitHubActionsOutput) Url() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToGitHubActions) *string { return v.Url }).(pulumi.StringPtrOutput) +} + +type CacheToGitHubActionsPtrOutput struct{ *pulumi.OutputState } + +func (CacheToGitHubActionsPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToGitHubActions)(nil)).Elem() +} + +func (o CacheToGitHubActionsPtrOutput) ToCacheToGitHubActionsPtrOutput() CacheToGitHubActionsPtrOutput { + return o +} + +func (o CacheToGitHubActionsPtrOutput) ToCacheToGitHubActionsPtrOutputWithContext(ctx context.Context) CacheToGitHubActionsPtrOutput { + return o +} + +func (o CacheToGitHubActionsPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheToGitHubActions] { + return pulumix.Output[*CacheToGitHubActions]{ + OutputState: o.OutputState, + } +} + +func (o CacheToGitHubActionsPtrOutput) Elem() CacheToGitHubActionsOutput { + return o.ApplyT(func(v *CacheToGitHubActions) CacheToGitHubActions { + if v != nil { + return *v + } + var ret CacheToGitHubActions + return ret + }).(CacheToGitHubActionsOutput) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToGitHubActionsPtrOutput) IgnoreError() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CacheToGitHubActions) *bool { + if v == nil { + return nil + } + return v.IgnoreError + }).(pulumi.BoolPtrOutput) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToGitHubActionsPtrOutput) Mode() CacheModePtrOutput { + return o.ApplyT(func(v *CacheToGitHubActions) *CacheMode { + if v == nil { + return nil + } + return v.Mode + }).(CacheModePtrOutput) +} + +// The scope to use for cache keys. Defaults to `buildkit`. +// +// This should be set if building and caching multiple images in one +// workflow, otherwise caches will overwrite each other. +func (o CacheToGitHubActionsPtrOutput) Scope() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToGitHubActions) *string { + if v == nil { + return nil + } + return v.Scope + }).(pulumi.StringPtrOutput) +} + +// The GitHub Actions token to use. This is not a personal access tokens +// and is typically generated automatically as part of each job. +// +// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheToGitHubActionsPtrOutput) Token() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToGitHubActions) *string { + if v == nil { + return nil + } + return v.Token + }).(pulumi.StringPtrOutput) +} + +// The cache server URL to use for artifacts. +// +// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheToGitHubActionsPtrOutput) Url() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToGitHubActions) *string { + if v == nil { + return nil + } + return v.Url + }).(pulumi.StringPtrOutput) +} + +// Include an inline cache with the exported image. +type CacheToInline struct { +} + +// CacheToInlineInput is an input type that accepts CacheToInlineArgs and CacheToInlineOutput values. +// You can construct a concrete instance of `CacheToInlineInput` via: +// +// CacheToInlineArgs{...} +type CacheToInlineInput interface { + pulumi.Input + + ToCacheToInlineOutput() CacheToInlineOutput + ToCacheToInlineOutputWithContext(context.Context) CacheToInlineOutput +} + +// Include an inline cache with the exported image. +type CacheToInlineArgs struct { +} + +func (CacheToInlineArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToInline)(nil)).Elem() +} + +func (i CacheToInlineArgs) ToCacheToInlineOutput() CacheToInlineOutput { + return i.ToCacheToInlineOutputWithContext(context.Background()) +} + +func (i CacheToInlineArgs) ToCacheToInlineOutputWithContext(ctx context.Context) CacheToInlineOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToInlineOutput) +} + +func (i CacheToInlineArgs) ToOutput(ctx context.Context) pulumix.Output[CacheToInline] { + return pulumix.Output[CacheToInline]{ + OutputState: i.ToCacheToInlineOutputWithContext(ctx).OutputState, + } +} + +func (i CacheToInlineArgs) ToCacheToInlinePtrOutput() CacheToInlinePtrOutput { + return i.ToCacheToInlinePtrOutputWithContext(context.Background()) +} + +func (i CacheToInlineArgs) ToCacheToInlinePtrOutputWithContext(ctx context.Context) CacheToInlinePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToInlineOutput).ToCacheToInlinePtrOutputWithContext(ctx) +} + +// CacheToInlinePtrInput is an input type that accepts CacheToInlineArgs, CacheToInlinePtr and CacheToInlinePtrOutput values. +// You can construct a concrete instance of `CacheToInlinePtrInput` via: +// +// CacheToInlineArgs{...} +// +// or: +// +// nil +type CacheToInlinePtrInput interface { + pulumi.Input + + ToCacheToInlinePtrOutput() CacheToInlinePtrOutput + ToCacheToInlinePtrOutputWithContext(context.Context) CacheToInlinePtrOutput +} + +type cacheToInlinePtrType CacheToInlineArgs + +func CacheToInlinePtr(v *CacheToInlineArgs) CacheToInlinePtrInput { + return (*cacheToInlinePtrType)(v) +} + +func (*cacheToInlinePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToInline)(nil)).Elem() +} + +func (i *cacheToInlinePtrType) ToCacheToInlinePtrOutput() CacheToInlinePtrOutput { + return i.ToCacheToInlinePtrOutputWithContext(context.Background()) +} + +func (i *cacheToInlinePtrType) ToCacheToInlinePtrOutputWithContext(ctx context.Context) CacheToInlinePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToInlinePtrOutput) +} + +func (i *cacheToInlinePtrType) ToOutput(ctx context.Context) pulumix.Output[*CacheToInline] { + return pulumix.Output[*CacheToInline]{ + OutputState: i.ToCacheToInlinePtrOutputWithContext(ctx).OutputState, + } +} + +// Include an inline cache with the exported image. +type CacheToInlineOutput struct{ *pulumi.OutputState } + +func (CacheToInlineOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToInline)(nil)).Elem() +} + +func (o CacheToInlineOutput) ToCacheToInlineOutput() CacheToInlineOutput { + return o +} + +func (o CacheToInlineOutput) ToCacheToInlineOutputWithContext(ctx context.Context) CacheToInlineOutput { + return o +} + +func (o CacheToInlineOutput) ToCacheToInlinePtrOutput() CacheToInlinePtrOutput { + return o.ToCacheToInlinePtrOutputWithContext(context.Background()) +} + +func (o CacheToInlineOutput) ToCacheToInlinePtrOutputWithContext(ctx context.Context) CacheToInlinePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheToInline) *CacheToInline { + return &v + }).(CacheToInlinePtrOutput) +} + +func (o CacheToInlineOutput) ToOutput(ctx context.Context) pulumix.Output[CacheToInline] { + return pulumix.Output[CacheToInline]{ + OutputState: o.OutputState, + } +} + +type CacheToInlinePtrOutput struct{ *pulumi.OutputState } + +func (CacheToInlinePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToInline)(nil)).Elem() +} + +func (o CacheToInlinePtrOutput) ToCacheToInlinePtrOutput() CacheToInlinePtrOutput { + return o +} + +func (o CacheToInlinePtrOutput) ToCacheToInlinePtrOutputWithContext(ctx context.Context) CacheToInlinePtrOutput { + return o +} + +func (o CacheToInlinePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheToInline] { + return pulumix.Output[*CacheToInline]{ + OutputState: o.OutputState, + } +} + +func (o CacheToInlinePtrOutput) Elem() CacheToInlineOutput { + return o.ApplyT(func(v *CacheToInline) CacheToInline { + if v != nil { + return *v + } + var ret CacheToInline + return ret + }).(CacheToInlineOutput) +} + +type CacheToLocal struct { + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // Path of the local directory to export the cache. + Dest string `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Ignore errors caused by failed cache exports. + IgnoreError *bool `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode *CacheMode `pulumi:"mode"` +} + +// Defaults sets the appropriate defaults for CacheToLocal +func (val *CacheToLocal) Defaults() *CacheToLocal { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.IgnoreError == nil { + ignoreError_ := false + tmp.IgnoreError = &ignoreError_ + } + if tmp.Mode == nil { + mode_ := CacheMode("min") + tmp.Mode = &mode_ + } + return &tmp +} + +// CacheToLocalInput is an input type that accepts CacheToLocalArgs and CacheToLocalOutput values. +// You can construct a concrete instance of `CacheToLocalInput` via: +// +// CacheToLocalArgs{...} +type CacheToLocalInput interface { + pulumi.Input + + ToCacheToLocalOutput() CacheToLocalOutput + ToCacheToLocalOutputWithContext(context.Context) CacheToLocalOutput +} + +type CacheToLocalArgs struct { + // The compression type to use. + Compression CompressionTypePtrInput `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumi.IntPtrInput `pulumi:"compressionLevel"` + // Path of the local directory to export the cache. + Dest pulumi.StringInput `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression pulumi.BoolPtrInput `pulumi:"forceCompression"` + // Ignore errors caused by failed cache exports. + IgnoreError pulumi.BoolPtrInput `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode CacheModePtrInput `pulumi:"mode"` +} + +// Defaults sets the appropriate defaults for CacheToLocalArgs +func (val *CacheToLocalArgs) Defaults() *CacheToLocalArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = CompressionType("gzip") + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumi.IntPtr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumi.BoolPtr(false) + } + if tmp.IgnoreError == nil { + tmp.IgnoreError = pulumi.BoolPtr(false) + } + if tmp.Mode == nil { + tmp.Mode = CacheMode("min") + } + return &tmp +} +func (CacheToLocalArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToLocal)(nil)).Elem() +} + +func (i CacheToLocalArgs) ToCacheToLocalOutput() CacheToLocalOutput { + return i.ToCacheToLocalOutputWithContext(context.Background()) +} + +func (i CacheToLocalArgs) ToCacheToLocalOutputWithContext(ctx context.Context) CacheToLocalOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToLocalOutput) +} + +func (i CacheToLocalArgs) ToOutput(ctx context.Context) pulumix.Output[CacheToLocal] { + return pulumix.Output[CacheToLocal]{ + OutputState: i.ToCacheToLocalOutputWithContext(ctx).OutputState, + } +} + +func (i CacheToLocalArgs) ToCacheToLocalPtrOutput() CacheToLocalPtrOutput { + return i.ToCacheToLocalPtrOutputWithContext(context.Background()) +} + +func (i CacheToLocalArgs) ToCacheToLocalPtrOutputWithContext(ctx context.Context) CacheToLocalPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToLocalOutput).ToCacheToLocalPtrOutputWithContext(ctx) +} + +// CacheToLocalPtrInput is an input type that accepts CacheToLocalArgs, CacheToLocalPtr and CacheToLocalPtrOutput values. +// You can construct a concrete instance of `CacheToLocalPtrInput` via: +// +// CacheToLocalArgs{...} +// +// or: +// +// nil +type CacheToLocalPtrInput interface { + pulumi.Input + + ToCacheToLocalPtrOutput() CacheToLocalPtrOutput + ToCacheToLocalPtrOutputWithContext(context.Context) CacheToLocalPtrOutput +} + +type cacheToLocalPtrType CacheToLocalArgs + +func CacheToLocalPtr(v *CacheToLocalArgs) CacheToLocalPtrInput { + return (*cacheToLocalPtrType)(v) +} + +func (*cacheToLocalPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToLocal)(nil)).Elem() +} + +func (i *cacheToLocalPtrType) ToCacheToLocalPtrOutput() CacheToLocalPtrOutput { + return i.ToCacheToLocalPtrOutputWithContext(context.Background()) +} + +func (i *cacheToLocalPtrType) ToCacheToLocalPtrOutputWithContext(ctx context.Context) CacheToLocalPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToLocalPtrOutput) +} + +func (i *cacheToLocalPtrType) ToOutput(ctx context.Context) pulumix.Output[*CacheToLocal] { + return pulumix.Output[*CacheToLocal]{ + OutputState: i.ToCacheToLocalPtrOutputWithContext(ctx).OutputState, + } +} + +type CacheToLocalOutput struct{ *pulumi.OutputState } + +func (CacheToLocalOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToLocal)(nil)).Elem() +} + +func (o CacheToLocalOutput) ToCacheToLocalOutput() CacheToLocalOutput { + return o +} + +func (o CacheToLocalOutput) ToCacheToLocalOutputWithContext(ctx context.Context) CacheToLocalOutput { + return o +} + +func (o CacheToLocalOutput) ToCacheToLocalPtrOutput() CacheToLocalPtrOutput { + return o.ToCacheToLocalPtrOutputWithContext(context.Background()) +} + +func (o CacheToLocalOutput) ToCacheToLocalPtrOutputWithContext(ctx context.Context) CacheToLocalPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheToLocal) *CacheToLocal { + return &v + }).(CacheToLocalPtrOutput) +} + +func (o CacheToLocalOutput) ToOutput(ctx context.Context) pulumix.Output[CacheToLocal] { + return pulumix.Output[CacheToLocal]{ + OutputState: o.OutputState, + } +} + +// The compression type to use. +func (o CacheToLocalOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v CacheToLocal) *CompressionType { return v.Compression }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o CacheToLocalOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v CacheToLocal) *int { return v.CompressionLevel }).(pulumi.IntPtrOutput) +} + +// Path of the local directory to export the cache. +func (o CacheToLocalOutput) Dest() pulumi.StringOutput { + return o.ApplyT(func(v CacheToLocal) string { return v.Dest }).(pulumi.StringOutput) +} + +// Forcefully apply compression. +func (o CacheToLocalOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheToLocal) *bool { return v.ForceCompression }).(pulumi.BoolPtrOutput) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToLocalOutput) IgnoreError() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheToLocal) *bool { return v.IgnoreError }).(pulumi.BoolPtrOutput) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToLocalOutput) Mode() CacheModePtrOutput { + return o.ApplyT(func(v CacheToLocal) *CacheMode { return v.Mode }).(CacheModePtrOutput) +} + +type CacheToLocalPtrOutput struct{ *pulumi.OutputState } + +func (CacheToLocalPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToLocal)(nil)).Elem() +} + +func (o CacheToLocalPtrOutput) ToCacheToLocalPtrOutput() CacheToLocalPtrOutput { + return o +} + +func (o CacheToLocalPtrOutput) ToCacheToLocalPtrOutputWithContext(ctx context.Context) CacheToLocalPtrOutput { + return o +} + +func (o CacheToLocalPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheToLocal] { + return pulumix.Output[*CacheToLocal]{ + OutputState: o.OutputState, + } +} + +func (o CacheToLocalPtrOutput) Elem() CacheToLocalOutput { + return o.ApplyT(func(v *CacheToLocal) CacheToLocal { + if v != nil { + return *v + } + var ret CacheToLocal + return ret + }).(CacheToLocalOutput) +} + +// The compression type to use. +func (o CacheToLocalPtrOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v *CacheToLocal) *CompressionType { + if v == nil { + return nil + } + return v.Compression + }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o CacheToLocalPtrOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v *CacheToLocal) *int { + if v == nil { + return nil + } + return v.CompressionLevel + }).(pulumi.IntPtrOutput) +} + +// Path of the local directory to export the cache. +func (o CacheToLocalPtrOutput) Dest() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToLocal) *string { + if v == nil { + return nil + } + return &v.Dest + }).(pulumi.StringPtrOutput) +} + +// Forcefully apply compression. +func (o CacheToLocalPtrOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CacheToLocal) *bool { + if v == nil { + return nil + } + return v.ForceCompression + }).(pulumi.BoolPtrOutput) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToLocalPtrOutput) IgnoreError() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CacheToLocal) *bool { + if v == nil { + return nil + } + return v.IgnoreError + }).(pulumi.BoolPtrOutput) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToLocalPtrOutput) Mode() CacheModePtrOutput { + return o.ApplyT(func(v *CacheToLocal) *CacheMode { + if v == nil { + return nil + } + return v.Mode + }).(CacheModePtrOutput) +} + +type CacheToRegistry struct { + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Ignore errors caused by failed cache exports. + IgnoreError *bool `pulumi:"ignoreError"` + // Export cache manifest as an OCI-compatible image manifest instead of a + // manifest list. Requires `ociMediaTypes` to also be `true`. + // + // Some registries like AWS ECR will not work with caching if this is + // `false`. + // + // Defaults to `false` to match Docker's default behavior. + ImageManifest *bool `pulumi:"imageManifest"` + // The cache mode to use. Defaults to `min`. + Mode *CacheMode `pulumi:"mode"` + // Whether to use OCI media types in exported manifests. Defaults to + // `true`. + OciMediaTypes *bool `pulumi:"ociMediaTypes"` + // Fully qualified name of the cache image to import. + Ref string `pulumi:"ref"` +} + +// Defaults sets the appropriate defaults for CacheToRegistry +func (val *CacheToRegistry) Defaults() *CacheToRegistry { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.IgnoreError == nil { + ignoreError_ := false + tmp.IgnoreError = &ignoreError_ + } + if tmp.ImageManifest == nil { + imageManifest_ := false + tmp.ImageManifest = &imageManifest_ + } + if tmp.Mode == nil { + mode_ := CacheMode("min") + tmp.Mode = &mode_ + } + if tmp.OciMediaTypes == nil { + ociMediaTypes_ := true + tmp.OciMediaTypes = &ociMediaTypes_ + } + return &tmp +} + +// CacheToRegistryInput is an input type that accepts CacheToRegistryArgs and CacheToRegistryOutput values. +// You can construct a concrete instance of `CacheToRegistryInput` via: +// +// CacheToRegistryArgs{...} +type CacheToRegistryInput interface { + pulumi.Input + + ToCacheToRegistryOutput() CacheToRegistryOutput + ToCacheToRegistryOutputWithContext(context.Context) CacheToRegistryOutput +} + +type CacheToRegistryArgs struct { + // The compression type to use. + Compression CompressionTypePtrInput `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumi.IntPtrInput `pulumi:"compressionLevel"` + // Forcefully apply compression. + ForceCompression pulumi.BoolPtrInput `pulumi:"forceCompression"` + // Ignore errors caused by failed cache exports. + IgnoreError pulumi.BoolPtrInput `pulumi:"ignoreError"` + // Export cache manifest as an OCI-compatible image manifest instead of a + // manifest list. Requires `ociMediaTypes` to also be `true`. + // + // Some registries like AWS ECR will not work with caching if this is + // `false`. + // + // Defaults to `false` to match Docker's default behavior. + ImageManifest pulumi.BoolPtrInput `pulumi:"imageManifest"` + // The cache mode to use. Defaults to `min`. + Mode CacheModePtrInput `pulumi:"mode"` + // Whether to use OCI media types in exported manifests. Defaults to + // `true`. + OciMediaTypes pulumi.BoolPtrInput `pulumi:"ociMediaTypes"` + // Fully qualified name of the cache image to import. + Ref pulumi.StringInput `pulumi:"ref"` +} + +// Defaults sets the appropriate defaults for CacheToRegistryArgs +func (val *CacheToRegistryArgs) Defaults() *CacheToRegistryArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = CompressionType("gzip") + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumi.IntPtr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumi.BoolPtr(false) + } + if tmp.IgnoreError == nil { + tmp.IgnoreError = pulumi.BoolPtr(false) + } + if tmp.ImageManifest == nil { + tmp.ImageManifest = pulumi.BoolPtr(false) + } + if tmp.Mode == nil { + tmp.Mode = CacheMode("min") + } + if tmp.OciMediaTypes == nil { + tmp.OciMediaTypes = pulumi.BoolPtr(true) + } + return &tmp +} +func (CacheToRegistryArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToRegistry)(nil)).Elem() +} + +func (i CacheToRegistryArgs) ToCacheToRegistryOutput() CacheToRegistryOutput { + return i.ToCacheToRegistryOutputWithContext(context.Background()) +} + +func (i CacheToRegistryArgs) ToCacheToRegistryOutputWithContext(ctx context.Context) CacheToRegistryOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToRegistryOutput) +} + +func (i CacheToRegistryArgs) ToOutput(ctx context.Context) pulumix.Output[CacheToRegistry] { + return pulumix.Output[CacheToRegistry]{ + OutputState: i.ToCacheToRegistryOutputWithContext(ctx).OutputState, + } +} + +func (i CacheToRegistryArgs) ToCacheToRegistryPtrOutput() CacheToRegistryPtrOutput { + return i.ToCacheToRegistryPtrOutputWithContext(context.Background()) +} + +func (i CacheToRegistryArgs) ToCacheToRegistryPtrOutputWithContext(ctx context.Context) CacheToRegistryPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToRegistryOutput).ToCacheToRegistryPtrOutputWithContext(ctx) +} + +// CacheToRegistryPtrInput is an input type that accepts CacheToRegistryArgs, CacheToRegistryPtr and CacheToRegistryPtrOutput values. +// You can construct a concrete instance of `CacheToRegistryPtrInput` via: +// +// CacheToRegistryArgs{...} +// +// or: +// +// nil +type CacheToRegistryPtrInput interface { + pulumi.Input + + ToCacheToRegistryPtrOutput() CacheToRegistryPtrOutput + ToCacheToRegistryPtrOutputWithContext(context.Context) CacheToRegistryPtrOutput +} + +type cacheToRegistryPtrType CacheToRegistryArgs + +func CacheToRegistryPtr(v *CacheToRegistryArgs) CacheToRegistryPtrInput { + return (*cacheToRegistryPtrType)(v) +} + +func (*cacheToRegistryPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToRegistry)(nil)).Elem() +} + +func (i *cacheToRegistryPtrType) ToCacheToRegistryPtrOutput() CacheToRegistryPtrOutput { + return i.ToCacheToRegistryPtrOutputWithContext(context.Background()) +} + +func (i *cacheToRegistryPtrType) ToCacheToRegistryPtrOutputWithContext(ctx context.Context) CacheToRegistryPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToRegistryPtrOutput) +} + +func (i *cacheToRegistryPtrType) ToOutput(ctx context.Context) pulumix.Output[*CacheToRegistry] { + return pulumix.Output[*CacheToRegistry]{ + OutputState: i.ToCacheToRegistryPtrOutputWithContext(ctx).OutputState, + } +} + +type CacheToRegistryOutput struct{ *pulumi.OutputState } + +func (CacheToRegistryOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToRegistry)(nil)).Elem() +} + +func (o CacheToRegistryOutput) ToCacheToRegistryOutput() CacheToRegistryOutput { + return o +} + +func (o CacheToRegistryOutput) ToCacheToRegistryOutputWithContext(ctx context.Context) CacheToRegistryOutput { + return o +} + +func (o CacheToRegistryOutput) ToCacheToRegistryPtrOutput() CacheToRegistryPtrOutput { + return o.ToCacheToRegistryPtrOutputWithContext(context.Background()) +} + +func (o CacheToRegistryOutput) ToCacheToRegistryPtrOutputWithContext(ctx context.Context) CacheToRegistryPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheToRegistry) *CacheToRegistry { + return &v + }).(CacheToRegistryPtrOutput) +} + +func (o CacheToRegistryOutput) ToOutput(ctx context.Context) pulumix.Output[CacheToRegistry] { + return pulumix.Output[CacheToRegistry]{ + OutputState: o.OutputState, + } +} + +// The compression type to use. +func (o CacheToRegistryOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v CacheToRegistry) *CompressionType { return v.Compression }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o CacheToRegistryOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v CacheToRegistry) *int { return v.CompressionLevel }).(pulumi.IntPtrOutput) +} + +// Forcefully apply compression. +func (o CacheToRegistryOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheToRegistry) *bool { return v.ForceCompression }).(pulumi.BoolPtrOutput) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToRegistryOutput) IgnoreError() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheToRegistry) *bool { return v.IgnoreError }).(pulumi.BoolPtrOutput) +} + +// Export cache manifest as an OCI-compatible image manifest instead of a +// manifest list. Requires `ociMediaTypes` to also be `true`. +// +// Some registries like AWS ECR will not work with caching if this is +// `false`. +// +// Defaults to `false` to match Docker's default behavior. +func (o CacheToRegistryOutput) ImageManifest() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheToRegistry) *bool { return v.ImageManifest }).(pulumi.BoolPtrOutput) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToRegistryOutput) Mode() CacheModePtrOutput { + return o.ApplyT(func(v CacheToRegistry) *CacheMode { return v.Mode }).(CacheModePtrOutput) +} + +// Whether to use OCI media types in exported manifests. Defaults to +// `true`. +func (o CacheToRegistryOutput) OciMediaTypes() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheToRegistry) *bool { return v.OciMediaTypes }).(pulumi.BoolPtrOutput) +} + +// Fully qualified name of the cache image to import. +func (o CacheToRegistryOutput) Ref() pulumi.StringOutput { + return o.ApplyT(func(v CacheToRegistry) string { return v.Ref }).(pulumi.StringOutput) +} + +type CacheToRegistryPtrOutput struct{ *pulumi.OutputState } + +func (CacheToRegistryPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToRegistry)(nil)).Elem() +} + +func (o CacheToRegistryPtrOutput) ToCacheToRegistryPtrOutput() CacheToRegistryPtrOutput { + return o +} + +func (o CacheToRegistryPtrOutput) ToCacheToRegistryPtrOutputWithContext(ctx context.Context) CacheToRegistryPtrOutput { + return o +} + +func (o CacheToRegistryPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheToRegistry] { + return pulumix.Output[*CacheToRegistry]{ + OutputState: o.OutputState, + } +} + +func (o CacheToRegistryPtrOutput) Elem() CacheToRegistryOutput { + return o.ApplyT(func(v *CacheToRegistry) CacheToRegistry { + if v != nil { + return *v + } + var ret CacheToRegistry + return ret + }).(CacheToRegistryOutput) +} + +// The compression type to use. +func (o CacheToRegistryPtrOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v *CacheToRegistry) *CompressionType { + if v == nil { + return nil + } + return v.Compression + }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o CacheToRegistryPtrOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v *CacheToRegistry) *int { + if v == nil { + return nil + } + return v.CompressionLevel + }).(pulumi.IntPtrOutput) +} + +// Forcefully apply compression. +func (o CacheToRegistryPtrOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CacheToRegistry) *bool { + if v == nil { + return nil + } + return v.ForceCompression + }).(pulumi.BoolPtrOutput) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToRegistryPtrOutput) IgnoreError() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CacheToRegistry) *bool { + if v == nil { + return nil + } + return v.IgnoreError + }).(pulumi.BoolPtrOutput) +} + +// Export cache manifest as an OCI-compatible image manifest instead of a +// manifest list. Requires `ociMediaTypes` to also be `true`. +// +// Some registries like AWS ECR will not work with caching if this is +// `false`. +// +// Defaults to `false` to match Docker's default behavior. +func (o CacheToRegistryPtrOutput) ImageManifest() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CacheToRegistry) *bool { + if v == nil { + return nil + } + return v.ImageManifest + }).(pulumi.BoolPtrOutput) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToRegistryPtrOutput) Mode() CacheModePtrOutput { + return o.ApplyT(func(v *CacheToRegistry) *CacheMode { + if v == nil { + return nil + } + return v.Mode + }).(CacheModePtrOutput) +} + +// Whether to use OCI media types in exported manifests. Defaults to +// `true`. +func (o CacheToRegistryPtrOutput) OciMediaTypes() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CacheToRegistry) *bool { + if v == nil { + return nil + } + return v.OciMediaTypes + }).(pulumi.BoolPtrOutput) +} + +// Fully qualified name of the cache image to import. +func (o CacheToRegistryPtrOutput) Ref() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToRegistry) *string { + if v == nil { + return nil + } + return &v.Ref + }).(pulumi.StringPtrOutput) +} + +type CacheToS3 struct { + // Defaults to `$AWS_ACCESS_KEY_ID`. + AccessKeyId *string `pulumi:"accessKeyId"` + // Prefix to prepend to blob filenames. + BlobsPrefix *string `pulumi:"blobsPrefix"` + // Name of the S3 bucket. + Bucket string `pulumi:"bucket"` + // Endpoint of the S3 bucket. + EndpointUrl *string `pulumi:"endpointUrl"` + // Ignore errors caused by failed cache exports. + IgnoreError *bool `pulumi:"ignoreError"` + // Prefix to prepend on manifest filenames. + ManifestsPrefix *string `pulumi:"manifestsPrefix"` + // The cache mode to use. Defaults to `min`. + Mode *CacheMode `pulumi:"mode"` + // Name of the cache image. + Name *string `pulumi:"name"` + // The geographic location of the bucket. Defaults to `$AWS_REGION`. + Region string `pulumi:"region"` + // Defaults to `$AWS_SECRET_ACCESS_KEY`. + SecretAccessKey *string `pulumi:"secretAccessKey"` + // Defaults to `$AWS_SESSION_TOKEN`. + SessionToken *string `pulumi:"sessionToken"` + // Uses `bucket` in the URL instead of hostname when `true`. + UsePathStyle *bool `pulumi:"usePathStyle"` +} + +// Defaults sets the appropriate defaults for CacheToS3 +func (val *CacheToS3) Defaults() *CacheToS3 { + if val == nil { + return nil + } + tmp := *val + if tmp.AccessKeyId == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_ACCESS_KEY_ID"); d != nil { + accessKeyId_ := d.(string) + tmp.AccessKeyId = &accessKeyId_ + } + } + if tmp.IgnoreError == nil { + ignoreError_ := false + tmp.IgnoreError = &ignoreError_ + } + if tmp.Mode == nil { + mode_ := CacheMode("min") + tmp.Mode = &mode_ + } + if internal.IsZero(tmp.Region) { + if d := internal.GetEnvOrDefault("", nil, "AWS_REGION"); d != nil { + tmp.Region = d.(string) + } + } + if tmp.SecretAccessKey == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SECRET_ACCESS_KEY"); d != nil { + secretAccessKey_ := d.(string) + tmp.SecretAccessKey = &secretAccessKey_ + } + } + if tmp.SessionToken == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SESSION_TOKEN"); d != nil { + sessionToken_ := d.(string) + tmp.SessionToken = &sessionToken_ + } + } + return &tmp +} + +// CacheToS3Input is an input type that accepts CacheToS3Args and CacheToS3Output values. +// You can construct a concrete instance of `CacheToS3Input` via: +// +// CacheToS3Args{...} +type CacheToS3Input interface { + pulumi.Input + + ToCacheToS3Output() CacheToS3Output + ToCacheToS3OutputWithContext(context.Context) CacheToS3Output +} + +type CacheToS3Args struct { + // Defaults to `$AWS_ACCESS_KEY_ID`. + AccessKeyId pulumi.StringPtrInput `pulumi:"accessKeyId"` + // Prefix to prepend to blob filenames. + BlobsPrefix pulumi.StringPtrInput `pulumi:"blobsPrefix"` + // Name of the S3 bucket. + Bucket pulumi.StringInput `pulumi:"bucket"` + // Endpoint of the S3 bucket. + EndpointUrl pulumi.StringPtrInput `pulumi:"endpointUrl"` + // Ignore errors caused by failed cache exports. + IgnoreError pulumi.BoolPtrInput `pulumi:"ignoreError"` + // Prefix to prepend on manifest filenames. + ManifestsPrefix pulumi.StringPtrInput `pulumi:"manifestsPrefix"` + // The cache mode to use. Defaults to `min`. + Mode CacheModePtrInput `pulumi:"mode"` + // Name of the cache image. + Name pulumi.StringPtrInput `pulumi:"name"` + // The geographic location of the bucket. Defaults to `$AWS_REGION`. + Region pulumi.StringInput `pulumi:"region"` + // Defaults to `$AWS_SECRET_ACCESS_KEY`. + SecretAccessKey pulumi.StringPtrInput `pulumi:"secretAccessKey"` + // Defaults to `$AWS_SESSION_TOKEN`. + SessionToken pulumi.StringPtrInput `pulumi:"sessionToken"` + // Uses `bucket` in the URL instead of hostname when `true`. + UsePathStyle pulumi.BoolPtrInput `pulumi:"usePathStyle"` +} + +// Defaults sets the appropriate defaults for CacheToS3Args +func (val *CacheToS3Args) Defaults() *CacheToS3Args { + if val == nil { + return nil + } + tmp := *val + if tmp.AccessKeyId == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_ACCESS_KEY_ID"); d != nil { + tmp.AccessKeyId = pulumi.StringPtr(d.(string)) + } + } + if tmp.IgnoreError == nil { + tmp.IgnoreError = pulumi.BoolPtr(false) + } + if tmp.Mode == nil { + tmp.Mode = CacheMode("min") + } + if tmp.Region == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_REGION"); d != nil { + tmp.Region = pulumi.String(d.(string)) + } + } + if tmp.SecretAccessKey == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SECRET_ACCESS_KEY"); d != nil { + tmp.SecretAccessKey = pulumi.StringPtr(d.(string)) + } + } + if tmp.SessionToken == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SESSION_TOKEN"); d != nil { + tmp.SessionToken = pulumi.StringPtr(d.(string)) + } + } + return &tmp +} +func (CacheToS3Args) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToS3)(nil)).Elem() +} + +func (i CacheToS3Args) ToCacheToS3Output() CacheToS3Output { + return i.ToCacheToS3OutputWithContext(context.Background()) +} + +func (i CacheToS3Args) ToCacheToS3OutputWithContext(ctx context.Context) CacheToS3Output { + return pulumi.ToOutputWithContext(ctx, i).(CacheToS3Output) +} + +func (i CacheToS3Args) ToOutput(ctx context.Context) pulumix.Output[CacheToS3] { + return pulumix.Output[CacheToS3]{ + OutputState: i.ToCacheToS3OutputWithContext(ctx).OutputState, + } +} + +func (i CacheToS3Args) ToCacheToS3PtrOutput() CacheToS3PtrOutput { + return i.ToCacheToS3PtrOutputWithContext(context.Background()) +} + +func (i CacheToS3Args) ToCacheToS3PtrOutputWithContext(ctx context.Context) CacheToS3PtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToS3Output).ToCacheToS3PtrOutputWithContext(ctx) +} + +// CacheToS3PtrInput is an input type that accepts CacheToS3Args, CacheToS3Ptr and CacheToS3PtrOutput values. +// You can construct a concrete instance of `CacheToS3PtrInput` via: +// +// CacheToS3Args{...} +// +// or: +// +// nil +type CacheToS3PtrInput interface { + pulumi.Input + + ToCacheToS3PtrOutput() CacheToS3PtrOutput + ToCacheToS3PtrOutputWithContext(context.Context) CacheToS3PtrOutput +} + +type cacheToS3PtrType CacheToS3Args + +func CacheToS3Ptr(v *CacheToS3Args) CacheToS3PtrInput { + return (*cacheToS3PtrType)(v) +} + +func (*cacheToS3PtrType) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToS3)(nil)).Elem() +} + +func (i *cacheToS3PtrType) ToCacheToS3PtrOutput() CacheToS3PtrOutput { + return i.ToCacheToS3PtrOutputWithContext(context.Background()) +} + +func (i *cacheToS3PtrType) ToCacheToS3PtrOutputWithContext(ctx context.Context) CacheToS3PtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToS3PtrOutput) +} + +func (i *cacheToS3PtrType) ToOutput(ctx context.Context) pulumix.Output[*CacheToS3] { + return pulumix.Output[*CacheToS3]{ + OutputState: i.ToCacheToS3PtrOutputWithContext(ctx).OutputState, + } +} + +type CacheToS3Output struct{ *pulumi.OutputState } + +func (CacheToS3Output) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToS3)(nil)).Elem() +} + +func (o CacheToS3Output) ToCacheToS3Output() CacheToS3Output { + return o +} + +func (o CacheToS3Output) ToCacheToS3OutputWithContext(ctx context.Context) CacheToS3Output { + return o +} + +func (o CacheToS3Output) ToCacheToS3PtrOutput() CacheToS3PtrOutput { + return o.ToCacheToS3PtrOutputWithContext(context.Background()) +} + +func (o CacheToS3Output) ToCacheToS3PtrOutputWithContext(ctx context.Context) CacheToS3PtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v CacheToS3) *CacheToS3 { + return &v + }).(CacheToS3PtrOutput) +} + +func (o CacheToS3Output) ToOutput(ctx context.Context) pulumix.Output[CacheToS3] { + return pulumix.Output[CacheToS3]{ + OutputState: o.OutputState, + } +} + +// Defaults to `$AWS_ACCESS_KEY_ID`. +func (o CacheToS3Output) AccessKeyId() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToS3) *string { return v.AccessKeyId }).(pulumi.StringPtrOutput) +} + +// Prefix to prepend to blob filenames. +func (o CacheToS3Output) BlobsPrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToS3) *string { return v.BlobsPrefix }).(pulumi.StringPtrOutput) +} + +// Name of the S3 bucket. +func (o CacheToS3Output) Bucket() pulumi.StringOutput { + return o.ApplyT(func(v CacheToS3) string { return v.Bucket }).(pulumi.StringOutput) +} + +// Endpoint of the S3 bucket. +func (o CacheToS3Output) EndpointUrl() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToS3) *string { return v.EndpointUrl }).(pulumi.StringPtrOutput) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToS3Output) IgnoreError() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheToS3) *bool { return v.IgnoreError }).(pulumi.BoolPtrOutput) +} + +// Prefix to prepend on manifest filenames. +func (o CacheToS3Output) ManifestsPrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToS3) *string { return v.ManifestsPrefix }).(pulumi.StringPtrOutput) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToS3Output) Mode() CacheModePtrOutput { + return o.ApplyT(func(v CacheToS3) *CacheMode { return v.Mode }).(CacheModePtrOutput) +} + +// Name of the cache image. +func (o CacheToS3Output) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToS3) *string { return v.Name }).(pulumi.StringPtrOutput) +} + +// The geographic location of the bucket. Defaults to `$AWS_REGION`. +func (o CacheToS3Output) Region() pulumi.StringOutput { + return o.ApplyT(func(v CacheToS3) string { return v.Region }).(pulumi.StringOutput) +} + +// Defaults to `$AWS_SECRET_ACCESS_KEY`. +func (o CacheToS3Output) SecretAccessKey() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToS3) *string { return v.SecretAccessKey }).(pulumi.StringPtrOutput) +} + +// Defaults to `$AWS_SESSION_TOKEN`. +func (o CacheToS3Output) SessionToken() pulumi.StringPtrOutput { + return o.ApplyT(func(v CacheToS3) *string { return v.SessionToken }).(pulumi.StringPtrOutput) +} + +// Uses `bucket` in the URL instead of hostname when `true`. +func (o CacheToS3Output) UsePathStyle() pulumi.BoolPtrOutput { + return o.ApplyT(func(v CacheToS3) *bool { return v.UsePathStyle }).(pulumi.BoolPtrOutput) +} + +type CacheToS3PtrOutput struct{ *pulumi.OutputState } + +func (CacheToS3PtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**CacheToS3)(nil)).Elem() +} + +func (o CacheToS3PtrOutput) ToCacheToS3PtrOutput() CacheToS3PtrOutput { + return o +} + +func (o CacheToS3PtrOutput) ToCacheToS3PtrOutputWithContext(ctx context.Context) CacheToS3PtrOutput { + return o +} + +func (o CacheToS3PtrOutput) ToOutput(ctx context.Context) pulumix.Output[*CacheToS3] { + return pulumix.Output[*CacheToS3]{ + OutputState: o.OutputState, + } +} + +func (o CacheToS3PtrOutput) Elem() CacheToS3Output { + return o.ApplyT(func(v *CacheToS3) CacheToS3 { + if v != nil { + return *v + } + var ret CacheToS3 + return ret + }).(CacheToS3Output) +} + +// Defaults to `$AWS_ACCESS_KEY_ID`. +func (o CacheToS3PtrOutput) AccessKeyId() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToS3) *string { + if v == nil { + return nil + } + return v.AccessKeyId + }).(pulumi.StringPtrOutput) +} + +// Prefix to prepend to blob filenames. +func (o CacheToS3PtrOutput) BlobsPrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToS3) *string { + if v == nil { + return nil + } + return v.BlobsPrefix + }).(pulumi.StringPtrOutput) +} + +// Name of the S3 bucket. +func (o CacheToS3PtrOutput) Bucket() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToS3) *string { + if v == nil { + return nil + } + return &v.Bucket + }).(pulumi.StringPtrOutput) +} + +// Endpoint of the S3 bucket. +func (o CacheToS3PtrOutput) EndpointUrl() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToS3) *string { + if v == nil { + return nil + } + return v.EndpointUrl + }).(pulumi.StringPtrOutput) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToS3PtrOutput) IgnoreError() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CacheToS3) *bool { + if v == nil { + return nil + } + return v.IgnoreError + }).(pulumi.BoolPtrOutput) +} + +// Prefix to prepend on manifest filenames. +func (o CacheToS3PtrOutput) ManifestsPrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToS3) *string { + if v == nil { + return nil + } + return v.ManifestsPrefix + }).(pulumi.StringPtrOutput) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToS3PtrOutput) Mode() CacheModePtrOutput { + return o.ApplyT(func(v *CacheToS3) *CacheMode { + if v == nil { + return nil + } + return v.Mode + }).(CacheModePtrOutput) +} + +// Name of the cache image. +func (o CacheToS3PtrOutput) Name() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToS3) *string { + if v == nil { + return nil + } + return v.Name + }).(pulumi.StringPtrOutput) +} + +// The geographic location of the bucket. Defaults to `$AWS_REGION`. +func (o CacheToS3PtrOutput) Region() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToS3) *string { + if v == nil { + return nil + } + return &v.Region + }).(pulumi.StringPtrOutput) +} + +// Defaults to `$AWS_SECRET_ACCESS_KEY`. +func (o CacheToS3PtrOutput) SecretAccessKey() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToS3) *string { + if v == nil { + return nil + } + return v.SecretAccessKey + }).(pulumi.StringPtrOutput) +} + +// Defaults to `$AWS_SESSION_TOKEN`. +func (o CacheToS3PtrOutput) SessionToken() pulumi.StringPtrOutput { + return o.ApplyT(func(v *CacheToS3) *string { + if v == nil { + return nil + } + return v.SessionToken + }).(pulumi.StringPtrOutput) +} + +// Uses `bucket` in the URL instead of hostname when `true`. +func (o CacheToS3PtrOutput) UsePathStyle() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *CacheToS3) *bool { + if v == nil { + return nil + } + return v.UsePathStyle + }).(pulumi.BoolPtrOutput) +} + +type Context struct { + // Resources to use for build context. + // + // The location can be: + // * A relative or absolute path to a local directory (`.`, `./app`, + // `/app`, etc.). + // * A remote URL of a Git repository, tarball, or plain text file + // (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + // etc.). + Location string `pulumi:"location"` +} + +// ContextInput is an input type that accepts ContextArgs and ContextOutput values. +// You can construct a concrete instance of `ContextInput` via: +// +// ContextArgs{...} +type ContextInput interface { + pulumi.Input + + ToContextOutput() ContextOutput + ToContextOutputWithContext(context.Context) ContextOutput +} + +type ContextArgs struct { + // Resources to use for build context. + // + // The location can be: + // * A relative or absolute path to a local directory (`.`, `./app`, + // `/app`, etc.). + // * A remote URL of a Git repository, tarball, or plain text file + // (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + // etc.). + Location pulumi.StringInput `pulumi:"location"` +} + +func (ContextArgs) ElementType() reflect.Type { + return reflect.TypeOf((*Context)(nil)).Elem() +} + +func (i ContextArgs) ToContextOutput() ContextOutput { + return i.ToContextOutputWithContext(context.Background()) +} + +func (i ContextArgs) ToContextOutputWithContext(ctx context.Context) ContextOutput { + return pulumi.ToOutputWithContext(ctx, i).(ContextOutput) +} + +func (i ContextArgs) ToOutput(ctx context.Context) pulumix.Output[Context] { + return pulumix.Output[Context]{ + OutputState: i.ToContextOutputWithContext(ctx).OutputState, + } +} + +// ContextMapInput is an input type that accepts ContextMap and ContextMapOutput values. +// You can construct a concrete instance of `ContextMapInput` via: +// +// ContextMap{ "key": ContextArgs{...} } +type ContextMapInput interface { + pulumi.Input + + ToContextMapOutput() ContextMapOutput + ToContextMapOutputWithContext(context.Context) ContextMapOutput +} + +type ContextMap map[string]ContextInput + +func (ContextMap) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]Context)(nil)).Elem() +} + +func (i ContextMap) ToContextMapOutput() ContextMapOutput { + return i.ToContextMapOutputWithContext(context.Background()) +} + +func (i ContextMap) ToContextMapOutputWithContext(ctx context.Context) ContextMapOutput { + return pulumi.ToOutputWithContext(ctx, i).(ContextMapOutput) +} + +func (i ContextMap) ToOutput(ctx context.Context) pulumix.Output[map[string]Context] { + return pulumix.Output[map[string]Context]{ + OutputState: i.ToContextMapOutputWithContext(ctx).OutputState, + } +} + +type ContextOutput struct{ *pulumi.OutputState } + +func (ContextOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Context)(nil)).Elem() +} + +func (o ContextOutput) ToContextOutput() ContextOutput { + return o +} + +func (o ContextOutput) ToContextOutputWithContext(ctx context.Context) ContextOutput { + return o +} + +func (o ContextOutput) ToOutput(ctx context.Context) pulumix.Output[Context] { + return pulumix.Output[Context]{ + OutputState: o.OutputState, + } +} + +// Resources to use for build context. +// +// The location can be: +// - A relative or absolute path to a local directory (`.`, `./app`, +// `/app`, etc.). +// - A remote URL of a Git repository, tarball, or plain text file +// (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, +// etc.). +func (o ContextOutput) Location() pulumi.StringOutput { + return o.ApplyT(func(v Context) string { return v.Location }).(pulumi.StringOutput) +} + +type ContextMapOutput struct{ *pulumi.OutputState } + +func (ContextMapOutput) ElementType() reflect.Type { + return reflect.TypeOf((*map[string]Context)(nil)).Elem() +} + +func (o ContextMapOutput) ToContextMapOutput() ContextMapOutput { + return o +} + +func (o ContextMapOutput) ToContextMapOutputWithContext(ctx context.Context) ContextMapOutput { + return o +} + +func (o ContextMapOutput) ToOutput(ctx context.Context) pulumix.Output[map[string]Context] { + return pulumix.Output[map[string]Context]{ + OutputState: o.OutputState, + } +} + +func (o ContextMapOutput) MapIndex(k pulumi.StringInput) ContextOutput { + return pulumi.All(o, k).ApplyT(func(vs []interface{}) Context { + return vs[0].(map[string]Context)[vs[1].(string)] + }).(ContextOutput) +} + +type Dockerfile struct { + // Raw Dockerfile contents. + // + // Conflicts with `location`. + // + // Equivalent to invoking Docker with `-f -`. + Inline *string `pulumi:"inline"` + // Location of the Dockerfile to use. + // + // Can be a relative or absolute path to a local file, or a remote URL. + // + // Defaults to `${context.location}/Dockerfile` if context is on-disk. + // + // Conflicts with `inline`. + Location *string `pulumi:"location"` +} + +// DockerfileInput is an input type that accepts DockerfileArgs and DockerfileOutput values. +// You can construct a concrete instance of `DockerfileInput` via: +// +// DockerfileArgs{...} +type DockerfileInput interface { + pulumi.Input + + ToDockerfileOutput() DockerfileOutput + ToDockerfileOutputWithContext(context.Context) DockerfileOutput +} + +type DockerfileArgs struct { + // Raw Dockerfile contents. + // + // Conflicts with `location`. + // + // Equivalent to invoking Docker with `-f -`. + Inline pulumi.StringPtrInput `pulumi:"inline"` + // Location of the Dockerfile to use. + // + // Can be a relative or absolute path to a local file, or a remote URL. + // + // Defaults to `${context.location}/Dockerfile` if context is on-disk. + // + // Conflicts with `inline`. + Location pulumi.StringPtrInput `pulumi:"location"` +} + +func (DockerfileArgs) ElementType() reflect.Type { + return reflect.TypeOf((*Dockerfile)(nil)).Elem() +} + +func (i DockerfileArgs) ToDockerfileOutput() DockerfileOutput { + return i.ToDockerfileOutputWithContext(context.Background()) +} + +func (i DockerfileArgs) ToDockerfileOutputWithContext(ctx context.Context) DockerfileOutput { + return pulumi.ToOutputWithContext(ctx, i).(DockerfileOutput) +} + +func (i DockerfileArgs) ToOutput(ctx context.Context) pulumix.Output[Dockerfile] { + return pulumix.Output[Dockerfile]{ + OutputState: i.ToDockerfileOutputWithContext(ctx).OutputState, + } +} + +func (i DockerfileArgs) ToDockerfilePtrOutput() DockerfilePtrOutput { + return i.ToDockerfilePtrOutputWithContext(context.Background()) +} + +func (i DockerfileArgs) ToDockerfilePtrOutputWithContext(ctx context.Context) DockerfilePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(DockerfileOutput).ToDockerfilePtrOutputWithContext(ctx) +} + +// DockerfilePtrInput is an input type that accepts DockerfileArgs, DockerfilePtr and DockerfilePtrOutput values. +// You can construct a concrete instance of `DockerfilePtrInput` via: +// +// DockerfileArgs{...} +// +// or: +// +// nil +type DockerfilePtrInput interface { + pulumi.Input + + ToDockerfilePtrOutput() DockerfilePtrOutput + ToDockerfilePtrOutputWithContext(context.Context) DockerfilePtrOutput +} + +type dockerfilePtrType DockerfileArgs + +func DockerfilePtr(v *DockerfileArgs) DockerfilePtrInput { + return (*dockerfilePtrType)(v) +} + +func (*dockerfilePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**Dockerfile)(nil)).Elem() +} + +func (i *dockerfilePtrType) ToDockerfilePtrOutput() DockerfilePtrOutput { + return i.ToDockerfilePtrOutputWithContext(context.Background()) +} + +func (i *dockerfilePtrType) ToDockerfilePtrOutputWithContext(ctx context.Context) DockerfilePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(DockerfilePtrOutput) +} + +func (i *dockerfilePtrType) ToOutput(ctx context.Context) pulumix.Output[*Dockerfile] { + return pulumix.Output[*Dockerfile]{ + OutputState: i.ToDockerfilePtrOutputWithContext(ctx).OutputState, + } +} + +type DockerfileOutput struct{ *pulumi.OutputState } + +func (DockerfileOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Dockerfile)(nil)).Elem() +} + +func (o DockerfileOutput) ToDockerfileOutput() DockerfileOutput { + return o +} + +func (o DockerfileOutput) ToDockerfileOutputWithContext(ctx context.Context) DockerfileOutput { + return o +} + +func (o DockerfileOutput) ToDockerfilePtrOutput() DockerfilePtrOutput { + return o.ToDockerfilePtrOutputWithContext(context.Background()) +} + +func (o DockerfileOutput) ToDockerfilePtrOutputWithContext(ctx context.Context) DockerfilePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v Dockerfile) *Dockerfile { + return &v + }).(DockerfilePtrOutput) +} + +func (o DockerfileOutput) ToOutput(ctx context.Context) pulumix.Output[Dockerfile] { + return pulumix.Output[Dockerfile]{ + OutputState: o.OutputState, + } +} + +// Raw Dockerfile contents. +// +// Conflicts with `location`. +// +// Equivalent to invoking Docker with `-f -`. +func (o DockerfileOutput) Inline() pulumi.StringPtrOutput { + return o.ApplyT(func(v Dockerfile) *string { return v.Inline }).(pulumi.StringPtrOutput) +} + +// Location of the Dockerfile to use. +// +// Can be a relative or absolute path to a local file, or a remote URL. +// +// Defaults to `${context.location}/Dockerfile` if context is on-disk. +// +// Conflicts with `inline`. +func (o DockerfileOutput) Location() pulumi.StringPtrOutput { + return o.ApplyT(func(v Dockerfile) *string { return v.Location }).(pulumi.StringPtrOutput) +} + +type DockerfilePtrOutput struct{ *pulumi.OutputState } + +func (DockerfilePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**Dockerfile)(nil)).Elem() +} + +func (o DockerfilePtrOutput) ToDockerfilePtrOutput() DockerfilePtrOutput { + return o +} + +func (o DockerfilePtrOutput) ToDockerfilePtrOutputWithContext(ctx context.Context) DockerfilePtrOutput { + return o +} + +func (o DockerfilePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*Dockerfile] { + return pulumix.Output[*Dockerfile]{ + OutputState: o.OutputState, + } +} + +func (o DockerfilePtrOutput) Elem() DockerfileOutput { + return o.ApplyT(func(v *Dockerfile) Dockerfile { + if v != nil { + return *v + } + var ret Dockerfile + return ret + }).(DockerfileOutput) +} + +// Raw Dockerfile contents. +// +// Conflicts with `location`. +// +// Equivalent to invoking Docker with `-f -`. +func (o DockerfilePtrOutput) Inline() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Dockerfile) *string { + if v == nil { + return nil + } + return v.Inline + }).(pulumi.StringPtrOutput) +} + +// Location of the Dockerfile to use. +// +// Can be a relative or absolute path to a local file, or a remote URL. +// +// Defaults to `${context.location}/Dockerfile` if context is on-disk. +// +// Conflicts with `inline`. +func (o DockerfilePtrOutput) Location() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Dockerfile) *string { + if v == nil { + return nil + } + return v.Location + }).(pulumi.StringPtrOutput) +} + +type Export struct { + // A no-op export. Helpful for silencing the 'no exports' warning if you + // just want to populate caches. + Cacheonly *ExportCacheOnly `pulumi:"cacheonly"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled *bool `pulumi:"disabled"` + // Export as a Docker image layout. + Docker *ExportDocker `pulumi:"docker"` + // Outputs the build result into a container image format. + Image *ExportImage `pulumi:"image"` + // Export to a local directory as files and directories. + Local *ExportLocal `pulumi:"local"` + // Identical to the Docker exporter but uses OCI media types by default. + Oci *ExportOCI `pulumi:"oci"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=docker`) + Raw *string `pulumi:"raw"` + // Identical to the Image exporter, but pushes by default. + Registry *ExportRegistry `pulumi:"registry"` + // Export to a local directory as a tarball. + Tar *ExportTar `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for Export +func (val *Export) Defaults() *Export { + if val == nil { + return nil + } + tmp := *val + tmp.Docker = tmp.Docker.Defaults() + + tmp.Image = tmp.Image.Defaults() + + tmp.Oci = tmp.Oci.Defaults() + + tmp.Registry = tmp.Registry.Defaults() + + return &tmp +} + +// ExportInput is an input type that accepts ExportArgs and ExportOutput values. +// You can construct a concrete instance of `ExportInput` via: +// +// ExportArgs{...} +type ExportInput interface { + pulumi.Input + + ToExportOutput() ExportOutput + ToExportOutputWithContext(context.Context) ExportOutput +} + +type ExportArgs struct { + // A no-op export. Helpful for silencing the 'no exports' warning if you + // just want to populate caches. + Cacheonly ExportCacheOnlyPtrInput `pulumi:"cacheonly"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled pulumi.BoolPtrInput `pulumi:"disabled"` + // Export as a Docker image layout. + Docker ExportDockerPtrInput `pulumi:"docker"` + // Outputs the build result into a container image format. + Image ExportImagePtrInput `pulumi:"image"` + // Export to a local directory as files and directories. + Local ExportLocalPtrInput `pulumi:"local"` + // Identical to the Docker exporter but uses OCI media types by default. + Oci ExportOCIPtrInput `pulumi:"oci"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=docker`) + Raw pulumi.StringPtrInput `pulumi:"raw"` + // Identical to the Image exporter, but pushes by default. + Registry ExportRegistryPtrInput `pulumi:"registry"` + // Export to a local directory as a tarball. + Tar ExportTarPtrInput `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for ExportArgs +func (val *ExportArgs) Defaults() *ExportArgs { + if val == nil { + return nil + } + tmp := *val + + return &tmp +} +func (ExportArgs) ElementType() reflect.Type { + return reflect.TypeOf((*Export)(nil)).Elem() +} + +func (i ExportArgs) ToExportOutput() ExportOutput { + return i.ToExportOutputWithContext(context.Background()) +} + +func (i ExportArgs) ToExportOutputWithContext(ctx context.Context) ExportOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportOutput) +} + +func (i ExportArgs) ToOutput(ctx context.Context) pulumix.Output[Export] { + return pulumix.Output[Export]{ + OutputState: i.ToExportOutputWithContext(ctx).OutputState, + } +} + +// ExportArrayInput is an input type that accepts ExportArray and ExportArrayOutput values. +// You can construct a concrete instance of `ExportArrayInput` via: +// +// ExportArray{ ExportArgs{...} } +type ExportArrayInput interface { + pulumi.Input + + ToExportArrayOutput() ExportArrayOutput + ToExportArrayOutputWithContext(context.Context) ExportArrayOutput +} + +type ExportArray []ExportInput + +func (ExportArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]Export)(nil)).Elem() +} + +func (i ExportArray) ToExportArrayOutput() ExportArrayOutput { + return i.ToExportArrayOutputWithContext(context.Background()) +} + +func (i ExportArray) ToExportArrayOutputWithContext(ctx context.Context) ExportArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportArrayOutput) +} + +func (i ExportArray) ToOutput(ctx context.Context) pulumix.Output[[]Export] { + return pulumix.Output[[]Export]{ + OutputState: i.ToExportArrayOutputWithContext(ctx).OutputState, + } +} + +type ExportOutput struct{ *pulumi.OutputState } + +func (ExportOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Export)(nil)).Elem() +} + +func (o ExportOutput) ToExportOutput() ExportOutput { + return o +} + +func (o ExportOutput) ToExportOutputWithContext(ctx context.Context) ExportOutput { + return o +} + +func (o ExportOutput) ToOutput(ctx context.Context) pulumix.Output[Export] { + return pulumix.Output[Export]{ + OutputState: o.OutputState, + } +} + +// A no-op export. Helpful for silencing the 'no exports' warning if you +// just want to populate caches. +func (o ExportOutput) Cacheonly() ExportCacheOnlyPtrOutput { + return o.ApplyT(func(v Export) *ExportCacheOnly { return v.Cacheonly }).(ExportCacheOnlyPtrOutput) +} + +// When `true` this entry will be excluded. Defaults to `false`. +func (o ExportOutput) Disabled() pulumi.BoolPtrOutput { + return o.ApplyT(func(v Export) *bool { return v.Disabled }).(pulumi.BoolPtrOutput) +} + +// Export as a Docker image layout. +func (o ExportOutput) Docker() ExportDockerPtrOutput { + return o.ApplyT(func(v Export) *ExportDocker { return v.Docker }).(ExportDockerPtrOutput) +} + +// Outputs the build result into a container image format. +func (o ExportOutput) Image() ExportImagePtrOutput { + return o.ApplyT(func(v Export) *ExportImage { return v.Image }).(ExportImagePtrOutput) +} + +// Export to a local directory as files and directories. +func (o ExportOutput) Local() ExportLocalPtrOutput { + return o.ApplyT(func(v Export) *ExportLocal { return v.Local }).(ExportLocalPtrOutput) +} + +// Identical to the Docker exporter but uses OCI media types by default. +func (o ExportOutput) Oci() ExportOCIPtrOutput { + return o.ApplyT(func(v Export) *ExportOCI { return v.Oci }).(ExportOCIPtrOutput) +} + +// A raw string as you would provide it to the Docker CLI (e.g., +// `type=docker`) +func (o ExportOutput) Raw() pulumi.StringPtrOutput { + return o.ApplyT(func(v Export) *string { return v.Raw }).(pulumi.StringPtrOutput) +} + +// Identical to the Image exporter, but pushes by default. +func (o ExportOutput) Registry() ExportRegistryPtrOutput { + return o.ApplyT(func(v Export) *ExportRegistry { return v.Registry }).(ExportRegistryPtrOutput) +} + +// Export to a local directory as a tarball. +func (o ExportOutput) Tar() ExportTarPtrOutput { + return o.ApplyT(func(v Export) *ExportTar { return v.Tar }).(ExportTarPtrOutput) +} + +type ExportArrayOutput struct{ *pulumi.OutputState } + +func (ExportArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]Export)(nil)).Elem() +} + +func (o ExportArrayOutput) ToExportArrayOutput() ExportArrayOutput { + return o +} + +func (o ExportArrayOutput) ToExportArrayOutputWithContext(ctx context.Context) ExportArrayOutput { + return o +} + +func (o ExportArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]Export] { + return pulumix.Output[[]Export]{ + OutputState: o.OutputState, + } +} + +func (o ExportArrayOutput) Index(i pulumi.IntInput) ExportOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) Export { + return vs[0].([]Export)[vs[1].(int)] + }).(ExportOutput) +} + +type ExportCacheOnly struct { +} + +// ExportCacheOnlyInput is an input type that accepts ExportCacheOnlyArgs and ExportCacheOnlyOutput values. +// You can construct a concrete instance of `ExportCacheOnlyInput` via: +// +// ExportCacheOnlyArgs{...} +type ExportCacheOnlyInput interface { + pulumi.Input + + ToExportCacheOnlyOutput() ExportCacheOnlyOutput + ToExportCacheOnlyOutputWithContext(context.Context) ExportCacheOnlyOutput +} + +type ExportCacheOnlyArgs struct { +} + +func (ExportCacheOnlyArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportCacheOnly)(nil)).Elem() +} + +func (i ExportCacheOnlyArgs) ToExportCacheOnlyOutput() ExportCacheOnlyOutput { + return i.ToExportCacheOnlyOutputWithContext(context.Background()) +} + +func (i ExportCacheOnlyArgs) ToExportCacheOnlyOutputWithContext(ctx context.Context) ExportCacheOnlyOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportCacheOnlyOutput) +} + +func (i ExportCacheOnlyArgs) ToOutput(ctx context.Context) pulumix.Output[ExportCacheOnly] { + return pulumix.Output[ExportCacheOnly]{ + OutputState: i.ToExportCacheOnlyOutputWithContext(ctx).OutputState, + } +} + +func (i ExportCacheOnlyArgs) ToExportCacheOnlyPtrOutput() ExportCacheOnlyPtrOutput { + return i.ToExportCacheOnlyPtrOutputWithContext(context.Background()) +} + +func (i ExportCacheOnlyArgs) ToExportCacheOnlyPtrOutputWithContext(ctx context.Context) ExportCacheOnlyPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportCacheOnlyOutput).ToExportCacheOnlyPtrOutputWithContext(ctx) +} + +// ExportCacheOnlyPtrInput is an input type that accepts ExportCacheOnlyArgs, ExportCacheOnlyPtr and ExportCacheOnlyPtrOutput values. +// You can construct a concrete instance of `ExportCacheOnlyPtrInput` via: +// +// ExportCacheOnlyArgs{...} +// +// or: +// +// nil +type ExportCacheOnlyPtrInput interface { + pulumi.Input + + ToExportCacheOnlyPtrOutput() ExportCacheOnlyPtrOutput + ToExportCacheOnlyPtrOutputWithContext(context.Context) ExportCacheOnlyPtrOutput +} + +type exportCacheOnlyPtrType ExportCacheOnlyArgs + +func ExportCacheOnlyPtr(v *ExportCacheOnlyArgs) ExportCacheOnlyPtrInput { + return (*exportCacheOnlyPtrType)(v) +} + +func (*exportCacheOnlyPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**ExportCacheOnly)(nil)).Elem() +} + +func (i *exportCacheOnlyPtrType) ToExportCacheOnlyPtrOutput() ExportCacheOnlyPtrOutput { + return i.ToExportCacheOnlyPtrOutputWithContext(context.Background()) +} + +func (i *exportCacheOnlyPtrType) ToExportCacheOnlyPtrOutputWithContext(ctx context.Context) ExportCacheOnlyPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportCacheOnlyPtrOutput) +} + +func (i *exportCacheOnlyPtrType) ToOutput(ctx context.Context) pulumix.Output[*ExportCacheOnly] { + return pulumix.Output[*ExportCacheOnly]{ + OutputState: i.ToExportCacheOnlyPtrOutputWithContext(ctx).OutputState, + } +} + +type ExportCacheOnlyOutput struct{ *pulumi.OutputState } + +func (ExportCacheOnlyOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportCacheOnly)(nil)).Elem() +} + +func (o ExportCacheOnlyOutput) ToExportCacheOnlyOutput() ExportCacheOnlyOutput { + return o +} + +func (o ExportCacheOnlyOutput) ToExportCacheOnlyOutputWithContext(ctx context.Context) ExportCacheOnlyOutput { + return o +} + +func (o ExportCacheOnlyOutput) ToExportCacheOnlyPtrOutput() ExportCacheOnlyPtrOutput { + return o.ToExportCacheOnlyPtrOutputWithContext(context.Background()) +} + +func (o ExportCacheOnlyOutput) ToExportCacheOnlyPtrOutputWithContext(ctx context.Context) ExportCacheOnlyPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v ExportCacheOnly) *ExportCacheOnly { + return &v + }).(ExportCacheOnlyPtrOutput) +} + +func (o ExportCacheOnlyOutput) ToOutput(ctx context.Context) pulumix.Output[ExportCacheOnly] { + return pulumix.Output[ExportCacheOnly]{ + OutputState: o.OutputState, + } +} + +type ExportCacheOnlyPtrOutput struct{ *pulumi.OutputState } + +func (ExportCacheOnlyPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**ExportCacheOnly)(nil)).Elem() +} + +func (o ExportCacheOnlyPtrOutput) ToExportCacheOnlyPtrOutput() ExportCacheOnlyPtrOutput { + return o +} + +func (o ExportCacheOnlyPtrOutput) ToExportCacheOnlyPtrOutputWithContext(ctx context.Context) ExportCacheOnlyPtrOutput { + return o +} + +func (o ExportCacheOnlyPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*ExportCacheOnly] { + return pulumix.Output[*ExportCacheOnly]{ + OutputState: o.OutputState, + } +} + +func (o ExportCacheOnlyPtrOutput) Elem() ExportCacheOnlyOutput { + return o.ApplyT(func(v *ExportCacheOnly) ExportCacheOnly { + if v != nil { + return *v + } + var ret ExportCacheOnly + return ret + }).(ExportCacheOnlyOutput) +} + +type ExportDocker struct { + // Attach an arbitrary key/value annotation to the image. + Annotations map[string]string `pulumi:"annotations"` + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // The local export path. + Dest *string `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Specify images names to export. This is overridden if tags are already specified. + Names []string `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes *bool `pulumi:"ociMediaTypes"` + // Bundle the output into a tarball layout. + Tar *bool `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for ExportDocker +func (val *ExportDocker) Defaults() *ExportDocker { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.OciMediaTypes == nil { + ociMediaTypes_ := false + tmp.OciMediaTypes = &ociMediaTypes_ + } + if tmp.Tar == nil { + tar_ := true + tmp.Tar = &tar_ + } + return &tmp +} + +// ExportDockerInput is an input type that accepts ExportDockerArgs and ExportDockerOutput values. +// You can construct a concrete instance of `ExportDockerInput` via: +// +// ExportDockerArgs{...} +type ExportDockerInput interface { + pulumi.Input + + ToExportDockerOutput() ExportDockerOutput + ToExportDockerOutputWithContext(context.Context) ExportDockerOutput +} + +type ExportDockerArgs struct { + // Attach an arbitrary key/value annotation to the image. + Annotations pulumi.StringMapInput `pulumi:"annotations"` + // The compression type to use. + Compression CompressionTypePtrInput `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumi.IntPtrInput `pulumi:"compressionLevel"` + // The local export path. + Dest pulumi.StringPtrInput `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression pulumi.BoolPtrInput `pulumi:"forceCompression"` + // Specify images names to export. This is overridden if tags are already specified. + Names pulumi.StringArrayInput `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes pulumi.BoolPtrInput `pulumi:"ociMediaTypes"` + // Bundle the output into a tarball layout. + Tar pulumi.BoolPtrInput `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for ExportDockerArgs +func (val *ExportDockerArgs) Defaults() *ExportDockerArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = CompressionType("gzip") + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumi.IntPtr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumi.BoolPtr(false) + } + if tmp.OciMediaTypes == nil { + tmp.OciMediaTypes = pulumi.BoolPtr(false) + } + if tmp.Tar == nil { + tmp.Tar = pulumi.BoolPtr(true) + } + return &tmp +} +func (ExportDockerArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportDocker)(nil)).Elem() +} + +func (i ExportDockerArgs) ToExportDockerOutput() ExportDockerOutput { + return i.ToExportDockerOutputWithContext(context.Background()) +} + +func (i ExportDockerArgs) ToExportDockerOutputWithContext(ctx context.Context) ExportDockerOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportDockerOutput) +} + +func (i ExportDockerArgs) ToOutput(ctx context.Context) pulumix.Output[ExportDocker] { + return pulumix.Output[ExportDocker]{ + OutputState: i.ToExportDockerOutputWithContext(ctx).OutputState, + } +} + +func (i ExportDockerArgs) ToExportDockerPtrOutput() ExportDockerPtrOutput { + return i.ToExportDockerPtrOutputWithContext(context.Background()) +} + +func (i ExportDockerArgs) ToExportDockerPtrOutputWithContext(ctx context.Context) ExportDockerPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportDockerOutput).ToExportDockerPtrOutputWithContext(ctx) +} + +// ExportDockerPtrInput is an input type that accepts ExportDockerArgs, ExportDockerPtr and ExportDockerPtrOutput values. +// You can construct a concrete instance of `ExportDockerPtrInput` via: +// +// ExportDockerArgs{...} +// +// or: +// +// nil +type ExportDockerPtrInput interface { + pulumi.Input + + ToExportDockerPtrOutput() ExportDockerPtrOutput + ToExportDockerPtrOutputWithContext(context.Context) ExportDockerPtrOutput +} + +type exportDockerPtrType ExportDockerArgs + +func ExportDockerPtr(v *ExportDockerArgs) ExportDockerPtrInput { + return (*exportDockerPtrType)(v) +} + +func (*exportDockerPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**ExportDocker)(nil)).Elem() +} + +func (i *exportDockerPtrType) ToExportDockerPtrOutput() ExportDockerPtrOutput { + return i.ToExportDockerPtrOutputWithContext(context.Background()) +} + +func (i *exportDockerPtrType) ToExportDockerPtrOutputWithContext(ctx context.Context) ExportDockerPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportDockerPtrOutput) +} + +func (i *exportDockerPtrType) ToOutput(ctx context.Context) pulumix.Output[*ExportDocker] { + return pulumix.Output[*ExportDocker]{ + OutputState: i.ToExportDockerPtrOutputWithContext(ctx).OutputState, + } +} + +type ExportDockerOutput struct{ *pulumi.OutputState } + +func (ExportDockerOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportDocker)(nil)).Elem() +} + +func (o ExportDockerOutput) ToExportDockerOutput() ExportDockerOutput { + return o +} + +func (o ExportDockerOutput) ToExportDockerOutputWithContext(ctx context.Context) ExportDockerOutput { + return o +} + +func (o ExportDockerOutput) ToExportDockerPtrOutput() ExportDockerPtrOutput { + return o.ToExportDockerPtrOutputWithContext(context.Background()) +} + +func (o ExportDockerOutput) ToExportDockerPtrOutputWithContext(ctx context.Context) ExportDockerPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v ExportDocker) *ExportDocker { + return &v + }).(ExportDockerPtrOutput) +} + +func (o ExportDockerOutput) ToOutput(ctx context.Context) pulumix.Output[ExportDocker] { + return pulumix.Output[ExportDocker]{ + OutputState: o.OutputState, + } +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportDockerOutput) Annotations() pulumi.StringMapOutput { + return o.ApplyT(func(v ExportDocker) map[string]string { return v.Annotations }).(pulumi.StringMapOutput) +} + +// The compression type to use. +func (o ExportDockerOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v ExportDocker) *CompressionType { return v.Compression }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o ExportDockerOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v ExportDocker) *int { return v.CompressionLevel }).(pulumi.IntPtrOutput) +} + +// The local export path. +func (o ExportDockerOutput) Dest() pulumi.StringPtrOutput { + return o.ApplyT(func(v ExportDocker) *string { return v.Dest }).(pulumi.StringPtrOutput) +} + +// Forcefully apply compression. +func (o ExportDockerOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportDocker) *bool { return v.ForceCompression }).(pulumi.BoolPtrOutput) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportDockerOutput) Names() pulumi.StringArrayOutput { + return o.ApplyT(func(v ExportDocker) []string { return v.Names }).(pulumi.StringArrayOutput) +} + +// Use OCI media types in exporter manifests. +func (o ExportDockerOutput) OciMediaTypes() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportDocker) *bool { return v.OciMediaTypes }).(pulumi.BoolPtrOutput) +} + +// Bundle the output into a tarball layout. +func (o ExportDockerOutput) Tar() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportDocker) *bool { return v.Tar }).(pulumi.BoolPtrOutput) +} + +type ExportDockerPtrOutput struct{ *pulumi.OutputState } + +func (ExportDockerPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**ExportDocker)(nil)).Elem() +} + +func (o ExportDockerPtrOutput) ToExportDockerPtrOutput() ExportDockerPtrOutput { + return o +} + +func (o ExportDockerPtrOutput) ToExportDockerPtrOutputWithContext(ctx context.Context) ExportDockerPtrOutput { + return o +} + +func (o ExportDockerPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*ExportDocker] { + return pulumix.Output[*ExportDocker]{ + OutputState: o.OutputState, + } +} + +func (o ExportDockerPtrOutput) Elem() ExportDockerOutput { + return o.ApplyT(func(v *ExportDocker) ExportDocker { + if v != nil { + return *v + } + var ret ExportDocker + return ret + }).(ExportDockerOutput) +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportDockerPtrOutput) Annotations() pulumi.StringMapOutput { + return o.ApplyT(func(v *ExportDocker) map[string]string { + if v == nil { + return nil + } + return v.Annotations + }).(pulumi.StringMapOutput) +} + +// The compression type to use. +func (o ExportDockerPtrOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v *ExportDocker) *CompressionType { + if v == nil { + return nil + } + return v.Compression + }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o ExportDockerPtrOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v *ExportDocker) *int { + if v == nil { + return nil + } + return v.CompressionLevel + }).(pulumi.IntPtrOutput) +} + +// The local export path. +func (o ExportDockerPtrOutput) Dest() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ExportDocker) *string { + if v == nil { + return nil + } + return v.Dest + }).(pulumi.StringPtrOutput) +} + +// Forcefully apply compression. +func (o ExportDockerPtrOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportDocker) *bool { + if v == nil { + return nil + } + return v.ForceCompression + }).(pulumi.BoolPtrOutput) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportDockerPtrOutput) Names() pulumi.StringArrayOutput { + return o.ApplyT(func(v *ExportDocker) []string { + if v == nil { + return nil + } + return v.Names + }).(pulumi.StringArrayOutput) +} + +// Use OCI media types in exporter manifests. +func (o ExportDockerPtrOutput) OciMediaTypes() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportDocker) *bool { + if v == nil { + return nil + } + return v.OciMediaTypes + }).(pulumi.BoolPtrOutput) +} + +// Bundle the output into a tarball layout. +func (o ExportDockerPtrOutput) Tar() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportDocker) *bool { + if v == nil { + return nil + } + return v.Tar + }).(pulumi.BoolPtrOutput) +} + +type ExportImage struct { + // Attach an arbitrary key/value annotation to the image. + Annotations map[string]string `pulumi:"annotations"` + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // Name image with `prefix@`, used for anonymous images. + DanglingNamePrefix *string `pulumi:"danglingNamePrefix"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Allow pushing to an insecure registry. + Insecure *bool `pulumi:"insecure"` + // Add additional canonical name (`name@`). + NameCanonical *bool `pulumi:"nameCanonical"` + // Specify images names to export. This is overridden if tags are already specified. + Names []string `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes *bool `pulumi:"ociMediaTypes"` + // Push after creating the image. Defaults to `false`. + Push *bool `pulumi:"push"` + // Push image without name. + PushByDigest *bool `pulumi:"pushByDigest"` + // Store resulting images to the worker's image store and ensure all of + // its blobs are in the content store. + // + // Defaults to `true`. + // + // Ignored if the worker doesn't have image store (when using OCI workers, + // for example). + Store *bool `pulumi:"store"` + // Unpack image after creation (for use with containerd). Defaults to + // `false`. + Unpack *bool `pulumi:"unpack"` +} + +// Defaults sets the appropriate defaults for ExportImage +func (val *ExportImage) Defaults() *ExportImage { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.OciMediaTypes == nil { + ociMediaTypes_ := false + tmp.OciMediaTypes = &ociMediaTypes_ + } + if tmp.Store == nil { + store_ := true + tmp.Store = &store_ + } + return &tmp +} + +// ExportImageInput is an input type that accepts ExportImageArgs and ExportImageOutput values. +// You can construct a concrete instance of `ExportImageInput` via: +// +// ExportImageArgs{...} +type ExportImageInput interface { + pulumi.Input + + ToExportImageOutput() ExportImageOutput + ToExportImageOutputWithContext(context.Context) ExportImageOutput +} + +type ExportImageArgs struct { + // Attach an arbitrary key/value annotation to the image. + Annotations pulumi.StringMapInput `pulumi:"annotations"` + // The compression type to use. + Compression CompressionTypePtrInput `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumi.IntPtrInput `pulumi:"compressionLevel"` + // Name image with `prefix@`, used for anonymous images. + DanglingNamePrefix pulumi.StringPtrInput `pulumi:"danglingNamePrefix"` + // Forcefully apply compression. + ForceCompression pulumi.BoolPtrInput `pulumi:"forceCompression"` + // Allow pushing to an insecure registry. + Insecure pulumi.BoolPtrInput `pulumi:"insecure"` + // Add additional canonical name (`name@`). + NameCanonical pulumi.BoolPtrInput `pulumi:"nameCanonical"` + // Specify images names to export. This is overridden if tags are already specified. + Names pulumi.StringArrayInput `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes pulumi.BoolPtrInput `pulumi:"ociMediaTypes"` + // Push after creating the image. Defaults to `false`. + Push pulumi.BoolPtrInput `pulumi:"push"` + // Push image without name. + PushByDigest pulumi.BoolPtrInput `pulumi:"pushByDigest"` + // Store resulting images to the worker's image store and ensure all of + // its blobs are in the content store. + // + // Defaults to `true`. + // + // Ignored if the worker doesn't have image store (when using OCI workers, + // for example). + Store pulumi.BoolPtrInput `pulumi:"store"` + // Unpack image after creation (for use with containerd). Defaults to + // `false`. + Unpack pulumi.BoolPtrInput `pulumi:"unpack"` +} + +// Defaults sets the appropriate defaults for ExportImageArgs +func (val *ExportImageArgs) Defaults() *ExportImageArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = CompressionType("gzip") + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumi.IntPtr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumi.BoolPtr(false) + } + if tmp.OciMediaTypes == nil { + tmp.OciMediaTypes = pulumi.BoolPtr(false) + } + if tmp.Store == nil { + tmp.Store = pulumi.BoolPtr(true) + } + return &tmp +} +func (ExportImageArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportImage)(nil)).Elem() +} + +func (i ExportImageArgs) ToExportImageOutput() ExportImageOutput { + return i.ToExportImageOutputWithContext(context.Background()) +} + +func (i ExportImageArgs) ToExportImageOutputWithContext(ctx context.Context) ExportImageOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportImageOutput) +} + +func (i ExportImageArgs) ToOutput(ctx context.Context) pulumix.Output[ExportImage] { + return pulumix.Output[ExportImage]{ + OutputState: i.ToExportImageOutputWithContext(ctx).OutputState, + } +} + +func (i ExportImageArgs) ToExportImagePtrOutput() ExportImagePtrOutput { + return i.ToExportImagePtrOutputWithContext(context.Background()) +} + +func (i ExportImageArgs) ToExportImagePtrOutputWithContext(ctx context.Context) ExportImagePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportImageOutput).ToExportImagePtrOutputWithContext(ctx) +} + +// ExportImagePtrInput is an input type that accepts ExportImageArgs, ExportImagePtr and ExportImagePtrOutput values. +// You can construct a concrete instance of `ExportImagePtrInput` via: +// +// ExportImageArgs{...} +// +// or: +// +// nil +type ExportImagePtrInput interface { + pulumi.Input + + ToExportImagePtrOutput() ExportImagePtrOutput + ToExportImagePtrOutputWithContext(context.Context) ExportImagePtrOutput +} + +type exportImagePtrType ExportImageArgs + +func ExportImagePtr(v *ExportImageArgs) ExportImagePtrInput { + return (*exportImagePtrType)(v) +} + +func (*exportImagePtrType) ElementType() reflect.Type { + return reflect.TypeOf((**ExportImage)(nil)).Elem() +} + +func (i *exportImagePtrType) ToExportImagePtrOutput() ExportImagePtrOutput { + return i.ToExportImagePtrOutputWithContext(context.Background()) +} + +func (i *exportImagePtrType) ToExportImagePtrOutputWithContext(ctx context.Context) ExportImagePtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportImagePtrOutput) +} + +func (i *exportImagePtrType) ToOutput(ctx context.Context) pulumix.Output[*ExportImage] { + return pulumix.Output[*ExportImage]{ + OutputState: i.ToExportImagePtrOutputWithContext(ctx).OutputState, + } +} + +type ExportImageOutput struct{ *pulumi.OutputState } + +func (ExportImageOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportImage)(nil)).Elem() +} + +func (o ExportImageOutput) ToExportImageOutput() ExportImageOutput { + return o +} + +func (o ExportImageOutput) ToExportImageOutputWithContext(ctx context.Context) ExportImageOutput { + return o +} + +func (o ExportImageOutput) ToExportImagePtrOutput() ExportImagePtrOutput { + return o.ToExportImagePtrOutputWithContext(context.Background()) +} + +func (o ExportImageOutput) ToExportImagePtrOutputWithContext(ctx context.Context) ExportImagePtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v ExportImage) *ExportImage { + return &v + }).(ExportImagePtrOutput) +} + +func (o ExportImageOutput) ToOutput(ctx context.Context) pulumix.Output[ExportImage] { + return pulumix.Output[ExportImage]{ + OutputState: o.OutputState, + } +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportImageOutput) Annotations() pulumi.StringMapOutput { + return o.ApplyT(func(v ExportImage) map[string]string { return v.Annotations }).(pulumi.StringMapOutput) +} + +// The compression type to use. +func (o ExportImageOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v ExportImage) *CompressionType { return v.Compression }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o ExportImageOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v ExportImage) *int { return v.CompressionLevel }).(pulumi.IntPtrOutput) +} + +// Name image with `prefix@`, used for anonymous images. +func (o ExportImageOutput) DanglingNamePrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v ExportImage) *string { return v.DanglingNamePrefix }).(pulumi.StringPtrOutput) +} + +// Forcefully apply compression. +func (o ExportImageOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportImage) *bool { return v.ForceCompression }).(pulumi.BoolPtrOutput) +} + +// Allow pushing to an insecure registry. +func (o ExportImageOutput) Insecure() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportImage) *bool { return v.Insecure }).(pulumi.BoolPtrOutput) +} + +// Add additional canonical name (`name@`). +func (o ExportImageOutput) NameCanonical() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportImage) *bool { return v.NameCanonical }).(pulumi.BoolPtrOutput) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportImageOutput) Names() pulumi.StringArrayOutput { + return o.ApplyT(func(v ExportImage) []string { return v.Names }).(pulumi.StringArrayOutput) +} + +// Use OCI media types in exporter manifests. +func (o ExportImageOutput) OciMediaTypes() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportImage) *bool { return v.OciMediaTypes }).(pulumi.BoolPtrOutput) +} + +// Push after creating the image. Defaults to `false`. +func (o ExportImageOutput) Push() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportImage) *bool { return v.Push }).(pulumi.BoolPtrOutput) +} + +// Push image without name. +func (o ExportImageOutput) PushByDigest() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportImage) *bool { return v.PushByDigest }).(pulumi.BoolPtrOutput) +} + +// Store resulting images to the worker's image store and ensure all of +// its blobs are in the content store. +// +// Defaults to `true`. +// +// Ignored if the worker doesn't have image store (when using OCI workers, +// for example). +func (o ExportImageOutput) Store() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportImage) *bool { return v.Store }).(pulumi.BoolPtrOutput) +} + +// Unpack image after creation (for use with containerd). Defaults to +// `false`. +func (o ExportImageOutput) Unpack() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportImage) *bool { return v.Unpack }).(pulumi.BoolPtrOutput) +} + +type ExportImagePtrOutput struct{ *pulumi.OutputState } + +func (ExportImagePtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**ExportImage)(nil)).Elem() +} + +func (o ExportImagePtrOutput) ToExportImagePtrOutput() ExportImagePtrOutput { + return o +} + +func (o ExportImagePtrOutput) ToExportImagePtrOutputWithContext(ctx context.Context) ExportImagePtrOutput { + return o +} + +func (o ExportImagePtrOutput) ToOutput(ctx context.Context) pulumix.Output[*ExportImage] { + return pulumix.Output[*ExportImage]{ + OutputState: o.OutputState, + } +} + +func (o ExportImagePtrOutput) Elem() ExportImageOutput { + return o.ApplyT(func(v *ExportImage) ExportImage { + if v != nil { + return *v + } + var ret ExportImage + return ret + }).(ExportImageOutput) +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportImagePtrOutput) Annotations() pulumi.StringMapOutput { + return o.ApplyT(func(v *ExportImage) map[string]string { + if v == nil { + return nil + } + return v.Annotations + }).(pulumi.StringMapOutput) +} + +// The compression type to use. +func (o ExportImagePtrOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v *ExportImage) *CompressionType { + if v == nil { + return nil + } + return v.Compression + }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o ExportImagePtrOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v *ExportImage) *int { + if v == nil { + return nil + } + return v.CompressionLevel + }).(pulumi.IntPtrOutput) +} + +// Name image with `prefix@`, used for anonymous images. +func (o ExportImagePtrOutput) DanglingNamePrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ExportImage) *string { + if v == nil { + return nil + } + return v.DanglingNamePrefix + }).(pulumi.StringPtrOutput) +} + +// Forcefully apply compression. +func (o ExportImagePtrOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportImage) *bool { + if v == nil { + return nil + } + return v.ForceCompression + }).(pulumi.BoolPtrOutput) +} + +// Allow pushing to an insecure registry. +func (o ExportImagePtrOutput) Insecure() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportImage) *bool { + if v == nil { + return nil + } + return v.Insecure + }).(pulumi.BoolPtrOutput) +} + +// Add additional canonical name (`name@`). +func (o ExportImagePtrOutput) NameCanonical() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportImage) *bool { + if v == nil { + return nil + } + return v.NameCanonical + }).(pulumi.BoolPtrOutput) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportImagePtrOutput) Names() pulumi.StringArrayOutput { + return o.ApplyT(func(v *ExportImage) []string { + if v == nil { + return nil + } + return v.Names + }).(pulumi.StringArrayOutput) +} + +// Use OCI media types in exporter manifests. +func (o ExportImagePtrOutput) OciMediaTypes() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportImage) *bool { + if v == nil { + return nil + } + return v.OciMediaTypes + }).(pulumi.BoolPtrOutput) +} + +// Push after creating the image. Defaults to `false`. +func (o ExportImagePtrOutput) Push() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportImage) *bool { + if v == nil { + return nil + } + return v.Push + }).(pulumi.BoolPtrOutput) +} + +// Push image without name. +func (o ExportImagePtrOutput) PushByDigest() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportImage) *bool { + if v == nil { + return nil + } + return v.PushByDigest + }).(pulumi.BoolPtrOutput) +} + +// Store resulting images to the worker's image store and ensure all of +// its blobs are in the content store. +// +// Defaults to `true`. +// +// Ignored if the worker doesn't have image store (when using OCI workers, +// for example). +func (o ExportImagePtrOutput) Store() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportImage) *bool { + if v == nil { + return nil + } + return v.Store + }).(pulumi.BoolPtrOutput) +} + +// Unpack image after creation (for use with containerd). Defaults to +// `false`. +func (o ExportImagePtrOutput) Unpack() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportImage) *bool { + if v == nil { + return nil + } + return v.Unpack + }).(pulumi.BoolPtrOutput) +} + +type ExportLocal struct { + // Output path. + Dest string `pulumi:"dest"` +} + +// ExportLocalInput is an input type that accepts ExportLocalArgs and ExportLocalOutput values. +// You can construct a concrete instance of `ExportLocalInput` via: +// +// ExportLocalArgs{...} +type ExportLocalInput interface { + pulumi.Input + + ToExportLocalOutput() ExportLocalOutput + ToExportLocalOutputWithContext(context.Context) ExportLocalOutput +} + +type ExportLocalArgs struct { + // Output path. + Dest pulumi.StringInput `pulumi:"dest"` +} + +func (ExportLocalArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportLocal)(nil)).Elem() +} + +func (i ExportLocalArgs) ToExportLocalOutput() ExportLocalOutput { + return i.ToExportLocalOutputWithContext(context.Background()) +} + +func (i ExportLocalArgs) ToExportLocalOutputWithContext(ctx context.Context) ExportLocalOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportLocalOutput) +} + +func (i ExportLocalArgs) ToOutput(ctx context.Context) pulumix.Output[ExportLocal] { + return pulumix.Output[ExportLocal]{ + OutputState: i.ToExportLocalOutputWithContext(ctx).OutputState, + } +} + +func (i ExportLocalArgs) ToExportLocalPtrOutput() ExportLocalPtrOutput { + return i.ToExportLocalPtrOutputWithContext(context.Background()) +} + +func (i ExportLocalArgs) ToExportLocalPtrOutputWithContext(ctx context.Context) ExportLocalPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportLocalOutput).ToExportLocalPtrOutputWithContext(ctx) +} + +// ExportLocalPtrInput is an input type that accepts ExportLocalArgs, ExportLocalPtr and ExportLocalPtrOutput values. +// You can construct a concrete instance of `ExportLocalPtrInput` via: +// +// ExportLocalArgs{...} +// +// or: +// +// nil +type ExportLocalPtrInput interface { + pulumi.Input + + ToExportLocalPtrOutput() ExportLocalPtrOutput + ToExportLocalPtrOutputWithContext(context.Context) ExportLocalPtrOutput +} + +type exportLocalPtrType ExportLocalArgs + +func ExportLocalPtr(v *ExportLocalArgs) ExportLocalPtrInput { + return (*exportLocalPtrType)(v) +} + +func (*exportLocalPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**ExportLocal)(nil)).Elem() +} + +func (i *exportLocalPtrType) ToExportLocalPtrOutput() ExportLocalPtrOutput { + return i.ToExportLocalPtrOutputWithContext(context.Background()) +} + +func (i *exportLocalPtrType) ToExportLocalPtrOutputWithContext(ctx context.Context) ExportLocalPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportLocalPtrOutput) +} + +func (i *exportLocalPtrType) ToOutput(ctx context.Context) pulumix.Output[*ExportLocal] { + return pulumix.Output[*ExportLocal]{ + OutputState: i.ToExportLocalPtrOutputWithContext(ctx).OutputState, + } +} + +type ExportLocalOutput struct{ *pulumi.OutputState } + +func (ExportLocalOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportLocal)(nil)).Elem() +} + +func (o ExportLocalOutput) ToExportLocalOutput() ExportLocalOutput { + return o +} + +func (o ExportLocalOutput) ToExportLocalOutputWithContext(ctx context.Context) ExportLocalOutput { + return o +} + +func (o ExportLocalOutput) ToExportLocalPtrOutput() ExportLocalPtrOutput { + return o.ToExportLocalPtrOutputWithContext(context.Background()) +} + +func (o ExportLocalOutput) ToExportLocalPtrOutputWithContext(ctx context.Context) ExportLocalPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v ExportLocal) *ExportLocal { + return &v + }).(ExportLocalPtrOutput) +} + +func (o ExportLocalOutput) ToOutput(ctx context.Context) pulumix.Output[ExportLocal] { + return pulumix.Output[ExportLocal]{ + OutputState: o.OutputState, + } +} + +// Output path. +func (o ExportLocalOutput) Dest() pulumi.StringOutput { + return o.ApplyT(func(v ExportLocal) string { return v.Dest }).(pulumi.StringOutput) +} + +type ExportLocalPtrOutput struct{ *pulumi.OutputState } + +func (ExportLocalPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**ExportLocal)(nil)).Elem() +} + +func (o ExportLocalPtrOutput) ToExportLocalPtrOutput() ExportLocalPtrOutput { + return o +} + +func (o ExportLocalPtrOutput) ToExportLocalPtrOutputWithContext(ctx context.Context) ExportLocalPtrOutput { + return o +} + +func (o ExportLocalPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*ExportLocal] { + return pulumix.Output[*ExportLocal]{ + OutputState: o.OutputState, + } +} + +func (o ExportLocalPtrOutput) Elem() ExportLocalOutput { + return o.ApplyT(func(v *ExportLocal) ExportLocal { + if v != nil { + return *v + } + var ret ExportLocal + return ret + }).(ExportLocalOutput) +} + +// Output path. +func (o ExportLocalPtrOutput) Dest() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ExportLocal) *string { + if v == nil { + return nil + } + return &v.Dest + }).(pulumi.StringPtrOutput) +} + +type ExportOCI struct { + // Attach an arbitrary key/value annotation to the image. + Annotations map[string]string `pulumi:"annotations"` + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // The local export path. + Dest *string `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Specify images names to export. This is overridden if tags are already specified. + Names []string `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes *bool `pulumi:"ociMediaTypes"` + // Bundle the output into a tarball layout. + Tar *bool `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for ExportOCI +func (val *ExportOCI) Defaults() *ExportOCI { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.OciMediaTypes == nil { + ociMediaTypes_ := true + tmp.OciMediaTypes = &ociMediaTypes_ + } + if tmp.Tar == nil { + tar_ := true + tmp.Tar = &tar_ + } + return &tmp +} + +// ExportOCIInput is an input type that accepts ExportOCIArgs and ExportOCIOutput values. +// You can construct a concrete instance of `ExportOCIInput` via: +// +// ExportOCIArgs{...} +type ExportOCIInput interface { + pulumi.Input + + ToExportOCIOutput() ExportOCIOutput + ToExportOCIOutputWithContext(context.Context) ExportOCIOutput +} + +type ExportOCIArgs struct { + // Attach an arbitrary key/value annotation to the image. + Annotations pulumi.StringMapInput `pulumi:"annotations"` + // The compression type to use. + Compression CompressionTypePtrInput `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumi.IntPtrInput `pulumi:"compressionLevel"` + // The local export path. + Dest pulumi.StringPtrInput `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression pulumi.BoolPtrInput `pulumi:"forceCompression"` + // Specify images names to export. This is overridden if tags are already specified. + Names pulumi.StringArrayInput `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes pulumi.BoolPtrInput `pulumi:"ociMediaTypes"` + // Bundle the output into a tarball layout. + Tar pulumi.BoolPtrInput `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for ExportOCIArgs +func (val *ExportOCIArgs) Defaults() *ExportOCIArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = CompressionType("gzip") + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumi.IntPtr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumi.BoolPtr(false) + } + if tmp.OciMediaTypes == nil { + tmp.OciMediaTypes = pulumi.BoolPtr(true) + } + if tmp.Tar == nil { + tmp.Tar = pulumi.BoolPtr(true) + } + return &tmp +} +func (ExportOCIArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportOCI)(nil)).Elem() +} + +func (i ExportOCIArgs) ToExportOCIOutput() ExportOCIOutput { + return i.ToExportOCIOutputWithContext(context.Background()) +} + +func (i ExportOCIArgs) ToExportOCIOutputWithContext(ctx context.Context) ExportOCIOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportOCIOutput) +} + +func (i ExportOCIArgs) ToOutput(ctx context.Context) pulumix.Output[ExportOCI] { + return pulumix.Output[ExportOCI]{ + OutputState: i.ToExportOCIOutputWithContext(ctx).OutputState, + } +} + +func (i ExportOCIArgs) ToExportOCIPtrOutput() ExportOCIPtrOutput { + return i.ToExportOCIPtrOutputWithContext(context.Background()) +} + +func (i ExportOCIArgs) ToExportOCIPtrOutputWithContext(ctx context.Context) ExportOCIPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportOCIOutput).ToExportOCIPtrOutputWithContext(ctx) +} + +// ExportOCIPtrInput is an input type that accepts ExportOCIArgs, ExportOCIPtr and ExportOCIPtrOutput values. +// You can construct a concrete instance of `ExportOCIPtrInput` via: +// +// ExportOCIArgs{...} +// +// or: +// +// nil +type ExportOCIPtrInput interface { + pulumi.Input + + ToExportOCIPtrOutput() ExportOCIPtrOutput + ToExportOCIPtrOutputWithContext(context.Context) ExportOCIPtrOutput +} + +type exportOCIPtrType ExportOCIArgs + +func ExportOCIPtr(v *ExportOCIArgs) ExportOCIPtrInput { + return (*exportOCIPtrType)(v) +} + +func (*exportOCIPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**ExportOCI)(nil)).Elem() +} + +func (i *exportOCIPtrType) ToExportOCIPtrOutput() ExportOCIPtrOutput { + return i.ToExportOCIPtrOutputWithContext(context.Background()) +} + +func (i *exportOCIPtrType) ToExportOCIPtrOutputWithContext(ctx context.Context) ExportOCIPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportOCIPtrOutput) +} + +func (i *exportOCIPtrType) ToOutput(ctx context.Context) pulumix.Output[*ExportOCI] { + return pulumix.Output[*ExportOCI]{ + OutputState: i.ToExportOCIPtrOutputWithContext(ctx).OutputState, + } +} + +type ExportOCIOutput struct{ *pulumi.OutputState } + +func (ExportOCIOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportOCI)(nil)).Elem() +} + +func (o ExportOCIOutput) ToExportOCIOutput() ExportOCIOutput { + return o +} + +func (o ExportOCIOutput) ToExportOCIOutputWithContext(ctx context.Context) ExportOCIOutput { + return o +} + +func (o ExportOCIOutput) ToExportOCIPtrOutput() ExportOCIPtrOutput { + return o.ToExportOCIPtrOutputWithContext(context.Background()) +} + +func (o ExportOCIOutput) ToExportOCIPtrOutputWithContext(ctx context.Context) ExportOCIPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v ExportOCI) *ExportOCI { + return &v + }).(ExportOCIPtrOutput) +} + +func (o ExportOCIOutput) ToOutput(ctx context.Context) pulumix.Output[ExportOCI] { + return pulumix.Output[ExportOCI]{ + OutputState: o.OutputState, + } +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportOCIOutput) Annotations() pulumi.StringMapOutput { + return o.ApplyT(func(v ExportOCI) map[string]string { return v.Annotations }).(pulumi.StringMapOutput) +} + +// The compression type to use. +func (o ExportOCIOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v ExportOCI) *CompressionType { return v.Compression }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o ExportOCIOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v ExportOCI) *int { return v.CompressionLevel }).(pulumi.IntPtrOutput) +} + +// The local export path. +func (o ExportOCIOutput) Dest() pulumi.StringPtrOutput { + return o.ApplyT(func(v ExportOCI) *string { return v.Dest }).(pulumi.StringPtrOutput) +} + +// Forcefully apply compression. +func (o ExportOCIOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportOCI) *bool { return v.ForceCompression }).(pulumi.BoolPtrOutput) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportOCIOutput) Names() pulumi.StringArrayOutput { + return o.ApplyT(func(v ExportOCI) []string { return v.Names }).(pulumi.StringArrayOutput) +} + +// Use OCI media types in exporter manifests. +func (o ExportOCIOutput) OciMediaTypes() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportOCI) *bool { return v.OciMediaTypes }).(pulumi.BoolPtrOutput) +} + +// Bundle the output into a tarball layout. +func (o ExportOCIOutput) Tar() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportOCI) *bool { return v.Tar }).(pulumi.BoolPtrOutput) +} + +type ExportOCIPtrOutput struct{ *pulumi.OutputState } + +func (ExportOCIPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**ExportOCI)(nil)).Elem() +} + +func (o ExportOCIPtrOutput) ToExportOCIPtrOutput() ExportOCIPtrOutput { + return o +} + +func (o ExportOCIPtrOutput) ToExportOCIPtrOutputWithContext(ctx context.Context) ExportOCIPtrOutput { + return o +} + +func (o ExportOCIPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*ExportOCI] { + return pulumix.Output[*ExportOCI]{ + OutputState: o.OutputState, + } +} + +func (o ExportOCIPtrOutput) Elem() ExportOCIOutput { + return o.ApplyT(func(v *ExportOCI) ExportOCI { + if v != nil { + return *v + } + var ret ExportOCI + return ret + }).(ExportOCIOutput) +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportOCIPtrOutput) Annotations() pulumi.StringMapOutput { + return o.ApplyT(func(v *ExportOCI) map[string]string { + if v == nil { + return nil + } + return v.Annotations + }).(pulumi.StringMapOutput) +} + +// The compression type to use. +func (o ExportOCIPtrOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v *ExportOCI) *CompressionType { + if v == nil { + return nil + } + return v.Compression + }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o ExportOCIPtrOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v *ExportOCI) *int { + if v == nil { + return nil + } + return v.CompressionLevel + }).(pulumi.IntPtrOutput) +} + +// The local export path. +func (o ExportOCIPtrOutput) Dest() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ExportOCI) *string { + if v == nil { + return nil + } + return v.Dest + }).(pulumi.StringPtrOutput) +} + +// Forcefully apply compression. +func (o ExportOCIPtrOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportOCI) *bool { + if v == nil { + return nil + } + return v.ForceCompression + }).(pulumi.BoolPtrOutput) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportOCIPtrOutput) Names() pulumi.StringArrayOutput { + return o.ApplyT(func(v *ExportOCI) []string { + if v == nil { + return nil + } + return v.Names + }).(pulumi.StringArrayOutput) +} + +// Use OCI media types in exporter manifests. +func (o ExportOCIPtrOutput) OciMediaTypes() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportOCI) *bool { + if v == nil { + return nil + } + return v.OciMediaTypes + }).(pulumi.BoolPtrOutput) +} + +// Bundle the output into a tarball layout. +func (o ExportOCIPtrOutput) Tar() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportOCI) *bool { + if v == nil { + return nil + } + return v.Tar + }).(pulumi.BoolPtrOutput) +} + +type ExportRegistry struct { + // Attach an arbitrary key/value annotation to the image. + Annotations map[string]string `pulumi:"annotations"` + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // Name image with `prefix@`, used for anonymous images. + DanglingNamePrefix *string `pulumi:"danglingNamePrefix"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Allow pushing to an insecure registry. + Insecure *bool `pulumi:"insecure"` + // Add additional canonical name (`name@`). + NameCanonical *bool `pulumi:"nameCanonical"` + // Specify images names to export. This is overridden if tags are already specified. + Names []string `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes *bool `pulumi:"ociMediaTypes"` + // Push after creating the image. Defaults to `true`. + Push *bool `pulumi:"push"` + // Push image without name. + PushByDigest *bool `pulumi:"pushByDigest"` + // Store resulting images to the worker's image store and ensure all of + // its blobs are in the content store. + // + // Defaults to `true`. + // + // Ignored if the worker doesn't have image store (when using OCI workers, + // for example). + Store *bool `pulumi:"store"` + // Unpack image after creation (for use with containerd). Defaults to + // `false`. + Unpack *bool `pulumi:"unpack"` +} + +// Defaults sets the appropriate defaults for ExportRegistry +func (val *ExportRegistry) Defaults() *ExportRegistry { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.OciMediaTypes == nil { + ociMediaTypes_ := false + tmp.OciMediaTypes = &ociMediaTypes_ + } + if tmp.Push == nil { + push_ := true + tmp.Push = &push_ + } + if tmp.Store == nil { + store_ := true + tmp.Store = &store_ + } + return &tmp +} + +// ExportRegistryInput is an input type that accepts ExportRegistryArgs and ExportRegistryOutput values. +// You can construct a concrete instance of `ExportRegistryInput` via: +// +// ExportRegistryArgs{...} +type ExportRegistryInput interface { + pulumi.Input + + ToExportRegistryOutput() ExportRegistryOutput + ToExportRegistryOutputWithContext(context.Context) ExportRegistryOutput +} + +type ExportRegistryArgs struct { + // Attach an arbitrary key/value annotation to the image. + Annotations pulumi.StringMapInput `pulumi:"annotations"` + // The compression type to use. + Compression CompressionTypePtrInput `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumi.IntPtrInput `pulumi:"compressionLevel"` + // Name image with `prefix@`, used for anonymous images. + DanglingNamePrefix pulumi.StringPtrInput `pulumi:"danglingNamePrefix"` + // Forcefully apply compression. + ForceCompression pulumi.BoolPtrInput `pulumi:"forceCompression"` + // Allow pushing to an insecure registry. + Insecure pulumi.BoolPtrInput `pulumi:"insecure"` + // Add additional canonical name (`name@`). + NameCanonical pulumi.BoolPtrInput `pulumi:"nameCanonical"` + // Specify images names to export. This is overridden if tags are already specified. + Names pulumi.StringArrayInput `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes pulumi.BoolPtrInput `pulumi:"ociMediaTypes"` + // Push after creating the image. Defaults to `true`. + Push pulumi.BoolPtrInput `pulumi:"push"` + // Push image without name. + PushByDigest pulumi.BoolPtrInput `pulumi:"pushByDigest"` + // Store resulting images to the worker's image store and ensure all of + // its blobs are in the content store. + // + // Defaults to `true`. + // + // Ignored if the worker doesn't have image store (when using OCI workers, + // for example). + Store pulumi.BoolPtrInput `pulumi:"store"` + // Unpack image after creation (for use with containerd). Defaults to + // `false`. + Unpack pulumi.BoolPtrInput `pulumi:"unpack"` +} + +// Defaults sets the appropriate defaults for ExportRegistryArgs +func (val *ExportRegistryArgs) Defaults() *ExportRegistryArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = CompressionType("gzip") + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumi.IntPtr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumi.BoolPtr(false) + } + if tmp.OciMediaTypes == nil { + tmp.OciMediaTypes = pulumi.BoolPtr(false) + } + if tmp.Push == nil { + tmp.Push = pulumi.BoolPtr(true) + } + if tmp.Store == nil { + tmp.Store = pulumi.BoolPtr(true) + } + return &tmp +} +func (ExportRegistryArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportRegistry)(nil)).Elem() +} + +func (i ExportRegistryArgs) ToExportRegistryOutput() ExportRegistryOutput { + return i.ToExportRegistryOutputWithContext(context.Background()) +} + +func (i ExportRegistryArgs) ToExportRegistryOutputWithContext(ctx context.Context) ExportRegistryOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportRegistryOutput) +} + +func (i ExportRegistryArgs) ToOutput(ctx context.Context) pulumix.Output[ExportRegistry] { + return pulumix.Output[ExportRegistry]{ + OutputState: i.ToExportRegistryOutputWithContext(ctx).OutputState, + } +} + +func (i ExportRegistryArgs) ToExportRegistryPtrOutput() ExportRegistryPtrOutput { + return i.ToExportRegistryPtrOutputWithContext(context.Background()) +} + +func (i ExportRegistryArgs) ToExportRegistryPtrOutputWithContext(ctx context.Context) ExportRegistryPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportRegistryOutput).ToExportRegistryPtrOutputWithContext(ctx) +} + +// ExportRegistryPtrInput is an input type that accepts ExportRegistryArgs, ExportRegistryPtr and ExportRegistryPtrOutput values. +// You can construct a concrete instance of `ExportRegistryPtrInput` via: +// +// ExportRegistryArgs{...} +// +// or: +// +// nil +type ExportRegistryPtrInput interface { + pulumi.Input + + ToExportRegistryPtrOutput() ExportRegistryPtrOutput + ToExportRegistryPtrOutputWithContext(context.Context) ExportRegistryPtrOutput +} + +type exportRegistryPtrType ExportRegistryArgs + +func ExportRegistryPtr(v *ExportRegistryArgs) ExportRegistryPtrInput { + return (*exportRegistryPtrType)(v) +} + +func (*exportRegistryPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**ExportRegistry)(nil)).Elem() +} + +func (i *exportRegistryPtrType) ToExportRegistryPtrOutput() ExportRegistryPtrOutput { + return i.ToExportRegistryPtrOutputWithContext(context.Background()) +} + +func (i *exportRegistryPtrType) ToExportRegistryPtrOutputWithContext(ctx context.Context) ExportRegistryPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportRegistryPtrOutput) +} + +func (i *exportRegistryPtrType) ToOutput(ctx context.Context) pulumix.Output[*ExportRegistry] { + return pulumix.Output[*ExportRegistry]{ + OutputState: i.ToExportRegistryPtrOutputWithContext(ctx).OutputState, + } +} + +type ExportRegistryOutput struct{ *pulumi.OutputState } + +func (ExportRegistryOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportRegistry)(nil)).Elem() +} + +func (o ExportRegistryOutput) ToExportRegistryOutput() ExportRegistryOutput { + return o +} + +func (o ExportRegistryOutput) ToExportRegistryOutputWithContext(ctx context.Context) ExportRegistryOutput { + return o +} + +func (o ExportRegistryOutput) ToExportRegistryPtrOutput() ExportRegistryPtrOutput { + return o.ToExportRegistryPtrOutputWithContext(context.Background()) +} + +func (o ExportRegistryOutput) ToExportRegistryPtrOutputWithContext(ctx context.Context) ExportRegistryPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v ExportRegistry) *ExportRegistry { + return &v + }).(ExportRegistryPtrOutput) +} + +func (o ExportRegistryOutput) ToOutput(ctx context.Context) pulumix.Output[ExportRegistry] { + return pulumix.Output[ExportRegistry]{ + OutputState: o.OutputState, + } +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportRegistryOutput) Annotations() pulumi.StringMapOutput { + return o.ApplyT(func(v ExportRegistry) map[string]string { return v.Annotations }).(pulumi.StringMapOutput) +} + +// The compression type to use. +func (o ExportRegistryOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v ExportRegistry) *CompressionType { return v.Compression }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o ExportRegistryOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v ExportRegistry) *int { return v.CompressionLevel }).(pulumi.IntPtrOutput) +} + +// Name image with `prefix@`, used for anonymous images. +func (o ExportRegistryOutput) DanglingNamePrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v ExportRegistry) *string { return v.DanglingNamePrefix }).(pulumi.StringPtrOutput) +} + +// Forcefully apply compression. +func (o ExportRegistryOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportRegistry) *bool { return v.ForceCompression }).(pulumi.BoolPtrOutput) +} + +// Allow pushing to an insecure registry. +func (o ExportRegistryOutput) Insecure() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportRegistry) *bool { return v.Insecure }).(pulumi.BoolPtrOutput) +} + +// Add additional canonical name (`name@`). +func (o ExportRegistryOutput) NameCanonical() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportRegistry) *bool { return v.NameCanonical }).(pulumi.BoolPtrOutput) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportRegistryOutput) Names() pulumi.StringArrayOutput { + return o.ApplyT(func(v ExportRegistry) []string { return v.Names }).(pulumi.StringArrayOutput) +} + +// Use OCI media types in exporter manifests. +func (o ExportRegistryOutput) OciMediaTypes() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportRegistry) *bool { return v.OciMediaTypes }).(pulumi.BoolPtrOutput) +} + +// Push after creating the image. Defaults to `true`. +func (o ExportRegistryOutput) Push() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportRegistry) *bool { return v.Push }).(pulumi.BoolPtrOutput) +} + +// Push image without name. +func (o ExportRegistryOutput) PushByDigest() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportRegistry) *bool { return v.PushByDigest }).(pulumi.BoolPtrOutput) +} + +// Store resulting images to the worker's image store and ensure all of +// its blobs are in the content store. +// +// Defaults to `true`. +// +// Ignored if the worker doesn't have image store (when using OCI workers, +// for example). +func (o ExportRegistryOutput) Store() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportRegistry) *bool { return v.Store }).(pulumi.BoolPtrOutput) +} + +// Unpack image after creation (for use with containerd). Defaults to +// `false`. +func (o ExportRegistryOutput) Unpack() pulumi.BoolPtrOutput { + return o.ApplyT(func(v ExportRegistry) *bool { return v.Unpack }).(pulumi.BoolPtrOutput) +} + +type ExportRegistryPtrOutput struct{ *pulumi.OutputState } + +func (ExportRegistryPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**ExportRegistry)(nil)).Elem() +} + +func (o ExportRegistryPtrOutput) ToExportRegistryPtrOutput() ExportRegistryPtrOutput { + return o +} + +func (o ExportRegistryPtrOutput) ToExportRegistryPtrOutputWithContext(ctx context.Context) ExportRegistryPtrOutput { + return o +} + +func (o ExportRegistryPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*ExportRegistry] { + return pulumix.Output[*ExportRegistry]{ + OutputState: o.OutputState, + } +} + +func (o ExportRegistryPtrOutput) Elem() ExportRegistryOutput { + return o.ApplyT(func(v *ExportRegistry) ExportRegistry { + if v != nil { + return *v + } + var ret ExportRegistry + return ret + }).(ExportRegistryOutput) +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportRegistryPtrOutput) Annotations() pulumi.StringMapOutput { + return o.ApplyT(func(v *ExportRegistry) map[string]string { + if v == nil { + return nil + } + return v.Annotations + }).(pulumi.StringMapOutput) +} + +// The compression type to use. +func (o ExportRegistryPtrOutput) Compression() CompressionTypePtrOutput { + return o.ApplyT(func(v *ExportRegistry) *CompressionType { + if v == nil { + return nil + } + return v.Compression + }).(CompressionTypePtrOutput) +} + +// Compression level from 0 to 22. +func (o ExportRegistryPtrOutput) CompressionLevel() pulumi.IntPtrOutput { + return o.ApplyT(func(v *ExportRegistry) *int { + if v == nil { + return nil + } + return v.CompressionLevel + }).(pulumi.IntPtrOutput) +} + +// Name image with `prefix@`, used for anonymous images. +func (o ExportRegistryPtrOutput) DanglingNamePrefix() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ExportRegistry) *string { + if v == nil { + return nil + } + return v.DanglingNamePrefix + }).(pulumi.StringPtrOutput) +} + +// Forcefully apply compression. +func (o ExportRegistryPtrOutput) ForceCompression() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportRegistry) *bool { + if v == nil { + return nil + } + return v.ForceCompression + }).(pulumi.BoolPtrOutput) +} + +// Allow pushing to an insecure registry. +func (o ExportRegistryPtrOutput) Insecure() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportRegistry) *bool { + if v == nil { + return nil + } + return v.Insecure + }).(pulumi.BoolPtrOutput) +} + +// Add additional canonical name (`name@`). +func (o ExportRegistryPtrOutput) NameCanonical() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportRegistry) *bool { + if v == nil { + return nil + } + return v.NameCanonical + }).(pulumi.BoolPtrOutput) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportRegistryPtrOutput) Names() pulumi.StringArrayOutput { + return o.ApplyT(func(v *ExportRegistry) []string { + if v == nil { + return nil + } + return v.Names + }).(pulumi.StringArrayOutput) +} + +// Use OCI media types in exporter manifests. +func (o ExportRegistryPtrOutput) OciMediaTypes() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportRegistry) *bool { + if v == nil { + return nil + } + return v.OciMediaTypes + }).(pulumi.BoolPtrOutput) +} + +// Push after creating the image. Defaults to `true`. +func (o ExportRegistryPtrOutput) Push() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportRegistry) *bool { + if v == nil { + return nil + } + return v.Push + }).(pulumi.BoolPtrOutput) +} + +// Push image without name. +func (o ExportRegistryPtrOutput) PushByDigest() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportRegistry) *bool { + if v == nil { + return nil + } + return v.PushByDigest + }).(pulumi.BoolPtrOutput) +} + +// Store resulting images to the worker's image store and ensure all of +// its blobs are in the content store. +// +// Defaults to `true`. +// +// Ignored if the worker doesn't have image store (when using OCI workers, +// for example). +func (o ExportRegistryPtrOutput) Store() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportRegistry) *bool { + if v == nil { + return nil + } + return v.Store + }).(pulumi.BoolPtrOutput) +} + +// Unpack image after creation (for use with containerd). Defaults to +// `false`. +func (o ExportRegistryPtrOutput) Unpack() pulumi.BoolPtrOutput { + return o.ApplyT(func(v *ExportRegistry) *bool { + if v == nil { + return nil + } + return v.Unpack + }).(pulumi.BoolPtrOutput) +} + +type ExportTar struct { + // Output path. + Dest string `pulumi:"dest"` +} + +// ExportTarInput is an input type that accepts ExportTarArgs and ExportTarOutput values. +// You can construct a concrete instance of `ExportTarInput` via: +// +// ExportTarArgs{...} +type ExportTarInput interface { + pulumi.Input + + ToExportTarOutput() ExportTarOutput + ToExportTarOutputWithContext(context.Context) ExportTarOutput +} + +type ExportTarArgs struct { + // Output path. + Dest pulumi.StringInput `pulumi:"dest"` +} + +func (ExportTarArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportTar)(nil)).Elem() +} + +func (i ExportTarArgs) ToExportTarOutput() ExportTarOutput { + return i.ToExportTarOutputWithContext(context.Background()) +} + +func (i ExportTarArgs) ToExportTarOutputWithContext(ctx context.Context) ExportTarOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportTarOutput) +} + +func (i ExportTarArgs) ToOutput(ctx context.Context) pulumix.Output[ExportTar] { + return pulumix.Output[ExportTar]{ + OutputState: i.ToExportTarOutputWithContext(ctx).OutputState, + } +} + +func (i ExportTarArgs) ToExportTarPtrOutput() ExportTarPtrOutput { + return i.ToExportTarPtrOutputWithContext(context.Background()) +} + +func (i ExportTarArgs) ToExportTarPtrOutputWithContext(ctx context.Context) ExportTarPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportTarOutput).ToExportTarPtrOutputWithContext(ctx) +} + +// ExportTarPtrInput is an input type that accepts ExportTarArgs, ExportTarPtr and ExportTarPtrOutput values. +// You can construct a concrete instance of `ExportTarPtrInput` via: +// +// ExportTarArgs{...} +// +// or: +// +// nil +type ExportTarPtrInput interface { + pulumi.Input + + ToExportTarPtrOutput() ExportTarPtrOutput + ToExportTarPtrOutputWithContext(context.Context) ExportTarPtrOutput +} + +type exportTarPtrType ExportTarArgs + +func ExportTarPtr(v *ExportTarArgs) ExportTarPtrInput { + return (*exportTarPtrType)(v) +} + +func (*exportTarPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**ExportTar)(nil)).Elem() +} + +func (i *exportTarPtrType) ToExportTarPtrOutput() ExportTarPtrOutput { + return i.ToExportTarPtrOutputWithContext(context.Background()) +} + +func (i *exportTarPtrType) ToExportTarPtrOutputWithContext(ctx context.Context) ExportTarPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportTarPtrOutput) +} + +func (i *exportTarPtrType) ToOutput(ctx context.Context) pulumix.Output[*ExportTar] { + return pulumix.Output[*ExportTar]{ + OutputState: i.ToExportTarPtrOutputWithContext(ctx).OutputState, + } +} + +type ExportTarOutput struct{ *pulumi.OutputState } + +func (ExportTarOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportTar)(nil)).Elem() +} + +func (o ExportTarOutput) ToExportTarOutput() ExportTarOutput { + return o +} + +func (o ExportTarOutput) ToExportTarOutputWithContext(ctx context.Context) ExportTarOutput { + return o +} + +func (o ExportTarOutput) ToExportTarPtrOutput() ExportTarPtrOutput { + return o.ToExportTarPtrOutputWithContext(context.Background()) +} + +func (o ExportTarOutput) ToExportTarPtrOutputWithContext(ctx context.Context) ExportTarPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v ExportTar) *ExportTar { + return &v + }).(ExportTarPtrOutput) +} + +func (o ExportTarOutput) ToOutput(ctx context.Context) pulumix.Output[ExportTar] { + return pulumix.Output[ExportTar]{ + OutputState: o.OutputState, + } +} + +// Output path. +func (o ExportTarOutput) Dest() pulumi.StringOutput { + return o.ApplyT(func(v ExportTar) string { return v.Dest }).(pulumi.StringOutput) +} + +type ExportTarPtrOutput struct{ *pulumi.OutputState } + +func (ExportTarPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**ExportTar)(nil)).Elem() +} + +func (o ExportTarPtrOutput) ToExportTarPtrOutput() ExportTarPtrOutput { + return o +} + +func (o ExportTarPtrOutput) ToExportTarPtrOutputWithContext(ctx context.Context) ExportTarPtrOutput { + return o +} + +func (o ExportTarPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*ExportTar] { + return pulumix.Output[*ExportTar]{ + OutputState: o.OutputState, + } +} + +func (o ExportTarPtrOutput) Elem() ExportTarOutput { + return o.ApplyT(func(v *ExportTar) ExportTar { + if v != nil { + return *v + } + var ret ExportTar + return ret + }).(ExportTarOutput) +} + +// Output path. +func (o ExportTarPtrOutput) Dest() pulumi.StringPtrOutput { + return o.ApplyT(func(v *ExportTar) *string { + if v == nil { + return nil + } + return &v.Dest + }).(pulumi.StringPtrOutput) +} + +type Registry struct { + // The registry's address (e.g. "docker.io"). + Address string `pulumi:"address"` + // Password or token for the registry. + Password *string `pulumi:"password"` + // Username for the registry. + Username *string `pulumi:"username"` +} + +// RegistryInput is an input type that accepts RegistryArgs and RegistryOutput values. +// You can construct a concrete instance of `RegistryInput` via: +// +// RegistryArgs{...} +type RegistryInput interface { + pulumi.Input + + ToRegistryOutput() RegistryOutput + ToRegistryOutputWithContext(context.Context) RegistryOutput +} + +type RegistryArgs struct { + // The registry's address (e.g. "docker.io"). + Address pulumi.StringInput `pulumi:"address"` + // Password or token for the registry. + Password pulumi.StringPtrInput `pulumi:"password"` + // Username for the registry. + Username pulumi.StringPtrInput `pulumi:"username"` +} + +func (RegistryArgs) ElementType() reflect.Type { + return reflect.TypeOf((*Registry)(nil)).Elem() +} + +func (i RegistryArgs) ToRegistryOutput() RegistryOutput { + return i.ToRegistryOutputWithContext(context.Background()) +} + +func (i RegistryArgs) ToRegistryOutputWithContext(ctx context.Context) RegistryOutput { + return pulumi.ToOutputWithContext(ctx, i).(RegistryOutput) +} + +func (i RegistryArgs) ToOutput(ctx context.Context) pulumix.Output[Registry] { + return pulumix.Output[Registry]{ + OutputState: i.ToRegistryOutputWithContext(ctx).OutputState, + } +} + +func (i RegistryArgs) ToRegistryPtrOutput() RegistryPtrOutput { + return i.ToRegistryPtrOutputWithContext(context.Background()) +} + +func (i RegistryArgs) ToRegistryPtrOutputWithContext(ctx context.Context) RegistryPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RegistryOutput).ToRegistryPtrOutputWithContext(ctx) +} + +// RegistryPtrInput is an input type that accepts RegistryArgs, RegistryPtr and RegistryPtrOutput values. +// You can construct a concrete instance of `RegistryPtrInput` via: +// +// RegistryArgs{...} +// +// or: +// +// nil +type RegistryPtrInput interface { + pulumi.Input + + ToRegistryPtrOutput() RegistryPtrOutput + ToRegistryPtrOutputWithContext(context.Context) RegistryPtrOutput +} + +type registryPtrType RegistryArgs + +func RegistryPtr(v *RegistryArgs) RegistryPtrInput { + return (*registryPtrType)(v) +} + +func (*registryPtrType) ElementType() reflect.Type { + return reflect.TypeOf((**Registry)(nil)).Elem() +} + +func (i *registryPtrType) ToRegistryPtrOutput() RegistryPtrOutput { + return i.ToRegistryPtrOutputWithContext(context.Background()) +} + +func (i *registryPtrType) ToRegistryPtrOutputWithContext(ctx context.Context) RegistryPtrOutput { + return pulumi.ToOutputWithContext(ctx, i).(RegistryPtrOutput) +} + +func (i *registryPtrType) ToOutput(ctx context.Context) pulumix.Output[*Registry] { + return pulumix.Output[*Registry]{ + OutputState: i.ToRegistryPtrOutputWithContext(ctx).OutputState, + } +} + +// RegistryArrayInput is an input type that accepts RegistryArray and RegistryArrayOutput values. +// You can construct a concrete instance of `RegistryArrayInput` via: +// +// RegistryArray{ RegistryArgs{...} } +type RegistryArrayInput interface { + pulumi.Input + + ToRegistryArrayOutput() RegistryArrayOutput + ToRegistryArrayOutputWithContext(context.Context) RegistryArrayOutput +} + +type RegistryArray []RegistryInput + +func (RegistryArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]Registry)(nil)).Elem() +} + +func (i RegistryArray) ToRegistryArrayOutput() RegistryArrayOutput { + return i.ToRegistryArrayOutputWithContext(context.Background()) +} + +func (i RegistryArray) ToRegistryArrayOutputWithContext(ctx context.Context) RegistryArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(RegistryArrayOutput) +} + +func (i RegistryArray) ToOutput(ctx context.Context) pulumix.Output[[]Registry] { + return pulumix.Output[[]Registry]{ + OutputState: i.ToRegistryArrayOutputWithContext(ctx).OutputState, + } +} + +type RegistryOutput struct{ *pulumi.OutputState } + +func (RegistryOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Registry)(nil)).Elem() +} + +func (o RegistryOutput) ToRegistryOutput() RegistryOutput { + return o +} + +func (o RegistryOutput) ToRegistryOutputWithContext(ctx context.Context) RegistryOutput { + return o +} + +func (o RegistryOutput) ToRegistryPtrOutput() RegistryPtrOutput { + return o.ToRegistryPtrOutputWithContext(context.Background()) +} + +func (o RegistryOutput) ToRegistryPtrOutputWithContext(ctx context.Context) RegistryPtrOutput { + return o.ApplyTWithContext(ctx, func(_ context.Context, v Registry) *Registry { + return &v + }).(RegistryPtrOutput) +} + +func (o RegistryOutput) ToOutput(ctx context.Context) pulumix.Output[Registry] { + return pulumix.Output[Registry]{ + OutputState: o.OutputState, + } +} + +// The registry's address (e.g. "docker.io"). +func (o RegistryOutput) Address() pulumi.StringOutput { + return o.ApplyT(func(v Registry) string { return v.Address }).(pulumi.StringOutput) +} + +// Password or token for the registry. +func (o RegistryOutput) Password() pulumi.StringPtrOutput { + return o.ApplyT(func(v Registry) *string { return v.Password }).(pulumi.StringPtrOutput) +} + +// Username for the registry. +func (o RegistryOutput) Username() pulumi.StringPtrOutput { + return o.ApplyT(func(v Registry) *string { return v.Username }).(pulumi.StringPtrOutput) +} + +type RegistryPtrOutput struct{ *pulumi.OutputState } + +func (RegistryPtrOutput) ElementType() reflect.Type { + return reflect.TypeOf((**Registry)(nil)).Elem() +} + +func (o RegistryPtrOutput) ToRegistryPtrOutput() RegistryPtrOutput { + return o +} + +func (o RegistryPtrOutput) ToRegistryPtrOutputWithContext(ctx context.Context) RegistryPtrOutput { + return o +} + +func (o RegistryPtrOutput) ToOutput(ctx context.Context) pulumix.Output[*Registry] { + return pulumix.Output[*Registry]{ + OutputState: o.OutputState, + } +} + +func (o RegistryPtrOutput) Elem() RegistryOutput { + return o.ApplyT(func(v *Registry) Registry { + if v != nil { + return *v + } + var ret Registry + return ret + }).(RegistryOutput) +} + +// The registry's address (e.g. "docker.io"). +func (o RegistryPtrOutput) Address() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Registry) *string { + if v == nil { + return nil + } + return &v.Address + }).(pulumi.StringPtrOutput) +} + +// Password or token for the registry. +func (o RegistryPtrOutput) Password() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Registry) *string { + if v == nil { + return nil + } + return v.Password + }).(pulumi.StringPtrOutput) +} + +// Username for the registry. +func (o RegistryPtrOutput) Username() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Registry) *string { + if v == nil { + return nil + } + return v.Username + }).(pulumi.StringPtrOutput) +} + +type RegistryArrayOutput struct{ *pulumi.OutputState } + +func (RegistryArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]Registry)(nil)).Elem() +} + +func (o RegistryArrayOutput) ToRegistryArrayOutput() RegistryArrayOutput { + return o +} + +func (o RegistryArrayOutput) ToRegistryArrayOutputWithContext(ctx context.Context) RegistryArrayOutput { + return o +} + +func (o RegistryArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]Registry] { + return pulumix.Output[[]Registry]{ + OutputState: o.OutputState, + } +} + +func (o RegistryArrayOutput) Index(i pulumi.IntInput) RegistryOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) Registry { + return vs[0].([]Registry)[vs[1].(int)] + }).(RegistryOutput) +} + +type SSH struct { + // Useful for distinguishing different servers that are part of the same + // build. + // + // A value of `default` is appropriate if only dealing with a single host. + Id string `pulumi:"id"` + // SSH agent socket or private keys to expose to the build under the given + // identifier. + // + // Defaults to `[$SSH_AUTH_SOCK]`. + // + // Note that your keys are **not** automatically added when using an + // agent. Run `ssh-add -l` locally to confirm which public keys are + // visible to the agent; these will be exposed to your build. + Paths []string `pulumi:"paths"` +} + +// SSHInput is an input type that accepts SSHArgs and SSHOutput values. +// You can construct a concrete instance of `SSHInput` via: +// +// SSHArgs{...} +type SSHInput interface { + pulumi.Input + + ToSSHOutput() SSHOutput + ToSSHOutputWithContext(context.Context) SSHOutput +} + +type SSHArgs struct { + // Useful for distinguishing different servers that are part of the same + // build. + // + // A value of `default` is appropriate if only dealing with a single host. + Id pulumi.StringInput `pulumi:"id"` + // SSH agent socket or private keys to expose to the build under the given + // identifier. + // + // Defaults to `[$SSH_AUTH_SOCK]`. + // + // Note that your keys are **not** automatically added when using an + // agent. Run `ssh-add -l` locally to confirm which public keys are + // visible to the agent; these will be exposed to your build. + Paths pulumi.StringArrayInput `pulumi:"paths"` +} + +func (SSHArgs) ElementType() reflect.Type { + return reflect.TypeOf((*SSH)(nil)).Elem() +} + +func (i SSHArgs) ToSSHOutput() SSHOutput { + return i.ToSSHOutputWithContext(context.Background()) +} + +func (i SSHArgs) ToSSHOutputWithContext(ctx context.Context) SSHOutput { + return pulumi.ToOutputWithContext(ctx, i).(SSHOutput) +} + +func (i SSHArgs) ToOutput(ctx context.Context) pulumix.Output[SSH] { + return pulumix.Output[SSH]{ + OutputState: i.ToSSHOutputWithContext(ctx).OutputState, + } +} + +// SSHArrayInput is an input type that accepts SSHArray and SSHArrayOutput values. +// You can construct a concrete instance of `SSHArrayInput` via: +// +// SSHArray{ SSHArgs{...} } +type SSHArrayInput interface { + pulumi.Input + + ToSSHArrayOutput() SSHArrayOutput + ToSSHArrayOutputWithContext(context.Context) SSHArrayOutput +} + +type SSHArray []SSHInput + +func (SSHArray) ElementType() reflect.Type { + return reflect.TypeOf((*[]SSH)(nil)).Elem() +} + +func (i SSHArray) ToSSHArrayOutput() SSHArrayOutput { + return i.ToSSHArrayOutputWithContext(context.Background()) +} + +func (i SSHArray) ToSSHArrayOutputWithContext(ctx context.Context) SSHArrayOutput { + return pulumi.ToOutputWithContext(ctx, i).(SSHArrayOutput) +} + +func (i SSHArray) ToOutput(ctx context.Context) pulumix.Output[[]SSH] { + return pulumix.Output[[]SSH]{ + OutputState: i.ToSSHArrayOutputWithContext(ctx).OutputState, + } +} + +type SSHOutput struct{ *pulumi.OutputState } + +func (SSHOutput) ElementType() reflect.Type { + return reflect.TypeOf((*SSH)(nil)).Elem() +} + +func (o SSHOutput) ToSSHOutput() SSHOutput { + return o +} + +func (o SSHOutput) ToSSHOutputWithContext(ctx context.Context) SSHOutput { + return o +} + +func (o SSHOutput) ToOutput(ctx context.Context) pulumix.Output[SSH] { + return pulumix.Output[SSH]{ + OutputState: o.OutputState, + } +} + +// Useful for distinguishing different servers that are part of the same +// build. +// +// A value of `default` is appropriate if only dealing with a single host. +func (o SSHOutput) Id() pulumi.StringOutput { + return o.ApplyT(func(v SSH) string { return v.Id }).(pulumi.StringOutput) +} + +// SSH agent socket or private keys to expose to the build under the given +// identifier. +// +// Defaults to `[$SSH_AUTH_SOCK]`. +// +// Note that your keys are **not** automatically added when using an +// agent. Run `ssh-add -l` locally to confirm which public keys are +// visible to the agent; these will be exposed to your build. +func (o SSHOutput) Paths() pulumi.StringArrayOutput { + return o.ApplyT(func(v SSH) []string { return v.Paths }).(pulumi.StringArrayOutput) +} + +type SSHArrayOutput struct{ *pulumi.OutputState } + +func (SSHArrayOutput) ElementType() reflect.Type { + return reflect.TypeOf((*[]SSH)(nil)).Elem() +} + +func (o SSHArrayOutput) ToSSHArrayOutput() SSHArrayOutput { + return o +} + +func (o SSHArrayOutput) ToSSHArrayOutputWithContext(ctx context.Context) SSHArrayOutput { + return o +} + +func (o SSHArrayOutput) ToOutput(ctx context.Context) pulumix.Output[[]SSH] { + return pulumix.Output[[]SSH]{ + OutputState: o.OutputState, + } +} + +func (o SSHArrayOutput) Index(i pulumi.IntInput) SSHOutput { + return pulumi.All(o, i).ApplyT(func(vs []interface{}) SSH { + return vs[0].([]SSH)[vs[1].(int)] + }).(SSHOutput) +} + +func init() { + pulumi.RegisterInputType(reflect.TypeOf((*BuildContextInput)(nil)).Elem(), BuildContextArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*BuildContextPtrInput)(nil)).Elem(), BuildContextArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*BuilderConfigInput)(nil)).Elem(), BuilderConfigArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*BuilderConfigPtrInput)(nil)).Elem(), BuilderConfigArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromInput)(nil)).Elem(), CacheFromArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromArrayInput)(nil)).Elem(), CacheFromArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromAzureBlobInput)(nil)).Elem(), CacheFromAzureBlobArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromAzureBlobPtrInput)(nil)).Elem(), CacheFromAzureBlobArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromGitHubActionsInput)(nil)).Elem(), CacheFromGitHubActionsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromGitHubActionsPtrInput)(nil)).Elem(), CacheFromGitHubActionsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromLocalInput)(nil)).Elem(), CacheFromLocalArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromLocalPtrInput)(nil)).Elem(), CacheFromLocalArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromRegistryInput)(nil)).Elem(), CacheFromRegistryArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromRegistryPtrInput)(nil)).Elem(), CacheFromRegistryArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromS3Input)(nil)).Elem(), CacheFromS3Args{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheFromS3PtrInput)(nil)).Elem(), CacheFromS3Args{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToInput)(nil)).Elem(), CacheToArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToArrayInput)(nil)).Elem(), CacheToArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToAzureBlobInput)(nil)).Elem(), CacheToAzureBlobArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToAzureBlobPtrInput)(nil)).Elem(), CacheToAzureBlobArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToGitHubActionsInput)(nil)).Elem(), CacheToGitHubActionsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToGitHubActionsPtrInput)(nil)).Elem(), CacheToGitHubActionsArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToInlineInput)(nil)).Elem(), CacheToInlineArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToInlinePtrInput)(nil)).Elem(), CacheToInlineArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToLocalInput)(nil)).Elem(), CacheToLocalArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToLocalPtrInput)(nil)).Elem(), CacheToLocalArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToRegistryInput)(nil)).Elem(), CacheToRegistryArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToRegistryPtrInput)(nil)).Elem(), CacheToRegistryArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToS3Input)(nil)).Elem(), CacheToS3Args{}) + pulumi.RegisterInputType(reflect.TypeOf((*CacheToS3PtrInput)(nil)).Elem(), CacheToS3Args{}) + pulumi.RegisterInputType(reflect.TypeOf((*ContextInput)(nil)).Elem(), ContextArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ContextMapInput)(nil)).Elem(), ContextMap{}) + pulumi.RegisterInputType(reflect.TypeOf((*DockerfileInput)(nil)).Elem(), DockerfileArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*DockerfilePtrInput)(nil)).Elem(), DockerfileArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportInput)(nil)).Elem(), ExportArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportArrayInput)(nil)).Elem(), ExportArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportCacheOnlyInput)(nil)).Elem(), ExportCacheOnlyArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportCacheOnlyPtrInput)(nil)).Elem(), ExportCacheOnlyArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportDockerInput)(nil)).Elem(), ExportDockerArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportDockerPtrInput)(nil)).Elem(), ExportDockerArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportImageInput)(nil)).Elem(), ExportImageArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportImagePtrInput)(nil)).Elem(), ExportImageArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportLocalInput)(nil)).Elem(), ExportLocalArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportLocalPtrInput)(nil)).Elem(), ExportLocalArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportOCIInput)(nil)).Elem(), ExportOCIArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportOCIPtrInput)(nil)).Elem(), ExportOCIArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportRegistryInput)(nil)).Elem(), ExportRegistryArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportRegistryPtrInput)(nil)).Elem(), ExportRegistryArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportTarInput)(nil)).Elem(), ExportTarArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*ExportTarPtrInput)(nil)).Elem(), ExportTarArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RegistryInput)(nil)).Elem(), RegistryArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RegistryPtrInput)(nil)).Elem(), RegistryArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*RegistryArrayInput)(nil)).Elem(), RegistryArray{}) + pulumi.RegisterInputType(reflect.TypeOf((*SSHInput)(nil)).Elem(), SSHArgs{}) + pulumi.RegisterInputType(reflect.TypeOf((*SSHArrayInput)(nil)).Elem(), SSHArray{}) + pulumi.RegisterOutputType(BuildContextOutput{}) + pulumi.RegisterOutputType(BuildContextPtrOutput{}) + pulumi.RegisterOutputType(BuilderConfigOutput{}) + pulumi.RegisterOutputType(BuilderConfigPtrOutput{}) + pulumi.RegisterOutputType(CacheFromOutput{}) + pulumi.RegisterOutputType(CacheFromArrayOutput{}) + pulumi.RegisterOutputType(CacheFromAzureBlobOutput{}) + pulumi.RegisterOutputType(CacheFromAzureBlobPtrOutput{}) + pulumi.RegisterOutputType(CacheFromGitHubActionsOutput{}) + pulumi.RegisterOutputType(CacheFromGitHubActionsPtrOutput{}) + pulumi.RegisterOutputType(CacheFromLocalOutput{}) + pulumi.RegisterOutputType(CacheFromLocalPtrOutput{}) + pulumi.RegisterOutputType(CacheFromRegistryOutput{}) + pulumi.RegisterOutputType(CacheFromRegistryPtrOutput{}) + pulumi.RegisterOutputType(CacheFromS3Output{}) + pulumi.RegisterOutputType(CacheFromS3PtrOutput{}) + pulumi.RegisterOutputType(CacheToOutput{}) + pulumi.RegisterOutputType(CacheToArrayOutput{}) + pulumi.RegisterOutputType(CacheToAzureBlobOutput{}) + pulumi.RegisterOutputType(CacheToAzureBlobPtrOutput{}) + pulumi.RegisterOutputType(CacheToGitHubActionsOutput{}) + pulumi.RegisterOutputType(CacheToGitHubActionsPtrOutput{}) + pulumi.RegisterOutputType(CacheToInlineOutput{}) + pulumi.RegisterOutputType(CacheToInlinePtrOutput{}) + pulumi.RegisterOutputType(CacheToLocalOutput{}) + pulumi.RegisterOutputType(CacheToLocalPtrOutput{}) + pulumi.RegisterOutputType(CacheToRegistryOutput{}) + pulumi.RegisterOutputType(CacheToRegistryPtrOutput{}) + pulumi.RegisterOutputType(CacheToS3Output{}) + pulumi.RegisterOutputType(CacheToS3PtrOutput{}) + pulumi.RegisterOutputType(ContextOutput{}) + pulumi.RegisterOutputType(ContextMapOutput{}) + pulumi.RegisterOutputType(DockerfileOutput{}) + pulumi.RegisterOutputType(DockerfilePtrOutput{}) + pulumi.RegisterOutputType(ExportOutput{}) + pulumi.RegisterOutputType(ExportArrayOutput{}) + pulumi.RegisterOutputType(ExportCacheOnlyOutput{}) + pulumi.RegisterOutputType(ExportCacheOnlyPtrOutput{}) + pulumi.RegisterOutputType(ExportDockerOutput{}) + pulumi.RegisterOutputType(ExportDockerPtrOutput{}) + pulumi.RegisterOutputType(ExportImageOutput{}) + pulumi.RegisterOutputType(ExportImagePtrOutput{}) + pulumi.RegisterOutputType(ExportLocalOutput{}) + pulumi.RegisterOutputType(ExportLocalPtrOutput{}) + pulumi.RegisterOutputType(ExportOCIOutput{}) + pulumi.RegisterOutputType(ExportOCIPtrOutput{}) + pulumi.RegisterOutputType(ExportRegistryOutput{}) + pulumi.RegisterOutputType(ExportRegistryPtrOutput{}) + pulumi.RegisterOutputType(ExportTarOutput{}) + pulumi.RegisterOutputType(ExportTarPtrOutput{}) + pulumi.RegisterOutputType(RegistryOutput{}) + pulumi.RegisterOutputType(RegistryPtrOutput{}) + pulumi.RegisterOutputType(RegistryArrayOutput{}) + pulumi.RegisterOutputType(SSHOutput{}) + pulumi.RegisterOutputType(SSHArrayOutput{}) +} diff --git a/sdk/go/dockerbuild/random.go b/sdk/go/dockerbuild/random.go deleted file mode 100644 index d959310..0000000 --- a/sdk/go/dockerbuild/random.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by pulumi-language-go DO NOT EDIT. -// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** - -package dockerbuild - -import ( - "context" - "reflect" - - "errors" - "github.com/pulumi/pulumi-dockerbuild/sdk/go/dockerbuild/internal" - "github.com/pulumi/pulumi/sdk/v3/go/pulumi" - "github.com/pulumi/pulumi/sdk/v3/go/pulumix" -) - -type Random struct { - pulumi.CustomResourceState - - Length pulumix.Output[int] `pulumi:"length"` - Result pulumix.Output[string] `pulumi:"result"` -} - -// NewRandom registers a new resource with the given unique name, arguments, and options. -func NewRandom(ctx *pulumi.Context, - name string, args *RandomArgs, opts ...pulumi.ResourceOption) (*Random, error) { - if args == nil { - return nil, errors.New("missing one or more required arguments") - } - - if args.Length == nil { - return nil, errors.New("invalid value for required argument 'Length'") - } - opts = internal.PkgResourceDefaultOpts(opts) - var resource Random - err := ctx.RegisterResource("dockerbuild:index:Random", name, args, &resource, opts...) - if err != nil { - return nil, err - } - return &resource, nil -} - -// GetRandom gets an existing Random resource's state with the given name, ID, and optional -// state properties that are used to uniquely qualify the lookup (nil if not required). -func GetRandom(ctx *pulumi.Context, - name string, id pulumi.IDInput, state *RandomState, opts ...pulumi.ResourceOption) (*Random, error) { - var resource Random - err := ctx.ReadResource("dockerbuild:index:Random", name, id, state, &resource, opts...) - if err != nil { - return nil, err - } - return &resource, nil -} - -// Input properties used for looking up and filtering Random resources. -type randomState struct { -} - -type RandomState struct { -} - -func (RandomState) ElementType() reflect.Type { - return reflect.TypeOf((*randomState)(nil)).Elem() -} - -type randomArgs struct { - Length int `pulumi:"length"` -} - -// The set of arguments for constructing a Random resource. -type RandomArgs struct { - Length pulumix.Input[int] -} - -func (RandomArgs) ElementType() reflect.Type { - return reflect.TypeOf((*randomArgs)(nil)).Elem() -} - -type RandomOutput struct{ *pulumi.OutputState } - -func (RandomOutput) ElementType() reflect.Type { - return reflect.TypeOf((*Random)(nil)).Elem() -} - -func (o RandomOutput) ToRandomOutput() RandomOutput { - return o -} - -func (o RandomOutput) ToRandomOutputWithContext(ctx context.Context) RandomOutput { - return o -} - -func (o RandomOutput) ToOutput(ctx context.Context) pulumix.Output[Random] { - return pulumix.Output[Random]{ - OutputState: o.OutputState, - } -} - -func (o RandomOutput) Length() pulumix.Output[int] { - value := pulumix.Apply[Random](o, func(v Random) pulumix.Output[int] { return v.Length }) - return pulumix.Flatten[int, pulumix.Output[int]](value) -} - -func (o RandomOutput) Result() pulumix.Output[string] { - value := pulumix.Apply[Random](o, func(v Random) pulumix.Output[string] { return v.Result }) - return pulumix.Flatten[string, pulumix.Output[string]](value) -} - -func init() { - pulumi.RegisterOutputType(RandomOutput{}) -} diff --git a/sdk/go/dockerbuild/x/config/config.go b/sdk/go/dockerbuild/x/config/config.go new file mode 100644 index 0000000..26bba90 --- /dev/null +++ b/sdk/go/dockerbuild/x/config/config.go @@ -0,0 +1,28 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package config + +import ( + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" +) + +var _ = internal.GetEnvOrDefault + +// The build daemon's address. +func GetHost(ctx *pulumi.Context) string { + v, err := config.Try(ctx, "docker-build:host") + if err == nil { + return v + } + var value string + if d := internal.GetEnvOrDefault("", nil, "DOCKER_HOST"); d != nil { + value = d.(string) + } + return value +} +func GetRegistries(ctx *pulumi.Context) string { + return config.Get(ctx, "docker-build:registries") +} diff --git a/sdk/go/dockerbuild/x/doc.go b/sdk/go/dockerbuild/x/doc.go new file mode 100644 index 0000000..e798e27 --- /dev/null +++ b/sdk/go/dockerbuild/x/doc.go @@ -0,0 +1,2 @@ +// A Pulumi provider for building modern Docker images with buildx and BuildKit. +package dockerbuild diff --git a/sdk/go/dockerbuild/x/image.go b/sdk/go/dockerbuild/x/image.go new file mode 100644 index 0000000..c2ec336 --- /dev/null +++ b/sdk/go/dockerbuild/x/image.go @@ -0,0 +1,1376 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dockerbuild + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +// A Docker image built using buildx -- Docker's interface to the improved +// BuildKit backend. +// +// ## Stability +// +// **This resource is pre-1.0 and in public preview.** +// +// We will strive to keep APIs and behavior as stable as possible, but we +// cannot guarantee stability until version 1.0. +// +// ## Migrating Pulumi Docker v3 and v4 Image resources +// +// This provider's `Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider. +// Existing `Image` resources can be converted to the docker-build `Image` resources with minor modifications. +// +// ### Behavioral differences +// +// There are several key behavioral differences to keep in mind when transitioning images to the new `Image` resource. +// +// #### Previews +// +// Version `3.x` of the Pulumi Docker provider always builds images during preview operations. +// This is helpful as a safeguard to prevent "broken" images from merging, but users found the behavior unnecessarily redundant when running previews and updates locally. +// +// 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. +// Several users reported outages due to the default behavior allowing bad images to accidentally sneak through CI. +// +// The default behavior of this provider's `Image` resource is similar to `3.x` and will build images during previews. +// This behavior can be changed by specifying `buildOnPreview`. +// +// #### Push behavior +// +// 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. +// +// This provider's `Image` resource matches the Docker CLI's behavior and does not push images anywhere by default. +// +// To push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`). +// Like Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally. +// +// #### Secrets +// +// Version `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field. +// +// Version `4.x` of the Pulumi Docker provider does not support secrets. +// +// The `Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables. +// Instead, they should be passed directly as values. +// (Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).) +// Pulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments. +// +// #### Caching +// +// Version `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`. +// It builds targets individually and pushes them to separate images for caching. +// +// Version `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches. +// +// Both versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior. +// This can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc. +// +// The `Image` resource delegates all caching behavior to Docker. +// `cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc. +// +// #### Outputs +// +// Versions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest. +// In `4.x` this could also be a single sha256 hash if the image wasn't pushed. +// +// Unlike earlier providers the `Image` resource can push multiple tags. +// As a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed. +// If multiple tags were pushed this uses one at random. +// +// If you need more control over tag references you can use the `digest` output, which is always a single sha256 hash as long as the image was exported somewhere. +// +// #### Tag deletion and refreshes +// +// Versions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` resource is deleted, nor do they confirm expected tags exist during `refresh` operations. +// +// The `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist. +// If any are missing a subsequent `update` will push them. +// +// When a `Image` is deleted, it will _attempt_ to also delete any pushed tags. +// Deletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular). +// Manifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace. +// +// Use the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted. +// +// ### Example migration +// +// Examples of "fully-featured" `v3` and `v4` `Image` resources are shown below, along with an example `Image` resource showing how they would look after migration. +// +// The `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`. +// After migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`. +// In almost all cases, properties of `Image` are named after the Docker CLI flag they correspond to. +// +// The `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`. +// It it is shown with parameters similar to the `v3` example for completeness. +// +// ## Example Usage +// +// ## Example Usage +// ### Push to AWS ECR with caching +// ```go +// package main +// +// import ( +// +// "fmt" +// +// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecr" +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// ecrRepository, err := ecr.NewRepository(ctx, "ecr-repository", nil) +// if err != nil { +// return err +// } +// authToken := ecr.GetAuthorizationTokenOutput(ctx, ecr.GetAuthorizationTokenOutputArgs{ +// RegistryId: ecrRepository.RegistryId, +// }, nil) +// myImage, err := dockerbuild.NewImage(ctx, "my-image", &dockerbuild.ImageArgs{ +// CacheFrom: dockerbuild.CacheFromArray{ +// &dockerbuild.CacheFromArgs{ +// Registry: &dockerbuild.CacheFromRegistryArgs{ +// Ref: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) { +// return fmt.Sprintf("%v:cache", repositoryUrl), nil +// }).(pulumi.StringOutput), +// }, +// }, +// }, +// CacheTo: dockerbuild.CacheToArray{ +// &dockerbuild.CacheToArgs{ +// Registry: &dockerbuild.CacheToRegistryArgs{ +// ImageManifest: pulumi.Bool(true), +// OciMediaTypes: pulumi.Bool(true), +// Ref: ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) { +// return fmt.Sprintf("%v:cache", repositoryUrl), nil +// }).(pulumi.StringOutput), +// }, +// }, +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("./app"), +// }, +// Push: pulumi.Bool(true), +// Registries: dockerbuild.RegistryArray{ +// &dockerbuild.RegistryArgs{ +// Address: ecrRepository.RepositoryUrl, +// Password: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) { +// return &authToken.Password, nil +// }).(pulumi.StringPtrOutput), +// Username: authToken.ApplyT(func(authToken ecr.GetAuthorizationTokenResult) (*string, error) { +// return &authToken.UserName, nil +// }).(pulumi.StringPtrOutput), +// }, +// }, +// Tags: pulumi.StringArray{ +// ecrRepository.RepositoryUrl.ApplyT(func(repositoryUrl string) (string, error) { +// return fmt.Sprintf("%v:latest", repositoryUrl), nil +// }).(pulumi.StringOutput), +// }, +// }) +// if err != nil { +// return err +// } +// ctx.Export("ref", myImage.Ref) +// return nil +// }) +// } +// +// ``` +// ### Multi-platform image +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Platforms: docker - build.PlatformArray{ +// dockerbuild.Platform_Plan9_amd64, +// dockerbuild.Platform_Plan9_386, +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Registry export +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Push: pulumi.Bool(true), +// Registries: dockerbuild.RegistryArray{ +// &dockerbuild.RegistryArgs{ +// Address: pulumi.String("docker.io"), +// Password: pulumi.Any(dockerHubPassword), +// Username: pulumi.String("pulumibot"), +// }, +// }, +// Tags: pulumi.StringArray{ +// pulumi.String("docker.io/pulumi/pulumi:3.107.0"), +// }, +// }) +// if err != nil { +// return err +// } +// ctx.Export("ref", myImage.Ref) +// return nil +// }) +// } +// +// ``` +// ### Caching +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// CacheFrom: dockerbuild.CacheFromArray{ +// &dockerbuild.CacheFromArgs{ +// Local: &dockerbuild.CacheFromLocalArgs{ +// Src: pulumi.String("tmp/cache"), +// }, +// }, +// }, +// CacheTo: dockerbuild.CacheToArray{ +// &dockerbuild.CacheToArgs{ +// Local: &dockerbuild.CacheToLocalArgs{ +// Dest: pulumi.String("tmp/cache"), +// Mode: dockerbuild.CacheModeMax, +// }, +// }, +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Docker Build Cloud +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Builder: &dockerbuild.BuilderConfigArgs{ +// Name: pulumi.String("cloud-builder-name"), +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Exec: pulumi.Bool(true), +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Build arguments +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// BuildArgs: pulumi.StringMap{ +// "SET_ME_TO_TRUE": pulumi.String("true"), +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Build target +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Push: pulumi.Bool(false), +// Target: pulumi.String("build-me"), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Named contexts +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// Named: dockerbuild.ContextMap{ +// "golang:latest": &dockerbuild.ContextArgs{ +// Location: pulumi.String("docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"), +// }, +// }, +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Remote context +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile"), +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Inline Dockerfile +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Dockerfile: &dockerbuild.DockerfileArgs{ +// Inline: pulumi.String("FROM busybox\nCOPY hello.c ./\n"), +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Remote context +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("https://github.com/docker-library/hello-world.git"), +// }, +// Dockerfile: &dockerbuild.DockerfileArgs{ +// Location: pulumi.String("app/Dockerfile"), +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// ### Local export +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// _, err := dockerbuild.NewImage(ctx, "image", &dockerbuild.ImageArgs{ +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Exports: dockerbuild.ExportArray{ +// &dockerbuild.ExportArgs{ +// Docker: &dockerbuild.ExportDockerArgs{ +// Tar: pulumi.Bool(true), +// }, +// }, +// }, +// Push: pulumi.Bool(false), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +type Image struct { + pulumi.CustomResourceState + + // Custom `host:ip` mappings to use during the build. + // + // Equivalent to Docker's `--add-host` flag. + AddHosts pulumix.ArrayOutput[string] `pulumi:"addHosts"` + // `ARG` names and values to set during the build. + // + // These variables are accessed like environment variables inside `RUN` + // instructions. + // + // Build arguments are persisted in the image, so you should use `secrets` + // if these arguments are sensitive. + // + // Equivalent to Docker's `--build-arg` flag. + BuildArgs pulumix.MapOutput[string] `pulumi:"buildArgs"` + // Setting this to `false` will always skip image builds during previews, + // and setting it to `true` will always build images during previews. + // + // Images built during previews are never exported to registries, however + // cache manifests are still exported. + // + // On-disk Dockerfiles are always validated for syntactic correctness + // regardless of this setting. + // + // Defaults to `true` as a safeguard against broken images merging as part + // of CI pipelines. + BuildOnPreview pulumix.Output[*bool] `pulumi:"buildOnPreview"` + // Builder configuration. + Builder pulumix.GPtrOutput[BuilderConfig, BuilderConfigOutput] `pulumi:"builder"` + // Cache export configuration. + // + // Equivalent to Docker's `--cache-from` flag. + CacheFrom pulumix.GArrayOutput[CacheFrom, CacheFromOutput] `pulumi:"cacheFrom"` + // Cache import configuration. + // + // Equivalent to Docker's `--cache-to` flag. + CacheTo pulumix.GArrayOutput[CacheTo, CacheToOutput] `pulumi:"cacheTo"` + // Build context settings. + // + // Equivalent to Docker's `PATH | URL | -` positional argument. + Context pulumix.GPtrOutput[BuildContext, BuildContextOutput] `pulumi:"context"` + // A preliminary hash of the image's build context. + // + // Pulumi uses this to determine if an image _may_ need to be re-built. + ContextHash pulumix.Output[string] `pulumi:"contextHash"` + // A SHA256 digest of the image if it was exported to a registry or + // elsewhere. + // + // Empty if the image was not exported. + // + // Registry images can be referenced precisely as `@`. The + // `ref` output provides one such reference as a convenience. + Digest pulumix.Output[string] `pulumi:"digest"` + // Dockerfile settings. + // + // Equivalent to Docker's `--file` flag. + Dockerfile pulumix.GPtrOutput[Dockerfile, DockerfileOutput] `pulumi:"dockerfile"` + // Use `exec` mode to build this image. + // + // By default the provider embeds a v25 Docker client with v0.12 buildx + // support. This helps ensure consistent behavior across environments and + // is compatible with alternative build backends (e.g. `buildkitd`), but + // it may not be desirable if you require a specific version of buildx. + // For example you may want to run a custom `docker-buildx` binary with + // support for [Docker Build + // Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + // + // When this is set to `true` the provider will instead execute the + // `docker-buildx` binary directly to perform its operations. The user is + // responsible for ensuring this binary exists, with correct permissions + // and pre-configured builders, at a path Docker expects (e.g. + // `~/.docker/cli-plugins`). + // + // Debugging `exec` mode may be more difficult as Pulumi will not be able + // to surface fine-grained errors and warnings. Additionally credentials + // are temporarily written to disk in order to provide them to the + // `docker-buildx` binary. + Exec pulumix.Output[*bool] `pulumi:"exec"` + // Controls where images are persisted after building. + // + // Images are only stored in the local cache unless `exports` are + // explicitly configured. + // + // Exporting to multiple destinations requires a daemon running BuildKit + // 0.13 or later. + // + // Equivalent to Docker's `--output` flag. + Exports pulumix.GArrayOutput[Export, ExportOutput] `pulumi:"exports"` + // Attach arbitrary key/value metadata to the image. + // + // Equivalent to Docker's `--label` flag. + Labels pulumix.MapOutput[string] `pulumi:"labels"` + // When `true` the build will automatically include a `docker` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--load` flag. + Load pulumix.Output[*bool] `pulumi:"load"` + // Set the network mode for `RUN` instructions. Defaults to `default`. + // + // For custom networks, configure your builder with `--driver-opt network=...`. + // + // Equivalent to Docker's `--network` flag. + Network pulumix.Output[*NetworkMode] `pulumi:"network"` + // Do not import cache manifests when building the image. + // + // Equivalent to Docker's `--no-cache` flag. + NoCache pulumix.Output[*bool] `pulumi:"noCache"` + // Set target platform(s) for the build. Defaults to the host's platform. + // + // Equivalent to Docker's `--platform` flag. + Platforms pulumix.ArrayOutput[Platform] `pulumi:"platforms"` + // Always pull referenced images. + // + // Equivalent to Docker's `--pull` flag. + Pull pulumix.Output[*bool] `pulumi:"pull"` + // When `true` the build will automatically include a `registry` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--push` flag. + Push pulumix.Output[bool] `pulumi:"push"` + // If the image was pushed to any registries then this will contain a + // single fully-qualified tag including the build's digest. + // + // If the image had tags but was not exported, this will take on a value + // of one of those tags. + // + // This will be empty if the image had no exports and no tags. + // + // This is only for convenience and may not be appropriate for situations + // where multiple tags or registries are involved. In those cases this + // output is not guaranteed to be stable. + // + // For more control over tags consumed by downstream resources you should + // use the `digest` output. + Ref pulumix.Output[string] `pulumi:"ref"` + // Registry credentials. Required if reading or exporting to private + // repositories. + // + // Credentials are kept in-memory and do not pollute pre-existing + // credentials on the host. + // + // Similar to `docker login`. + Registries pulumix.GArrayOutput[Registry, RegistryOutput] `pulumi:"registries"` + // A mapping of secret names to their corresponding values. + // + // Unlike the Docker CLI, these can be passed by value and do not need to + // exist on-disk or in environment variables. + // + // Build arguments and environment variables are persistent in the final + // image, so you should use this for sensitive values. + // + // Similar to Docker's `--secret` flag. + Secrets pulumix.MapOutput[string] `pulumi:"secrets"` + // SSH agent socket or keys to expose to the build. + // + // Equivalent to Docker's `--ssh` flag. + Ssh pulumix.GArrayOutput[SSH, SSHOutput] `pulumi:"ssh"` + // Name and optionally a tag (format: `name:tag`). + // + // If exporting to a registry, the name should include the fully qualified + // registry address (e.g. `docker.io/pulumi/pulumi:latest`). + // + // Equivalent to Docker's `--tag` flag. + Tags pulumix.ArrayOutput[string] `pulumi:"tags"` + // Set the target build stage(s) to build. + // + // If not specified all targets will be built by default. + // + // Equivalent to Docker's `--target` flag. + Target pulumix.Output[*string] `pulumi:"target"` +} + +// NewImage registers a new resource with the given unique name, arguments, and options. +func NewImage(ctx *pulumi.Context, + name string, args *ImageArgs, opts ...pulumi.ResourceOption) (*Image, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Push == nil { + return nil, errors.New("invalid value for required argument 'Push'") + } + if args.BuildOnPreview == nil { + args.BuildOnPreview = pulumix.Ptr(true) + } + if args.Network == nil { + args.Network = pulumix.Ptr(NetworkMode("default")) + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource Image + err := ctx.RegisterResource("docker-build:index:Image", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetImage gets an existing Image resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetImage(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *ImageState, opts ...pulumi.ResourceOption) (*Image, error) { + var resource Image + err := ctx.ReadResource("docker-build:index:Image", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering Image resources. +type imageState struct { +} + +type ImageState struct { +} + +func (ImageState) ElementType() reflect.Type { + return reflect.TypeOf((*imageState)(nil)).Elem() +} + +type imageArgs struct { + // Custom `host:ip` mappings to use during the build. + // + // Equivalent to Docker's `--add-host` flag. + AddHosts []string `pulumi:"addHosts"` + // `ARG` names and values to set during the build. + // + // These variables are accessed like environment variables inside `RUN` + // instructions. + // + // Build arguments are persisted in the image, so you should use `secrets` + // if these arguments are sensitive. + // + // Equivalent to Docker's `--build-arg` flag. + BuildArgs map[string]string `pulumi:"buildArgs"` + // Setting this to `false` will always skip image builds during previews, + // and setting it to `true` will always build images during previews. + // + // Images built during previews are never exported to registries, however + // cache manifests are still exported. + // + // On-disk Dockerfiles are always validated for syntactic correctness + // regardless of this setting. + // + // Defaults to `true` as a safeguard against broken images merging as part + // of CI pipelines. + BuildOnPreview *bool `pulumi:"buildOnPreview"` + // Builder configuration. + Builder *BuilderConfig `pulumi:"builder"` + // Cache export configuration. + // + // Equivalent to Docker's `--cache-from` flag. + CacheFrom []CacheFrom `pulumi:"cacheFrom"` + // Cache import configuration. + // + // Equivalent to Docker's `--cache-to` flag. + CacheTo []CacheTo `pulumi:"cacheTo"` + // Build context settings. + // + // Equivalent to Docker's `PATH | URL | -` positional argument. + Context *BuildContext `pulumi:"context"` + // Dockerfile settings. + // + // Equivalent to Docker's `--file` flag. + Dockerfile *Dockerfile `pulumi:"dockerfile"` + // Use `exec` mode to build this image. + // + // By default the provider embeds a v25 Docker client with v0.12 buildx + // support. This helps ensure consistent behavior across environments and + // is compatible with alternative build backends (e.g. `buildkitd`), but + // it may not be desirable if you require a specific version of buildx. + // For example you may want to run a custom `docker-buildx` binary with + // support for [Docker Build + // Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + // + // When this is set to `true` the provider will instead execute the + // `docker-buildx` binary directly to perform its operations. The user is + // responsible for ensuring this binary exists, with correct permissions + // and pre-configured builders, at a path Docker expects (e.g. + // `~/.docker/cli-plugins`). + // + // Debugging `exec` mode may be more difficult as Pulumi will not be able + // to surface fine-grained errors and warnings. Additionally credentials + // are temporarily written to disk in order to provide them to the + // `docker-buildx` binary. + Exec *bool `pulumi:"exec"` + // Controls where images are persisted after building. + // + // Images are only stored in the local cache unless `exports` are + // explicitly configured. + // + // Exporting to multiple destinations requires a daemon running BuildKit + // 0.13 or later. + // + // Equivalent to Docker's `--output` flag. + Exports []Export `pulumi:"exports"` + // Attach arbitrary key/value metadata to the image. + // + // Equivalent to Docker's `--label` flag. + Labels map[string]string `pulumi:"labels"` + // When `true` the build will automatically include a `docker` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--load` flag. + Load *bool `pulumi:"load"` + // Set the network mode for `RUN` instructions. Defaults to `default`. + // + // For custom networks, configure your builder with `--driver-opt network=...`. + // + // Equivalent to Docker's `--network` flag. + Network *NetworkMode `pulumi:"network"` + // Do not import cache manifests when building the image. + // + // Equivalent to Docker's `--no-cache` flag. + NoCache *bool `pulumi:"noCache"` + // Set target platform(s) for the build. Defaults to the host's platform. + // + // Equivalent to Docker's `--platform` flag. + Platforms []Platform `pulumi:"platforms"` + // Always pull referenced images. + // + // Equivalent to Docker's `--pull` flag. + Pull *bool `pulumi:"pull"` + // When `true` the build will automatically include a `registry` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--push` flag. + Push bool `pulumi:"push"` + // Registry credentials. Required if reading or exporting to private + // repositories. + // + // Credentials are kept in-memory and do not pollute pre-existing + // credentials on the host. + // + // Similar to `docker login`. + Registries []Registry `pulumi:"registries"` + // A mapping of secret names to their corresponding values. + // + // Unlike the Docker CLI, these can be passed by value and do not need to + // exist on-disk or in environment variables. + // + // Build arguments and environment variables are persistent in the final + // image, so you should use this for sensitive values. + // + // Similar to Docker's `--secret` flag. + Secrets map[string]string `pulumi:"secrets"` + // SSH agent socket or keys to expose to the build. + // + // Equivalent to Docker's `--ssh` flag. + Ssh []SSH `pulumi:"ssh"` + // Name and optionally a tag (format: `name:tag`). + // + // If exporting to a registry, the name should include the fully qualified + // registry address (e.g. `docker.io/pulumi/pulumi:latest`). + // + // Equivalent to Docker's `--tag` flag. + Tags []string `pulumi:"tags"` + // Set the target build stage(s) to build. + // + // If not specified all targets will be built by default. + // + // Equivalent to Docker's `--target` flag. + Target *string `pulumi:"target"` +} + +// The set of arguments for constructing a Image resource. +type ImageArgs struct { + // Custom `host:ip` mappings to use during the build. + // + // Equivalent to Docker's `--add-host` flag. + AddHosts pulumix.Input[[]string] + // `ARG` names and values to set during the build. + // + // These variables are accessed like environment variables inside `RUN` + // instructions. + // + // Build arguments are persisted in the image, so you should use `secrets` + // if these arguments are sensitive. + // + // Equivalent to Docker's `--build-arg` flag. + BuildArgs pulumix.Input[map[string]string] + // Setting this to `false` will always skip image builds during previews, + // and setting it to `true` will always build images during previews. + // + // Images built during previews are never exported to registries, however + // cache manifests are still exported. + // + // On-disk Dockerfiles are always validated for syntactic correctness + // regardless of this setting. + // + // Defaults to `true` as a safeguard against broken images merging as part + // of CI pipelines. + BuildOnPreview pulumix.Input[*bool] + // Builder configuration. + Builder pulumix.Input[*BuilderConfigArgs] + // Cache export configuration. + // + // Equivalent to Docker's `--cache-from` flag. + CacheFrom pulumix.Input[[]*CacheFromArgs] + // Cache import configuration. + // + // Equivalent to Docker's `--cache-to` flag. + CacheTo pulumix.Input[[]*CacheToArgs] + // Build context settings. + // + // Equivalent to Docker's `PATH | URL | -` positional argument. + Context pulumix.Input[*BuildContextArgs] + // Dockerfile settings. + // + // Equivalent to Docker's `--file` flag. + Dockerfile pulumix.Input[*DockerfileArgs] + // Use `exec` mode to build this image. + // + // By default the provider embeds a v25 Docker client with v0.12 buildx + // support. This helps ensure consistent behavior across environments and + // is compatible with alternative build backends (e.g. `buildkitd`), but + // it may not be desirable if you require a specific version of buildx. + // For example you may want to run a custom `docker-buildx` binary with + // support for [Docker Build + // Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + // + // When this is set to `true` the provider will instead execute the + // `docker-buildx` binary directly to perform its operations. The user is + // responsible for ensuring this binary exists, with correct permissions + // and pre-configured builders, at a path Docker expects (e.g. + // `~/.docker/cli-plugins`). + // + // Debugging `exec` mode may be more difficult as Pulumi will not be able + // to surface fine-grained errors and warnings. Additionally credentials + // are temporarily written to disk in order to provide them to the + // `docker-buildx` binary. + Exec pulumix.Input[*bool] + // Controls where images are persisted after building. + // + // Images are only stored in the local cache unless `exports` are + // explicitly configured. + // + // Exporting to multiple destinations requires a daemon running BuildKit + // 0.13 or later. + // + // Equivalent to Docker's `--output` flag. + Exports pulumix.Input[[]*ExportArgs] + // Attach arbitrary key/value metadata to the image. + // + // Equivalent to Docker's `--label` flag. + Labels pulumix.Input[map[string]string] + // When `true` the build will automatically include a `docker` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--load` flag. + Load pulumix.Input[*bool] + // Set the network mode for `RUN` instructions. Defaults to `default`. + // + // For custom networks, configure your builder with `--driver-opt network=...`. + // + // Equivalent to Docker's `--network` flag. + Network pulumix.Input[*NetworkMode] + // Do not import cache manifests when building the image. + // + // Equivalent to Docker's `--no-cache` flag. + NoCache pulumix.Input[*bool] + // Set target platform(s) for the build. Defaults to the host's platform. + // + // Equivalent to Docker's `--platform` flag. + Platforms pulumix.Input[[]Platform] + // Always pull referenced images. + // + // Equivalent to Docker's `--pull` flag. + Pull pulumix.Input[*bool] + // When `true` the build will automatically include a `registry` export. + // + // Defaults to `false`. + // + // Equivalent to Docker's `--push` flag. + Push pulumix.Input[bool] + // Registry credentials. Required if reading or exporting to private + // repositories. + // + // Credentials are kept in-memory and do not pollute pre-existing + // credentials on the host. + // + // Similar to `docker login`. + Registries pulumix.Input[[]*RegistryArgs] + // A mapping of secret names to their corresponding values. + // + // Unlike the Docker CLI, these can be passed by value and do not need to + // exist on-disk or in environment variables. + // + // Build arguments and environment variables are persistent in the final + // image, so you should use this for sensitive values. + // + // Similar to Docker's `--secret` flag. + Secrets pulumix.Input[map[string]string] + // SSH agent socket or keys to expose to the build. + // + // Equivalent to Docker's `--ssh` flag. + Ssh pulumix.Input[[]*SSHArgs] + // Name and optionally a tag (format: `name:tag`). + // + // If exporting to a registry, the name should include the fully qualified + // registry address (e.g. `docker.io/pulumi/pulumi:latest`). + // + // Equivalent to Docker's `--tag` flag. + Tags pulumix.Input[[]string] + // Set the target build stage(s) to build. + // + // If not specified all targets will be built by default. + // + // Equivalent to Docker's `--target` flag. + Target pulumix.Input[*string] +} + +func (ImageArgs) ElementType() reflect.Type { + return reflect.TypeOf((*imageArgs)(nil)).Elem() +} + +type ImageOutput struct{ *pulumi.OutputState } + +func (ImageOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Image)(nil)).Elem() +} + +func (o ImageOutput) ToImageOutput() ImageOutput { + return o +} + +func (o ImageOutput) ToImageOutputWithContext(ctx context.Context) ImageOutput { + return o +} + +func (o ImageOutput) ToOutput(ctx context.Context) pulumix.Output[Image] { + return pulumix.Output[Image]{ + OutputState: o.OutputState, + } +} + +// Custom `host:ip` mappings to use during the build. +// +// Equivalent to Docker's `--add-host` flag. +func (o ImageOutput) AddHosts() pulumix.ArrayOutput[string] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.ArrayOutput[string] { return v.AddHosts }) + unwrapped := pulumix.Flatten[[]string, pulumix.ArrayOutput[string]](value) + return pulumix.ArrayOutput[string]{OutputState: unwrapped.OutputState} +} + +// `ARG` names and values to set during the build. +// +// These variables are accessed like environment variables inside `RUN` +// instructions. +// +// Build arguments are persisted in the image, so you should use `secrets` +// if these arguments are sensitive. +// +// Equivalent to Docker's `--build-arg` flag. +func (o ImageOutput) BuildArgs() pulumix.MapOutput[string] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.MapOutput[string] { return v.BuildArgs }) + unwrapped := pulumix.Flatten[map[string]string, pulumix.MapOutput[string]](value) + return pulumix.MapOutput[string]{OutputState: unwrapped.OutputState} +} + +// Setting this to `false` will always skip image builds during previews, +// and setting it to `true` will always build images during previews. +// +// Images built during previews are never exported to registries, however +// cache manifests are still exported. +// +// On-disk Dockerfiles are always validated for syntactic correctness +// regardless of this setting. +// +// Defaults to `true` as a safeguard against broken images merging as part +// of CI pipelines. +func (o ImageOutput) BuildOnPreview() pulumix.Output[*bool] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.Output[*bool] { return v.BuildOnPreview }) + return pulumix.Flatten[*bool, pulumix.Output[*bool]](value) +} + +// Builder configuration. +func (o ImageOutput) Builder() pulumix.GPtrOutput[BuilderConfig, BuilderConfigOutput] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.GPtrOutput[BuilderConfig, BuilderConfigOutput] { return v.Builder }) + unwrapped := pulumix.Flatten[*BuilderConfig, pulumix.GPtrOutput[BuilderConfig, BuilderConfigOutput]](value) + return pulumix.GPtrOutput[BuilderConfig, BuilderConfigOutput]{OutputState: unwrapped.OutputState} +} + +// Cache export configuration. +// +// Equivalent to Docker's `--cache-from` flag. +func (o ImageOutput) CacheFrom() pulumix.GArrayOutput[CacheFrom, CacheFromOutput] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.GArrayOutput[CacheFrom, CacheFromOutput] { return v.CacheFrom }) + unwrapped := pulumix.Flatten[[]CacheFrom, pulumix.GArrayOutput[CacheFrom, CacheFromOutput]](value) + return pulumix.GArrayOutput[CacheFrom, CacheFromOutput]{OutputState: unwrapped.OutputState} +} + +// Cache import configuration. +// +// Equivalent to Docker's `--cache-to` flag. +func (o ImageOutput) CacheTo() pulumix.GArrayOutput[CacheTo, CacheToOutput] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.GArrayOutput[CacheTo, CacheToOutput] { return v.CacheTo }) + unwrapped := pulumix.Flatten[[]CacheTo, pulumix.GArrayOutput[CacheTo, CacheToOutput]](value) + return pulumix.GArrayOutput[CacheTo, CacheToOutput]{OutputState: unwrapped.OutputState} +} + +// Build context settings. +// +// Equivalent to Docker's `PATH | URL | -` positional argument. +func (o ImageOutput) Context() pulumix.GPtrOutput[BuildContext, BuildContextOutput] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.GPtrOutput[BuildContext, BuildContextOutput] { return v.Context }) + unwrapped := pulumix.Flatten[*BuildContext, pulumix.GPtrOutput[BuildContext, BuildContextOutput]](value) + return pulumix.GPtrOutput[BuildContext, BuildContextOutput]{OutputState: unwrapped.OutputState} +} + +// A preliminary hash of the image's build context. +// +// Pulumi uses this to determine if an image _may_ need to be re-built. +func (o ImageOutput) ContextHash() pulumix.Output[string] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.Output[string] { return v.ContextHash }) + return pulumix.Flatten[string, pulumix.Output[string]](value) +} + +// A SHA256 digest of the image if it was exported to a registry or +// elsewhere. +// +// Empty if the image was not exported. +// +// Registry images can be referenced precisely as `@`. The +// `ref` output provides one such reference as a convenience. +func (o ImageOutput) Digest() pulumix.Output[string] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.Output[string] { return v.Digest }) + return pulumix.Flatten[string, pulumix.Output[string]](value) +} + +// Dockerfile settings. +// +// Equivalent to Docker's `--file` flag. +func (o ImageOutput) Dockerfile() pulumix.GPtrOutput[Dockerfile, DockerfileOutput] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.GPtrOutput[Dockerfile, DockerfileOutput] { return v.Dockerfile }) + unwrapped := pulumix.Flatten[*Dockerfile, pulumix.GPtrOutput[Dockerfile, DockerfileOutput]](value) + return pulumix.GPtrOutput[Dockerfile, DockerfileOutput]{OutputState: unwrapped.OutputState} +} + +// Use `exec` mode to build this image. +// +// By default the provider embeds a v25 Docker client with v0.12 buildx +// support. This helps ensure consistent behavior across environments and +// is compatible with alternative build backends (e.g. `buildkitd`), but +// it may not be desirable if you require a specific version of buildx. +// For example you may want to run a custom `docker-buildx` binary with +// support for [Docker Build +// Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). +// +// When this is set to `true` the provider will instead execute the +// `docker-buildx` binary directly to perform its operations. The user is +// responsible for ensuring this binary exists, with correct permissions +// and pre-configured builders, at a path Docker expects (e.g. +// `~/.docker/cli-plugins`). +// +// Debugging `exec` mode may be more difficult as Pulumi will not be able +// to surface fine-grained errors and warnings. Additionally credentials +// are temporarily written to disk in order to provide them to the +// `docker-buildx` binary. +func (o ImageOutput) Exec() pulumix.Output[*bool] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.Output[*bool] { return v.Exec }) + return pulumix.Flatten[*bool, pulumix.Output[*bool]](value) +} + +// Controls where images are persisted after building. +// +// Images are only stored in the local cache unless `exports` are +// explicitly configured. +// +// Exporting to multiple destinations requires a daemon running BuildKit +// 0.13 or later. +// +// Equivalent to Docker's `--output` flag. +func (o ImageOutput) Exports() pulumix.GArrayOutput[Export, ExportOutput] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.GArrayOutput[Export, ExportOutput] { return v.Exports }) + unwrapped := pulumix.Flatten[[]Export, pulumix.GArrayOutput[Export, ExportOutput]](value) + return pulumix.GArrayOutput[Export, ExportOutput]{OutputState: unwrapped.OutputState} +} + +// Attach arbitrary key/value metadata to the image. +// +// Equivalent to Docker's `--label` flag. +func (o ImageOutput) Labels() pulumix.MapOutput[string] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.MapOutput[string] { return v.Labels }) + unwrapped := pulumix.Flatten[map[string]string, pulumix.MapOutput[string]](value) + return pulumix.MapOutput[string]{OutputState: unwrapped.OutputState} +} + +// When `true` the build will automatically include a `docker` export. +// +// Defaults to `false`. +// +// Equivalent to Docker's `--load` flag. +func (o ImageOutput) Load() pulumix.Output[*bool] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.Output[*bool] { return v.Load }) + return pulumix.Flatten[*bool, pulumix.Output[*bool]](value) +} + +// Set the network mode for `RUN` instructions. Defaults to `default`. +// +// For custom networks, configure your builder with `--driver-opt network=...`. +// +// Equivalent to Docker's `--network` flag. +func (o ImageOutput) Network() pulumix.Output[*NetworkMode] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.Output[*NetworkMode] { return v.Network }) + return pulumix.Flatten[*NetworkMode, pulumix.Output[*NetworkMode]](value) +} + +// Do not import cache manifests when building the image. +// +// Equivalent to Docker's `--no-cache` flag. +func (o ImageOutput) NoCache() pulumix.Output[*bool] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.Output[*bool] { return v.NoCache }) + return pulumix.Flatten[*bool, pulumix.Output[*bool]](value) +} + +// Set target platform(s) for the build. Defaults to the host's platform. +// +// Equivalent to Docker's `--platform` flag. +func (o ImageOutput) Platforms() pulumix.ArrayOutput[Platform] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.ArrayOutput[Platform] { return v.Platforms }) + unwrapped := pulumix.Flatten[[]Platform, pulumix.ArrayOutput[Platform]](value) + return pulumix.ArrayOutput[Platform]{OutputState: unwrapped.OutputState} +} + +// Always pull referenced images. +// +// Equivalent to Docker's `--pull` flag. +func (o ImageOutput) Pull() pulumix.Output[*bool] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.Output[*bool] { return v.Pull }) + return pulumix.Flatten[*bool, pulumix.Output[*bool]](value) +} + +// When `true` the build will automatically include a `registry` export. +// +// Defaults to `false`. +// +// Equivalent to Docker's `--push` flag. +func (o ImageOutput) Push() pulumix.Output[bool] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.Output[bool] { return v.Push }) + return pulumix.Flatten[bool, pulumix.Output[bool]](value) +} + +// If the image was pushed to any registries then this will contain a +// single fully-qualified tag including the build's digest. +// +// If the image had tags but was not exported, this will take on a value +// of one of those tags. +// +// This will be empty if the image had no exports and no tags. +// +// This is only for convenience and may not be appropriate for situations +// where multiple tags or registries are involved. In those cases this +// output is not guaranteed to be stable. +// +// For more control over tags consumed by downstream resources you should +// use the `digest` output. +func (o ImageOutput) Ref() pulumix.Output[string] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.Output[string] { return v.Ref }) + return pulumix.Flatten[string, pulumix.Output[string]](value) +} + +// Registry credentials. Required if reading or exporting to private +// repositories. +// +// Credentials are kept in-memory and do not pollute pre-existing +// credentials on the host. +// +// Similar to `docker login`. +func (o ImageOutput) Registries() pulumix.GArrayOutput[Registry, RegistryOutput] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.GArrayOutput[Registry, RegistryOutput] { return v.Registries }) + unwrapped := pulumix.Flatten[[]Registry, pulumix.GArrayOutput[Registry, RegistryOutput]](value) + return pulumix.GArrayOutput[Registry, RegistryOutput]{OutputState: unwrapped.OutputState} +} + +// A mapping of secret names to their corresponding values. +// +// Unlike the Docker CLI, these can be passed by value and do not need to +// exist on-disk or in environment variables. +// +// Build arguments and environment variables are persistent in the final +// image, so you should use this for sensitive values. +// +// Similar to Docker's `--secret` flag. +func (o ImageOutput) Secrets() pulumix.MapOutput[string] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.MapOutput[string] { return v.Secrets }) + unwrapped := pulumix.Flatten[map[string]string, pulumix.MapOutput[string]](value) + return pulumix.MapOutput[string]{OutputState: unwrapped.OutputState} +} + +// SSH agent socket or keys to expose to the build. +// +// Equivalent to Docker's `--ssh` flag. +func (o ImageOutput) Ssh() pulumix.GArrayOutput[SSH, SSHOutput] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.GArrayOutput[SSH, SSHOutput] { return v.Ssh }) + unwrapped := pulumix.Flatten[[]SSH, pulumix.GArrayOutput[SSH, SSHOutput]](value) + return pulumix.GArrayOutput[SSH, SSHOutput]{OutputState: unwrapped.OutputState} +} + +// Name and optionally a tag (format: `name:tag`). +// +// If exporting to a registry, the name should include the fully qualified +// registry address (e.g. `docker.io/pulumi/pulumi:latest`). +// +// Equivalent to Docker's `--tag` flag. +func (o ImageOutput) Tags() pulumix.ArrayOutput[string] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.ArrayOutput[string] { return v.Tags }) + unwrapped := pulumix.Flatten[[]string, pulumix.ArrayOutput[string]](value) + return pulumix.ArrayOutput[string]{OutputState: unwrapped.OutputState} +} + +// Set the target build stage(s) to build. +// +// If not specified all targets will be built by default. +// +// Equivalent to Docker's `--target` flag. +func (o ImageOutput) Target() pulumix.Output[*string] { + value := pulumix.Apply[Image](o, func(v Image) pulumix.Output[*string] { return v.Target }) + return pulumix.Flatten[*string, pulumix.Output[*string]](value) +} + +func init() { + pulumi.RegisterOutputType(ImageOutput{}) +} diff --git a/sdk/go/dockerbuild/x/index.go b/sdk/go/dockerbuild/x/index.go new file mode 100644 index 0000000..1deb0f3 --- /dev/null +++ b/sdk/go/dockerbuild/x/index.go @@ -0,0 +1,288 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dockerbuild + +import ( + "context" + "reflect" + + "errors" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +// A wrapper around `docker buildx imagetools create` to create an index +// (or manifest list) referencing one or more existing images. +// +// In most cases you do not need an `Index` to build a multi-platform +// image -- specifying multiple platforms on the `Image` will handle this +// for you automatically. +// +// However, as of April 2024, building multi-platform images _with +// caching_ will only export a cache for one platform at a time (see [this +// discussion](https://github.com/docker/buildx/discussions/1382) for more +// details). +// +// Therefore this resource can be helpful if you are building +// multi-platform images with caching: each platform can be built and +// cached separately, and an `Index` can join them all together. An +// example of this is shown below. +// +// This resource creates an OCI image index or a Docker manifest list +// depending on the media types of the source images. +// +// ## Example Usage +// ### Multi-platform registry caching +// ```go +// package main +// +// import ( +// +// "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// amd64, err := dockerbuild.NewImage(ctx, "amd64", &dockerbuild.ImageArgs{ +// CacheFrom: dockerbuild.CacheFromArray{ +// &dockerbuild.CacheFromArgs{ +// Registry: &dockerbuild.CacheFromRegistryArgs{ +// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-amd64"), +// }, +// }, +// }, +// CacheTo: dockerbuild.CacheToArray{ +// &dockerbuild.CacheToArgs{ +// Registry: &dockerbuild.CacheToRegistryArgs{ +// Mode: dockerbuild.CacheModeMax, +// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-amd64"), +// }, +// }, +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Platforms: docker - build.PlatformArray{ +// dockerbuild.Platform_Linux_amd64, +// }, +// Tags: pulumi.StringArray{ +// pulumi.String("docker.io/pulumi/pulumi:3.107.0-amd64"), +// }, +// }) +// if err != nil { +// return err +// } +// arm64, err := dockerbuild.NewImage(ctx, "arm64", &dockerbuild.ImageArgs{ +// CacheFrom: dockerbuild.CacheFromArray{ +// &dockerbuild.CacheFromArgs{ +// Registry: &dockerbuild.CacheFromRegistryArgs{ +// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-arm64"), +// }, +// }, +// }, +// CacheTo: dockerbuild.CacheToArray{ +// &dockerbuild.CacheToArgs{ +// Registry: &dockerbuild.CacheToRegistryArgs{ +// Mode: dockerbuild.CacheModeMax, +// Ref: pulumi.String("docker.io/pulumi/pulumi:cache-arm64"), +// }, +// }, +// }, +// Context: &dockerbuild.BuildContextArgs{ +// Location: pulumi.String("app"), +// }, +// Platforms: docker - build.PlatformArray{ +// dockerbuild.Platform_Linux_arm64, +// }, +// Tags: pulumi.StringArray{ +// pulumi.String("docker.io/pulumi/pulumi:3.107.0-arm64"), +// }, +// }) +// if err != nil { +// return err +// } +// index, err := dockerbuild.NewIndex(ctx, "index", &dockerbuild.IndexArgs{ +// Sources: pulumi.StringArray{ +// amd64.Ref, +// arm64.Ref, +// }, +// Tag: pulumi.String("docker.io/pulumi/pulumi:3.107.0"), +// }) +// if err != nil { +// return err +// } +// ctx.Export("ref", index.Ref) +// return nil +// }) +// } +// +// ``` +type Index struct { + pulumi.CustomResourceState + + // If true, push the index to the target registry. + // + // Defaults to `true`. + Push pulumix.Output[*bool] `pulumi:"push"` + // The pushed tag with digest. + // + // Identical to the tag if the index was not pushed. + Ref pulumix.Output[string] `pulumi:"ref"` + // Authentication for the registry where the tagged index will be pushed. + // + // Credentials can also be included with the provider's configuration. + Registry pulumix.GPtrOutput[Registry, RegistryOutput] `pulumi:"registry"` + // Existing images to include in the index. + Sources pulumix.ArrayOutput[string] `pulumi:"sources"` + // The tag to apply to the index. + Tag pulumix.Output[string] `pulumi:"tag"` +} + +// NewIndex registers a new resource with the given unique name, arguments, and options. +func NewIndex(ctx *pulumi.Context, + name string, args *IndexArgs, opts ...pulumi.ResourceOption) (*Index, error) { + if args == nil { + return nil, errors.New("missing one or more required arguments") + } + + if args.Sources == nil { + return nil, errors.New("invalid value for required argument 'Sources'") + } + if args.Tag == nil { + return nil, errors.New("invalid value for required argument 'Tag'") + } + if args.Push == nil { + args.Push = pulumix.Ptr(true) + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource Index + err := ctx.RegisterResource("docker-build:index:Index", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// GetIndex gets an existing Index resource's state with the given name, ID, and optional +// state properties that are used to uniquely qualify the lookup (nil if not required). +func GetIndex(ctx *pulumi.Context, + name string, id pulumi.IDInput, state *IndexState, opts ...pulumi.ResourceOption) (*Index, error) { + var resource Index + err := ctx.ReadResource("docker-build:index:Index", name, id, state, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +// Input properties used for looking up and filtering Index resources. +type indexState struct { +} + +type IndexState struct { +} + +func (IndexState) ElementType() reflect.Type { + return reflect.TypeOf((*indexState)(nil)).Elem() +} + +type indexArgs struct { + // If true, push the index to the target registry. + // + // Defaults to `true`. + Push *bool `pulumi:"push"` + // Authentication for the registry where the tagged index will be pushed. + // + // Credentials can also be included with the provider's configuration. + Registry *Registry `pulumi:"registry"` + // Existing images to include in the index. + Sources []string `pulumi:"sources"` + // The tag to apply to the index. + Tag string `pulumi:"tag"` +} + +// The set of arguments for constructing a Index resource. +type IndexArgs struct { + // If true, push the index to the target registry. + // + // Defaults to `true`. + Push pulumix.Input[*bool] + // Authentication for the registry where the tagged index will be pushed. + // + // Credentials can also be included with the provider's configuration. + Registry pulumix.Input[*RegistryArgs] + // Existing images to include in the index. + Sources pulumix.Input[[]string] + // The tag to apply to the index. + Tag pulumix.Input[string] +} + +func (IndexArgs) ElementType() reflect.Type { + return reflect.TypeOf((*indexArgs)(nil)).Elem() +} + +type IndexOutput struct{ *pulumi.OutputState } + +func (IndexOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Index)(nil)).Elem() +} + +func (o IndexOutput) ToIndexOutput() IndexOutput { + return o +} + +func (o IndexOutput) ToIndexOutputWithContext(ctx context.Context) IndexOutput { + return o +} + +func (o IndexOutput) ToOutput(ctx context.Context) pulumix.Output[Index] { + return pulumix.Output[Index]{ + OutputState: o.OutputState, + } +} + +// If true, push the index to the target registry. +// +// Defaults to `true`. +func (o IndexOutput) Push() pulumix.Output[*bool] { + value := pulumix.Apply[Index](o, func(v Index) pulumix.Output[*bool] { return v.Push }) + return pulumix.Flatten[*bool, pulumix.Output[*bool]](value) +} + +// The pushed tag with digest. +// +// Identical to the tag if the index was not pushed. +func (o IndexOutput) Ref() pulumix.Output[string] { + value := pulumix.Apply[Index](o, func(v Index) pulumix.Output[string] { return v.Ref }) + return pulumix.Flatten[string, pulumix.Output[string]](value) +} + +// Authentication for the registry where the tagged index will be pushed. +// +// Credentials can also be included with the provider's configuration. +func (o IndexOutput) Registry() pulumix.GPtrOutput[Registry, RegistryOutput] { + value := pulumix.Apply[Index](o, func(v Index) pulumix.GPtrOutput[Registry, RegistryOutput] { return v.Registry }) + unwrapped := pulumix.Flatten[*Registry, pulumix.GPtrOutput[Registry, RegistryOutput]](value) + return pulumix.GPtrOutput[Registry, RegistryOutput]{OutputState: unwrapped.OutputState} +} + +// Existing images to include in the index. +func (o IndexOutput) Sources() pulumix.ArrayOutput[string] { + value := pulumix.Apply[Index](o, func(v Index) pulumix.ArrayOutput[string] { return v.Sources }) + unwrapped := pulumix.Flatten[[]string, pulumix.ArrayOutput[string]](value) + return pulumix.ArrayOutput[string]{OutputState: unwrapped.OutputState} +} + +// The tag to apply to the index. +func (o IndexOutput) Tag() pulumix.Output[string] { + value := pulumix.Apply[Index](o, func(v Index) pulumix.Output[string] { return v.Tag }) + return pulumix.Flatten[string, pulumix.Output[string]](value) +} + +func init() { + pulumi.RegisterOutputType(IndexOutput{}) +} diff --git a/sdk/go/dockerbuild/x/init.go b/sdk/go/dockerbuild/x/init.go new file mode 100644 index 0000000..33469af --- /dev/null +++ b/sdk/go/dockerbuild/x/init.go @@ -0,0 +1,68 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dockerbuild + +import ( + "fmt" + + "github.com/blang/semver" + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +) + +type module struct { + version semver.Version +} + +func (m *module) Version() semver.Version { + return m.version +} + +func (m *module) Construct(ctx *pulumi.Context, name, typ, urn string) (r pulumi.Resource, err error) { + switch typ { + case "docker-build:index:Image": + r = &Image{} + case "docker-build:index:Index": + r = &Index{} + default: + return nil, fmt.Errorf("unknown resource type: %s", typ) + } + + err = ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) + return +} + +type pkg struct { + version semver.Version +} + +func (p *pkg) Version() semver.Version { + return p.version +} + +func (p *pkg) ConstructProvider(ctx *pulumi.Context, name, typ, urn string) (pulumi.ProviderResource, error) { + if typ != "pulumi:providers:docker-build" { + return nil, fmt.Errorf("unknown provider type: %s", typ) + } + + r := &Provider{} + err := ctx.RegisterResource(typ, name, nil, r, pulumi.URN_(urn)) + return r, err +} + +func init() { + version, err := internal.PkgVersion() + if err != nil { + version = semver.Version{Major: 1} + } + pulumi.RegisterResourceModule( + "docker-build", + "index", + &module{version}, + ) + pulumi.RegisterResourcePackage( + "docker-build", + &pkg{version}, + ) +} diff --git a/sdk/go/dockerbuild/x/provider.go b/sdk/go/dockerbuild/x/provider.go new file mode 100644 index 0000000..f9c9b96 --- /dev/null +++ b/sdk/go/dockerbuild/x/provider.go @@ -0,0 +1,88 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dockerbuild + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +type Provider struct { + pulumi.ProviderResourceState + + // The build daemon's address. + Host pulumix.Output[*string] `pulumi:"host"` +} + +// NewProvider registers a new resource with the given unique name, arguments, and options. +func NewProvider(ctx *pulumi.Context, + name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error) { + if args == nil { + args = &ProviderArgs{} + } + + if args.Host == nil { + if d := internal.GetEnvOrDefault("", nil, "DOCKER_HOST"); d != nil { + args.Host = pulumix.Ptr(d.(string)) + } + } + opts = internal.PkgResourceDefaultOpts(opts) + var resource Provider + err := ctx.RegisterResource("pulumi:providers:docker-build", name, args, &resource, opts...) + if err != nil { + return nil, err + } + return &resource, nil +} + +type providerArgs struct { + // The build daemon's address. + Host *string `pulumi:"host"` + Registries []Registry `pulumi:"registries"` +} + +// The set of arguments for constructing a Provider resource. +type ProviderArgs struct { + // The build daemon's address. + Host pulumix.Input[*string] + Registries pulumix.Input[[]*RegistryArgs] +} + +func (ProviderArgs) ElementType() reflect.Type { + return reflect.TypeOf((*providerArgs)(nil)).Elem() +} + +type ProviderOutput struct{ *pulumi.OutputState } + +func (ProviderOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Provider)(nil)).Elem() +} + +func (o ProviderOutput) ToProviderOutput() ProviderOutput { + return o +} + +func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput { + return o +} + +func (o ProviderOutput) ToOutput(ctx context.Context) pulumix.Output[Provider] { + return pulumix.Output[Provider]{ + OutputState: o.OutputState, + } +} + +// The build daemon's address. +func (o ProviderOutput) Host() pulumix.Output[*string] { + value := pulumix.Apply[Provider](o, func(v Provider) pulumix.Output[*string] { return v.Host }) + return pulumix.Flatten[*string, pulumix.Output[*string]](value) +} + +func init() { + pulumi.RegisterOutputType(ProviderOutput{}) +} diff --git a/sdk/go/dockerbuild/x/pulumiEnums.go b/sdk/go/dockerbuild/x/pulumiEnums.go new file mode 100644 index 0000000..f034102 --- /dev/null +++ b/sdk/go/dockerbuild/x/pulumiEnums.go @@ -0,0 +1,68 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dockerbuild + +type CacheMode string + +const ( + // Only layers that are exported into the resulting image are cached. + CacheModeCacheModeMin = CacheMode("min") + // All layers are cached, even those of intermediate steps. + CacheModeCacheModeMax = CacheMode("max") +) + +type CompressionType string + +const ( + // Use `gzip` for compression. + CompressionTypeCompressionTypeGzip = CompressionType("gzip") + // Use `estargz` for compression. + CompressionTypeCompressionTypeEstargz = CompressionType("estargz") + // Use `zstd` for compression. + CompressionTypeCompressionTypeZstd = CompressionType("zstd") +) + +type NetworkMode string + +const ( + // The default sandbox network mode. + NetworkModeNetworkModeDefault = NetworkMode("default") + // Host network mode. + NetworkModeNetworkModeHost = NetworkMode("host") + // Disable network access. + NetworkModeNetworkModeNone = NetworkMode("none") +) + +type Platform string + +const ( + Platform_Platform_Darwin_386 = Platform("darwin/386") + Platform_Platform_Darwin_amd64 = Platform("darwin/amd64") + Platform_Platform_Darwin_arm = Platform("darwin/arm") + Platform_Platform_Darwin_arm64 = Platform("darwin/arm64") + Platform_Platform_Dragonfly_amd64 = Platform("dragonfly/amd64") + Platform_Platform_Freebsd_386 = Platform("freebsd/386") + Platform_Platform_Freebsd_amd64 = Platform("freebsd/amd64") + Platform_Platform_Freebsd_arm = Platform("freebsd/arm") + Platform_Platform_Linux_386 = Platform("linux/386") + Platform_Platform_Linux_amd64 = Platform("linux/amd64") + Platform_Platform_Linux_arm = Platform("linux/arm") + Platform_Platform_Linux_arm64 = Platform("linux/arm64") + Platform_Platform_Linux_mips64 = Platform("linux/mips64") + Platform_Platform_Linux_mips64le = Platform("linux/mips64le") + Platform_Platform_Linux_ppc64le = Platform("linux/ppc64le") + Platform_Platform_Linux_riscv64 = Platform("linux/riscv64") + Platform_Platform_Linux_s390x = Platform("linux/s390x") + Platform_Platform_Netbsd_386 = Platform("netbsd/386") + Platform_Platform_Netbsd_amd64 = Platform("netbsd/amd64") + Platform_Platform_Netbsd_arm = Platform("netbsd/arm") + Platform_Platform_Openbsd_386 = Platform("openbsd/386") + Platform_Platform_Openbsd_amd64 = Platform("openbsd/amd64") + Platform_Platform_Openbsd_arm = Platform("openbsd/arm") + Platform_Platform_Plan9_386 = Platform("plan9/386") + Platform_Platform_Plan9_amd64 = Platform("plan9/amd64") + Platform_Platform_Solaris_amd64 = Platform("solaris/amd64") + Platform_Platform_Windows_386 = Platform("windows/386") + Platform_Platform_Windows_amd64 = Platform("windows/amd64") +) diff --git a/sdk/go/dockerbuild/x/pulumiTypes.go b/sdk/go/dockerbuild/x/pulumiTypes.go new file mode 100644 index 0000000..6f4d693 --- /dev/null +++ b/sdk/go/dockerbuild/x/pulumiTypes.go @@ -0,0 +1,3413 @@ +// Code generated by pulumi-language-go DO NOT EDIT. +// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** + +package dockerbuild + +import ( + "context" + "reflect" + + "github.com/pulumi/pulumi-docker-build/sdk/go/dockerbuild/internal" + "github.com/pulumi/pulumi/sdk/v3/go/pulumi" + "github.com/pulumi/pulumi/sdk/v3/go/pulumix" +) + +var _ = internal.GetEnvOrDefault + +type BuildContext struct { + // Resources to use for build context. + // + // The location can be: + // * A relative or absolute path to a local directory (`.`, `./app`, + // `/app`, etc.). + // * A remote URL of a Git repository, tarball, or plain text file + // (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + // etc.). + Location string `pulumi:"location"` + // Additional build contexts to use. + // + // These contexts are accessed with `FROM name` or `--from=name` + // statements when using Dockerfile 1.4+ syntax. + // + // Values can be local paths, HTTP URLs, or `docker-image://` images. + Named map[string]*Context `pulumi:"named"` +} + +type BuildContextArgs struct { + // Resources to use for build context. + // + // The location can be: + // * A relative or absolute path to a local directory (`.`, `./app`, + // `/app`, etc.). + // * A remote URL of a Git repository, tarball, or plain text file + // (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + // etc.). + Location pulumix.Input[string] `pulumi:"location"` + // Additional build contexts to use. + // + // These contexts are accessed with `FROM name` or `--from=name` + // statements when using Dockerfile 1.4+ syntax. + // + // Values can be local paths, HTTP URLs, or `docker-image://` images. + Named pulumix.Input[map[string]*ContextArgs] `pulumi:"named"` +} + +func (BuildContextArgs) ElementType() reflect.Type { + return reflect.TypeOf((*BuildContext)(nil)).Elem() +} + +func (i BuildContextArgs) ToBuildContextOutput() BuildContextOutput { + return i.ToBuildContextOutputWithContext(context.Background()) +} + +func (i BuildContextArgs) ToBuildContextOutputWithContext(ctx context.Context) BuildContextOutput { + return pulumi.ToOutputWithContext(ctx, i).(BuildContextOutput) +} + +func (i *BuildContextArgs) ToOutput(ctx context.Context) pulumix.Output[*BuildContextArgs] { + return pulumix.Val(i) +} + +type BuildContextOutput struct{ *pulumi.OutputState } + +func (BuildContextOutput) ElementType() reflect.Type { + return reflect.TypeOf((*BuildContext)(nil)).Elem() +} + +func (o BuildContextOutput) ToBuildContextOutput() BuildContextOutput { + return o +} + +func (o BuildContextOutput) ToBuildContextOutputWithContext(ctx context.Context) BuildContextOutput { + return o +} + +func (o BuildContextOutput) ToOutput(ctx context.Context) pulumix.Output[BuildContext] { + return pulumix.Output[BuildContext]{ + OutputState: o.OutputState, + } +} + +// Resources to use for build context. +// +// The location can be: +// - A relative or absolute path to a local directory (`.`, `./app`, +// `/app`, etc.). +// - A remote URL of a Git repository, tarball, or plain text file +// (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, +// etc.). +func (o BuildContextOutput) Location() pulumix.Output[string] { + return pulumix.Apply[BuildContext](o, func(v BuildContext) string { return v.Location }) +} + +// Additional build contexts to use. +// +// These contexts are accessed with `FROM name` or `--from=name` +// statements when using Dockerfile 1.4+ syntax. +// +// Values can be local paths, HTTP URLs, or `docker-image://` images. +func (o BuildContextOutput) Named() pulumix.GMapOutput[Context, ContextOutput] { + value := pulumix.Apply[BuildContext](o, func(v BuildContext) map[string]*Context { return v.Named }) + return pulumix.GMapOutput[Context, ContextOutput]{OutputState: value.OutputState} +} + +type BuilderConfig struct { + // Name of an existing buildx builder to use. + // + // Only `docker-container`, `kubernetes`, or `remote` drivers are + // supported. The legacy `docker` driver is not supported. + // + // Equivalent to Docker's `--builder` flag. + Name *string `pulumi:"name"` +} + +type BuilderConfigArgs struct { + // Name of an existing buildx builder to use. + // + // Only `docker-container`, `kubernetes`, or `remote` drivers are + // supported. The legacy `docker` driver is not supported. + // + // Equivalent to Docker's `--builder` flag. + Name pulumix.Input[*string] `pulumi:"name"` +} + +func (BuilderConfigArgs) ElementType() reflect.Type { + return reflect.TypeOf((*BuilderConfig)(nil)).Elem() +} + +func (i BuilderConfigArgs) ToBuilderConfigOutput() BuilderConfigOutput { + return i.ToBuilderConfigOutputWithContext(context.Background()) +} + +func (i BuilderConfigArgs) ToBuilderConfigOutputWithContext(ctx context.Context) BuilderConfigOutput { + return pulumi.ToOutputWithContext(ctx, i).(BuilderConfigOutput) +} + +func (i *BuilderConfigArgs) ToOutput(ctx context.Context) pulumix.Output[*BuilderConfigArgs] { + return pulumix.Val(i) +} + +type BuilderConfigOutput struct{ *pulumi.OutputState } + +func (BuilderConfigOutput) ElementType() reflect.Type { + return reflect.TypeOf((*BuilderConfig)(nil)).Elem() +} + +func (o BuilderConfigOutput) ToBuilderConfigOutput() BuilderConfigOutput { + return o +} + +func (o BuilderConfigOutput) ToBuilderConfigOutputWithContext(ctx context.Context) BuilderConfigOutput { + return o +} + +func (o BuilderConfigOutput) ToOutput(ctx context.Context) pulumix.Output[BuilderConfig] { + return pulumix.Output[BuilderConfig]{ + OutputState: o.OutputState, + } +} + +// Name of an existing buildx builder to use. +// +// Only `docker-container`, `kubernetes`, or `remote` drivers are +// supported. The legacy `docker` driver is not supported. +// +// Equivalent to Docker's `--builder` flag. +func (o BuilderConfigOutput) Name() pulumix.Output[*string] { + return pulumix.Apply[BuilderConfig](o, func(v BuilderConfig) *string { return v.Name }) +} + +type CacheFrom struct { + // Upload build caches to Azure's blob storage service. + Azblob *CacheFromAzureBlob `pulumi:"azblob"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled *bool `pulumi:"disabled"` + // Recommended for use with GitHub Actions workflows. + // + // An action like `crazy-max/ghaction-github-runtime` is recommended to + // expose appropriate credentials to your GitHub workflow. + Gha *CacheFromGitHubActions `pulumi:"gha"` + // A simple backend which caches images on your local filesystem. + Local *CacheFromLocal `pulumi:"local"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=inline`). + Raw *string `pulumi:"raw"` + // Upload build caches to remote registries. + Registry *CacheFromRegistry `pulumi:"registry"` + // Upload build caches to AWS S3 or an S3-compatible services such as + // MinIO. + S3 *CacheFromS3 `pulumi:"s3"` +} + +// Defaults sets the appropriate defaults for CacheFrom +func (val *CacheFrom) Defaults() *CacheFrom { + if val == nil { + return nil + } + tmp := *val + tmp.Gha = tmp.Gha.Defaults() + + tmp.S3 = tmp.S3.Defaults() + + return &tmp +} + +type CacheFromArgs struct { + // Upload build caches to Azure's blob storage service. + Azblob pulumix.Input[*CacheFromAzureBlobArgs] `pulumi:"azblob"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled pulumix.Input[*bool] `pulumi:"disabled"` + // Recommended for use with GitHub Actions workflows. + // + // An action like `crazy-max/ghaction-github-runtime` is recommended to + // expose appropriate credentials to your GitHub workflow. + Gha pulumix.Input[*CacheFromGitHubActionsArgs] `pulumi:"gha"` + // A simple backend which caches images on your local filesystem. + Local pulumix.Input[*CacheFromLocalArgs] `pulumi:"local"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=inline`). + Raw pulumix.Input[*string] `pulumi:"raw"` + // Upload build caches to remote registries. + Registry pulumix.Input[*CacheFromRegistryArgs] `pulumi:"registry"` + // Upload build caches to AWS S3 or an S3-compatible services such as + // MinIO. + S3 pulumix.Input[*CacheFromS3Args] `pulumi:"s3"` +} + +// Defaults sets the appropriate defaults for CacheFromArgs +func (val *CacheFromArgs) Defaults() *CacheFromArgs { + if val == nil { + return nil + } + tmp := *val + + return &tmp +} +func (CacheFromArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFrom)(nil)).Elem() +} + +func (i CacheFromArgs) ToCacheFromOutput() CacheFromOutput { + return i.ToCacheFromOutputWithContext(context.Background()) +} + +func (i CacheFromArgs) ToCacheFromOutputWithContext(ctx context.Context) CacheFromOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromOutput) +} + +func (i *CacheFromArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheFromArgs] { + return pulumix.Val(i) +} + +type CacheFromOutput struct{ *pulumi.OutputState } + +func (CacheFromOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFrom)(nil)).Elem() +} + +func (o CacheFromOutput) ToCacheFromOutput() CacheFromOutput { + return o +} + +func (o CacheFromOutput) ToCacheFromOutputWithContext(ctx context.Context) CacheFromOutput { + return o +} + +func (o CacheFromOutput) ToOutput(ctx context.Context) pulumix.Output[CacheFrom] { + return pulumix.Output[CacheFrom]{ + OutputState: o.OutputState, + } +} + +// Upload build caches to Azure's blob storage service. +func (o CacheFromOutput) Azblob() pulumix.GPtrOutput[CacheFromAzureBlob, CacheFromAzureBlobOutput] { + value := pulumix.Apply[CacheFrom](o, func(v CacheFrom) *CacheFromAzureBlob { return v.Azblob }) + return pulumix.GPtrOutput[CacheFromAzureBlob, CacheFromAzureBlobOutput]{OutputState: value.OutputState} +} + +// When `true` this entry will be excluded. Defaults to `false`. +func (o CacheFromOutput) Disabled() pulumix.Output[*bool] { + return pulumix.Apply[CacheFrom](o, func(v CacheFrom) *bool { return v.Disabled }) +} + +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to +// expose appropriate credentials to your GitHub workflow. +func (o CacheFromOutput) Gha() pulumix.GPtrOutput[CacheFromGitHubActions, CacheFromGitHubActionsOutput] { + value := pulumix.Apply[CacheFrom](o, func(v CacheFrom) *CacheFromGitHubActions { return v.Gha }) + return pulumix.GPtrOutput[CacheFromGitHubActions, CacheFromGitHubActionsOutput]{OutputState: value.OutputState} +} + +// A simple backend which caches images on your local filesystem. +func (o CacheFromOutput) Local() pulumix.GPtrOutput[CacheFromLocal, CacheFromLocalOutput] { + value := pulumix.Apply[CacheFrom](o, func(v CacheFrom) *CacheFromLocal { return v.Local }) + return pulumix.GPtrOutput[CacheFromLocal, CacheFromLocalOutput]{OutputState: value.OutputState} +} + +// A raw string as you would provide it to the Docker CLI (e.g., +// `type=inline`). +func (o CacheFromOutput) Raw() pulumix.Output[*string] { + return pulumix.Apply[CacheFrom](o, func(v CacheFrom) *string { return v.Raw }) +} + +// Upload build caches to remote registries. +func (o CacheFromOutput) Registry() pulumix.GPtrOutput[CacheFromRegistry, CacheFromRegistryOutput] { + value := pulumix.Apply[CacheFrom](o, func(v CacheFrom) *CacheFromRegistry { return v.Registry }) + return pulumix.GPtrOutput[CacheFromRegistry, CacheFromRegistryOutput]{OutputState: value.OutputState} +} + +// Upload build caches to AWS S3 or an S3-compatible services such as +// MinIO. +func (o CacheFromOutput) S3() pulumix.GPtrOutput[CacheFromS3, CacheFromS3Output] { + value := pulumix.Apply[CacheFrom](o, func(v CacheFrom) *CacheFromS3 { return v.S3 }) + return pulumix.GPtrOutput[CacheFromS3, CacheFromS3Output]{OutputState: value.OutputState} +} + +type CacheFromAzureBlob struct { + // Base URL of the storage account. + AccountUrl *string `pulumi:"accountUrl"` + // The name of the cache image. + Name string `pulumi:"name"` + // Blob storage account key. + SecretAccessKey *string `pulumi:"secretAccessKey"` +} + +type CacheFromAzureBlobArgs struct { + // Base URL of the storage account. + AccountUrl pulumix.Input[*string] `pulumi:"accountUrl"` + // The name of the cache image. + Name pulumix.Input[string] `pulumi:"name"` + // Blob storage account key. + SecretAccessKey pulumix.Input[*string] `pulumi:"secretAccessKey"` +} + +func (CacheFromAzureBlobArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromAzureBlob)(nil)).Elem() +} + +func (i CacheFromAzureBlobArgs) ToCacheFromAzureBlobOutput() CacheFromAzureBlobOutput { + return i.ToCacheFromAzureBlobOutputWithContext(context.Background()) +} + +func (i CacheFromAzureBlobArgs) ToCacheFromAzureBlobOutputWithContext(ctx context.Context) CacheFromAzureBlobOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromAzureBlobOutput) +} + +func (i *CacheFromAzureBlobArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheFromAzureBlobArgs] { + return pulumix.Val(i) +} + +type CacheFromAzureBlobOutput struct{ *pulumi.OutputState } + +func (CacheFromAzureBlobOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromAzureBlob)(nil)).Elem() +} + +func (o CacheFromAzureBlobOutput) ToCacheFromAzureBlobOutput() CacheFromAzureBlobOutput { + return o +} + +func (o CacheFromAzureBlobOutput) ToCacheFromAzureBlobOutputWithContext(ctx context.Context) CacheFromAzureBlobOutput { + return o +} + +func (o CacheFromAzureBlobOutput) ToOutput(ctx context.Context) pulumix.Output[CacheFromAzureBlob] { + return pulumix.Output[CacheFromAzureBlob]{ + OutputState: o.OutputState, + } +} + +// Base URL of the storage account. +func (o CacheFromAzureBlobOutput) AccountUrl() pulumix.Output[*string] { + return pulumix.Apply[CacheFromAzureBlob](o, func(v CacheFromAzureBlob) *string { return v.AccountUrl }) +} + +// The name of the cache image. +func (o CacheFromAzureBlobOutput) Name() pulumix.Output[string] { + return pulumix.Apply[CacheFromAzureBlob](o, func(v CacheFromAzureBlob) string { return v.Name }) +} + +// Blob storage account key. +func (o CacheFromAzureBlobOutput) SecretAccessKey() pulumix.Output[*string] { + return pulumix.Apply[CacheFromAzureBlob](o, func(v CacheFromAzureBlob) *string { return v.SecretAccessKey }) +} + +type CacheFromGitHubActions struct { + // The scope to use for cache keys. Defaults to `buildkit`. + // + // This should be set if building and caching multiple images in one + // workflow, otherwise caches will overwrite each other. + Scope *string `pulumi:"scope"` + // The GitHub Actions token to use. This is not a personal access tokens + // and is typically generated automatically as part of each job. + // + // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Token *string `pulumi:"token"` + // The cache server URL to use for artifacts. + // + // Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Url *string `pulumi:"url"` +} + +// Defaults sets the appropriate defaults for CacheFromGitHubActions +func (val *CacheFromGitHubActions) Defaults() *CacheFromGitHubActions { + if val == nil { + return nil + } + tmp := *val + if tmp.Scope == nil { + if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil { + scope_ := d.(string) + tmp.Scope = &scope_ + } + } + if tmp.Token == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { + token_ := d.(string) + tmp.Token = &token_ + } + } + if tmp.Url == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil { + url_ := d.(string) + tmp.Url = &url_ + } + } + return &tmp +} + +type CacheFromGitHubActionsArgs struct { + // The scope to use for cache keys. Defaults to `buildkit`. + // + // This should be set if building and caching multiple images in one + // workflow, otherwise caches will overwrite each other. + Scope pulumix.Input[*string] `pulumi:"scope"` + // The GitHub Actions token to use. This is not a personal access tokens + // and is typically generated automatically as part of each job. + // + // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Token pulumix.Input[*string] `pulumi:"token"` + // The cache server URL to use for artifacts. + // + // Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Url pulumix.Input[*string] `pulumi:"url"` +} + +// Defaults sets the appropriate defaults for CacheFromGitHubActionsArgs +func (val *CacheFromGitHubActionsArgs) Defaults() *CacheFromGitHubActionsArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Scope == nil { + if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil { + tmp.Scope = pulumix.Ptr(d.(string)) + } + } + if tmp.Token == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { + tmp.Token = pulumix.Ptr(d.(string)) + } + } + if tmp.Url == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil { + tmp.Url = pulumix.Ptr(d.(string)) + } + } + return &tmp +} +func (CacheFromGitHubActionsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromGitHubActions)(nil)).Elem() +} + +func (i CacheFromGitHubActionsArgs) ToCacheFromGitHubActionsOutput() CacheFromGitHubActionsOutput { + return i.ToCacheFromGitHubActionsOutputWithContext(context.Background()) +} + +func (i CacheFromGitHubActionsArgs) ToCacheFromGitHubActionsOutputWithContext(ctx context.Context) CacheFromGitHubActionsOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromGitHubActionsOutput) +} + +func (i *CacheFromGitHubActionsArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheFromGitHubActionsArgs] { + return pulumix.Val(i) +} + +type CacheFromGitHubActionsOutput struct{ *pulumi.OutputState } + +func (CacheFromGitHubActionsOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromGitHubActions)(nil)).Elem() +} + +func (o CacheFromGitHubActionsOutput) ToCacheFromGitHubActionsOutput() CacheFromGitHubActionsOutput { + return o +} + +func (o CacheFromGitHubActionsOutput) ToCacheFromGitHubActionsOutputWithContext(ctx context.Context) CacheFromGitHubActionsOutput { + return o +} + +func (o CacheFromGitHubActionsOutput) ToOutput(ctx context.Context) pulumix.Output[CacheFromGitHubActions] { + return pulumix.Output[CacheFromGitHubActions]{ + OutputState: o.OutputState, + } +} + +// The scope to use for cache keys. Defaults to `buildkit`. +// +// This should be set if building and caching multiple images in one +// workflow, otherwise caches will overwrite each other. +func (o CacheFromGitHubActionsOutput) Scope() pulumix.Output[*string] { + return pulumix.Apply[CacheFromGitHubActions](o, func(v CacheFromGitHubActions) *string { return v.Scope }) +} + +// The GitHub Actions token to use. This is not a personal access tokens +// and is typically generated automatically as part of each job. +// +// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheFromGitHubActionsOutput) Token() pulumix.Output[*string] { + return pulumix.Apply[CacheFromGitHubActions](o, func(v CacheFromGitHubActions) *string { return v.Token }) +} + +// The cache server URL to use for artifacts. +// +// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheFromGitHubActionsOutput) Url() pulumix.Output[*string] { + return pulumix.Apply[CacheFromGitHubActions](o, func(v CacheFromGitHubActions) *string { return v.Url }) +} + +type CacheFromLocal struct { + // Digest of manifest to import. + Digest *string `pulumi:"digest"` + // Path of the local directory where cache gets imported from. + Src string `pulumi:"src"` +} + +type CacheFromLocalArgs struct { + // Digest of manifest to import. + Digest pulumix.Input[*string] `pulumi:"digest"` + // Path of the local directory where cache gets imported from. + Src pulumix.Input[string] `pulumi:"src"` +} + +func (CacheFromLocalArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromLocal)(nil)).Elem() +} + +func (i CacheFromLocalArgs) ToCacheFromLocalOutput() CacheFromLocalOutput { + return i.ToCacheFromLocalOutputWithContext(context.Background()) +} + +func (i CacheFromLocalArgs) ToCacheFromLocalOutputWithContext(ctx context.Context) CacheFromLocalOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromLocalOutput) +} + +func (i *CacheFromLocalArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheFromLocalArgs] { + return pulumix.Val(i) +} + +type CacheFromLocalOutput struct{ *pulumi.OutputState } + +func (CacheFromLocalOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromLocal)(nil)).Elem() +} + +func (o CacheFromLocalOutput) ToCacheFromLocalOutput() CacheFromLocalOutput { + return o +} + +func (o CacheFromLocalOutput) ToCacheFromLocalOutputWithContext(ctx context.Context) CacheFromLocalOutput { + return o +} + +func (o CacheFromLocalOutput) ToOutput(ctx context.Context) pulumix.Output[CacheFromLocal] { + return pulumix.Output[CacheFromLocal]{ + OutputState: o.OutputState, + } +} + +// Digest of manifest to import. +func (o CacheFromLocalOutput) Digest() pulumix.Output[*string] { + return pulumix.Apply[CacheFromLocal](o, func(v CacheFromLocal) *string { return v.Digest }) +} + +// Path of the local directory where cache gets imported from. +func (o CacheFromLocalOutput) Src() pulumix.Output[string] { + return pulumix.Apply[CacheFromLocal](o, func(v CacheFromLocal) string { return v.Src }) +} + +type CacheFromRegistry struct { + // Fully qualified name of the cache image to import. + Ref string `pulumi:"ref"` +} + +type CacheFromRegistryArgs struct { + // Fully qualified name of the cache image to import. + Ref pulumix.Input[string] `pulumi:"ref"` +} + +func (CacheFromRegistryArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromRegistry)(nil)).Elem() +} + +func (i CacheFromRegistryArgs) ToCacheFromRegistryOutput() CacheFromRegistryOutput { + return i.ToCacheFromRegistryOutputWithContext(context.Background()) +} + +func (i CacheFromRegistryArgs) ToCacheFromRegistryOutputWithContext(ctx context.Context) CacheFromRegistryOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromRegistryOutput) +} + +func (i *CacheFromRegistryArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheFromRegistryArgs] { + return pulumix.Val(i) +} + +type CacheFromRegistryOutput struct{ *pulumi.OutputState } + +func (CacheFromRegistryOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromRegistry)(nil)).Elem() +} + +func (o CacheFromRegistryOutput) ToCacheFromRegistryOutput() CacheFromRegistryOutput { + return o +} + +func (o CacheFromRegistryOutput) ToCacheFromRegistryOutputWithContext(ctx context.Context) CacheFromRegistryOutput { + return o +} + +func (o CacheFromRegistryOutput) ToOutput(ctx context.Context) pulumix.Output[CacheFromRegistry] { + return pulumix.Output[CacheFromRegistry]{ + OutputState: o.OutputState, + } +} + +// Fully qualified name of the cache image to import. +func (o CacheFromRegistryOutput) Ref() pulumix.Output[string] { + return pulumix.Apply[CacheFromRegistry](o, func(v CacheFromRegistry) string { return v.Ref }) +} + +type CacheFromS3 struct { + // Defaults to `$AWS_ACCESS_KEY_ID`. + AccessKeyId *string `pulumi:"accessKeyId"` + // Prefix to prepend to blob filenames. + BlobsPrefix *string `pulumi:"blobsPrefix"` + // Name of the S3 bucket. + Bucket string `pulumi:"bucket"` + // Endpoint of the S3 bucket. + EndpointUrl *string `pulumi:"endpointUrl"` + // Prefix to prepend on manifest filenames. + ManifestsPrefix *string `pulumi:"manifestsPrefix"` + // Name of the cache image. + Name *string `pulumi:"name"` + // The geographic location of the bucket. Defaults to `$AWS_REGION`. + Region string `pulumi:"region"` + // Defaults to `$AWS_SECRET_ACCESS_KEY`. + SecretAccessKey *string `pulumi:"secretAccessKey"` + // Defaults to `$AWS_SESSION_TOKEN`. + SessionToken *string `pulumi:"sessionToken"` + // Uses `bucket` in the URL instead of hostname when `true`. + UsePathStyle *bool `pulumi:"usePathStyle"` +} + +// Defaults sets the appropriate defaults for CacheFromS3 +func (val *CacheFromS3) Defaults() *CacheFromS3 { + if val == nil { + return nil + } + tmp := *val + if tmp.AccessKeyId == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_ACCESS_KEY_ID"); d != nil { + accessKeyId_ := d.(string) + tmp.AccessKeyId = &accessKeyId_ + } + } + if internal.IsZero(tmp.Region) { + if d := internal.GetEnvOrDefault("", nil, "AWS_REGION"); d != nil { + tmp.Region = d.(string) + } + } + if tmp.SecretAccessKey == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SECRET_ACCESS_KEY"); d != nil { + secretAccessKey_ := d.(string) + tmp.SecretAccessKey = &secretAccessKey_ + } + } + if tmp.SessionToken == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SESSION_TOKEN"); d != nil { + sessionToken_ := d.(string) + tmp.SessionToken = &sessionToken_ + } + } + return &tmp +} + +type CacheFromS3Args struct { + // Defaults to `$AWS_ACCESS_KEY_ID`. + AccessKeyId pulumix.Input[*string] `pulumi:"accessKeyId"` + // Prefix to prepend to blob filenames. + BlobsPrefix pulumix.Input[*string] `pulumi:"blobsPrefix"` + // Name of the S3 bucket. + Bucket pulumix.Input[string] `pulumi:"bucket"` + // Endpoint of the S3 bucket. + EndpointUrl pulumix.Input[*string] `pulumi:"endpointUrl"` + // Prefix to prepend on manifest filenames. + ManifestsPrefix pulumix.Input[*string] `pulumi:"manifestsPrefix"` + // Name of the cache image. + Name pulumix.Input[*string] `pulumi:"name"` + // The geographic location of the bucket. Defaults to `$AWS_REGION`. + Region pulumix.Input[string] `pulumi:"region"` + // Defaults to `$AWS_SECRET_ACCESS_KEY`. + SecretAccessKey pulumix.Input[*string] `pulumi:"secretAccessKey"` + // Defaults to `$AWS_SESSION_TOKEN`. + SessionToken pulumix.Input[*string] `pulumi:"sessionToken"` + // Uses `bucket` in the URL instead of hostname when `true`. + UsePathStyle pulumix.Input[*bool] `pulumi:"usePathStyle"` +} + +// Defaults sets the appropriate defaults for CacheFromS3Args +func (val *CacheFromS3Args) Defaults() *CacheFromS3Args { + if val == nil { + return nil + } + tmp := *val + if tmp.AccessKeyId == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_ACCESS_KEY_ID"); d != nil { + tmp.AccessKeyId = pulumix.Ptr(d.(string)) + } + } + if tmp.Region == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_REGION"); d != nil { + tmp.Region = pulumix.Val(d.(string)) + } + } + if tmp.SecretAccessKey == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SECRET_ACCESS_KEY"); d != nil { + tmp.SecretAccessKey = pulumix.Ptr(d.(string)) + } + } + if tmp.SessionToken == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SESSION_TOKEN"); d != nil { + tmp.SessionToken = pulumix.Ptr(d.(string)) + } + } + return &tmp +} +func (CacheFromS3Args) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromS3)(nil)).Elem() +} + +func (i CacheFromS3Args) ToCacheFromS3Output() CacheFromS3Output { + return i.ToCacheFromS3OutputWithContext(context.Background()) +} + +func (i CacheFromS3Args) ToCacheFromS3OutputWithContext(ctx context.Context) CacheFromS3Output { + return pulumi.ToOutputWithContext(ctx, i).(CacheFromS3Output) +} + +func (i *CacheFromS3Args) ToOutput(ctx context.Context) pulumix.Output[*CacheFromS3Args] { + return pulumix.Val(i) +} + +type CacheFromS3Output struct{ *pulumi.OutputState } + +func (CacheFromS3Output) ElementType() reflect.Type { + return reflect.TypeOf((*CacheFromS3)(nil)).Elem() +} + +func (o CacheFromS3Output) ToCacheFromS3Output() CacheFromS3Output { + return o +} + +func (o CacheFromS3Output) ToCacheFromS3OutputWithContext(ctx context.Context) CacheFromS3Output { + return o +} + +func (o CacheFromS3Output) ToOutput(ctx context.Context) pulumix.Output[CacheFromS3] { + return pulumix.Output[CacheFromS3]{ + OutputState: o.OutputState, + } +} + +// Defaults to `$AWS_ACCESS_KEY_ID`. +func (o CacheFromS3Output) AccessKeyId() pulumix.Output[*string] { + return pulumix.Apply[CacheFromS3](o, func(v CacheFromS3) *string { return v.AccessKeyId }) +} + +// Prefix to prepend to blob filenames. +func (o CacheFromS3Output) BlobsPrefix() pulumix.Output[*string] { + return pulumix.Apply[CacheFromS3](o, func(v CacheFromS3) *string { return v.BlobsPrefix }) +} + +// Name of the S3 bucket. +func (o CacheFromS3Output) Bucket() pulumix.Output[string] { + return pulumix.Apply[CacheFromS3](o, func(v CacheFromS3) string { return v.Bucket }) +} + +// Endpoint of the S3 bucket. +func (o CacheFromS3Output) EndpointUrl() pulumix.Output[*string] { + return pulumix.Apply[CacheFromS3](o, func(v CacheFromS3) *string { return v.EndpointUrl }) +} + +// Prefix to prepend on manifest filenames. +func (o CacheFromS3Output) ManifestsPrefix() pulumix.Output[*string] { + return pulumix.Apply[CacheFromS3](o, func(v CacheFromS3) *string { return v.ManifestsPrefix }) +} + +// Name of the cache image. +func (o CacheFromS3Output) Name() pulumix.Output[*string] { + return pulumix.Apply[CacheFromS3](o, func(v CacheFromS3) *string { return v.Name }) +} + +// The geographic location of the bucket. Defaults to `$AWS_REGION`. +func (o CacheFromS3Output) Region() pulumix.Output[string] { + return pulumix.Apply[CacheFromS3](o, func(v CacheFromS3) string { return v.Region }) +} + +// Defaults to `$AWS_SECRET_ACCESS_KEY`. +func (o CacheFromS3Output) SecretAccessKey() pulumix.Output[*string] { + return pulumix.Apply[CacheFromS3](o, func(v CacheFromS3) *string { return v.SecretAccessKey }) +} + +// Defaults to `$AWS_SESSION_TOKEN`. +func (o CacheFromS3Output) SessionToken() pulumix.Output[*string] { + return pulumix.Apply[CacheFromS3](o, func(v CacheFromS3) *string { return v.SessionToken }) +} + +// Uses `bucket` in the URL instead of hostname when `true`. +func (o CacheFromS3Output) UsePathStyle() pulumix.Output[*bool] { + return pulumix.Apply[CacheFromS3](o, func(v CacheFromS3) *bool { return v.UsePathStyle }) +} + +type CacheTo struct { + // Push cache to Azure's blob storage service. + Azblob *CacheToAzureBlob `pulumi:"azblob"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled *bool `pulumi:"disabled"` + // Recommended for use with GitHub Actions workflows. + // + // An action like `crazy-max/ghaction-github-runtime` is recommended to + // expose appropriate credentials to your GitHub workflow. + Gha *CacheToGitHubActions `pulumi:"gha"` + // The inline cache storage backend is the simplest implementation to get + // started with, but it does not handle multi-stage builds. Consider the + // `registry` cache backend instead. + Inline *CacheToInline `pulumi:"inline"` + // A simple backend which caches imagines on your local filesystem. + Local *CacheToLocal `pulumi:"local"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=inline`) + Raw *string `pulumi:"raw"` + // Push caches to remote registries. Incompatible with the `docker` build + // driver. + Registry *CacheToRegistry `pulumi:"registry"` + // Push cache to AWS S3 or S3-compatible services such as MinIO. + S3 *CacheToS3 `pulumi:"s3"` +} + +// Defaults sets the appropriate defaults for CacheTo +func (val *CacheTo) Defaults() *CacheTo { + if val == nil { + return nil + } + tmp := *val + tmp.Azblob = tmp.Azblob.Defaults() + + tmp.Gha = tmp.Gha.Defaults() + + tmp.Local = tmp.Local.Defaults() + + tmp.Registry = tmp.Registry.Defaults() + + tmp.S3 = tmp.S3.Defaults() + + return &tmp +} + +type CacheToArgs struct { + // Push cache to Azure's blob storage service. + Azblob pulumix.Input[*CacheToAzureBlobArgs] `pulumi:"azblob"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled pulumix.Input[*bool] `pulumi:"disabled"` + // Recommended for use with GitHub Actions workflows. + // + // An action like `crazy-max/ghaction-github-runtime` is recommended to + // expose appropriate credentials to your GitHub workflow. + Gha pulumix.Input[*CacheToGitHubActionsArgs] `pulumi:"gha"` + // The inline cache storage backend is the simplest implementation to get + // started with, but it does not handle multi-stage builds. Consider the + // `registry` cache backend instead. + Inline pulumix.Input[*CacheToInlineArgs] `pulumi:"inline"` + // A simple backend which caches imagines on your local filesystem. + Local pulumix.Input[*CacheToLocalArgs] `pulumi:"local"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=inline`) + Raw pulumix.Input[*string] `pulumi:"raw"` + // Push caches to remote registries. Incompatible with the `docker` build + // driver. + Registry pulumix.Input[*CacheToRegistryArgs] `pulumi:"registry"` + // Push cache to AWS S3 or S3-compatible services such as MinIO. + S3 pulumix.Input[*CacheToS3Args] `pulumi:"s3"` +} + +// Defaults sets the appropriate defaults for CacheToArgs +func (val *CacheToArgs) Defaults() *CacheToArgs { + if val == nil { + return nil + } + tmp := *val + + return &tmp +} +func (CacheToArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheTo)(nil)).Elem() +} + +func (i CacheToArgs) ToCacheToOutput() CacheToOutput { + return i.ToCacheToOutputWithContext(context.Background()) +} + +func (i CacheToArgs) ToCacheToOutputWithContext(ctx context.Context) CacheToOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToOutput) +} + +func (i *CacheToArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheToArgs] { + return pulumix.Val(i) +} + +type CacheToOutput struct{ *pulumi.OutputState } + +func (CacheToOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheTo)(nil)).Elem() +} + +func (o CacheToOutput) ToCacheToOutput() CacheToOutput { + return o +} + +func (o CacheToOutput) ToCacheToOutputWithContext(ctx context.Context) CacheToOutput { + return o +} + +func (o CacheToOutput) ToOutput(ctx context.Context) pulumix.Output[CacheTo] { + return pulumix.Output[CacheTo]{ + OutputState: o.OutputState, + } +} + +// Push cache to Azure's blob storage service. +func (o CacheToOutput) Azblob() pulumix.GPtrOutput[CacheToAzureBlob, CacheToAzureBlobOutput] { + value := pulumix.Apply[CacheTo](o, func(v CacheTo) *CacheToAzureBlob { return v.Azblob }) + return pulumix.GPtrOutput[CacheToAzureBlob, CacheToAzureBlobOutput]{OutputState: value.OutputState} +} + +// When `true` this entry will be excluded. Defaults to `false`. +func (o CacheToOutput) Disabled() pulumix.Output[*bool] { + return pulumix.Apply[CacheTo](o, func(v CacheTo) *bool { return v.Disabled }) +} + +// Recommended for use with GitHub Actions workflows. +// +// An action like `crazy-max/ghaction-github-runtime` is recommended to +// expose appropriate credentials to your GitHub workflow. +func (o CacheToOutput) Gha() pulumix.GPtrOutput[CacheToGitHubActions, CacheToGitHubActionsOutput] { + value := pulumix.Apply[CacheTo](o, func(v CacheTo) *CacheToGitHubActions { return v.Gha }) + return pulumix.GPtrOutput[CacheToGitHubActions, CacheToGitHubActionsOutput]{OutputState: value.OutputState} +} + +// The inline cache storage backend is the simplest implementation to get +// started with, but it does not handle multi-stage builds. Consider the +// `registry` cache backend instead. +func (o CacheToOutput) Inline() pulumix.GPtrOutput[CacheToInline, CacheToInlineOutput] { + value := pulumix.Apply[CacheTo](o, func(v CacheTo) *CacheToInline { return v.Inline }) + return pulumix.GPtrOutput[CacheToInline, CacheToInlineOutput]{OutputState: value.OutputState} +} + +// A simple backend which caches imagines on your local filesystem. +func (o CacheToOutput) Local() pulumix.GPtrOutput[CacheToLocal, CacheToLocalOutput] { + value := pulumix.Apply[CacheTo](o, func(v CacheTo) *CacheToLocal { return v.Local }) + return pulumix.GPtrOutput[CacheToLocal, CacheToLocalOutput]{OutputState: value.OutputState} +} + +// A raw string as you would provide it to the Docker CLI (e.g., +// `type=inline`) +func (o CacheToOutput) Raw() pulumix.Output[*string] { + return pulumix.Apply[CacheTo](o, func(v CacheTo) *string { return v.Raw }) +} + +// Push caches to remote registries. Incompatible with the `docker` build +// driver. +func (o CacheToOutput) Registry() pulumix.GPtrOutput[CacheToRegistry, CacheToRegistryOutput] { + value := pulumix.Apply[CacheTo](o, func(v CacheTo) *CacheToRegistry { return v.Registry }) + return pulumix.GPtrOutput[CacheToRegistry, CacheToRegistryOutput]{OutputState: value.OutputState} +} + +// Push cache to AWS S3 or S3-compatible services such as MinIO. +func (o CacheToOutput) S3() pulumix.GPtrOutput[CacheToS3, CacheToS3Output] { + value := pulumix.Apply[CacheTo](o, func(v CacheTo) *CacheToS3 { return v.S3 }) + return pulumix.GPtrOutput[CacheToS3, CacheToS3Output]{OutputState: value.OutputState} +} + +type CacheToAzureBlob struct { + // Base URL of the storage account. + AccountUrl *string `pulumi:"accountUrl"` + // Ignore errors caused by failed cache exports. + IgnoreError *bool `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode *CacheMode `pulumi:"mode"` + // The name of the cache image. + Name string `pulumi:"name"` + // Blob storage account key. + SecretAccessKey *string `pulumi:"secretAccessKey"` +} + +// Defaults sets the appropriate defaults for CacheToAzureBlob +func (val *CacheToAzureBlob) Defaults() *CacheToAzureBlob { + if val == nil { + return nil + } + tmp := *val + if tmp.IgnoreError == nil { + ignoreError_ := false + tmp.IgnoreError = &ignoreError_ + } + if tmp.Mode == nil { + mode_ := CacheMode("min") + tmp.Mode = &mode_ + } + return &tmp +} + +type CacheToAzureBlobArgs struct { + // Base URL of the storage account. + AccountUrl pulumix.Input[*string] `pulumi:"accountUrl"` + // Ignore errors caused by failed cache exports. + IgnoreError pulumix.Input[*bool] `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode pulumix.Input[*CacheMode] `pulumi:"mode"` + // The name of the cache image. + Name pulumix.Input[string] `pulumi:"name"` + // Blob storage account key. + SecretAccessKey pulumix.Input[*string] `pulumi:"secretAccessKey"` +} + +// Defaults sets the appropriate defaults for CacheToAzureBlobArgs +func (val *CacheToAzureBlobArgs) Defaults() *CacheToAzureBlobArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.IgnoreError == nil { + tmp.IgnoreError = pulumix.Ptr(false) + } + if tmp.Mode == nil { + tmp.Mode = pulumix.Ptr(CacheMode("min")) + } + return &tmp +} +func (CacheToAzureBlobArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToAzureBlob)(nil)).Elem() +} + +func (i CacheToAzureBlobArgs) ToCacheToAzureBlobOutput() CacheToAzureBlobOutput { + return i.ToCacheToAzureBlobOutputWithContext(context.Background()) +} + +func (i CacheToAzureBlobArgs) ToCacheToAzureBlobOutputWithContext(ctx context.Context) CacheToAzureBlobOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToAzureBlobOutput) +} + +func (i *CacheToAzureBlobArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheToAzureBlobArgs] { + return pulumix.Val(i) +} + +type CacheToAzureBlobOutput struct{ *pulumi.OutputState } + +func (CacheToAzureBlobOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToAzureBlob)(nil)).Elem() +} + +func (o CacheToAzureBlobOutput) ToCacheToAzureBlobOutput() CacheToAzureBlobOutput { + return o +} + +func (o CacheToAzureBlobOutput) ToCacheToAzureBlobOutputWithContext(ctx context.Context) CacheToAzureBlobOutput { + return o +} + +func (o CacheToAzureBlobOutput) ToOutput(ctx context.Context) pulumix.Output[CacheToAzureBlob] { + return pulumix.Output[CacheToAzureBlob]{ + OutputState: o.OutputState, + } +} + +// Base URL of the storage account. +func (o CacheToAzureBlobOutput) AccountUrl() pulumix.Output[*string] { + return pulumix.Apply[CacheToAzureBlob](o, func(v CacheToAzureBlob) *string { return v.AccountUrl }) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToAzureBlobOutput) IgnoreError() pulumix.Output[*bool] { + return pulumix.Apply[CacheToAzureBlob](o, func(v CacheToAzureBlob) *bool { return v.IgnoreError }) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToAzureBlobOutput) Mode() pulumix.Output[*CacheMode] { + return pulumix.Apply[CacheToAzureBlob](o, func(v CacheToAzureBlob) *CacheMode { return v.Mode }) +} + +// The name of the cache image. +func (o CacheToAzureBlobOutput) Name() pulumix.Output[string] { + return pulumix.Apply[CacheToAzureBlob](o, func(v CacheToAzureBlob) string { return v.Name }) +} + +// Blob storage account key. +func (o CacheToAzureBlobOutput) SecretAccessKey() pulumix.Output[*string] { + return pulumix.Apply[CacheToAzureBlob](o, func(v CacheToAzureBlob) *string { return v.SecretAccessKey }) +} + +type CacheToGitHubActions struct { + // Ignore errors caused by failed cache exports. + IgnoreError *bool `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode *CacheMode `pulumi:"mode"` + // The scope to use for cache keys. Defaults to `buildkit`. + // + // This should be set if building and caching multiple images in one + // workflow, otherwise caches will overwrite each other. + Scope *string `pulumi:"scope"` + // The GitHub Actions token to use. This is not a personal access tokens + // and is typically generated automatically as part of each job. + // + // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Token *string `pulumi:"token"` + // The cache server URL to use for artifacts. + // + // Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Url *string `pulumi:"url"` +} + +// Defaults sets the appropriate defaults for CacheToGitHubActions +func (val *CacheToGitHubActions) Defaults() *CacheToGitHubActions { + if val == nil { + return nil + } + tmp := *val + if tmp.IgnoreError == nil { + ignoreError_ := false + tmp.IgnoreError = &ignoreError_ + } + if tmp.Mode == nil { + mode_ := CacheMode("min") + tmp.Mode = &mode_ + } + if tmp.Scope == nil { + if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil { + scope_ := d.(string) + tmp.Scope = &scope_ + } + } + if tmp.Token == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { + token_ := d.(string) + tmp.Token = &token_ + } + } + if tmp.Url == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil { + url_ := d.(string) + tmp.Url = &url_ + } + } + return &tmp +} + +type CacheToGitHubActionsArgs struct { + // Ignore errors caused by failed cache exports. + IgnoreError pulumix.Input[*bool] `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode pulumix.Input[*CacheMode] `pulumi:"mode"` + // The scope to use for cache keys. Defaults to `buildkit`. + // + // This should be set if building and caching multiple images in one + // workflow, otherwise caches will overwrite each other. + Scope pulumix.Input[*string] `pulumi:"scope"` + // The GitHub Actions token to use. This is not a personal access tokens + // and is typically generated automatically as part of each job. + // + // Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Token pulumix.Input[*string] `pulumi:"token"` + // The cache server URL to use for artifacts. + // + // Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + // `crazy-max/ghaction-github-runtime` is recommended to expose this + // environment variable to your jobs. + Url pulumix.Input[*string] `pulumi:"url"` +} + +// Defaults sets the appropriate defaults for CacheToGitHubActionsArgs +func (val *CacheToGitHubActionsArgs) Defaults() *CacheToGitHubActionsArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.IgnoreError == nil { + tmp.IgnoreError = pulumix.Ptr(false) + } + if tmp.Mode == nil { + tmp.Mode = pulumix.Ptr(CacheMode("min")) + } + if tmp.Scope == nil { + if d := internal.GetEnvOrDefault("", nil, "buildkit"); d != nil { + tmp.Scope = pulumix.Ptr(d.(string)) + } + } + if tmp.Token == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_TOKEN"); d != nil { + tmp.Token = pulumix.Ptr(d.(string)) + } + } + if tmp.Url == nil { + if d := internal.GetEnvOrDefault("", nil, "ACTIONS_RUNTIME_URL"); d != nil { + tmp.Url = pulumix.Ptr(d.(string)) + } + } + return &tmp +} +func (CacheToGitHubActionsArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToGitHubActions)(nil)).Elem() +} + +func (i CacheToGitHubActionsArgs) ToCacheToGitHubActionsOutput() CacheToGitHubActionsOutput { + return i.ToCacheToGitHubActionsOutputWithContext(context.Background()) +} + +func (i CacheToGitHubActionsArgs) ToCacheToGitHubActionsOutputWithContext(ctx context.Context) CacheToGitHubActionsOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToGitHubActionsOutput) +} + +func (i *CacheToGitHubActionsArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheToGitHubActionsArgs] { + return pulumix.Val(i) +} + +type CacheToGitHubActionsOutput struct{ *pulumi.OutputState } + +func (CacheToGitHubActionsOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToGitHubActions)(nil)).Elem() +} + +func (o CacheToGitHubActionsOutput) ToCacheToGitHubActionsOutput() CacheToGitHubActionsOutput { + return o +} + +func (o CacheToGitHubActionsOutput) ToCacheToGitHubActionsOutputWithContext(ctx context.Context) CacheToGitHubActionsOutput { + return o +} + +func (o CacheToGitHubActionsOutput) ToOutput(ctx context.Context) pulumix.Output[CacheToGitHubActions] { + return pulumix.Output[CacheToGitHubActions]{ + OutputState: o.OutputState, + } +} + +// Ignore errors caused by failed cache exports. +func (o CacheToGitHubActionsOutput) IgnoreError() pulumix.Output[*bool] { + return pulumix.Apply[CacheToGitHubActions](o, func(v CacheToGitHubActions) *bool { return v.IgnoreError }) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToGitHubActionsOutput) Mode() pulumix.Output[*CacheMode] { + return pulumix.Apply[CacheToGitHubActions](o, func(v CacheToGitHubActions) *CacheMode { return v.Mode }) +} + +// The scope to use for cache keys. Defaults to `buildkit`. +// +// This should be set if building and caching multiple images in one +// workflow, otherwise caches will overwrite each other. +func (o CacheToGitHubActionsOutput) Scope() pulumix.Output[*string] { + return pulumix.Apply[CacheToGitHubActions](o, func(v CacheToGitHubActions) *string { return v.Scope }) +} + +// The GitHub Actions token to use. This is not a personal access tokens +// and is typically generated automatically as part of each job. +// +// Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheToGitHubActionsOutput) Token() pulumix.Output[*string] { + return pulumix.Apply[CacheToGitHubActions](o, func(v CacheToGitHubActions) *string { return v.Token }) +} + +// The cache server URL to use for artifacts. +// +// Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like +// `crazy-max/ghaction-github-runtime` is recommended to expose this +// environment variable to your jobs. +func (o CacheToGitHubActionsOutput) Url() pulumix.Output[*string] { + return pulumix.Apply[CacheToGitHubActions](o, func(v CacheToGitHubActions) *string { return v.Url }) +} + +// Include an inline cache with the exported image. +type CacheToInline struct { +} + +// Include an inline cache with the exported image. +type CacheToInlineArgs struct { +} + +func (CacheToInlineArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToInline)(nil)).Elem() +} + +func (i CacheToInlineArgs) ToCacheToInlineOutput() CacheToInlineOutput { + return i.ToCacheToInlineOutputWithContext(context.Background()) +} + +func (i CacheToInlineArgs) ToCacheToInlineOutputWithContext(ctx context.Context) CacheToInlineOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToInlineOutput) +} + +func (i *CacheToInlineArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheToInlineArgs] { + return pulumix.Val(i) +} + +// Include an inline cache with the exported image. +type CacheToInlineOutput struct{ *pulumi.OutputState } + +func (CacheToInlineOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToInline)(nil)).Elem() +} + +func (o CacheToInlineOutput) ToCacheToInlineOutput() CacheToInlineOutput { + return o +} + +func (o CacheToInlineOutput) ToCacheToInlineOutputWithContext(ctx context.Context) CacheToInlineOutput { + return o +} + +func (o CacheToInlineOutput) ToOutput(ctx context.Context) pulumix.Output[CacheToInline] { + return pulumix.Output[CacheToInline]{ + OutputState: o.OutputState, + } +} + +type CacheToLocal struct { + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // Path of the local directory to export the cache. + Dest string `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Ignore errors caused by failed cache exports. + IgnoreError *bool `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode *CacheMode `pulumi:"mode"` +} + +// Defaults sets the appropriate defaults for CacheToLocal +func (val *CacheToLocal) Defaults() *CacheToLocal { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.IgnoreError == nil { + ignoreError_ := false + tmp.IgnoreError = &ignoreError_ + } + if tmp.Mode == nil { + mode_ := CacheMode("min") + tmp.Mode = &mode_ + } + return &tmp +} + +type CacheToLocalArgs struct { + // The compression type to use. + Compression pulumix.Input[*CompressionType] `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"` + // Path of the local directory to export the cache. + Dest pulumix.Input[string] `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"` + // Ignore errors caused by failed cache exports. + IgnoreError pulumix.Input[*bool] `pulumi:"ignoreError"` + // The cache mode to use. Defaults to `min`. + Mode pulumix.Input[*CacheMode] `pulumi:"mode"` +} + +// Defaults sets the appropriate defaults for CacheToLocalArgs +func (val *CacheToLocalArgs) Defaults() *CacheToLocalArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = pulumix.Ptr(CompressionType("gzip")) + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumix.Ptr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumix.Ptr(false) + } + if tmp.IgnoreError == nil { + tmp.IgnoreError = pulumix.Ptr(false) + } + if tmp.Mode == nil { + tmp.Mode = pulumix.Ptr(CacheMode("min")) + } + return &tmp +} +func (CacheToLocalArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToLocal)(nil)).Elem() +} + +func (i CacheToLocalArgs) ToCacheToLocalOutput() CacheToLocalOutput { + return i.ToCacheToLocalOutputWithContext(context.Background()) +} + +func (i CacheToLocalArgs) ToCacheToLocalOutputWithContext(ctx context.Context) CacheToLocalOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToLocalOutput) +} + +func (i *CacheToLocalArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheToLocalArgs] { + return pulumix.Val(i) +} + +type CacheToLocalOutput struct{ *pulumi.OutputState } + +func (CacheToLocalOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToLocal)(nil)).Elem() +} + +func (o CacheToLocalOutput) ToCacheToLocalOutput() CacheToLocalOutput { + return o +} + +func (o CacheToLocalOutput) ToCacheToLocalOutputWithContext(ctx context.Context) CacheToLocalOutput { + return o +} + +func (o CacheToLocalOutput) ToOutput(ctx context.Context) pulumix.Output[CacheToLocal] { + return pulumix.Output[CacheToLocal]{ + OutputState: o.OutputState, + } +} + +// The compression type to use. +func (o CacheToLocalOutput) Compression() pulumix.Output[*CompressionType] { + return pulumix.Apply[CacheToLocal](o, func(v CacheToLocal) *CompressionType { return v.Compression }) +} + +// Compression level from 0 to 22. +func (o CacheToLocalOutput) CompressionLevel() pulumix.Output[*int] { + return pulumix.Apply[CacheToLocal](o, func(v CacheToLocal) *int { return v.CompressionLevel }) +} + +// Path of the local directory to export the cache. +func (o CacheToLocalOutput) Dest() pulumix.Output[string] { + return pulumix.Apply[CacheToLocal](o, func(v CacheToLocal) string { return v.Dest }) +} + +// Forcefully apply compression. +func (o CacheToLocalOutput) ForceCompression() pulumix.Output[*bool] { + return pulumix.Apply[CacheToLocal](o, func(v CacheToLocal) *bool { return v.ForceCompression }) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToLocalOutput) IgnoreError() pulumix.Output[*bool] { + return pulumix.Apply[CacheToLocal](o, func(v CacheToLocal) *bool { return v.IgnoreError }) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToLocalOutput) Mode() pulumix.Output[*CacheMode] { + return pulumix.Apply[CacheToLocal](o, func(v CacheToLocal) *CacheMode { return v.Mode }) +} + +type CacheToRegistry struct { + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Ignore errors caused by failed cache exports. + IgnoreError *bool `pulumi:"ignoreError"` + // Export cache manifest as an OCI-compatible image manifest instead of a + // manifest list. Requires `ociMediaTypes` to also be `true`. + // + // Some registries like AWS ECR will not work with caching if this is + // `false`. + // + // Defaults to `false` to match Docker's default behavior. + ImageManifest *bool `pulumi:"imageManifest"` + // The cache mode to use. Defaults to `min`. + Mode *CacheMode `pulumi:"mode"` + // Whether to use OCI media types in exported manifests. Defaults to + // `true`. + OciMediaTypes *bool `pulumi:"ociMediaTypes"` + // Fully qualified name of the cache image to import. + Ref string `pulumi:"ref"` +} + +// Defaults sets the appropriate defaults for CacheToRegistry +func (val *CacheToRegistry) Defaults() *CacheToRegistry { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.IgnoreError == nil { + ignoreError_ := false + tmp.IgnoreError = &ignoreError_ + } + if tmp.ImageManifest == nil { + imageManifest_ := false + tmp.ImageManifest = &imageManifest_ + } + if tmp.Mode == nil { + mode_ := CacheMode("min") + tmp.Mode = &mode_ + } + if tmp.OciMediaTypes == nil { + ociMediaTypes_ := true + tmp.OciMediaTypes = &ociMediaTypes_ + } + return &tmp +} + +type CacheToRegistryArgs struct { + // The compression type to use. + Compression pulumix.Input[*CompressionType] `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"` + // Forcefully apply compression. + ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"` + // Ignore errors caused by failed cache exports. + IgnoreError pulumix.Input[*bool] `pulumi:"ignoreError"` + // Export cache manifest as an OCI-compatible image manifest instead of a + // manifest list. Requires `ociMediaTypes` to also be `true`. + // + // Some registries like AWS ECR will not work with caching if this is + // `false`. + // + // Defaults to `false` to match Docker's default behavior. + ImageManifest pulumix.Input[*bool] `pulumi:"imageManifest"` + // The cache mode to use. Defaults to `min`. + Mode pulumix.Input[*CacheMode] `pulumi:"mode"` + // Whether to use OCI media types in exported manifests. Defaults to + // `true`. + OciMediaTypes pulumix.Input[*bool] `pulumi:"ociMediaTypes"` + // Fully qualified name of the cache image to import. + Ref pulumix.Input[string] `pulumi:"ref"` +} + +// Defaults sets the appropriate defaults for CacheToRegistryArgs +func (val *CacheToRegistryArgs) Defaults() *CacheToRegistryArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = pulumix.Ptr(CompressionType("gzip")) + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumix.Ptr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumix.Ptr(false) + } + if tmp.IgnoreError == nil { + tmp.IgnoreError = pulumix.Ptr(false) + } + if tmp.ImageManifest == nil { + tmp.ImageManifest = pulumix.Ptr(false) + } + if tmp.Mode == nil { + tmp.Mode = pulumix.Ptr(CacheMode("min")) + } + if tmp.OciMediaTypes == nil { + tmp.OciMediaTypes = pulumix.Ptr(true) + } + return &tmp +} +func (CacheToRegistryArgs) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToRegistry)(nil)).Elem() +} + +func (i CacheToRegistryArgs) ToCacheToRegistryOutput() CacheToRegistryOutput { + return i.ToCacheToRegistryOutputWithContext(context.Background()) +} + +func (i CacheToRegistryArgs) ToCacheToRegistryOutputWithContext(ctx context.Context) CacheToRegistryOutput { + return pulumi.ToOutputWithContext(ctx, i).(CacheToRegistryOutput) +} + +func (i *CacheToRegistryArgs) ToOutput(ctx context.Context) pulumix.Output[*CacheToRegistryArgs] { + return pulumix.Val(i) +} + +type CacheToRegistryOutput struct{ *pulumi.OutputState } + +func (CacheToRegistryOutput) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToRegistry)(nil)).Elem() +} + +func (o CacheToRegistryOutput) ToCacheToRegistryOutput() CacheToRegistryOutput { + return o +} + +func (o CacheToRegistryOutput) ToCacheToRegistryOutputWithContext(ctx context.Context) CacheToRegistryOutput { + return o +} + +func (o CacheToRegistryOutput) ToOutput(ctx context.Context) pulumix.Output[CacheToRegistry] { + return pulumix.Output[CacheToRegistry]{ + OutputState: o.OutputState, + } +} + +// The compression type to use. +func (o CacheToRegistryOutput) Compression() pulumix.Output[*CompressionType] { + return pulumix.Apply[CacheToRegistry](o, func(v CacheToRegistry) *CompressionType { return v.Compression }) +} + +// Compression level from 0 to 22. +func (o CacheToRegistryOutput) CompressionLevel() pulumix.Output[*int] { + return pulumix.Apply[CacheToRegistry](o, func(v CacheToRegistry) *int { return v.CompressionLevel }) +} + +// Forcefully apply compression. +func (o CacheToRegistryOutput) ForceCompression() pulumix.Output[*bool] { + return pulumix.Apply[CacheToRegistry](o, func(v CacheToRegistry) *bool { return v.ForceCompression }) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToRegistryOutput) IgnoreError() pulumix.Output[*bool] { + return pulumix.Apply[CacheToRegistry](o, func(v CacheToRegistry) *bool { return v.IgnoreError }) +} + +// Export cache manifest as an OCI-compatible image manifest instead of a +// manifest list. Requires `ociMediaTypes` to also be `true`. +// +// Some registries like AWS ECR will not work with caching if this is +// `false`. +// +// Defaults to `false` to match Docker's default behavior. +func (o CacheToRegistryOutput) ImageManifest() pulumix.Output[*bool] { + return pulumix.Apply[CacheToRegistry](o, func(v CacheToRegistry) *bool { return v.ImageManifest }) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToRegistryOutput) Mode() pulumix.Output[*CacheMode] { + return pulumix.Apply[CacheToRegistry](o, func(v CacheToRegistry) *CacheMode { return v.Mode }) +} + +// Whether to use OCI media types in exported manifests. Defaults to +// `true`. +func (o CacheToRegistryOutput) OciMediaTypes() pulumix.Output[*bool] { + return pulumix.Apply[CacheToRegistry](o, func(v CacheToRegistry) *bool { return v.OciMediaTypes }) +} + +// Fully qualified name of the cache image to import. +func (o CacheToRegistryOutput) Ref() pulumix.Output[string] { + return pulumix.Apply[CacheToRegistry](o, func(v CacheToRegistry) string { return v.Ref }) +} + +type CacheToS3 struct { + // Defaults to `$AWS_ACCESS_KEY_ID`. + AccessKeyId *string `pulumi:"accessKeyId"` + // Prefix to prepend to blob filenames. + BlobsPrefix *string `pulumi:"blobsPrefix"` + // Name of the S3 bucket. + Bucket string `pulumi:"bucket"` + // Endpoint of the S3 bucket. + EndpointUrl *string `pulumi:"endpointUrl"` + // Ignore errors caused by failed cache exports. + IgnoreError *bool `pulumi:"ignoreError"` + // Prefix to prepend on manifest filenames. + ManifestsPrefix *string `pulumi:"manifestsPrefix"` + // The cache mode to use. Defaults to `min`. + Mode *CacheMode `pulumi:"mode"` + // Name of the cache image. + Name *string `pulumi:"name"` + // The geographic location of the bucket. Defaults to `$AWS_REGION`. + Region string `pulumi:"region"` + // Defaults to `$AWS_SECRET_ACCESS_KEY`. + SecretAccessKey *string `pulumi:"secretAccessKey"` + // Defaults to `$AWS_SESSION_TOKEN`. + SessionToken *string `pulumi:"sessionToken"` + // Uses `bucket` in the URL instead of hostname when `true`. + UsePathStyle *bool `pulumi:"usePathStyle"` +} + +// Defaults sets the appropriate defaults for CacheToS3 +func (val *CacheToS3) Defaults() *CacheToS3 { + if val == nil { + return nil + } + tmp := *val + if tmp.AccessKeyId == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_ACCESS_KEY_ID"); d != nil { + accessKeyId_ := d.(string) + tmp.AccessKeyId = &accessKeyId_ + } + } + if tmp.IgnoreError == nil { + ignoreError_ := false + tmp.IgnoreError = &ignoreError_ + } + if tmp.Mode == nil { + mode_ := CacheMode("min") + tmp.Mode = &mode_ + } + if internal.IsZero(tmp.Region) { + if d := internal.GetEnvOrDefault("", nil, "AWS_REGION"); d != nil { + tmp.Region = d.(string) + } + } + if tmp.SecretAccessKey == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SECRET_ACCESS_KEY"); d != nil { + secretAccessKey_ := d.(string) + tmp.SecretAccessKey = &secretAccessKey_ + } + } + if tmp.SessionToken == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SESSION_TOKEN"); d != nil { + sessionToken_ := d.(string) + tmp.SessionToken = &sessionToken_ + } + } + return &tmp +} + +type CacheToS3Args struct { + // Defaults to `$AWS_ACCESS_KEY_ID`. + AccessKeyId pulumix.Input[*string] `pulumi:"accessKeyId"` + // Prefix to prepend to blob filenames. + BlobsPrefix pulumix.Input[*string] `pulumi:"blobsPrefix"` + // Name of the S3 bucket. + Bucket pulumix.Input[string] `pulumi:"bucket"` + // Endpoint of the S3 bucket. + EndpointUrl pulumix.Input[*string] `pulumi:"endpointUrl"` + // Ignore errors caused by failed cache exports. + IgnoreError pulumix.Input[*bool] `pulumi:"ignoreError"` + // Prefix to prepend on manifest filenames. + ManifestsPrefix pulumix.Input[*string] `pulumi:"manifestsPrefix"` + // The cache mode to use. Defaults to `min`. + Mode pulumix.Input[*CacheMode] `pulumi:"mode"` + // Name of the cache image. + Name pulumix.Input[*string] `pulumi:"name"` + // The geographic location of the bucket. Defaults to `$AWS_REGION`. + Region pulumix.Input[string] `pulumi:"region"` + // Defaults to `$AWS_SECRET_ACCESS_KEY`. + SecretAccessKey pulumix.Input[*string] `pulumi:"secretAccessKey"` + // Defaults to `$AWS_SESSION_TOKEN`. + SessionToken pulumix.Input[*string] `pulumi:"sessionToken"` + // Uses `bucket` in the URL instead of hostname when `true`. + UsePathStyle pulumix.Input[*bool] `pulumi:"usePathStyle"` +} + +// Defaults sets the appropriate defaults for CacheToS3Args +func (val *CacheToS3Args) Defaults() *CacheToS3Args { + if val == nil { + return nil + } + tmp := *val + if tmp.AccessKeyId == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_ACCESS_KEY_ID"); d != nil { + tmp.AccessKeyId = pulumix.Ptr(d.(string)) + } + } + if tmp.IgnoreError == nil { + tmp.IgnoreError = pulumix.Ptr(false) + } + if tmp.Mode == nil { + tmp.Mode = pulumix.Ptr(CacheMode("min")) + } + if tmp.Region == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_REGION"); d != nil { + tmp.Region = pulumix.Val(d.(string)) + } + } + if tmp.SecretAccessKey == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SECRET_ACCESS_KEY"); d != nil { + tmp.SecretAccessKey = pulumix.Ptr(d.(string)) + } + } + if tmp.SessionToken == nil { + if d := internal.GetEnvOrDefault("", nil, "AWS_SESSION_TOKEN"); d != nil { + tmp.SessionToken = pulumix.Ptr(d.(string)) + } + } + return &tmp +} +func (CacheToS3Args) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToS3)(nil)).Elem() +} + +func (i CacheToS3Args) ToCacheToS3Output() CacheToS3Output { + return i.ToCacheToS3OutputWithContext(context.Background()) +} + +func (i CacheToS3Args) ToCacheToS3OutputWithContext(ctx context.Context) CacheToS3Output { + return pulumi.ToOutputWithContext(ctx, i).(CacheToS3Output) +} + +func (i *CacheToS3Args) ToOutput(ctx context.Context) pulumix.Output[*CacheToS3Args] { + return pulumix.Val(i) +} + +type CacheToS3Output struct{ *pulumi.OutputState } + +func (CacheToS3Output) ElementType() reflect.Type { + return reflect.TypeOf((*CacheToS3)(nil)).Elem() +} + +func (o CacheToS3Output) ToCacheToS3Output() CacheToS3Output { + return o +} + +func (o CacheToS3Output) ToCacheToS3OutputWithContext(ctx context.Context) CacheToS3Output { + return o +} + +func (o CacheToS3Output) ToOutput(ctx context.Context) pulumix.Output[CacheToS3] { + return pulumix.Output[CacheToS3]{ + OutputState: o.OutputState, + } +} + +// Defaults to `$AWS_ACCESS_KEY_ID`. +func (o CacheToS3Output) AccessKeyId() pulumix.Output[*string] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) *string { return v.AccessKeyId }) +} + +// Prefix to prepend to blob filenames. +func (o CacheToS3Output) BlobsPrefix() pulumix.Output[*string] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) *string { return v.BlobsPrefix }) +} + +// Name of the S3 bucket. +func (o CacheToS3Output) Bucket() pulumix.Output[string] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) string { return v.Bucket }) +} + +// Endpoint of the S3 bucket. +func (o CacheToS3Output) EndpointUrl() pulumix.Output[*string] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) *string { return v.EndpointUrl }) +} + +// Ignore errors caused by failed cache exports. +func (o CacheToS3Output) IgnoreError() pulumix.Output[*bool] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) *bool { return v.IgnoreError }) +} + +// Prefix to prepend on manifest filenames. +func (o CacheToS3Output) ManifestsPrefix() pulumix.Output[*string] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) *string { return v.ManifestsPrefix }) +} + +// The cache mode to use. Defaults to `min`. +func (o CacheToS3Output) Mode() pulumix.Output[*CacheMode] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) *CacheMode { return v.Mode }) +} + +// Name of the cache image. +func (o CacheToS3Output) Name() pulumix.Output[*string] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) *string { return v.Name }) +} + +// The geographic location of the bucket. Defaults to `$AWS_REGION`. +func (o CacheToS3Output) Region() pulumix.Output[string] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) string { return v.Region }) +} + +// Defaults to `$AWS_SECRET_ACCESS_KEY`. +func (o CacheToS3Output) SecretAccessKey() pulumix.Output[*string] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) *string { return v.SecretAccessKey }) +} + +// Defaults to `$AWS_SESSION_TOKEN`. +func (o CacheToS3Output) SessionToken() pulumix.Output[*string] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) *string { return v.SessionToken }) +} + +// Uses `bucket` in the URL instead of hostname when `true`. +func (o CacheToS3Output) UsePathStyle() pulumix.Output[*bool] { + return pulumix.Apply[CacheToS3](o, func(v CacheToS3) *bool { return v.UsePathStyle }) +} + +type Context struct { + // Resources to use for build context. + // + // The location can be: + // * A relative or absolute path to a local directory (`.`, `./app`, + // `/app`, etc.). + // * A remote URL of a Git repository, tarball, or plain text file + // (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + // etc.). + Location string `pulumi:"location"` +} + +type ContextArgs struct { + // Resources to use for build context. + // + // The location can be: + // * A relative or absolute path to a local directory (`.`, `./app`, + // `/app`, etc.). + // * A remote URL of a Git repository, tarball, or plain text file + // (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + // etc.). + Location pulumix.Input[string] `pulumi:"location"` +} + +func (ContextArgs) ElementType() reflect.Type { + return reflect.TypeOf((*Context)(nil)).Elem() +} + +func (i ContextArgs) ToContextOutput() ContextOutput { + return i.ToContextOutputWithContext(context.Background()) +} + +func (i ContextArgs) ToContextOutputWithContext(ctx context.Context) ContextOutput { + return pulumi.ToOutputWithContext(ctx, i).(ContextOutput) +} + +func (i *ContextArgs) ToOutput(ctx context.Context) pulumix.Output[*ContextArgs] { + return pulumix.Val(i) +} + +type ContextOutput struct{ *pulumi.OutputState } + +func (ContextOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Context)(nil)).Elem() +} + +func (o ContextOutput) ToContextOutput() ContextOutput { + return o +} + +func (o ContextOutput) ToContextOutputWithContext(ctx context.Context) ContextOutput { + return o +} + +func (o ContextOutput) ToOutput(ctx context.Context) pulumix.Output[Context] { + return pulumix.Output[Context]{ + OutputState: o.OutputState, + } +} + +// Resources to use for build context. +// +// The location can be: +// - A relative or absolute path to a local directory (`.`, `./app`, +// `/app`, etc.). +// - A remote URL of a Git repository, tarball, or plain text file +// (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, +// etc.). +func (o ContextOutput) Location() pulumix.Output[string] { + return pulumix.Apply[Context](o, func(v Context) string { return v.Location }) +} + +type Dockerfile struct { + // Raw Dockerfile contents. + // + // Conflicts with `location`. + // + // Equivalent to invoking Docker with `-f -`. + Inline *string `pulumi:"inline"` + // Location of the Dockerfile to use. + // + // Can be a relative or absolute path to a local file, or a remote URL. + // + // Defaults to `${context.location}/Dockerfile` if context is on-disk. + // + // Conflicts with `inline`. + Location *string `pulumi:"location"` +} + +type DockerfileArgs struct { + // Raw Dockerfile contents. + // + // Conflicts with `location`. + // + // Equivalent to invoking Docker with `-f -`. + Inline pulumix.Input[*string] `pulumi:"inline"` + // Location of the Dockerfile to use. + // + // Can be a relative or absolute path to a local file, or a remote URL. + // + // Defaults to `${context.location}/Dockerfile` if context is on-disk. + // + // Conflicts with `inline`. + Location pulumix.Input[*string] `pulumi:"location"` +} + +func (DockerfileArgs) ElementType() reflect.Type { + return reflect.TypeOf((*Dockerfile)(nil)).Elem() +} + +func (i DockerfileArgs) ToDockerfileOutput() DockerfileOutput { + return i.ToDockerfileOutputWithContext(context.Background()) +} + +func (i DockerfileArgs) ToDockerfileOutputWithContext(ctx context.Context) DockerfileOutput { + return pulumi.ToOutputWithContext(ctx, i).(DockerfileOutput) +} + +func (i *DockerfileArgs) ToOutput(ctx context.Context) pulumix.Output[*DockerfileArgs] { + return pulumix.Val(i) +} + +type DockerfileOutput struct{ *pulumi.OutputState } + +func (DockerfileOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Dockerfile)(nil)).Elem() +} + +func (o DockerfileOutput) ToDockerfileOutput() DockerfileOutput { + return o +} + +func (o DockerfileOutput) ToDockerfileOutputWithContext(ctx context.Context) DockerfileOutput { + return o +} + +func (o DockerfileOutput) ToOutput(ctx context.Context) pulumix.Output[Dockerfile] { + return pulumix.Output[Dockerfile]{ + OutputState: o.OutputState, + } +} + +// Raw Dockerfile contents. +// +// Conflicts with `location`. +// +// Equivalent to invoking Docker with `-f -`. +func (o DockerfileOutput) Inline() pulumix.Output[*string] { + return pulumix.Apply[Dockerfile](o, func(v Dockerfile) *string { return v.Inline }) +} + +// Location of the Dockerfile to use. +// +// Can be a relative or absolute path to a local file, or a remote URL. +// +// Defaults to `${context.location}/Dockerfile` if context is on-disk. +// +// Conflicts with `inline`. +func (o DockerfileOutput) Location() pulumix.Output[*string] { + return pulumix.Apply[Dockerfile](o, func(v Dockerfile) *string { return v.Location }) +} + +type Export struct { + // A no-op export. Helpful for silencing the 'no exports' warning if you + // just want to populate caches. + Cacheonly *ExportCacheOnly `pulumi:"cacheonly"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled *bool `pulumi:"disabled"` + // Export as a Docker image layout. + Docker *ExportDocker `pulumi:"docker"` + // Outputs the build result into a container image format. + Image *ExportImage `pulumi:"image"` + // Export to a local directory as files and directories. + Local *ExportLocal `pulumi:"local"` + // Identical to the Docker exporter but uses OCI media types by default. + Oci *ExportOCI `pulumi:"oci"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=docker`) + Raw *string `pulumi:"raw"` + // Identical to the Image exporter, but pushes by default. + Registry *ExportRegistry `pulumi:"registry"` + // Export to a local directory as a tarball. + Tar *ExportTar `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for Export +func (val *Export) Defaults() *Export { + if val == nil { + return nil + } + tmp := *val + tmp.Docker = tmp.Docker.Defaults() + + tmp.Image = tmp.Image.Defaults() + + tmp.Oci = tmp.Oci.Defaults() + + tmp.Registry = tmp.Registry.Defaults() + + return &tmp +} + +type ExportArgs struct { + // A no-op export. Helpful for silencing the 'no exports' warning if you + // just want to populate caches. + Cacheonly pulumix.Input[*ExportCacheOnlyArgs] `pulumi:"cacheonly"` + // When `true` this entry will be excluded. Defaults to `false`. + Disabled pulumix.Input[*bool] `pulumi:"disabled"` + // Export as a Docker image layout. + Docker pulumix.Input[*ExportDockerArgs] `pulumi:"docker"` + // Outputs the build result into a container image format. + Image pulumix.Input[*ExportImageArgs] `pulumi:"image"` + // Export to a local directory as files and directories. + Local pulumix.Input[*ExportLocalArgs] `pulumi:"local"` + // Identical to the Docker exporter but uses OCI media types by default. + Oci pulumix.Input[*ExportOCIArgs] `pulumi:"oci"` + // A raw string as you would provide it to the Docker CLI (e.g., + // `type=docker`) + Raw pulumix.Input[*string] `pulumi:"raw"` + // Identical to the Image exporter, but pushes by default. + Registry pulumix.Input[*ExportRegistryArgs] `pulumi:"registry"` + // Export to a local directory as a tarball. + Tar pulumix.Input[*ExportTarArgs] `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for ExportArgs +func (val *ExportArgs) Defaults() *ExportArgs { + if val == nil { + return nil + } + tmp := *val + + return &tmp +} +func (ExportArgs) ElementType() reflect.Type { + return reflect.TypeOf((*Export)(nil)).Elem() +} + +func (i ExportArgs) ToExportOutput() ExportOutput { + return i.ToExportOutputWithContext(context.Background()) +} + +func (i ExportArgs) ToExportOutputWithContext(ctx context.Context) ExportOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportOutput) +} + +func (i *ExportArgs) ToOutput(ctx context.Context) pulumix.Output[*ExportArgs] { + return pulumix.Val(i) +} + +type ExportOutput struct{ *pulumi.OutputState } + +func (ExportOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Export)(nil)).Elem() +} + +func (o ExportOutput) ToExportOutput() ExportOutput { + return o +} + +func (o ExportOutput) ToExportOutputWithContext(ctx context.Context) ExportOutput { + return o +} + +func (o ExportOutput) ToOutput(ctx context.Context) pulumix.Output[Export] { + return pulumix.Output[Export]{ + OutputState: o.OutputState, + } +} + +// A no-op export. Helpful for silencing the 'no exports' warning if you +// just want to populate caches. +func (o ExportOutput) Cacheonly() pulumix.GPtrOutput[ExportCacheOnly, ExportCacheOnlyOutput] { + value := pulumix.Apply[Export](o, func(v Export) *ExportCacheOnly { return v.Cacheonly }) + return pulumix.GPtrOutput[ExportCacheOnly, ExportCacheOnlyOutput]{OutputState: value.OutputState} +} + +// When `true` this entry will be excluded. Defaults to `false`. +func (o ExportOutput) Disabled() pulumix.Output[*bool] { + return pulumix.Apply[Export](o, func(v Export) *bool { return v.Disabled }) +} + +// Export as a Docker image layout. +func (o ExportOutput) Docker() pulumix.GPtrOutput[ExportDocker, ExportDockerOutput] { + value := pulumix.Apply[Export](o, func(v Export) *ExportDocker { return v.Docker }) + return pulumix.GPtrOutput[ExportDocker, ExportDockerOutput]{OutputState: value.OutputState} +} + +// Outputs the build result into a container image format. +func (o ExportOutput) Image() pulumix.GPtrOutput[ExportImage, ExportImageOutput] { + value := pulumix.Apply[Export](o, func(v Export) *ExportImage { return v.Image }) + return pulumix.GPtrOutput[ExportImage, ExportImageOutput]{OutputState: value.OutputState} +} + +// Export to a local directory as files and directories. +func (o ExportOutput) Local() pulumix.GPtrOutput[ExportLocal, ExportLocalOutput] { + value := pulumix.Apply[Export](o, func(v Export) *ExportLocal { return v.Local }) + return pulumix.GPtrOutput[ExportLocal, ExportLocalOutput]{OutputState: value.OutputState} +} + +// Identical to the Docker exporter but uses OCI media types by default. +func (o ExportOutput) Oci() pulumix.GPtrOutput[ExportOCI, ExportOCIOutput] { + value := pulumix.Apply[Export](o, func(v Export) *ExportOCI { return v.Oci }) + return pulumix.GPtrOutput[ExportOCI, ExportOCIOutput]{OutputState: value.OutputState} +} + +// A raw string as you would provide it to the Docker CLI (e.g., +// `type=docker`) +func (o ExportOutput) Raw() pulumix.Output[*string] { + return pulumix.Apply[Export](o, func(v Export) *string { return v.Raw }) +} + +// Identical to the Image exporter, but pushes by default. +func (o ExportOutput) Registry() pulumix.GPtrOutput[ExportRegistry, ExportRegistryOutput] { + value := pulumix.Apply[Export](o, func(v Export) *ExportRegistry { return v.Registry }) + return pulumix.GPtrOutput[ExportRegistry, ExportRegistryOutput]{OutputState: value.OutputState} +} + +// Export to a local directory as a tarball. +func (o ExportOutput) Tar() pulumix.GPtrOutput[ExportTar, ExportTarOutput] { + value := pulumix.Apply[Export](o, func(v Export) *ExportTar { return v.Tar }) + return pulumix.GPtrOutput[ExportTar, ExportTarOutput]{OutputState: value.OutputState} +} + +type ExportCacheOnly struct { +} + +type ExportCacheOnlyArgs struct { +} + +func (ExportCacheOnlyArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportCacheOnly)(nil)).Elem() +} + +func (i ExportCacheOnlyArgs) ToExportCacheOnlyOutput() ExportCacheOnlyOutput { + return i.ToExportCacheOnlyOutputWithContext(context.Background()) +} + +func (i ExportCacheOnlyArgs) ToExportCacheOnlyOutputWithContext(ctx context.Context) ExportCacheOnlyOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportCacheOnlyOutput) +} + +func (i *ExportCacheOnlyArgs) ToOutput(ctx context.Context) pulumix.Output[*ExportCacheOnlyArgs] { + return pulumix.Val(i) +} + +type ExportCacheOnlyOutput struct{ *pulumi.OutputState } + +func (ExportCacheOnlyOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportCacheOnly)(nil)).Elem() +} + +func (o ExportCacheOnlyOutput) ToExportCacheOnlyOutput() ExportCacheOnlyOutput { + return o +} + +func (o ExportCacheOnlyOutput) ToExportCacheOnlyOutputWithContext(ctx context.Context) ExportCacheOnlyOutput { + return o +} + +func (o ExportCacheOnlyOutput) ToOutput(ctx context.Context) pulumix.Output[ExportCacheOnly] { + return pulumix.Output[ExportCacheOnly]{ + OutputState: o.OutputState, + } +} + +type ExportDocker struct { + // Attach an arbitrary key/value annotation to the image. + Annotations map[string]string `pulumi:"annotations"` + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // The local export path. + Dest *string `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Specify images names to export. This is overridden if tags are already specified. + Names []string `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes *bool `pulumi:"ociMediaTypes"` + // Bundle the output into a tarball layout. + Tar *bool `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for ExportDocker +func (val *ExportDocker) Defaults() *ExportDocker { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.OciMediaTypes == nil { + ociMediaTypes_ := false + tmp.OciMediaTypes = &ociMediaTypes_ + } + if tmp.Tar == nil { + tar_ := true + tmp.Tar = &tar_ + } + return &tmp +} + +type ExportDockerArgs struct { + // Attach an arbitrary key/value annotation to the image. + Annotations pulumix.Input[map[string]string] `pulumi:"annotations"` + // The compression type to use. + Compression pulumix.Input[*CompressionType] `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"` + // The local export path. + Dest pulumix.Input[*string] `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"` + // Specify images names to export. This is overridden if tags are already specified. + Names pulumix.Input[[]string] `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes pulumix.Input[*bool] `pulumi:"ociMediaTypes"` + // Bundle the output into a tarball layout. + Tar pulumix.Input[*bool] `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for ExportDockerArgs +func (val *ExportDockerArgs) Defaults() *ExportDockerArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = pulumix.Ptr(CompressionType("gzip")) + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumix.Ptr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumix.Ptr(false) + } + if tmp.OciMediaTypes == nil { + tmp.OciMediaTypes = pulumix.Ptr(false) + } + if tmp.Tar == nil { + tmp.Tar = pulumix.Ptr(true) + } + return &tmp +} +func (ExportDockerArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportDocker)(nil)).Elem() +} + +func (i ExportDockerArgs) ToExportDockerOutput() ExportDockerOutput { + return i.ToExportDockerOutputWithContext(context.Background()) +} + +func (i ExportDockerArgs) ToExportDockerOutputWithContext(ctx context.Context) ExportDockerOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportDockerOutput) +} + +func (i *ExportDockerArgs) ToOutput(ctx context.Context) pulumix.Output[*ExportDockerArgs] { + return pulumix.Val(i) +} + +type ExportDockerOutput struct{ *pulumi.OutputState } + +func (ExportDockerOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportDocker)(nil)).Elem() +} + +func (o ExportDockerOutput) ToExportDockerOutput() ExportDockerOutput { + return o +} + +func (o ExportDockerOutput) ToExportDockerOutputWithContext(ctx context.Context) ExportDockerOutput { + return o +} + +func (o ExportDockerOutput) ToOutput(ctx context.Context) pulumix.Output[ExportDocker] { + return pulumix.Output[ExportDocker]{ + OutputState: o.OutputState, + } +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportDockerOutput) Annotations() pulumix.MapOutput[string] { + value := pulumix.Apply[ExportDocker](o, func(v ExportDocker) map[string]string { return v.Annotations }) + return pulumix.MapOutput[string]{OutputState: value.OutputState} +} + +// The compression type to use. +func (o ExportDockerOutput) Compression() pulumix.Output[*CompressionType] { + return pulumix.Apply[ExportDocker](o, func(v ExportDocker) *CompressionType { return v.Compression }) +} + +// Compression level from 0 to 22. +func (o ExportDockerOutput) CompressionLevel() pulumix.Output[*int] { + return pulumix.Apply[ExportDocker](o, func(v ExportDocker) *int { return v.CompressionLevel }) +} + +// The local export path. +func (o ExportDockerOutput) Dest() pulumix.Output[*string] { + return pulumix.Apply[ExportDocker](o, func(v ExportDocker) *string { return v.Dest }) +} + +// Forcefully apply compression. +func (o ExportDockerOutput) ForceCompression() pulumix.Output[*bool] { + return pulumix.Apply[ExportDocker](o, func(v ExportDocker) *bool { return v.ForceCompression }) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportDockerOutput) Names() pulumix.ArrayOutput[string] { + value := pulumix.Apply[ExportDocker](o, func(v ExportDocker) []string { return v.Names }) + return pulumix.ArrayOutput[string]{OutputState: value.OutputState} +} + +// Use OCI media types in exporter manifests. +func (o ExportDockerOutput) OciMediaTypes() pulumix.Output[*bool] { + return pulumix.Apply[ExportDocker](o, func(v ExportDocker) *bool { return v.OciMediaTypes }) +} + +// Bundle the output into a tarball layout. +func (o ExportDockerOutput) Tar() pulumix.Output[*bool] { + return pulumix.Apply[ExportDocker](o, func(v ExportDocker) *bool { return v.Tar }) +} + +type ExportImage struct { + // Attach an arbitrary key/value annotation to the image. + Annotations map[string]string `pulumi:"annotations"` + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // Name image with `prefix@`, used for anonymous images. + DanglingNamePrefix *string `pulumi:"danglingNamePrefix"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Allow pushing to an insecure registry. + Insecure *bool `pulumi:"insecure"` + // Add additional canonical name (`name@`). + NameCanonical *bool `pulumi:"nameCanonical"` + // Specify images names to export. This is overridden if tags are already specified. + Names []string `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes *bool `pulumi:"ociMediaTypes"` + // Push after creating the image. Defaults to `false`. + Push *bool `pulumi:"push"` + // Push image without name. + PushByDigest *bool `pulumi:"pushByDigest"` + // Store resulting images to the worker's image store and ensure all of + // its blobs are in the content store. + // + // Defaults to `true`. + // + // Ignored if the worker doesn't have image store (when using OCI workers, + // for example). + Store *bool `pulumi:"store"` + // Unpack image after creation (for use with containerd). Defaults to + // `false`. + Unpack *bool `pulumi:"unpack"` +} + +// Defaults sets the appropriate defaults for ExportImage +func (val *ExportImage) Defaults() *ExportImage { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.OciMediaTypes == nil { + ociMediaTypes_ := false + tmp.OciMediaTypes = &ociMediaTypes_ + } + if tmp.Store == nil { + store_ := true + tmp.Store = &store_ + } + return &tmp +} + +type ExportImageArgs struct { + // Attach an arbitrary key/value annotation to the image. + Annotations pulumix.Input[map[string]string] `pulumi:"annotations"` + // The compression type to use. + Compression pulumix.Input[*CompressionType] `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"` + // Name image with `prefix@`, used for anonymous images. + DanglingNamePrefix pulumix.Input[*string] `pulumi:"danglingNamePrefix"` + // Forcefully apply compression. + ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"` + // Allow pushing to an insecure registry. + Insecure pulumix.Input[*bool] `pulumi:"insecure"` + // Add additional canonical name (`name@`). + NameCanonical pulumix.Input[*bool] `pulumi:"nameCanonical"` + // Specify images names to export. This is overridden if tags are already specified. + Names pulumix.Input[[]string] `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes pulumix.Input[*bool] `pulumi:"ociMediaTypes"` + // Push after creating the image. Defaults to `false`. + Push pulumix.Input[*bool] `pulumi:"push"` + // Push image without name. + PushByDigest pulumix.Input[*bool] `pulumi:"pushByDigest"` + // Store resulting images to the worker's image store and ensure all of + // its blobs are in the content store. + // + // Defaults to `true`. + // + // Ignored if the worker doesn't have image store (when using OCI workers, + // for example). + Store pulumix.Input[*bool] `pulumi:"store"` + // Unpack image after creation (for use with containerd). Defaults to + // `false`. + Unpack pulumix.Input[*bool] `pulumi:"unpack"` +} + +// Defaults sets the appropriate defaults for ExportImageArgs +func (val *ExportImageArgs) Defaults() *ExportImageArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = pulumix.Ptr(CompressionType("gzip")) + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumix.Ptr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumix.Ptr(false) + } + if tmp.OciMediaTypes == nil { + tmp.OciMediaTypes = pulumix.Ptr(false) + } + if tmp.Store == nil { + tmp.Store = pulumix.Ptr(true) + } + return &tmp +} +func (ExportImageArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportImage)(nil)).Elem() +} + +func (i ExportImageArgs) ToExportImageOutput() ExportImageOutput { + return i.ToExportImageOutputWithContext(context.Background()) +} + +func (i ExportImageArgs) ToExportImageOutputWithContext(ctx context.Context) ExportImageOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportImageOutput) +} + +func (i *ExportImageArgs) ToOutput(ctx context.Context) pulumix.Output[*ExportImageArgs] { + return pulumix.Val(i) +} + +type ExportImageOutput struct{ *pulumi.OutputState } + +func (ExportImageOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportImage)(nil)).Elem() +} + +func (o ExportImageOutput) ToExportImageOutput() ExportImageOutput { + return o +} + +func (o ExportImageOutput) ToExportImageOutputWithContext(ctx context.Context) ExportImageOutput { + return o +} + +func (o ExportImageOutput) ToOutput(ctx context.Context) pulumix.Output[ExportImage] { + return pulumix.Output[ExportImage]{ + OutputState: o.OutputState, + } +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportImageOutput) Annotations() pulumix.MapOutput[string] { + value := pulumix.Apply[ExportImage](o, func(v ExportImage) map[string]string { return v.Annotations }) + return pulumix.MapOutput[string]{OutputState: value.OutputState} +} + +// The compression type to use. +func (o ExportImageOutput) Compression() pulumix.Output[*CompressionType] { + return pulumix.Apply[ExportImage](o, func(v ExportImage) *CompressionType { return v.Compression }) +} + +// Compression level from 0 to 22. +func (o ExportImageOutput) CompressionLevel() pulumix.Output[*int] { + return pulumix.Apply[ExportImage](o, func(v ExportImage) *int { return v.CompressionLevel }) +} + +// Name image with `prefix@`, used for anonymous images. +func (o ExportImageOutput) DanglingNamePrefix() pulumix.Output[*string] { + return pulumix.Apply[ExportImage](o, func(v ExportImage) *string { return v.DanglingNamePrefix }) +} + +// Forcefully apply compression. +func (o ExportImageOutput) ForceCompression() pulumix.Output[*bool] { + return pulumix.Apply[ExportImage](o, func(v ExportImage) *bool { return v.ForceCompression }) +} + +// Allow pushing to an insecure registry. +func (o ExportImageOutput) Insecure() pulumix.Output[*bool] { + return pulumix.Apply[ExportImage](o, func(v ExportImage) *bool { return v.Insecure }) +} + +// Add additional canonical name (`name@`). +func (o ExportImageOutput) NameCanonical() pulumix.Output[*bool] { + return pulumix.Apply[ExportImage](o, func(v ExportImage) *bool { return v.NameCanonical }) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportImageOutput) Names() pulumix.ArrayOutput[string] { + value := pulumix.Apply[ExportImage](o, func(v ExportImage) []string { return v.Names }) + return pulumix.ArrayOutput[string]{OutputState: value.OutputState} +} + +// Use OCI media types in exporter manifests. +func (o ExportImageOutput) OciMediaTypes() pulumix.Output[*bool] { + return pulumix.Apply[ExportImage](o, func(v ExportImage) *bool { return v.OciMediaTypes }) +} + +// Push after creating the image. Defaults to `false`. +func (o ExportImageOutput) Push() pulumix.Output[*bool] { + return pulumix.Apply[ExportImage](o, func(v ExportImage) *bool { return v.Push }) +} + +// Push image without name. +func (o ExportImageOutput) PushByDigest() pulumix.Output[*bool] { + return pulumix.Apply[ExportImage](o, func(v ExportImage) *bool { return v.PushByDigest }) +} + +// Store resulting images to the worker's image store and ensure all of +// its blobs are in the content store. +// +// Defaults to `true`. +// +// Ignored if the worker doesn't have image store (when using OCI workers, +// for example). +func (o ExportImageOutput) Store() pulumix.Output[*bool] { + return pulumix.Apply[ExportImage](o, func(v ExportImage) *bool { return v.Store }) +} + +// Unpack image after creation (for use with containerd). Defaults to +// `false`. +func (o ExportImageOutput) Unpack() pulumix.Output[*bool] { + return pulumix.Apply[ExportImage](o, func(v ExportImage) *bool { return v.Unpack }) +} + +type ExportLocal struct { + // Output path. + Dest string `pulumi:"dest"` +} + +type ExportLocalArgs struct { + // Output path. + Dest pulumix.Input[string] `pulumi:"dest"` +} + +func (ExportLocalArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportLocal)(nil)).Elem() +} + +func (i ExportLocalArgs) ToExportLocalOutput() ExportLocalOutput { + return i.ToExportLocalOutputWithContext(context.Background()) +} + +func (i ExportLocalArgs) ToExportLocalOutputWithContext(ctx context.Context) ExportLocalOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportLocalOutput) +} + +func (i *ExportLocalArgs) ToOutput(ctx context.Context) pulumix.Output[*ExportLocalArgs] { + return pulumix.Val(i) +} + +type ExportLocalOutput struct{ *pulumi.OutputState } + +func (ExportLocalOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportLocal)(nil)).Elem() +} + +func (o ExportLocalOutput) ToExportLocalOutput() ExportLocalOutput { + return o +} + +func (o ExportLocalOutput) ToExportLocalOutputWithContext(ctx context.Context) ExportLocalOutput { + return o +} + +func (o ExportLocalOutput) ToOutput(ctx context.Context) pulumix.Output[ExportLocal] { + return pulumix.Output[ExportLocal]{ + OutputState: o.OutputState, + } +} + +// Output path. +func (o ExportLocalOutput) Dest() pulumix.Output[string] { + return pulumix.Apply[ExportLocal](o, func(v ExportLocal) string { return v.Dest }) +} + +type ExportOCI struct { + // Attach an arbitrary key/value annotation to the image. + Annotations map[string]string `pulumi:"annotations"` + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // The local export path. + Dest *string `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Specify images names to export. This is overridden if tags are already specified. + Names []string `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes *bool `pulumi:"ociMediaTypes"` + // Bundle the output into a tarball layout. + Tar *bool `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for ExportOCI +func (val *ExportOCI) Defaults() *ExportOCI { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.OciMediaTypes == nil { + ociMediaTypes_ := true + tmp.OciMediaTypes = &ociMediaTypes_ + } + if tmp.Tar == nil { + tar_ := true + tmp.Tar = &tar_ + } + return &tmp +} + +type ExportOCIArgs struct { + // Attach an arbitrary key/value annotation to the image. + Annotations pulumix.Input[map[string]string] `pulumi:"annotations"` + // The compression type to use. + Compression pulumix.Input[*CompressionType] `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"` + // The local export path. + Dest pulumix.Input[*string] `pulumi:"dest"` + // Forcefully apply compression. + ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"` + // Specify images names to export. This is overridden if tags are already specified. + Names pulumix.Input[[]string] `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes pulumix.Input[*bool] `pulumi:"ociMediaTypes"` + // Bundle the output into a tarball layout. + Tar pulumix.Input[*bool] `pulumi:"tar"` +} + +// Defaults sets the appropriate defaults for ExportOCIArgs +func (val *ExportOCIArgs) Defaults() *ExportOCIArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = pulumix.Ptr(CompressionType("gzip")) + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumix.Ptr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumix.Ptr(false) + } + if tmp.OciMediaTypes == nil { + tmp.OciMediaTypes = pulumix.Ptr(true) + } + if tmp.Tar == nil { + tmp.Tar = pulumix.Ptr(true) + } + return &tmp +} +func (ExportOCIArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportOCI)(nil)).Elem() +} + +func (i ExportOCIArgs) ToExportOCIOutput() ExportOCIOutput { + return i.ToExportOCIOutputWithContext(context.Background()) +} + +func (i ExportOCIArgs) ToExportOCIOutputWithContext(ctx context.Context) ExportOCIOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportOCIOutput) +} + +func (i *ExportOCIArgs) ToOutput(ctx context.Context) pulumix.Output[*ExportOCIArgs] { + return pulumix.Val(i) +} + +type ExportOCIOutput struct{ *pulumi.OutputState } + +func (ExportOCIOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportOCI)(nil)).Elem() +} + +func (o ExportOCIOutput) ToExportOCIOutput() ExportOCIOutput { + return o +} + +func (o ExportOCIOutput) ToExportOCIOutputWithContext(ctx context.Context) ExportOCIOutput { + return o +} + +func (o ExportOCIOutput) ToOutput(ctx context.Context) pulumix.Output[ExportOCI] { + return pulumix.Output[ExportOCI]{ + OutputState: o.OutputState, + } +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportOCIOutput) Annotations() pulumix.MapOutput[string] { + value := pulumix.Apply[ExportOCI](o, func(v ExportOCI) map[string]string { return v.Annotations }) + return pulumix.MapOutput[string]{OutputState: value.OutputState} +} + +// The compression type to use. +func (o ExportOCIOutput) Compression() pulumix.Output[*CompressionType] { + return pulumix.Apply[ExportOCI](o, func(v ExportOCI) *CompressionType { return v.Compression }) +} + +// Compression level from 0 to 22. +func (o ExportOCIOutput) CompressionLevel() pulumix.Output[*int] { + return pulumix.Apply[ExportOCI](o, func(v ExportOCI) *int { return v.CompressionLevel }) +} + +// The local export path. +func (o ExportOCIOutput) Dest() pulumix.Output[*string] { + return pulumix.Apply[ExportOCI](o, func(v ExportOCI) *string { return v.Dest }) +} + +// Forcefully apply compression. +func (o ExportOCIOutput) ForceCompression() pulumix.Output[*bool] { + return pulumix.Apply[ExportOCI](o, func(v ExportOCI) *bool { return v.ForceCompression }) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportOCIOutput) Names() pulumix.ArrayOutput[string] { + value := pulumix.Apply[ExportOCI](o, func(v ExportOCI) []string { return v.Names }) + return pulumix.ArrayOutput[string]{OutputState: value.OutputState} +} + +// Use OCI media types in exporter manifests. +func (o ExportOCIOutput) OciMediaTypes() pulumix.Output[*bool] { + return pulumix.Apply[ExportOCI](o, func(v ExportOCI) *bool { return v.OciMediaTypes }) +} + +// Bundle the output into a tarball layout. +func (o ExportOCIOutput) Tar() pulumix.Output[*bool] { + return pulumix.Apply[ExportOCI](o, func(v ExportOCI) *bool { return v.Tar }) +} + +type ExportRegistry struct { + // Attach an arbitrary key/value annotation to the image. + Annotations map[string]string `pulumi:"annotations"` + // The compression type to use. + Compression *CompressionType `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel *int `pulumi:"compressionLevel"` + // Name image with `prefix@`, used for anonymous images. + DanglingNamePrefix *string `pulumi:"danglingNamePrefix"` + // Forcefully apply compression. + ForceCompression *bool `pulumi:"forceCompression"` + // Allow pushing to an insecure registry. + Insecure *bool `pulumi:"insecure"` + // Add additional canonical name (`name@`). + NameCanonical *bool `pulumi:"nameCanonical"` + // Specify images names to export. This is overridden if tags are already specified. + Names []string `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes *bool `pulumi:"ociMediaTypes"` + // Push after creating the image. Defaults to `true`. + Push *bool `pulumi:"push"` + // Push image without name. + PushByDigest *bool `pulumi:"pushByDigest"` + // Store resulting images to the worker's image store and ensure all of + // its blobs are in the content store. + // + // Defaults to `true`. + // + // Ignored if the worker doesn't have image store (when using OCI workers, + // for example). + Store *bool `pulumi:"store"` + // Unpack image after creation (for use with containerd). Defaults to + // `false`. + Unpack *bool `pulumi:"unpack"` +} + +// Defaults sets the appropriate defaults for ExportRegistry +func (val *ExportRegistry) Defaults() *ExportRegistry { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + compression_ := CompressionType("gzip") + tmp.Compression = &compression_ + } + if tmp.CompressionLevel == nil { + compressionLevel_ := 0 + tmp.CompressionLevel = &compressionLevel_ + } + if tmp.ForceCompression == nil { + forceCompression_ := false + tmp.ForceCompression = &forceCompression_ + } + if tmp.OciMediaTypes == nil { + ociMediaTypes_ := false + tmp.OciMediaTypes = &ociMediaTypes_ + } + if tmp.Push == nil { + push_ := true + tmp.Push = &push_ + } + if tmp.Store == nil { + store_ := true + tmp.Store = &store_ + } + return &tmp +} + +type ExportRegistryArgs struct { + // Attach an arbitrary key/value annotation to the image. + Annotations pulumix.Input[map[string]string] `pulumi:"annotations"` + // The compression type to use. + Compression pulumix.Input[*CompressionType] `pulumi:"compression"` + // Compression level from 0 to 22. + CompressionLevel pulumix.Input[*int] `pulumi:"compressionLevel"` + // Name image with `prefix@`, used for anonymous images. + DanglingNamePrefix pulumix.Input[*string] `pulumi:"danglingNamePrefix"` + // Forcefully apply compression. + ForceCompression pulumix.Input[*bool] `pulumi:"forceCompression"` + // Allow pushing to an insecure registry. + Insecure pulumix.Input[*bool] `pulumi:"insecure"` + // Add additional canonical name (`name@`). + NameCanonical pulumix.Input[*bool] `pulumi:"nameCanonical"` + // Specify images names to export. This is overridden if tags are already specified. + Names pulumix.Input[[]string] `pulumi:"names"` + // Use OCI media types in exporter manifests. + OciMediaTypes pulumix.Input[*bool] `pulumi:"ociMediaTypes"` + // Push after creating the image. Defaults to `true`. + Push pulumix.Input[*bool] `pulumi:"push"` + // Push image without name. + PushByDigest pulumix.Input[*bool] `pulumi:"pushByDigest"` + // Store resulting images to the worker's image store and ensure all of + // its blobs are in the content store. + // + // Defaults to `true`. + // + // Ignored if the worker doesn't have image store (when using OCI workers, + // for example). + Store pulumix.Input[*bool] `pulumi:"store"` + // Unpack image after creation (for use with containerd). Defaults to + // `false`. + Unpack pulumix.Input[*bool] `pulumi:"unpack"` +} + +// Defaults sets the appropriate defaults for ExportRegistryArgs +func (val *ExportRegistryArgs) Defaults() *ExportRegistryArgs { + if val == nil { + return nil + } + tmp := *val + if tmp.Compression == nil { + tmp.Compression = pulumix.Ptr(CompressionType("gzip")) + } + if tmp.CompressionLevel == nil { + tmp.CompressionLevel = pulumix.Ptr(0) + } + if tmp.ForceCompression == nil { + tmp.ForceCompression = pulumix.Ptr(false) + } + if tmp.OciMediaTypes == nil { + tmp.OciMediaTypes = pulumix.Ptr(false) + } + if tmp.Push == nil { + tmp.Push = pulumix.Ptr(true) + } + if tmp.Store == nil { + tmp.Store = pulumix.Ptr(true) + } + return &tmp +} +func (ExportRegistryArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportRegistry)(nil)).Elem() +} + +func (i ExportRegistryArgs) ToExportRegistryOutput() ExportRegistryOutput { + return i.ToExportRegistryOutputWithContext(context.Background()) +} + +func (i ExportRegistryArgs) ToExportRegistryOutputWithContext(ctx context.Context) ExportRegistryOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportRegistryOutput) +} + +func (i *ExportRegistryArgs) ToOutput(ctx context.Context) pulumix.Output[*ExportRegistryArgs] { + return pulumix.Val(i) +} + +type ExportRegistryOutput struct{ *pulumi.OutputState } + +func (ExportRegistryOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportRegistry)(nil)).Elem() +} + +func (o ExportRegistryOutput) ToExportRegistryOutput() ExportRegistryOutput { + return o +} + +func (o ExportRegistryOutput) ToExportRegistryOutputWithContext(ctx context.Context) ExportRegistryOutput { + return o +} + +func (o ExportRegistryOutput) ToOutput(ctx context.Context) pulumix.Output[ExportRegistry] { + return pulumix.Output[ExportRegistry]{ + OutputState: o.OutputState, + } +} + +// Attach an arbitrary key/value annotation to the image. +func (o ExportRegistryOutput) Annotations() pulumix.MapOutput[string] { + value := pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) map[string]string { return v.Annotations }) + return pulumix.MapOutput[string]{OutputState: value.OutputState} +} + +// The compression type to use. +func (o ExportRegistryOutput) Compression() pulumix.Output[*CompressionType] { + return pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) *CompressionType { return v.Compression }) +} + +// Compression level from 0 to 22. +func (o ExportRegistryOutput) CompressionLevel() pulumix.Output[*int] { + return pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) *int { return v.CompressionLevel }) +} + +// Name image with `prefix@`, used for anonymous images. +func (o ExportRegistryOutput) DanglingNamePrefix() pulumix.Output[*string] { + return pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) *string { return v.DanglingNamePrefix }) +} + +// Forcefully apply compression. +func (o ExportRegistryOutput) ForceCompression() pulumix.Output[*bool] { + return pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) *bool { return v.ForceCompression }) +} + +// Allow pushing to an insecure registry. +func (o ExportRegistryOutput) Insecure() pulumix.Output[*bool] { + return pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) *bool { return v.Insecure }) +} + +// Add additional canonical name (`name@`). +func (o ExportRegistryOutput) NameCanonical() pulumix.Output[*bool] { + return pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) *bool { return v.NameCanonical }) +} + +// Specify images names to export. This is overridden if tags are already specified. +func (o ExportRegistryOutput) Names() pulumix.ArrayOutput[string] { + value := pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) []string { return v.Names }) + return pulumix.ArrayOutput[string]{OutputState: value.OutputState} +} + +// Use OCI media types in exporter manifests. +func (o ExportRegistryOutput) OciMediaTypes() pulumix.Output[*bool] { + return pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) *bool { return v.OciMediaTypes }) +} + +// Push after creating the image. Defaults to `true`. +func (o ExportRegistryOutput) Push() pulumix.Output[*bool] { + return pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) *bool { return v.Push }) +} + +// Push image without name. +func (o ExportRegistryOutput) PushByDigest() pulumix.Output[*bool] { + return pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) *bool { return v.PushByDigest }) +} + +// Store resulting images to the worker's image store and ensure all of +// its blobs are in the content store. +// +// Defaults to `true`. +// +// Ignored if the worker doesn't have image store (when using OCI workers, +// for example). +func (o ExportRegistryOutput) Store() pulumix.Output[*bool] { + return pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) *bool { return v.Store }) +} + +// Unpack image after creation (for use with containerd). Defaults to +// `false`. +func (o ExportRegistryOutput) Unpack() pulumix.Output[*bool] { + return pulumix.Apply[ExportRegistry](o, func(v ExportRegistry) *bool { return v.Unpack }) +} + +type ExportTar struct { + // Output path. + Dest string `pulumi:"dest"` +} + +type ExportTarArgs struct { + // Output path. + Dest pulumix.Input[string] `pulumi:"dest"` +} + +func (ExportTarArgs) ElementType() reflect.Type { + return reflect.TypeOf((*ExportTar)(nil)).Elem() +} + +func (i ExportTarArgs) ToExportTarOutput() ExportTarOutput { + return i.ToExportTarOutputWithContext(context.Background()) +} + +func (i ExportTarArgs) ToExportTarOutputWithContext(ctx context.Context) ExportTarOutput { + return pulumi.ToOutputWithContext(ctx, i).(ExportTarOutput) +} + +func (i *ExportTarArgs) ToOutput(ctx context.Context) pulumix.Output[*ExportTarArgs] { + return pulumix.Val(i) +} + +type ExportTarOutput struct{ *pulumi.OutputState } + +func (ExportTarOutput) ElementType() reflect.Type { + return reflect.TypeOf((*ExportTar)(nil)).Elem() +} + +func (o ExportTarOutput) ToExportTarOutput() ExportTarOutput { + return o +} + +func (o ExportTarOutput) ToExportTarOutputWithContext(ctx context.Context) ExportTarOutput { + return o +} + +func (o ExportTarOutput) ToOutput(ctx context.Context) pulumix.Output[ExportTar] { + return pulumix.Output[ExportTar]{ + OutputState: o.OutputState, + } +} + +// Output path. +func (o ExportTarOutput) Dest() pulumix.Output[string] { + return pulumix.Apply[ExportTar](o, func(v ExportTar) string { return v.Dest }) +} + +type Registry struct { + // The registry's address (e.g. "docker.io"). + Address string `pulumi:"address"` + // Password or token for the registry. + Password *string `pulumi:"password"` + // Username for the registry. + Username *string `pulumi:"username"` +} + +type RegistryArgs struct { + // The registry's address (e.g. "docker.io"). + Address pulumix.Input[string] `pulumi:"address"` + // Password or token for the registry. + Password pulumix.Input[*string] `pulumi:"password"` + // Username for the registry. + Username pulumix.Input[*string] `pulumi:"username"` +} + +func (RegistryArgs) ElementType() reflect.Type { + return reflect.TypeOf((*Registry)(nil)).Elem() +} + +func (i RegistryArgs) ToRegistryOutput() RegistryOutput { + return i.ToRegistryOutputWithContext(context.Background()) +} + +func (i RegistryArgs) ToRegistryOutputWithContext(ctx context.Context) RegistryOutput { + return pulumi.ToOutputWithContext(ctx, i).(RegistryOutput) +} + +func (i *RegistryArgs) ToOutput(ctx context.Context) pulumix.Output[*RegistryArgs] { + return pulumix.Val(i) +} + +type RegistryOutput struct{ *pulumi.OutputState } + +func (RegistryOutput) ElementType() reflect.Type { + return reflect.TypeOf((*Registry)(nil)).Elem() +} + +func (o RegistryOutput) ToRegistryOutput() RegistryOutput { + return o +} + +func (o RegistryOutput) ToRegistryOutputWithContext(ctx context.Context) RegistryOutput { + return o +} + +func (o RegistryOutput) ToOutput(ctx context.Context) pulumix.Output[Registry] { + return pulumix.Output[Registry]{ + OutputState: o.OutputState, + } +} + +// The registry's address (e.g. "docker.io"). +func (o RegistryOutput) Address() pulumix.Output[string] { + return pulumix.Apply[Registry](o, func(v Registry) string { return v.Address }) +} + +// Password or token for the registry. +func (o RegistryOutput) Password() pulumix.Output[*string] { + return pulumix.Apply[Registry](o, func(v Registry) *string { return v.Password }) +} + +// Username for the registry. +func (o RegistryOutput) Username() pulumix.Output[*string] { + return pulumix.Apply[Registry](o, func(v Registry) *string { return v.Username }) +} + +type SSH struct { + // Useful for distinguishing different servers that are part of the same + // build. + // + // A value of `default` is appropriate if only dealing with a single host. + Id string `pulumi:"id"` + // SSH agent socket or private keys to expose to the build under the given + // identifier. + // + // Defaults to `[$SSH_AUTH_SOCK]`. + // + // Note that your keys are **not** automatically added when using an + // agent. Run `ssh-add -l` locally to confirm which public keys are + // visible to the agent; these will be exposed to your build. + Paths []string `pulumi:"paths"` +} + +type SSHArgs struct { + // Useful for distinguishing different servers that are part of the same + // build. + // + // A value of `default` is appropriate if only dealing with a single host. + Id pulumix.Input[string] `pulumi:"id"` + // SSH agent socket or private keys to expose to the build under the given + // identifier. + // + // Defaults to `[$SSH_AUTH_SOCK]`. + // + // Note that your keys are **not** automatically added when using an + // agent. Run `ssh-add -l` locally to confirm which public keys are + // visible to the agent; these will be exposed to your build. + Paths pulumix.Input[[]string] `pulumi:"paths"` +} + +func (SSHArgs) ElementType() reflect.Type { + return reflect.TypeOf((*SSH)(nil)).Elem() +} + +func (i SSHArgs) ToSSHOutput() SSHOutput { + return i.ToSSHOutputWithContext(context.Background()) +} + +func (i SSHArgs) ToSSHOutputWithContext(ctx context.Context) SSHOutput { + return pulumi.ToOutputWithContext(ctx, i).(SSHOutput) +} + +func (i *SSHArgs) ToOutput(ctx context.Context) pulumix.Output[*SSHArgs] { + return pulumix.Val(i) +} + +type SSHOutput struct{ *pulumi.OutputState } + +func (SSHOutput) ElementType() reflect.Type { + return reflect.TypeOf((*SSH)(nil)).Elem() +} + +func (o SSHOutput) ToSSHOutput() SSHOutput { + return o +} + +func (o SSHOutput) ToSSHOutputWithContext(ctx context.Context) SSHOutput { + return o +} + +func (o SSHOutput) ToOutput(ctx context.Context) pulumix.Output[SSH] { + return pulumix.Output[SSH]{ + OutputState: o.OutputState, + } +} + +// Useful for distinguishing different servers that are part of the same +// build. +// +// A value of `default` is appropriate if only dealing with a single host. +func (o SSHOutput) Id() pulumix.Output[string] { + return pulumix.Apply[SSH](o, func(v SSH) string { return v.Id }) +} + +// SSH agent socket or private keys to expose to the build under the given +// identifier. +// +// Defaults to `[$SSH_AUTH_SOCK]`. +// +// Note that your keys are **not** automatically added when using an +// agent. Run `ssh-add -l` locally to confirm which public keys are +// visible to the agent; these will be exposed to your build. +func (o SSHOutput) Paths() pulumix.ArrayOutput[string] { + value := pulumix.Apply[SSH](o, func(v SSH) []string { return v.Paths }) + return pulumix.ArrayOutput[string]{OutputState: value.OutputState} +} + +func init() { + pulumi.RegisterOutputType(BuildContextOutput{}) + pulumi.RegisterOutputType(BuilderConfigOutput{}) + pulumi.RegisterOutputType(CacheFromOutput{}) + pulumi.RegisterOutputType(CacheFromAzureBlobOutput{}) + pulumi.RegisterOutputType(CacheFromGitHubActionsOutput{}) + pulumi.RegisterOutputType(CacheFromLocalOutput{}) + pulumi.RegisterOutputType(CacheFromRegistryOutput{}) + pulumi.RegisterOutputType(CacheFromS3Output{}) + pulumi.RegisterOutputType(CacheToOutput{}) + pulumi.RegisterOutputType(CacheToAzureBlobOutput{}) + pulumi.RegisterOutputType(CacheToGitHubActionsOutput{}) + pulumi.RegisterOutputType(CacheToInlineOutput{}) + pulumi.RegisterOutputType(CacheToLocalOutput{}) + pulumi.RegisterOutputType(CacheToRegistryOutput{}) + pulumi.RegisterOutputType(CacheToS3Output{}) + pulumi.RegisterOutputType(ContextOutput{}) + pulumi.RegisterOutputType(DockerfileOutput{}) + pulumi.RegisterOutputType(ExportOutput{}) + pulumi.RegisterOutputType(ExportCacheOnlyOutput{}) + pulumi.RegisterOutputType(ExportDockerOutput{}) + pulumi.RegisterOutputType(ExportImageOutput{}) + pulumi.RegisterOutputType(ExportLocalOutput{}) + pulumi.RegisterOutputType(ExportOCIOutput{}) + pulumi.RegisterOutputType(ExportRegistryOutput{}) + pulumi.RegisterOutputType(ExportTarOutput{}) + pulumi.RegisterOutputType(RegistryOutput{}) + pulumi.RegisterOutputType(SSHOutput{}) +} diff --git a/sdk/java/README.md b/sdk/java/README.md index 6e37fcc..a778720 100644 --- a/sdk/java/README.md +++ b/sdk/java/README.md @@ -1 +1 @@ -Description +A Pulumi provider for building modern Docker images with buildx and BuildKit. diff --git a/sdk/java/settings.gradle b/sdk/java/settings.gradle index 1704904..74155ae 100644 --- a/sdk/java/settings.gradle +++ b/sdk/java/settings.gradle @@ -10,5 +10,5 @@ pluginManagement { } } -rootProject.name = "com.pulumi.dockerbuild" +rootProject.name = "com.pulumi.docker-build" include("lib") diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/Config.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/Config.java new file mode 100644 index 0000000..188bc35 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/Config.java @@ -0,0 +1,26 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild; + +import com.pulumi.core.TypeShape; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.inputs.Registry; +import java.lang.String; +import java.util.List; +import java.util.Optional; + +public final class Config { + + private static final com.pulumi.Config config = com.pulumi.Config.of("docker-build"); +/** + * The build daemon's address. + * + */ + public Optional host() { + return Codegen.stringProp("host").config(config).env("DOCKER_HOST").def("").get(); + } + public Optional> registries() { + return Codegen.objectProp("registries", TypeShape.>builder(List.class).addParameter(Registry.class).build()).config(config).get(); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/Image.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/Image.java new file mode 100644 index 0000000..9e04fd9 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/Image.java @@ -0,0 +1,1257 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.ImageArgs; +import com.pulumi.dockerbuild.Utilities; +import com.pulumi.dockerbuild.enums.NetworkMode; +import com.pulumi.dockerbuild.enums.Platform; +import com.pulumi.dockerbuild.outputs.BuildContext; +import com.pulumi.dockerbuild.outputs.BuilderConfig; +import com.pulumi.dockerbuild.outputs.CacheFrom; +import com.pulumi.dockerbuild.outputs.CacheTo; +import com.pulumi.dockerbuild.outputs.Dockerfile; +import com.pulumi.dockerbuild.outputs.Registry; +import com.pulumi.dockerbuild.outputs.SSH; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import javax.annotation.Nullable; + +/** + * A Docker image built using buildx -- Docker's interface to the improved + * BuildKit backend. + * + * ## Stability + * + * **This resource is pre-1.0 and in public preview.** + * + * We will strive to keep APIs and behavior as stable as possible, but we + * cannot guarantee stability until version 1.0. + * + * ## Migrating Pulumi Docker v3 and v4 Image resources + * + * This provider's `Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider. + * Existing `Image` resources can be converted to the docker-build `Image` resources with minor modifications. + * + * ### Behavioral differences + * + * There are several key behavioral differences to keep in mind when transitioning images to the new `Image` resource. + * + * #### Previews + * + * Version `3.x` of the Pulumi Docker provider always builds images during preview operations. + * This is helpful as a safeguard to prevent "broken" images from merging, but users found the behavior unnecessarily redundant when running previews and updates locally. + * + * 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. + * Several users reported outages due to the default behavior allowing bad images to accidentally sneak through CI. + * + * The default behavior of this provider's `Image` resource is similar to `3.x` and will build images during previews. + * This behavior can be changed by specifying `buildOnPreview`. + * + * #### Push behavior + * + * 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. + * + * This provider's `Image` resource matches the Docker CLI's behavior and does not push images anywhere by default. + * + * To push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`). + * Like Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally. + * + * #### Secrets + * + * Version `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field. + * + * Version `4.x` of the Pulumi Docker provider does not support secrets. + * + * The `Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables. + * Instead, they should be passed directly as values. + * (Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).) + * Pulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments. + * + * #### Caching + * + * Version `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`. + * It builds targets individually and pushes them to separate images for caching. + * + * Version `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches. + * + * Both versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior. + * This can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc. + * + * The `Image` resource delegates all caching behavior to Docker. + * `cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc. + * + * #### Outputs + * + * Versions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest. + * In `4.x` this could also be a single sha256 hash if the image wasn't pushed. + * + * Unlike earlier providers the `Image` resource can push multiple tags. + * As a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed. + * If multiple tags were pushed this uses one at random. + * + * If you need more control over tag references you can use the `digest` output, which is always a single sha256 hash as long as the image was exported somewhere. + * + * #### Tag deletion and refreshes + * + * Versions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` resource is deleted, nor do they confirm expected tags exist during `refresh` operations. + * + * The `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist. + * If any are missing a subsequent `update` will push them. + * + * When a `Image` is deleted, it will _attempt_ to also delete any pushed tags. + * Deletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular). + * Manifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace. + * + * Use the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted. + * + * ### Example migration + * + * Examples of "fully-featured" `v3` and `v4` `Image` resources are shown below, along with an example `Image` resource showing how they would look after migration. + * + * The `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`. + * After migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`. + * In almost all cases, properties of `Image` are named after the Docker CLI flag they correspond to. + * + * The `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`. + * It it is shown with parameters similar to the `v3` example for completeness. + * + * ## Example Usage + * + * ## Example Usage + * ### Push to AWS ECR with caching + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.aws.ecr.Repository; + * import com.pulumi.aws.ecr.EcrFunctions; + * import com.pulumi.aws.ecr.inputs.GetAuthorizationTokenArgs; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.CacheFromArgs; + * import com.pulumi.dockerbuild.inputs.CacheFromRegistryArgs; + * import com.pulumi.dockerbuild.inputs.CacheToArgs; + * import com.pulumi.dockerbuild.inputs.CacheToRegistryArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import com.pulumi.dockerbuild.inputs.RegistryArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var ecrRepository = new Repository("ecrRepository"); + * + * final var authToken = EcrFunctions.getAuthorizationToken(GetAuthorizationTokenArgs.builder() + * .registryId(ecrRepository.registryId()) + * .build()); + * + * var myImage = new Image("myImage", ImageArgs.builder() + * .cacheFrom(CacheFromArgs.builder() + * .registry(CacheFromRegistryArgs.builder() + * .ref(ecrRepository.repositoryUrl().applyValue(repositoryUrl -> String.format("%s:cache", repositoryUrl))) + * .build()) + * .build()) + * .cacheTo(CacheToArgs.builder() + * .registry(CacheToRegistryArgs.builder() + * .imageManifest(true) + * .ociMediaTypes(true) + * .ref(ecrRepository.repositoryUrl().applyValue(repositoryUrl -> String.format("%s:cache", repositoryUrl))) + * .build()) + * .build()) + * .context(BuildContextArgs.builder() + * .location("./app") + * .build()) + * .push(true) + * .registries(RegistryArgs.builder() + * .address(ecrRepository.repositoryUrl()) + * .password(authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult).applyValue(authToken -> authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult.password()))) + * .username(authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult).applyValue(authToken -> authToken.applyValue(getAuthorizationTokenResult -> getAuthorizationTokenResult.userName()))) + * .build()) + * .tags(ecrRepository.repositoryUrl().applyValue(repositoryUrl -> String.format("%s:latest", repositoryUrl))) + * .build()); + * + * ctx.export("ref", myImage.ref()); + * } + * } + * ``` + * ### Multi-platform image + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var image = new Image("image", ImageArgs.builder() + * .context(BuildContextArgs.builder() + * .location("app") + * .build()) + * .platforms( + * "plan9/amd64", + * "plan9/386") + * .push(false) + * .build()); + * + * } + * } + * ``` + * ### Registry export + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import com.pulumi.dockerbuild.inputs.RegistryArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var image = new Image("image", ImageArgs.builder() + * .context(BuildContextArgs.builder() + * .location("app") + * .build()) + * .push(true) + * .registries(RegistryArgs.builder() + * .address("docker.io") + * .password(dockerHubPassword) + * .username("pulumibot") + * .build()) + * .tags("docker.io/pulumi/pulumi:3.107.0") + * .build()); + * + * ctx.export("ref", myImage.ref()); + * } + * } + * ``` + * ### Caching + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.CacheFromArgs; + * import com.pulumi.dockerbuild.inputs.CacheFromLocalArgs; + * import com.pulumi.dockerbuild.inputs.CacheToArgs; + * import com.pulumi.dockerbuild.inputs.CacheToLocalArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var image = new Image("image", ImageArgs.builder() + * .cacheFrom(CacheFromArgs.builder() + * .local(CacheFromLocalArgs.builder() + * .src("tmp/cache") + * .build()) + * .build()) + * .cacheTo(CacheToArgs.builder() + * .local(CacheToLocalArgs.builder() + * .dest("tmp/cache") + * .mode("max") + * .build()) + * .build()) + * .context(BuildContextArgs.builder() + * .location("app") + * .build()) + * .push(false) + * .build()); + * + * } + * } + * ``` + * ### Docker Build Cloud + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.BuilderConfigArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var image = new Image("image", ImageArgs.builder() + * .builder(BuilderConfigArgs.builder() + * .name("cloud-builder-name") + * .build()) + * .context(BuildContextArgs.builder() + * .location("app") + * .build()) + * .exec(true) + * .push(false) + * .build()); + * + * } + * } + * ``` + * ### Build arguments + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var image = new Image("image", ImageArgs.builder() + * .buildArgs(Map.of("SET_ME_TO_TRUE", "true")) + * .context(BuildContextArgs.builder() + * .location("app") + * .build()) + * .push(false) + * .build()); + * + * } + * } + * ``` + * ### Build target + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var image = new Image("image", ImageArgs.builder() + * .context(BuildContextArgs.builder() + * .location("app") + * .build()) + * .push(false) + * .target("build-me") + * .build()); + * + * } + * } + * ``` + * ### Named contexts + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var image = new Image("image", ImageArgs.builder() + * .context(BuildContextArgs.builder() + * .location("app") + * .named(Map.of("golang:latest", Map.of("location", "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984"))) + * .build()) + * .push(false) + * .build()); + * + * } + * } + * ``` + * ### Remote context + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var image = new Image("image", ImageArgs.builder() + * .context(BuildContextArgs.builder() + * .location("https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile") + * .build()) + * .push(false) + * .build()); + * + * } + * } + * ``` + * ### Inline Dockerfile + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import com.pulumi.dockerbuild.inputs.DockerfileArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var image = new Image("image", ImageArgs.builder() + * .context(BuildContextArgs.builder() + * .location("app") + * .build()) + * .dockerfile(DockerfileArgs.builder() + * .inline(""" + * FROM busybox + * COPY hello.c ./ + * """) + * .build()) + * .push(false) + * .build()); + * + * } + * } + * ``` + * ### Remote context + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import com.pulumi.dockerbuild.inputs.DockerfileArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var image = new Image("image", ImageArgs.builder() + * .context(BuildContextArgs.builder() + * .location("https://github.com/docker-library/hello-world.git") + * .build()) + * .dockerfile(DockerfileArgs.builder() + * .location("app/Dockerfile") + * .build()) + * .push(false) + * .build()); + * + * } + * } + * ``` + * ### Local export + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import com.pulumi.dockerbuild.inputs.ExportArgs; + * import com.pulumi.dockerbuild.inputs.ExportDockerArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var image = new Image("image", ImageArgs.builder() + * .context(BuildContextArgs.builder() + * .location("app") + * .build()) + * .exports(ExportArgs.builder() + * .docker(ExportDockerArgs.builder() + * .tar(true) + * .build()) + * .build()) + * .push(false) + * .build()); + * + * } + * } + * ``` + * + */ +@ResourceType(type="docker-build:index:Image") +public class Image extends com.pulumi.resources.CustomResource { + /** + * Custom `host:ip` mappings to use during the build. + * + * Equivalent to Docker's `--add-host` flag. + * + */ + @Export(name="addHosts", refs={List.class,String.class}, tree="[0,1]") + private Output> addHosts; + + /** + * @return Custom `host:ip` mappings to use during the build. + * + * Equivalent to Docker's `--add-host` flag. + * + */ + public Output>> addHosts() { + return Codegen.optional(this.addHosts); + } + /** + * `ARG` names and values to set during the build. + * + * These variables are accessed like environment variables inside `RUN` + * instructions. + * + * Build arguments are persisted in the image, so you should use `secrets` + * if these arguments are sensitive. + * + * Equivalent to Docker's `--build-arg` flag. + * + */ + @Export(name="buildArgs", refs={Map.class,String.class}, tree="[0,1,1]") + private Output> buildArgs; + + /** + * @return `ARG` names and values to set during the build. + * + * These variables are accessed like environment variables inside `RUN` + * instructions. + * + * Build arguments are persisted in the image, so you should use `secrets` + * if these arguments are sensitive. + * + * Equivalent to Docker's `--build-arg` flag. + * + */ + public Output>> buildArgs() { + return Codegen.optional(this.buildArgs); + } + /** + * Setting this to `false` will always skip image builds during previews, + * and setting it to `true` will always build images during previews. + * + * Images built during previews are never exported to registries, however + * cache manifests are still exported. + * + * On-disk Dockerfiles are always validated for syntactic correctness + * regardless of this setting. + * + * Defaults to `true` as a safeguard against broken images merging as part + * of CI pipelines. + * + */ + @Export(name="buildOnPreview", refs={Boolean.class}, tree="[0]") + private Output buildOnPreview; + + /** + * @return Setting this to `false` will always skip image builds during previews, + * and setting it to `true` will always build images during previews. + * + * Images built during previews are never exported to registries, however + * cache manifests are still exported. + * + * On-disk Dockerfiles are always validated for syntactic correctness + * regardless of this setting. + * + * Defaults to `true` as a safeguard against broken images merging as part + * of CI pipelines. + * + */ + public Output> buildOnPreview() { + return Codegen.optional(this.buildOnPreview); + } + /** + * Builder configuration. + * + */ + @Export(name="builder", refs={BuilderConfig.class}, tree="[0]") + private Output builder; + + /** + * @return Builder configuration. + * + */ + public Output> builder_() { + return Codegen.optional(this.builder); + } + /** + * Cache export configuration. + * + * Equivalent to Docker's `--cache-from` flag. + * + */ + @Export(name="cacheFrom", refs={List.class,CacheFrom.class}, tree="[0,1]") + private Output> cacheFrom; + + /** + * @return Cache export configuration. + * + * Equivalent to Docker's `--cache-from` flag. + * + */ + public Output>> cacheFrom() { + return Codegen.optional(this.cacheFrom); + } + /** + * Cache import configuration. + * + * Equivalent to Docker's `--cache-to` flag. + * + */ + @Export(name="cacheTo", refs={List.class,CacheTo.class}, tree="[0,1]") + private Output> cacheTo; + + /** + * @return Cache import configuration. + * + * Equivalent to Docker's `--cache-to` flag. + * + */ + public Output>> cacheTo() { + return Codegen.optional(this.cacheTo); + } + /** + * Build context settings. + * + * Equivalent to Docker's `PATH | URL | -` positional argument. + * + */ + @Export(name="context", refs={BuildContext.class}, tree="[0]") + private Output context; + + /** + * @return Build context settings. + * + * Equivalent to Docker's `PATH | URL | -` positional argument. + * + */ + public Output> context() { + return Codegen.optional(this.context); + } + /** + * A preliminary hash of the image's build context. + * + * Pulumi uses this to determine if an image _may_ need to be re-built. + * + */ + @Export(name="contextHash", refs={String.class}, tree="[0]") + private Output contextHash; + + /** + * @return A preliminary hash of the image's build context. + * + * Pulumi uses this to determine if an image _may_ need to be re-built. + * + */ + public Output contextHash() { + return this.contextHash; + } + /** + * A SHA256 digest of the image if it was exported to a registry or + * elsewhere. + * + * Empty if the image was not exported. + * + * Registry images can be referenced precisely as `<tag>@<digest>`. The + * `ref` output provides one such reference as a convenience. + * + */ + @Export(name="digest", refs={String.class}, tree="[0]") + private Output digest; + + /** + * @return A SHA256 digest of the image if it was exported to a registry or + * elsewhere. + * + * Empty if the image was not exported. + * + * Registry images can be referenced precisely as `<tag>@<digest>`. The + * `ref` output provides one such reference as a convenience. + * + */ + public Output digest() { + return this.digest; + } + /** + * Dockerfile settings. + * + * Equivalent to Docker's `--file` flag. + * + */ + @Export(name="dockerfile", refs={Dockerfile.class}, tree="[0]") + private Output dockerfile; + + /** + * @return Dockerfile settings. + * + * Equivalent to Docker's `--file` flag. + * + */ + public Output> dockerfile() { + return Codegen.optional(this.dockerfile); + } + /** + * Use `exec` mode to build this image. + * + * By default the provider embeds a v25 Docker client with v0.12 buildx + * support. This helps ensure consistent behavior across environments and + * is compatible with alternative build backends (e.g. `buildkitd`), but + * it may not be desirable if you require a specific version of buildx. + * For example you may want to run a custom `docker-buildx` binary with + * support for [Docker Build + * Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + * + * When this is set to `true` the provider will instead execute the + * `docker-buildx` binary directly to perform its operations. The user is + * responsible for ensuring this binary exists, with correct permissions + * and pre-configured builders, at a path Docker expects (e.g. + * `~/.docker/cli-plugins`). + * + * Debugging `exec` mode may be more difficult as Pulumi will not be able + * to surface fine-grained errors and warnings. Additionally credentials + * are temporarily written to disk in order to provide them to the + * `docker-buildx` binary. + * + */ + @Export(name="exec", refs={Boolean.class}, tree="[0]") + private Output exec; + + /** + * @return Use `exec` mode to build this image. + * + * By default the provider embeds a v25 Docker client with v0.12 buildx + * support. This helps ensure consistent behavior across environments and + * is compatible with alternative build backends (e.g. `buildkitd`), but + * it may not be desirable if you require a specific version of buildx. + * For example you may want to run a custom `docker-buildx` binary with + * support for [Docker Build + * Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + * + * When this is set to `true` the provider will instead execute the + * `docker-buildx` binary directly to perform its operations. The user is + * responsible for ensuring this binary exists, with correct permissions + * and pre-configured builders, at a path Docker expects (e.g. + * `~/.docker/cli-plugins`). + * + * Debugging `exec` mode may be more difficult as Pulumi will not be able + * to surface fine-grained errors and warnings. Additionally credentials + * are temporarily written to disk in order to provide them to the + * `docker-buildx` binary. + * + */ + public Output> exec() { + return Codegen.optional(this.exec); + } + /** + * Controls where images are persisted after building. + * + * Images are only stored in the local cache unless `exports` are + * explicitly configured. + * + * Exporting to multiple destinations requires a daemon running BuildKit + * 0.13 or later. + * + * Equivalent to Docker's `--output` flag. + * + */ + @Export(name="exports", refs={List.class,com.pulumi.dockerbuild.outputs.Export.class}, tree="[0,1]") + private Output> exports; + + /** + * @return Controls where images are persisted after building. + * + * Images are only stored in the local cache unless `exports` are + * explicitly configured. + * + * Exporting to multiple destinations requires a daemon running BuildKit + * 0.13 or later. + * + * Equivalent to Docker's `--output` flag. + * + */ + public Output>> exports() { + return Codegen.optional(this.exports); + } + /** + * Attach arbitrary key/value metadata to the image. + * + * Equivalent to Docker's `--label` flag. + * + */ + @Export(name="labels", refs={Map.class,String.class}, tree="[0,1,1]") + private Output> labels; + + /** + * @return Attach arbitrary key/value metadata to the image. + * + * Equivalent to Docker's `--label` flag. + * + */ + public Output>> labels() { + return Codegen.optional(this.labels); + } + /** + * When `true` the build will automatically include a `docker` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--load` flag. + * + */ + @Export(name="load", refs={Boolean.class}, tree="[0]") + private Output load; + + /** + * @return When `true` the build will automatically include a `docker` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--load` flag. + * + */ + public Output> load() { + return Codegen.optional(this.load); + } + /** + * Set the network mode for `RUN` instructions. Defaults to `default`. + * + * For custom networks, configure your builder with `--driver-opt network=...`. + * + * Equivalent to Docker's `--network` flag. + * + */ + @Export(name="network", refs={NetworkMode.class}, tree="[0]") + private Output network; + + /** + * @return Set the network mode for `RUN` instructions. Defaults to `default`. + * + * For custom networks, configure your builder with `--driver-opt network=...`. + * + * Equivalent to Docker's `--network` flag. + * + */ + public Output> network() { + return Codegen.optional(this.network); + } + /** + * Do not import cache manifests when building the image. + * + * Equivalent to Docker's `--no-cache` flag. + * + */ + @Export(name="noCache", refs={Boolean.class}, tree="[0]") + private Output noCache; + + /** + * @return Do not import cache manifests when building the image. + * + * Equivalent to Docker's `--no-cache` flag. + * + */ + public Output> noCache() { + return Codegen.optional(this.noCache); + } + /** + * Set target platform(s) for the build. Defaults to the host's platform. + * + * Equivalent to Docker's `--platform` flag. + * + */ + @Export(name="platforms", refs={List.class,Platform.class}, tree="[0,1]") + private Output> platforms; + + /** + * @return Set target platform(s) for the build. Defaults to the host's platform. + * + * Equivalent to Docker's `--platform` flag. + * + */ + public Output>> platforms() { + return Codegen.optional(this.platforms); + } + /** + * Always pull referenced images. + * + * Equivalent to Docker's `--pull` flag. + * + */ + @Export(name="pull", refs={Boolean.class}, tree="[0]") + private Output pull; + + /** + * @return Always pull referenced images. + * + * Equivalent to Docker's `--pull` flag. + * + */ + public Output> pull() { + return Codegen.optional(this.pull); + } + /** + * When `true` the build will automatically include a `registry` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--push` flag. + * + */ + @Export(name="push", refs={Boolean.class}, tree="[0]") + private Output push; + + /** + * @return When `true` the build will automatically include a `registry` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--push` flag. + * + */ + public Output push() { + return this.push; + } + /** + * If the image was pushed to any registries then this will contain a + * single fully-qualified tag including the build's digest. + * + * If the image had tags but was not exported, this will take on a value + * of one of those tags. + * + * This will be empty if the image had no exports and no tags. + * + * This is only for convenience and may not be appropriate for situations + * where multiple tags or registries are involved. In those cases this + * output is not guaranteed to be stable. + * + * For more control over tags consumed by downstream resources you should + * use the `digest` output. + * + */ + @Export(name="ref", refs={String.class}, tree="[0]") + private Output ref; + + /** + * @return If the image was pushed to any registries then this will contain a + * single fully-qualified tag including the build's digest. + * + * If the image had tags but was not exported, this will take on a value + * of one of those tags. + * + * This will be empty if the image had no exports and no tags. + * + * This is only for convenience and may not be appropriate for situations + * where multiple tags or registries are involved. In those cases this + * output is not guaranteed to be stable. + * + * For more control over tags consumed by downstream resources you should + * use the `digest` output. + * + */ + public Output ref() { + return this.ref; + } + /** + * Registry credentials. Required if reading or exporting to private + * repositories. + * + * Credentials are kept in-memory and do not pollute pre-existing + * credentials on the host. + * + * Similar to `docker login`. + * + */ + @Export(name="registries", refs={List.class,Registry.class}, tree="[0,1]") + private Output> registries; + + /** + * @return Registry credentials. Required if reading or exporting to private + * repositories. + * + * Credentials are kept in-memory and do not pollute pre-existing + * credentials on the host. + * + * Similar to `docker login`. + * + */ + public Output>> registries() { + return Codegen.optional(this.registries); + } + /** + * A mapping of secret names to their corresponding values. + * + * Unlike the Docker CLI, these can be passed by value and do not need to + * exist on-disk or in environment variables. + * + * Build arguments and environment variables are persistent in the final + * image, so you should use this for sensitive values. + * + * Similar to Docker's `--secret` flag. + * + */ + @Export(name="secrets", refs={Map.class,String.class}, tree="[0,1,1]") + private Output> secrets; + + /** + * @return A mapping of secret names to their corresponding values. + * + * Unlike the Docker CLI, these can be passed by value and do not need to + * exist on-disk or in environment variables. + * + * Build arguments and environment variables are persistent in the final + * image, so you should use this for sensitive values. + * + * Similar to Docker's `--secret` flag. + * + */ + public Output>> secrets() { + return Codegen.optional(this.secrets); + } + /** + * SSH agent socket or keys to expose to the build. + * + * Equivalent to Docker's `--ssh` flag. + * + */ + @Export(name="ssh", refs={List.class,SSH.class}, tree="[0,1]") + private Output> ssh; + + /** + * @return SSH agent socket or keys to expose to the build. + * + * Equivalent to Docker's `--ssh` flag. + * + */ + public Output>> ssh() { + return Codegen.optional(this.ssh); + } + /** + * Name and optionally a tag (format: `name:tag`). + * + * If exporting to a registry, the name should include the fully qualified + * registry address (e.g. `docker.io/pulumi/pulumi:latest`). + * + * Equivalent to Docker's `--tag` flag. + * + */ + @Export(name="tags", refs={List.class,String.class}, tree="[0,1]") + private Output> tags; + + /** + * @return Name and optionally a tag (format: `name:tag`). + * + * If exporting to a registry, the name should include the fully qualified + * registry address (e.g. `docker.io/pulumi/pulumi:latest`). + * + * Equivalent to Docker's `--tag` flag. + * + */ + public Output>> tags() { + return Codegen.optional(this.tags); + } + /** + * Set the target build stage(s) to build. + * + * If not specified all targets will be built by default. + * + * Equivalent to Docker's `--target` flag. + * + */ + @Export(name="target", refs={String.class}, tree="[0]") + private Output target; + + /** + * @return Set the target build stage(s) to build. + * + * If not specified all targets will be built by default. + * + * Equivalent to Docker's `--target` flag. + * + */ + public Output> target() { + return Codegen.optional(this.target); + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public Image(String name) { + this(name, ImageArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public Image(String name, ImageArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public Image(String name, ImageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("docker-build:index:Image", name, args == null ? ImageArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + } + + private Image(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("docker-build:index:Image", name, null, makeResourceOptions(options, id)); + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static Image get(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new Image(name, id, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/ImageArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/ImageArgs.java new file mode 100644 index 0000000..bfd71fb --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/ImageArgs.java @@ -0,0 +1,1389 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.enums.NetworkMode; +import com.pulumi.dockerbuild.enums.Platform; +import com.pulumi.dockerbuild.inputs.BuildContextArgs; +import com.pulumi.dockerbuild.inputs.BuilderConfigArgs; +import com.pulumi.dockerbuild.inputs.CacheFromArgs; +import com.pulumi.dockerbuild.inputs.CacheToArgs; +import com.pulumi.dockerbuild.inputs.DockerfileArgs; +import com.pulumi.dockerbuild.inputs.ExportArgs; +import com.pulumi.dockerbuild.inputs.RegistryArgs; +import com.pulumi.dockerbuild.inputs.SSHArgs; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class ImageArgs extends com.pulumi.resources.ResourceArgs { + + public static final ImageArgs Empty = new ImageArgs(); + + /** + * Custom `host:ip` mappings to use during the build. + * + * Equivalent to Docker's `--add-host` flag. + * + */ + @Import(name="addHosts") + private @Nullable Output> addHosts; + + /** + * @return Custom `host:ip` mappings to use during the build. + * + * Equivalent to Docker's `--add-host` flag. + * + */ + public Optional>> addHosts() { + return Optional.ofNullable(this.addHosts); + } + + /** + * `ARG` names and values to set during the build. + * + * These variables are accessed like environment variables inside `RUN` + * instructions. + * + * Build arguments are persisted in the image, so you should use `secrets` + * if these arguments are sensitive. + * + * Equivalent to Docker's `--build-arg` flag. + * + */ + @Import(name="buildArgs") + private @Nullable Output> buildArgs; + + /** + * @return `ARG` names and values to set during the build. + * + * These variables are accessed like environment variables inside `RUN` + * instructions. + * + * Build arguments are persisted in the image, so you should use `secrets` + * if these arguments are sensitive. + * + * Equivalent to Docker's `--build-arg` flag. + * + */ + public Optional>> buildArgs() { + return Optional.ofNullable(this.buildArgs); + } + + /** + * Setting this to `false` will always skip image builds during previews, + * and setting it to `true` will always build images during previews. + * + * Images built during previews are never exported to registries, however + * cache manifests are still exported. + * + * On-disk Dockerfiles are always validated for syntactic correctness + * regardless of this setting. + * + * Defaults to `true` as a safeguard against broken images merging as part + * of CI pipelines. + * + */ + @Import(name="buildOnPreview") + private @Nullable Output buildOnPreview; + + /** + * @return Setting this to `false` will always skip image builds during previews, + * and setting it to `true` will always build images during previews. + * + * Images built during previews are never exported to registries, however + * cache manifests are still exported. + * + * On-disk Dockerfiles are always validated for syntactic correctness + * regardless of this setting. + * + * Defaults to `true` as a safeguard against broken images merging as part + * of CI pipelines. + * + */ + public Optional> buildOnPreview() { + return Optional.ofNullable(this.buildOnPreview); + } + + /** + * Builder configuration. + * + */ + @Import(name="builder") + private @Nullable Output builder; + + /** + * @return Builder configuration. + * + */ + public Optional> builder_() { + return Optional.ofNullable(this.builder); + } + + /** + * Cache export configuration. + * + * Equivalent to Docker's `--cache-from` flag. + * + */ + @Import(name="cacheFrom") + private @Nullable Output> cacheFrom; + + /** + * @return Cache export configuration. + * + * Equivalent to Docker's `--cache-from` flag. + * + */ + public Optional>> cacheFrom() { + return Optional.ofNullable(this.cacheFrom); + } + + /** + * Cache import configuration. + * + * Equivalent to Docker's `--cache-to` flag. + * + */ + @Import(name="cacheTo") + private @Nullable Output> cacheTo; + + /** + * @return Cache import configuration. + * + * Equivalent to Docker's `--cache-to` flag. + * + */ + public Optional>> cacheTo() { + return Optional.ofNullable(this.cacheTo); + } + + /** + * Build context settings. + * + * Equivalent to Docker's `PATH | URL | -` positional argument. + * + */ + @Import(name="context") + private @Nullable Output context; + + /** + * @return Build context settings. + * + * Equivalent to Docker's `PATH | URL | -` positional argument. + * + */ + public Optional> context() { + return Optional.ofNullable(this.context); + } + + /** + * Dockerfile settings. + * + * Equivalent to Docker's `--file` flag. + * + */ + @Import(name="dockerfile") + private @Nullable Output dockerfile; + + /** + * @return Dockerfile settings. + * + * Equivalent to Docker's `--file` flag. + * + */ + public Optional> dockerfile() { + return Optional.ofNullable(this.dockerfile); + } + + /** + * Use `exec` mode to build this image. + * + * By default the provider embeds a v25 Docker client with v0.12 buildx + * support. This helps ensure consistent behavior across environments and + * is compatible with alternative build backends (e.g. `buildkitd`), but + * it may not be desirable if you require a specific version of buildx. + * For example you may want to run a custom `docker-buildx` binary with + * support for [Docker Build + * Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + * + * When this is set to `true` the provider will instead execute the + * `docker-buildx` binary directly to perform its operations. The user is + * responsible for ensuring this binary exists, with correct permissions + * and pre-configured builders, at a path Docker expects (e.g. + * `~/.docker/cli-plugins`). + * + * Debugging `exec` mode may be more difficult as Pulumi will not be able + * to surface fine-grained errors and warnings. Additionally credentials + * are temporarily written to disk in order to provide them to the + * `docker-buildx` binary. + * + */ + @Import(name="exec") + private @Nullable Output exec; + + /** + * @return Use `exec` mode to build this image. + * + * By default the provider embeds a v25 Docker client with v0.12 buildx + * support. This helps ensure consistent behavior across environments and + * is compatible with alternative build backends (e.g. `buildkitd`), but + * it may not be desirable if you require a specific version of buildx. + * For example you may want to run a custom `docker-buildx` binary with + * support for [Docker Build + * Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + * + * When this is set to `true` the provider will instead execute the + * `docker-buildx` binary directly to perform its operations. The user is + * responsible for ensuring this binary exists, with correct permissions + * and pre-configured builders, at a path Docker expects (e.g. + * `~/.docker/cli-plugins`). + * + * Debugging `exec` mode may be more difficult as Pulumi will not be able + * to surface fine-grained errors and warnings. Additionally credentials + * are temporarily written to disk in order to provide them to the + * `docker-buildx` binary. + * + */ + public Optional> exec() { + return Optional.ofNullable(this.exec); + } + + /** + * Controls where images are persisted after building. + * + * Images are only stored in the local cache unless `exports` are + * explicitly configured. + * + * Exporting to multiple destinations requires a daemon running BuildKit + * 0.13 or later. + * + * Equivalent to Docker's `--output` flag. + * + */ + @Import(name="exports") + private @Nullable Output> exports; + + /** + * @return Controls where images are persisted after building. + * + * Images are only stored in the local cache unless `exports` are + * explicitly configured. + * + * Exporting to multiple destinations requires a daemon running BuildKit + * 0.13 or later. + * + * Equivalent to Docker's `--output` flag. + * + */ + public Optional>> exports() { + return Optional.ofNullable(this.exports); + } + + /** + * Attach arbitrary key/value metadata to the image. + * + * Equivalent to Docker's `--label` flag. + * + */ + @Import(name="labels") + private @Nullable Output> labels; + + /** + * @return Attach arbitrary key/value metadata to the image. + * + * Equivalent to Docker's `--label` flag. + * + */ + public Optional>> labels() { + return Optional.ofNullable(this.labels); + } + + /** + * When `true` the build will automatically include a `docker` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--load` flag. + * + */ + @Import(name="load") + private @Nullable Output load; + + /** + * @return When `true` the build will automatically include a `docker` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--load` flag. + * + */ + public Optional> load() { + return Optional.ofNullable(this.load); + } + + /** + * Set the network mode for `RUN` instructions. Defaults to `default`. + * + * For custom networks, configure your builder with `--driver-opt network=...`. + * + * Equivalent to Docker's `--network` flag. + * + */ + @Import(name="network") + private @Nullable Output network; + + /** + * @return Set the network mode for `RUN` instructions. Defaults to `default`. + * + * For custom networks, configure your builder with `--driver-opt network=...`. + * + * Equivalent to Docker's `--network` flag. + * + */ + public Optional> network() { + return Optional.ofNullable(this.network); + } + + /** + * Do not import cache manifests when building the image. + * + * Equivalent to Docker's `--no-cache` flag. + * + */ + @Import(name="noCache") + private @Nullable Output noCache; + + /** + * @return Do not import cache manifests when building the image. + * + * Equivalent to Docker's `--no-cache` flag. + * + */ + public Optional> noCache() { + return Optional.ofNullable(this.noCache); + } + + /** + * Set target platform(s) for the build. Defaults to the host's platform. + * + * Equivalent to Docker's `--platform` flag. + * + */ + @Import(name="platforms") + private @Nullable Output> platforms; + + /** + * @return Set target platform(s) for the build. Defaults to the host's platform. + * + * Equivalent to Docker's `--platform` flag. + * + */ + public Optional>> platforms() { + return Optional.ofNullable(this.platforms); + } + + /** + * Always pull referenced images. + * + * Equivalent to Docker's `--pull` flag. + * + */ + @Import(name="pull") + private @Nullable Output pull; + + /** + * @return Always pull referenced images. + * + * Equivalent to Docker's `--pull` flag. + * + */ + public Optional> pull() { + return Optional.ofNullable(this.pull); + } + + /** + * When `true` the build will automatically include a `registry` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--push` flag. + * + */ + @Import(name="push", required=true) + private Output push; + + /** + * @return When `true` the build will automatically include a `registry` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--push` flag. + * + */ + public Output push() { + return this.push; + } + + /** + * Registry credentials. Required if reading or exporting to private + * repositories. + * + * Credentials are kept in-memory and do not pollute pre-existing + * credentials on the host. + * + * Similar to `docker login`. + * + */ + @Import(name="registries") + private @Nullable Output> registries; + + /** + * @return Registry credentials. Required if reading or exporting to private + * repositories. + * + * Credentials are kept in-memory and do not pollute pre-existing + * credentials on the host. + * + * Similar to `docker login`. + * + */ + public Optional>> registries() { + return Optional.ofNullable(this.registries); + } + + /** + * A mapping of secret names to their corresponding values. + * + * Unlike the Docker CLI, these can be passed by value and do not need to + * exist on-disk or in environment variables. + * + * Build arguments and environment variables are persistent in the final + * image, so you should use this for sensitive values. + * + * Similar to Docker's `--secret` flag. + * + */ + @Import(name="secrets") + private @Nullable Output> secrets; + + /** + * @return A mapping of secret names to their corresponding values. + * + * Unlike the Docker CLI, these can be passed by value and do not need to + * exist on-disk or in environment variables. + * + * Build arguments and environment variables are persistent in the final + * image, so you should use this for sensitive values. + * + * Similar to Docker's `--secret` flag. + * + */ + public Optional>> secrets() { + return Optional.ofNullable(this.secrets); + } + + /** + * SSH agent socket or keys to expose to the build. + * + * Equivalent to Docker's `--ssh` flag. + * + */ + @Import(name="ssh") + private @Nullable Output> ssh; + + /** + * @return SSH agent socket or keys to expose to the build. + * + * Equivalent to Docker's `--ssh` flag. + * + */ + public Optional>> ssh() { + return Optional.ofNullable(this.ssh); + } + + /** + * Name and optionally a tag (format: `name:tag`). + * + * If exporting to a registry, the name should include the fully qualified + * registry address (e.g. `docker.io/pulumi/pulumi:latest`). + * + * Equivalent to Docker's `--tag` flag. + * + */ + @Import(name="tags") + private @Nullable Output> tags; + + /** + * @return Name and optionally a tag (format: `name:tag`). + * + * If exporting to a registry, the name should include the fully qualified + * registry address (e.g. `docker.io/pulumi/pulumi:latest`). + * + * Equivalent to Docker's `--tag` flag. + * + */ + public Optional>> tags() { + return Optional.ofNullable(this.tags); + } + + /** + * Set the target build stage(s) to build. + * + * If not specified all targets will be built by default. + * + * Equivalent to Docker's `--target` flag. + * + */ + @Import(name="target") + private @Nullable Output target; + + /** + * @return Set the target build stage(s) to build. + * + * If not specified all targets will be built by default. + * + * Equivalent to Docker's `--target` flag. + * + */ + public Optional> target() { + return Optional.ofNullable(this.target); + } + + private ImageArgs() {} + + private ImageArgs(ImageArgs $) { + this.addHosts = $.addHosts; + this.buildArgs = $.buildArgs; + this.buildOnPreview = $.buildOnPreview; + this.builder = $.builder; + this.cacheFrom = $.cacheFrom; + this.cacheTo = $.cacheTo; + this.context = $.context; + this.dockerfile = $.dockerfile; + this.exec = $.exec; + this.exports = $.exports; + this.labels = $.labels; + this.load = $.load; + this.network = $.network; + this.noCache = $.noCache; + this.platforms = $.platforms; + this.pull = $.pull; + this.push = $.push; + this.registries = $.registries; + this.secrets = $.secrets; + this.ssh = $.ssh; + this.tags = $.tags; + this.target = $.target; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(ImageArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private ImageArgs $; + + public Builder() { + $ = new ImageArgs(); + } + + public Builder(ImageArgs defaults) { + $ = new ImageArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param addHosts Custom `host:ip` mappings to use during the build. + * + * Equivalent to Docker's `--add-host` flag. + * + * @return builder + * + */ + public Builder addHosts(@Nullable Output> addHosts) { + $.addHosts = addHosts; + return this; + } + + /** + * @param addHosts Custom `host:ip` mappings to use during the build. + * + * Equivalent to Docker's `--add-host` flag. + * + * @return builder + * + */ + public Builder addHosts(List addHosts) { + return addHosts(Output.of(addHosts)); + } + + /** + * @param addHosts Custom `host:ip` mappings to use during the build. + * + * Equivalent to Docker's `--add-host` flag. + * + * @return builder + * + */ + public Builder addHosts(String... addHosts) { + return addHosts(List.of(addHosts)); + } + + /** + * @param buildArgs `ARG` names and values to set during the build. + * + * These variables are accessed like environment variables inside `RUN` + * instructions. + * + * Build arguments are persisted in the image, so you should use `secrets` + * if these arguments are sensitive. + * + * Equivalent to Docker's `--build-arg` flag. + * + * @return builder + * + */ + public Builder buildArgs(@Nullable Output> buildArgs) { + $.buildArgs = buildArgs; + return this; + } + + /** + * @param buildArgs `ARG` names and values to set during the build. + * + * These variables are accessed like environment variables inside `RUN` + * instructions. + * + * Build arguments are persisted in the image, so you should use `secrets` + * if these arguments are sensitive. + * + * Equivalent to Docker's `--build-arg` flag. + * + * @return builder + * + */ + public Builder buildArgs(Map buildArgs) { + return buildArgs(Output.of(buildArgs)); + } + + /** + * @param buildOnPreview Setting this to `false` will always skip image builds during previews, + * and setting it to `true` will always build images during previews. + * + * Images built during previews are never exported to registries, however + * cache manifests are still exported. + * + * On-disk Dockerfiles are always validated for syntactic correctness + * regardless of this setting. + * + * Defaults to `true` as a safeguard against broken images merging as part + * of CI pipelines. + * + * @return builder + * + */ + public Builder buildOnPreview(@Nullable Output buildOnPreview) { + $.buildOnPreview = buildOnPreview; + return this; + } + + /** + * @param buildOnPreview Setting this to `false` will always skip image builds during previews, + * and setting it to `true` will always build images during previews. + * + * Images built during previews are never exported to registries, however + * cache manifests are still exported. + * + * On-disk Dockerfiles are always validated for syntactic correctness + * regardless of this setting. + * + * Defaults to `true` as a safeguard against broken images merging as part + * of CI pipelines. + * + * @return builder + * + */ + public Builder buildOnPreview(Boolean buildOnPreview) { + return buildOnPreview(Output.of(buildOnPreview)); + } + + /** + * @param builder Builder configuration. + * + * @return builder + * + */ + public Builder builder_(@Nullable Output builder) { + $.builder = builder; + return this; + } + + /** + * @param builder Builder configuration. + * + * @return builder + * + */ + public Builder builder_(BuilderConfigArgs builder) { + return builder_(Output.of(builder)); + } + + /** + * @param cacheFrom Cache export configuration. + * + * Equivalent to Docker's `--cache-from` flag. + * + * @return builder + * + */ + public Builder cacheFrom(@Nullable Output> cacheFrom) { + $.cacheFrom = cacheFrom; + return this; + } + + /** + * @param cacheFrom Cache export configuration. + * + * Equivalent to Docker's `--cache-from` flag. + * + * @return builder + * + */ + public Builder cacheFrom(List cacheFrom) { + return cacheFrom(Output.of(cacheFrom)); + } + + /** + * @param cacheFrom Cache export configuration. + * + * Equivalent to Docker's `--cache-from` flag. + * + * @return builder + * + */ + public Builder cacheFrom(CacheFromArgs... cacheFrom) { + return cacheFrom(List.of(cacheFrom)); + } + + /** + * @param cacheTo Cache import configuration. + * + * Equivalent to Docker's `--cache-to` flag. + * + * @return builder + * + */ + public Builder cacheTo(@Nullable Output> cacheTo) { + $.cacheTo = cacheTo; + return this; + } + + /** + * @param cacheTo Cache import configuration. + * + * Equivalent to Docker's `--cache-to` flag. + * + * @return builder + * + */ + public Builder cacheTo(List cacheTo) { + return cacheTo(Output.of(cacheTo)); + } + + /** + * @param cacheTo Cache import configuration. + * + * Equivalent to Docker's `--cache-to` flag. + * + * @return builder + * + */ + public Builder cacheTo(CacheToArgs... cacheTo) { + return cacheTo(List.of(cacheTo)); + } + + /** + * @param context Build context settings. + * + * Equivalent to Docker's `PATH | URL | -` positional argument. + * + * @return builder + * + */ + public Builder context(@Nullable Output context) { + $.context = context; + return this; + } + + /** + * @param context Build context settings. + * + * Equivalent to Docker's `PATH | URL | -` positional argument. + * + * @return builder + * + */ + public Builder context(BuildContextArgs context) { + return context(Output.of(context)); + } + + /** + * @param dockerfile Dockerfile settings. + * + * Equivalent to Docker's `--file` flag. + * + * @return builder + * + */ + public Builder dockerfile(@Nullable Output dockerfile) { + $.dockerfile = dockerfile; + return this; + } + + /** + * @param dockerfile Dockerfile settings. + * + * Equivalent to Docker's `--file` flag. + * + * @return builder + * + */ + public Builder dockerfile(DockerfileArgs dockerfile) { + return dockerfile(Output.of(dockerfile)); + } + + /** + * @param exec Use `exec` mode to build this image. + * + * By default the provider embeds a v25 Docker client with v0.12 buildx + * support. This helps ensure consistent behavior across environments and + * is compatible with alternative build backends (e.g. `buildkitd`), but + * it may not be desirable if you require a specific version of buildx. + * For example you may want to run a custom `docker-buildx` binary with + * support for [Docker Build + * Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + * + * When this is set to `true` the provider will instead execute the + * `docker-buildx` binary directly to perform its operations. The user is + * responsible for ensuring this binary exists, with correct permissions + * and pre-configured builders, at a path Docker expects (e.g. + * `~/.docker/cli-plugins`). + * + * Debugging `exec` mode may be more difficult as Pulumi will not be able + * to surface fine-grained errors and warnings. Additionally credentials + * are temporarily written to disk in order to provide them to the + * `docker-buildx` binary. + * + * @return builder + * + */ + public Builder exec(@Nullable Output exec) { + $.exec = exec; + return this; + } + + /** + * @param exec Use `exec` mode to build this image. + * + * By default the provider embeds a v25 Docker client with v0.12 buildx + * support. This helps ensure consistent behavior across environments and + * is compatible with alternative build backends (e.g. `buildkitd`), but + * it may not be desirable if you require a specific version of buildx. + * For example you may want to run a custom `docker-buildx` binary with + * support for [Docker Build + * Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + * + * When this is set to `true` the provider will instead execute the + * `docker-buildx` binary directly to perform its operations. The user is + * responsible for ensuring this binary exists, with correct permissions + * and pre-configured builders, at a path Docker expects (e.g. + * `~/.docker/cli-plugins`). + * + * Debugging `exec` mode may be more difficult as Pulumi will not be able + * to surface fine-grained errors and warnings. Additionally credentials + * are temporarily written to disk in order to provide them to the + * `docker-buildx` binary. + * + * @return builder + * + */ + public Builder exec(Boolean exec) { + return exec(Output.of(exec)); + } + + /** + * @param exports Controls where images are persisted after building. + * + * Images are only stored in the local cache unless `exports` are + * explicitly configured. + * + * Exporting to multiple destinations requires a daemon running BuildKit + * 0.13 or later. + * + * Equivalent to Docker's `--output` flag. + * + * @return builder + * + */ + public Builder exports(@Nullable Output> exports) { + $.exports = exports; + return this; + } + + /** + * @param exports Controls where images are persisted after building. + * + * Images are only stored in the local cache unless `exports` are + * explicitly configured. + * + * Exporting to multiple destinations requires a daemon running BuildKit + * 0.13 or later. + * + * Equivalent to Docker's `--output` flag. + * + * @return builder + * + */ + public Builder exports(List exports) { + return exports(Output.of(exports)); + } + + /** + * @param exports Controls where images are persisted after building. + * + * Images are only stored in the local cache unless `exports` are + * explicitly configured. + * + * Exporting to multiple destinations requires a daemon running BuildKit + * 0.13 or later. + * + * Equivalent to Docker's `--output` flag. + * + * @return builder + * + */ + public Builder exports(ExportArgs... exports) { + return exports(List.of(exports)); + } + + /** + * @param labels Attach arbitrary key/value metadata to the image. + * + * Equivalent to Docker's `--label` flag. + * + * @return builder + * + */ + public Builder labels(@Nullable Output> labels) { + $.labels = labels; + return this; + } + + /** + * @param labels Attach arbitrary key/value metadata to the image. + * + * Equivalent to Docker's `--label` flag. + * + * @return builder + * + */ + public Builder labels(Map labels) { + return labels(Output.of(labels)); + } + + /** + * @param load When `true` the build will automatically include a `docker` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--load` flag. + * + * @return builder + * + */ + public Builder load(@Nullable Output load) { + $.load = load; + return this; + } + + /** + * @param load When `true` the build will automatically include a `docker` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--load` flag. + * + * @return builder + * + */ + public Builder load(Boolean load) { + return load(Output.of(load)); + } + + /** + * @param network Set the network mode for `RUN` instructions. Defaults to `default`. + * + * For custom networks, configure your builder with `--driver-opt network=...`. + * + * Equivalent to Docker's `--network` flag. + * + * @return builder + * + */ + public Builder network(@Nullable Output network) { + $.network = network; + return this; + } + + /** + * @param network Set the network mode for `RUN` instructions. Defaults to `default`. + * + * For custom networks, configure your builder with `--driver-opt network=...`. + * + * Equivalent to Docker's `--network` flag. + * + * @return builder + * + */ + public Builder network(NetworkMode network) { + return network(Output.of(network)); + } + + /** + * @param noCache Do not import cache manifests when building the image. + * + * Equivalent to Docker's `--no-cache` flag. + * + * @return builder + * + */ + public Builder noCache(@Nullable Output noCache) { + $.noCache = noCache; + return this; + } + + /** + * @param noCache Do not import cache manifests when building the image. + * + * Equivalent to Docker's `--no-cache` flag. + * + * @return builder + * + */ + public Builder noCache(Boolean noCache) { + return noCache(Output.of(noCache)); + } + + /** + * @param platforms Set target platform(s) for the build. Defaults to the host's platform. + * + * Equivalent to Docker's `--platform` flag. + * + * @return builder + * + */ + public Builder platforms(@Nullable Output> platforms) { + $.platforms = platforms; + return this; + } + + /** + * @param platforms Set target platform(s) for the build. Defaults to the host's platform. + * + * Equivalent to Docker's `--platform` flag. + * + * @return builder + * + */ + public Builder platforms(List platforms) { + return platforms(Output.of(platforms)); + } + + /** + * @param platforms Set target platform(s) for the build. Defaults to the host's platform. + * + * Equivalent to Docker's `--platform` flag. + * + * @return builder + * + */ + public Builder platforms(Platform... platforms) { + return platforms(List.of(platforms)); + } + + /** + * @param pull Always pull referenced images. + * + * Equivalent to Docker's `--pull` flag. + * + * @return builder + * + */ + public Builder pull(@Nullable Output pull) { + $.pull = pull; + return this; + } + + /** + * @param pull Always pull referenced images. + * + * Equivalent to Docker's `--pull` flag. + * + * @return builder + * + */ + public Builder pull(Boolean pull) { + return pull(Output.of(pull)); + } + + /** + * @param push When `true` the build will automatically include a `registry` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--push` flag. + * + * @return builder + * + */ + public Builder push(Output push) { + $.push = push; + return this; + } + + /** + * @param push When `true` the build will automatically include a `registry` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--push` flag. + * + * @return builder + * + */ + public Builder push(Boolean push) { + return push(Output.of(push)); + } + + /** + * @param registries Registry credentials. Required if reading or exporting to private + * repositories. + * + * Credentials are kept in-memory and do not pollute pre-existing + * credentials on the host. + * + * Similar to `docker login`. + * + * @return builder + * + */ + public Builder registries(@Nullable Output> registries) { + $.registries = registries; + return this; + } + + /** + * @param registries Registry credentials. Required if reading or exporting to private + * repositories. + * + * Credentials are kept in-memory and do not pollute pre-existing + * credentials on the host. + * + * Similar to `docker login`. + * + * @return builder + * + */ + public Builder registries(List registries) { + return registries(Output.of(registries)); + } + + /** + * @param registries Registry credentials. Required if reading or exporting to private + * repositories. + * + * Credentials are kept in-memory and do not pollute pre-existing + * credentials on the host. + * + * Similar to `docker login`. + * + * @return builder + * + */ + public Builder registries(RegistryArgs... registries) { + return registries(List.of(registries)); + } + + /** + * @param secrets A mapping of secret names to their corresponding values. + * + * Unlike the Docker CLI, these can be passed by value and do not need to + * exist on-disk or in environment variables. + * + * Build arguments and environment variables are persistent in the final + * image, so you should use this for sensitive values. + * + * Similar to Docker's `--secret` flag. + * + * @return builder + * + */ + public Builder secrets(@Nullable Output> secrets) { + $.secrets = secrets; + return this; + } + + /** + * @param secrets A mapping of secret names to their corresponding values. + * + * Unlike the Docker CLI, these can be passed by value and do not need to + * exist on-disk or in environment variables. + * + * Build arguments and environment variables are persistent in the final + * image, so you should use this for sensitive values. + * + * Similar to Docker's `--secret` flag. + * + * @return builder + * + */ + public Builder secrets(Map secrets) { + return secrets(Output.of(secrets)); + } + + /** + * @param ssh SSH agent socket or keys to expose to the build. + * + * Equivalent to Docker's `--ssh` flag. + * + * @return builder + * + */ + public Builder ssh(@Nullable Output> ssh) { + $.ssh = ssh; + return this; + } + + /** + * @param ssh SSH agent socket or keys to expose to the build. + * + * Equivalent to Docker's `--ssh` flag. + * + * @return builder + * + */ + public Builder ssh(List ssh) { + return ssh(Output.of(ssh)); + } + + /** + * @param ssh SSH agent socket or keys to expose to the build. + * + * Equivalent to Docker's `--ssh` flag. + * + * @return builder + * + */ + public Builder ssh(SSHArgs... ssh) { + return ssh(List.of(ssh)); + } + + /** + * @param tags Name and optionally a tag (format: `name:tag`). + * + * If exporting to a registry, the name should include the fully qualified + * registry address (e.g. `docker.io/pulumi/pulumi:latest`). + * + * Equivalent to Docker's `--tag` flag. + * + * @return builder + * + */ + public Builder tags(@Nullable Output> tags) { + $.tags = tags; + return this; + } + + /** + * @param tags Name and optionally a tag (format: `name:tag`). + * + * If exporting to a registry, the name should include the fully qualified + * registry address (e.g. `docker.io/pulumi/pulumi:latest`). + * + * Equivalent to Docker's `--tag` flag. + * + * @return builder + * + */ + public Builder tags(List tags) { + return tags(Output.of(tags)); + } + + /** + * @param tags Name and optionally a tag (format: `name:tag`). + * + * If exporting to a registry, the name should include the fully qualified + * registry address (e.g. `docker.io/pulumi/pulumi:latest`). + * + * Equivalent to Docker's `--tag` flag. + * + * @return builder + * + */ + public Builder tags(String... tags) { + return tags(List.of(tags)); + } + + /** + * @param target Set the target build stage(s) to build. + * + * If not specified all targets will be built by default. + * + * Equivalent to Docker's `--target` flag. + * + * @return builder + * + */ + public Builder target(@Nullable Output target) { + $.target = target; + return this; + } + + /** + * @param target Set the target build stage(s) to build. + * + * If not specified all targets will be built by default. + * + * Equivalent to Docker's `--target` flag. + * + * @return builder + * + */ + public Builder target(String target) { + return target(Output.of(target)); + } + + public ImageArgs build() { + $.buildOnPreview = Codegen.booleanProp("buildOnPreview").output().arg($.buildOnPreview).def(true).getNullable(); + $.network = Codegen.objectProp("network", NetworkMode.class).output().arg($.network).def(NetworkMode.Default_).getNullable(); + if ($.push == null) { + throw new MissingRequiredPropertyException("ImageArgs", "push"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/Index.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/Index.java new file mode 100644 index 0000000..6f013c0 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/Index.java @@ -0,0 +1,253 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; +import com.pulumi.core.annotations.ResourceType; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.IndexArgs; +import com.pulumi.dockerbuild.Utilities; +import com.pulumi.dockerbuild.outputs.Registry; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Optional; +import javax.annotation.Nullable; + +/** + * A wrapper around `docker buildx imagetools create` to create an index + * (or manifest list) referencing one or more existing images. + * + * In most cases you do not need an `Index` to build a multi-platform + * image -- specifying multiple platforms on the `Image` will handle this + * for you automatically. + * + * However, as of April 2024, building multi-platform images _with + * caching_ will only export a cache for one platform at a time (see [this + * discussion](https://github.com/docker/buildx/discussions/1382) for more + * details). + * + * Therefore this resource can be helpful if you are building + * multi-platform images with caching: each platform can be built and + * cached separately, and an `Index` can join them all together. An + * example of this is shown below. + * + * This resource creates an OCI image index or a Docker manifest list + * depending on the media types of the source images. + * + * ## Example Usage + * ### Multi-platform registry caching + * ```java + * package generated_program; + * + * import com.pulumi.Context; + * import com.pulumi.Pulumi; + * import com.pulumi.core.Output; + * import com.pulumi.dockerbuild.Image; + * import com.pulumi.dockerbuild.ImageArgs; + * import com.pulumi.dockerbuild.inputs.CacheFromArgs; + * import com.pulumi.dockerbuild.inputs.CacheFromRegistryArgs; + * import com.pulumi.dockerbuild.inputs.CacheToArgs; + * import com.pulumi.dockerbuild.inputs.CacheToRegistryArgs; + * import com.pulumi.dockerbuild.inputs.BuildContextArgs; + * import com.pulumi.dockerbuild.Index; + * import com.pulumi.dockerbuild.IndexArgs; + * import java.util.List; + * import java.util.ArrayList; + * import java.util.Map; + * import java.io.File; + * import java.nio.file.Files; + * import java.nio.file.Paths; + * + * public class App { + * public static void main(String[] args) { + * Pulumi.run(App::stack); + * } + * + * public static void stack(Context ctx) { + * var amd64 = new Image("amd64", ImageArgs.builder() + * .cacheFrom(CacheFromArgs.builder() + * .registry(CacheFromRegistryArgs.builder() + * .ref("docker.io/pulumi/pulumi:cache-amd64") + * .build()) + * .build()) + * .cacheTo(CacheToArgs.builder() + * .registry(CacheToRegistryArgs.builder() + * .mode("max") + * .ref("docker.io/pulumi/pulumi:cache-amd64") + * .build()) + * .build()) + * .context(BuildContextArgs.builder() + * .location("app") + * .build()) + * .platforms("linux/amd64") + * .tags("docker.io/pulumi/pulumi:3.107.0-amd64") + * .build()); + * + * var arm64 = new Image("arm64", ImageArgs.builder() + * .cacheFrom(CacheFromArgs.builder() + * .registry(CacheFromRegistryArgs.builder() + * .ref("docker.io/pulumi/pulumi:cache-arm64") + * .build()) + * .build()) + * .cacheTo(CacheToArgs.builder() + * .registry(CacheToRegistryArgs.builder() + * .mode("max") + * .ref("docker.io/pulumi/pulumi:cache-arm64") + * .build()) + * .build()) + * .context(BuildContextArgs.builder() + * .location("app") + * .build()) + * .platforms("linux/arm64") + * .tags("docker.io/pulumi/pulumi:3.107.0-arm64") + * .build()); + * + * var index = new Index("index", IndexArgs.builder() + * .sources( + * amd64.ref(), + * arm64.ref()) + * .tag("docker.io/pulumi/pulumi:3.107.0") + * .build()); + * + * ctx.export("ref", index.ref()); + * } + * } + * ``` + * + */ +@ResourceType(type="docker-build:index:Index") +public class Index extends com.pulumi.resources.CustomResource { + /** + * If true, push the index to the target registry. + * + * Defaults to `true`. + * + */ + @Export(name="push", refs={Boolean.class}, tree="[0]") + private Output push; + + /** + * @return If true, push the index to the target registry. + * + * Defaults to `true`. + * + */ + public Output> push() { + return Codegen.optional(this.push); + } + /** + * The pushed tag with digest. + * + * Identical to the tag if the index was not pushed. + * + */ + @Export(name="ref", refs={String.class}, tree="[0]") + private Output ref; + + /** + * @return The pushed tag with digest. + * + * Identical to the tag if the index was not pushed. + * + */ + public Output ref() { + return this.ref; + } + /** + * Authentication for the registry where the tagged index will be pushed. + * + * Credentials can also be included with the provider's configuration. + * + */ + @Export(name="registry", refs={Registry.class}, tree="[0]") + private Output registry; + + /** + * @return Authentication for the registry where the tagged index will be pushed. + * + * Credentials can also be included with the provider's configuration. + * + */ + public Output> registry() { + return Codegen.optional(this.registry); + } + /** + * Existing images to include in the index. + * + */ + @Export(name="sources", refs={List.class,String.class}, tree="[0,1]") + private Output> sources; + + /** + * @return Existing images to include in the index. + * + */ + public Output> sources() { + return this.sources; + } + /** + * The tag to apply to the index. + * + */ + @Export(name="tag", refs={String.class}, tree="[0]") + private Output tag; + + /** + * @return The tag to apply to the index. + * + */ + public Output tag() { + return this.tag; + } + + /** + * + * @param name The _unique_ name of the resulting resource. + */ + public Index(String name) { + this(name, IndexArgs.Empty); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + */ + public Index(String name, IndexArgs args) { + this(name, args, null); + } + /** + * + * @param name The _unique_ name of the resulting resource. + * @param args The arguments to use to populate this resource's properties. + * @param options A bag of options that control this resource's behavior. + */ + public Index(String name, IndexArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("docker-build:index:Index", name, args == null ? IndexArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + } + + private Index(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { + super("docker-build:index:Index", name, null, makeResourceOptions(options, id)); + } + + private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { + var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() + .version(Utilities.getVersion()) + .build(); + return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); + } + + /** + * Get an existing Host resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param options Optional settings to control the behavior of the CustomResource. + */ + public static Index get(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { + return new Index(name, id, options); + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/IndexArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/IndexArgs.java new file mode 100644 index 0000000..ba66dab --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/IndexArgs.java @@ -0,0 +1,232 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.inputs.RegistryArgs; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class IndexArgs extends com.pulumi.resources.ResourceArgs { + + public static final IndexArgs Empty = new IndexArgs(); + + /** + * If true, push the index to the target registry. + * + * Defaults to `true`. + * + */ + @Import(name="push") + private @Nullable Output push; + + /** + * @return If true, push the index to the target registry. + * + * Defaults to `true`. + * + */ + public Optional> push() { + return Optional.ofNullable(this.push); + } + + /** + * Authentication for the registry where the tagged index will be pushed. + * + * Credentials can also be included with the provider's configuration. + * + */ + @Import(name="registry") + private @Nullable Output registry; + + /** + * @return Authentication for the registry where the tagged index will be pushed. + * + * Credentials can also be included with the provider's configuration. + * + */ + public Optional> registry() { + return Optional.ofNullable(this.registry); + } + + /** + * Existing images to include in the index. + * + */ + @Import(name="sources", required=true) + private Output> sources; + + /** + * @return Existing images to include in the index. + * + */ + public Output> sources() { + return this.sources; + } + + /** + * The tag to apply to the index. + * + */ + @Import(name="tag", required=true) + private Output tag; + + /** + * @return The tag to apply to the index. + * + */ + public Output tag() { + return this.tag; + } + + private IndexArgs() {} + + private IndexArgs(IndexArgs $) { + this.push = $.push; + this.registry = $.registry; + this.sources = $.sources; + this.tag = $.tag; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(IndexArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private IndexArgs $; + + public Builder() { + $ = new IndexArgs(); + } + + public Builder(IndexArgs defaults) { + $ = new IndexArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param push If true, push the index to the target registry. + * + * Defaults to `true`. + * + * @return builder + * + */ + public Builder push(@Nullable Output push) { + $.push = push; + return this; + } + + /** + * @param push If true, push the index to the target registry. + * + * Defaults to `true`. + * + * @return builder + * + */ + public Builder push(Boolean push) { + return push(Output.of(push)); + } + + /** + * @param registry Authentication for the registry where the tagged index will be pushed. + * + * Credentials can also be included with the provider's configuration. + * + * @return builder + * + */ + public Builder registry(@Nullable Output registry) { + $.registry = registry; + return this; + } + + /** + * @param registry Authentication for the registry where the tagged index will be pushed. + * + * Credentials can also be included with the provider's configuration. + * + * @return builder + * + */ + public Builder registry(RegistryArgs registry) { + return registry(Output.of(registry)); + } + + /** + * @param sources Existing images to include in the index. + * + * @return builder + * + */ + public Builder sources(Output> sources) { + $.sources = sources; + return this; + } + + /** + * @param sources Existing images to include in the index. + * + * @return builder + * + */ + public Builder sources(List sources) { + return sources(Output.of(sources)); + } + + /** + * @param sources Existing images to include in the index. + * + * @return builder + * + */ + public Builder sources(String... sources) { + return sources(List.of(sources)); + } + + /** + * @param tag The tag to apply to the index. + * + * @return builder + * + */ + public Builder tag(Output tag) { + $.tag = tag; + return this; + } + + /** + * @param tag The tag to apply to the index. + * + * @return builder + * + */ + public Builder tag(String tag) { + return tag(Output.of(tag)); + } + + public IndexArgs build() { + $.push = Codegen.booleanProp("push").output().arg($.push).def(true).getNullable(); + if ($.sources == null) { + throw new MissingRequiredPropertyException("IndexArgs", "sources"); + } + if ($.tag == null) { + throw new MissingRequiredPropertyException("IndexArgs", "tag"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/Provider.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/Provider.java index 34eeb30..0d8460b 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/Provider.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/Provider.java @@ -4,14 +4,32 @@ package com.pulumi.dockerbuild; import com.pulumi.core.Output; +import com.pulumi.core.annotations.Export; import com.pulumi.core.annotations.ResourceType; import com.pulumi.core.internal.Codegen; import com.pulumi.dockerbuild.ProviderArgs; import com.pulumi.dockerbuild.Utilities; +import java.lang.String; +import java.util.Optional; import javax.annotation.Nullable; -@ResourceType(type="pulumi:providers:dockerbuild") +@ResourceType(type="pulumi:providers:docker-build") public class Provider extends com.pulumi.resources.ProviderResource { + /** + * The build daemon's address. + * + */ + @Export(name="host", refs={String.class}, tree="[0]") + private Output host; + + /** + * @return The build daemon's address. + * + */ + public Output> host() { + return Codegen.optional(this.host); + } + /** * * @param name The _unique_ name of the resulting resource. @@ -34,7 +52,7 @@ public class Provider extends com.pulumi.resources.ProviderResource { * @param options A bag of options that control this resource's behavior. */ public Provider(String name, @Nullable ProviderArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("dockerbuild", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); + super("docker-build", name, args == null ? ProviderArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/ProviderArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/ProviderArgs.java index ed37003..d42d184 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/ProviderArgs.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/ProviderArgs.java @@ -3,16 +3,56 @@ package com.pulumi.dockerbuild; - +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.inputs.RegistryArgs; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; public final class ProviderArgs extends com.pulumi.resources.ResourceArgs { public static final ProviderArgs Empty = new ProviderArgs(); + /** + * The build daemon's address. + * + */ + @Import(name="host") + private @Nullable Output host; + + /** + * @return The build daemon's address. + * + */ + public Optional> host() { + return Optional.ofNullable(this.host); + } + + @Import(name="registries", json=true) + private @Nullable Output> registries; + + public Optional>> registries() { + return Optional.ofNullable(this.registries); + } + + private ProviderArgs() {} + + private ProviderArgs(ProviderArgs $) { + this.host = $.host; + this.registries = $.registries; + } + public static Builder builder() { return new Builder(); } + public static Builder builder(ProviderArgs defaults) { + return new Builder(defaults); + } public static final class Builder { private ProviderArgs $; @@ -20,7 +60,47 @@ public final class ProviderArgs extends com.pulumi.resources.ResourceArgs { public Builder() { $ = new ProviderArgs(); } + + public Builder(ProviderArgs defaults) { + $ = new ProviderArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param host The build daemon's address. + * + * @return builder + * + */ + public Builder host(@Nullable Output host) { + $.host = host; + return this; + } + + /** + * @param host The build daemon's address. + * + * @return builder + * + */ + public Builder host(String host) { + return host(Output.of(host)); + } + + public Builder registries(@Nullable Output> registries) { + $.registries = registries; + return this; + } + + public Builder registries(List registries) { + return registries(Output.of(registries)); + } + + public Builder registries(RegistryArgs... registries) { + return registries(List.of(registries)); + } + public ProviderArgs build() { + $.host = Codegen.stringProp("host").output().arg($.host).env("DOCKER_HOST").def("").getNullable(); return $; } } diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/Random.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/Random.java deleted file mode 100644 index 6503133..0000000 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/Random.java +++ /dev/null @@ -1,78 +0,0 @@ -// *** WARNING: this file was generated by pulumi. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -package com.pulumi.dockerbuild; - -import com.pulumi.core.Output; -import com.pulumi.core.annotations.Export; -import com.pulumi.core.annotations.ResourceType; -import com.pulumi.core.internal.Codegen; -import com.pulumi.dockerbuild.RandomArgs; -import com.pulumi.dockerbuild.Utilities; -import java.lang.Integer; -import java.lang.String; -import javax.annotation.Nullable; - -@ResourceType(type="dockerbuild:index:Random") -public class Random extends com.pulumi.resources.CustomResource { - @Export(name="length", refs={Integer.class}, tree="[0]") - private Output length; - - public Output length() { - return this.length; - } - @Export(name="result", refs={String.class}, tree="[0]") - private Output result; - - public Output result() { - return this.result; - } - - /** - * - * @param name The _unique_ name of the resulting resource. - */ - public Random(String name) { - this(name, RandomArgs.Empty); - } - /** - * - * @param name The _unique_ name of the resulting resource. - * @param args The arguments to use to populate this resource's properties. - */ - public Random(String name, RandomArgs args) { - this(name, args, null); - } - /** - * - * @param name The _unique_ name of the resulting resource. - * @param args The arguments to use to populate this resource's properties. - * @param options A bag of options that control this resource's behavior. - */ - public Random(String name, RandomArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("dockerbuild:index:Random", name, args == null ? RandomArgs.Empty : args, makeResourceOptions(options, Codegen.empty())); - } - - private Random(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { - super("dockerbuild:index:Random", name, null, makeResourceOptions(options, id)); - } - - private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { - var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() - .version(Utilities.getVersion()) - .build(); - return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); - } - - /** - * Get an existing Host resource's state with the given name, ID, and optional extra - * properties used to qualify the lookup. - * - * @param name The _unique_ name of the resulting resource. - * @param id The _unique_ provider ID of the resource to lookup. - * @param options Optional settings to control the behavior of the CustomResource. - */ - public static Random get(String name, Output id, @Nullable com.pulumi.resources.CustomResourceOptions options) { - return new Random(name, id, options); - } -} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/RandomArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/RandomArgs.java deleted file mode 100644 index 110dec3..0000000 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/RandomArgs.java +++ /dev/null @@ -1,65 +0,0 @@ -// *** WARNING: this file was generated by pulumi. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -package com.pulumi.dockerbuild; - -import com.pulumi.core.Output; -import com.pulumi.core.annotations.Import; -import com.pulumi.exceptions.MissingRequiredPropertyException; -import java.lang.Integer; -import java.util.Objects; - - -public final class RandomArgs extends com.pulumi.resources.ResourceArgs { - - public static final RandomArgs Empty = new RandomArgs(); - - @Import(name="length", required=true) - private Output length; - - public Output length() { - return this.length; - } - - private RandomArgs() {} - - private RandomArgs(RandomArgs $) { - this.length = $.length; - } - - public static Builder builder() { - return new Builder(); - } - public static Builder builder(RandomArgs defaults) { - return new Builder(defaults); - } - - public static final class Builder { - private RandomArgs $; - - public Builder() { - $ = new RandomArgs(); - } - - public Builder(RandomArgs defaults) { - $ = new RandomArgs(Objects.requireNonNull(defaults)); - } - - public Builder length(Output length) { - $.length = length; - return this; - } - - public Builder length(Integer length) { - return length(Output.of(length)); - } - - public RandomArgs build() { - if ($.length == null) { - throw new MissingRequiredPropertyException("RandomArgs", "length"); - } - return $; - } - } - -} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/Utilities.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/Utilities.java index 66c6d72..c8c809b 100644 --- a/sdk/java/src/main/java/com/pulumi/dockerbuild/Utilities.java +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/Utilities.java @@ -74,7 +74,7 @@ public class Utilities { } static { - var resourceName = "com/pulumi/dockerbuild/version.txt"; + var resourceName = "com/pulumi/docker-build/version.txt"; var versionFile = Utilities.class.getClassLoader().getResourceAsStream(resourceName); if (versionFile == null) { throw new IllegalStateException( diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/CacheMode.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/CacheMode.java new file mode 100644 index 0000000..fb705e9 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/CacheMode.java @@ -0,0 +1,41 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.enums; + +import com.pulumi.core.annotations.EnumType; +import java.lang.String; +import java.util.Objects; +import java.util.StringJoiner; + + @EnumType + public enum CacheMode { + /** + * Only layers that are exported into the resulting image are cached. + * + */ + Min("min"), + /** + * All layers are cached, even those of intermediate steps. + * + */ + Max("max"); + + private final String value; + + CacheMode(String value) { + this.value = Objects.requireNonNull(value); + } + + @EnumType.Converter + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return new StringJoiner(", ", "CacheMode[", "]") + .add("value='" + this.value + "'") + .toString(); + } + } diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/CompressionType.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/CompressionType.java new file mode 100644 index 0000000..bc5ab8e --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/CompressionType.java @@ -0,0 +1,46 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.enums; + +import com.pulumi.core.annotations.EnumType; +import java.lang.String; +import java.util.Objects; +import java.util.StringJoiner; + + @EnumType + public enum CompressionType { + /** + * Use `gzip` for compression. + * + */ + Gzip("gzip"), + /** + * Use `estargz` for compression. + * + */ + Estargz("estargz"), + /** + * Use `zstd` for compression. + * + */ + Zstd("zstd"); + + private final String value; + + CompressionType(String value) { + this.value = Objects.requireNonNull(value); + } + + @EnumType.Converter + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return new StringJoiner(", ", "CompressionType[", "]") + .add("value='" + this.value + "'") + .toString(); + } + } diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/NetworkMode.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/NetworkMode.java new file mode 100644 index 0000000..5b27243 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/NetworkMode.java @@ -0,0 +1,46 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.enums; + +import com.pulumi.core.annotations.EnumType; +import java.lang.String; +import java.util.Objects; +import java.util.StringJoiner; + + @EnumType + public enum NetworkMode { + /** + * The default sandbox network mode. + * + */ + Default_("default"), + /** + * Host network mode. + * + */ + Host("host"), + /** + * Disable network access. + * + */ + None("none"); + + private final String value; + + NetworkMode(String value) { + this.value = Objects.requireNonNull(value); + } + + @EnumType.Converter + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return new StringJoiner(", ", "NetworkMode[", "]") + .add("value='" + this.value + "'") + .toString(); + } + } diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/Platform.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/Platform.java new file mode 100644 index 0000000..6c14b3a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/enums/Platform.java @@ -0,0 +1,59 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.enums; + +import com.pulumi.core.annotations.EnumType; +import java.lang.String; +import java.util.Objects; +import java.util.StringJoiner; + + @EnumType + public enum Platform { + Darwin_386("darwin/386"), + Darwin_amd64("darwin/amd64"), + Darwin_arm("darwin/arm"), + Darwin_arm64("darwin/arm64"), + Dragonfly_amd64("dragonfly/amd64"), + Freebsd_386("freebsd/386"), + Freebsd_amd64("freebsd/amd64"), + Freebsd_arm("freebsd/arm"), + Linux_386("linux/386"), + Linux_amd64("linux/amd64"), + Linux_arm("linux/arm"), + Linux_arm64("linux/arm64"), + Linux_mips64("linux/mips64"), + Linux_mips64le("linux/mips64le"), + Linux_ppc64le("linux/ppc64le"), + Linux_riscv64("linux/riscv64"), + Linux_s390x("linux/s390x"), + Netbsd_386("netbsd/386"), + Netbsd_amd64("netbsd/amd64"), + Netbsd_arm("netbsd/arm"), + Openbsd_386("openbsd/386"), + Openbsd_amd64("openbsd/amd64"), + Openbsd_arm("openbsd/arm"), + Plan9_386("plan9/386"), + Plan9_amd64("plan9/amd64"), + Solaris_amd64("solaris/amd64"), + Windows_386("windows/386"), + Windows_amd64("windows/amd64"); + + private final String value; + + Platform(String value) { + this.value = Objects.requireNonNull(value); + } + + @EnumType.Converter + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return new StringJoiner(", ", "Platform[", "]") + .add("value='" + this.value + "'") + .toString(); + } + } diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/BuildContextArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/BuildContextArgs.java new file mode 100644 index 0000000..8baa84d --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/BuildContextArgs.java @@ -0,0 +1,174 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.dockerbuild.inputs.ContextArgs; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class BuildContextArgs extends com.pulumi.resources.ResourceArgs { + + public static final BuildContextArgs Empty = new BuildContextArgs(); + + /** + * Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + */ + @Import(name="location", required=true) + private Output location; + + /** + * @return Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + */ + public Output location() { + return this.location; + } + + /** + * Additional build contexts to use. + * + * These contexts are accessed with `FROM name` or `--from=name` + * statements when using Dockerfile 1.4+ syntax. + * + * Values can be local paths, HTTP URLs, or `docker-image://` images. + * + */ + @Import(name="named") + private @Nullable Output> named; + + /** + * @return Additional build contexts to use. + * + * These contexts are accessed with `FROM name` or `--from=name` + * statements when using Dockerfile 1.4+ syntax. + * + * Values can be local paths, HTTP URLs, or `docker-image://` images. + * + */ + public Optional>> named() { + return Optional.ofNullable(this.named); + } + + private BuildContextArgs() {} + + private BuildContextArgs(BuildContextArgs $) { + this.location = $.location; + this.named = $.named; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(BuildContextArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private BuildContextArgs $; + + public Builder() { + $ = new BuildContextArgs(); + } + + public Builder(BuildContextArgs defaults) { + $ = new BuildContextArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param location Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + * @return builder + * + */ + public Builder location(Output location) { + $.location = location; + return this; + } + + /** + * @param location Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + * @return builder + * + */ + public Builder location(String location) { + return location(Output.of(location)); + } + + /** + * @param named Additional build contexts to use. + * + * These contexts are accessed with `FROM name` or `--from=name` + * statements when using Dockerfile 1.4+ syntax. + * + * Values can be local paths, HTTP URLs, or `docker-image://` images. + * + * @return builder + * + */ + public Builder named(@Nullable Output> named) { + $.named = named; + return this; + } + + /** + * @param named Additional build contexts to use. + * + * These contexts are accessed with `FROM name` or `--from=name` + * statements when using Dockerfile 1.4+ syntax. + * + * Values can be local paths, HTTP URLs, or `docker-image://` images. + * + * @return builder + * + */ + public Builder named(Map named) { + return named(Output.of(named)); + } + + public BuildContextArgs build() { + if ($.location == null) { + throw new MissingRequiredPropertyException("BuildContextArgs", "location"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/BuilderConfigArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/BuilderConfigArgs.java new file mode 100644 index 0000000..986bbaf --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/BuilderConfigArgs.java @@ -0,0 +1,103 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class BuilderConfigArgs extends com.pulumi.resources.ResourceArgs { + + public static final BuilderConfigArgs Empty = new BuilderConfigArgs(); + + /** + * Name of an existing buildx builder to use. + * + * Only `docker-container`, `kubernetes`, or `remote` drivers are + * supported. The legacy `docker` driver is not supported. + * + * Equivalent to Docker's `--builder` flag. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return Name of an existing buildx builder to use. + * + * Only `docker-container`, `kubernetes`, or `remote` drivers are + * supported. The legacy `docker` driver is not supported. + * + * Equivalent to Docker's `--builder` flag. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + private BuilderConfigArgs() {} + + private BuilderConfigArgs(BuilderConfigArgs $) { + this.name = $.name; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(BuilderConfigArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private BuilderConfigArgs $; + + public Builder() { + $ = new BuilderConfigArgs(); + } + + public Builder(BuilderConfigArgs defaults) { + $ = new BuilderConfigArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param name Name of an existing buildx builder to use. + * + * Only `docker-container`, `kubernetes`, or `remote` drivers are + * supported. The legacy `docker` driver is not supported. + * + * Equivalent to Docker's `--builder` flag. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name Name of an existing buildx builder to use. + * + * Only `docker-container`, `kubernetes`, or `remote` drivers are + * supported. The legacy `docker` driver is not supported. + * + * Equivalent to Docker's `--builder` flag. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + public BuilderConfigArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromArgs.java new file mode 100644 index 0000000..a05f9cf --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromArgs.java @@ -0,0 +1,331 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.dockerbuild.inputs.CacheFromAzureBlobArgs; +import com.pulumi.dockerbuild.inputs.CacheFromGitHubActionsArgs; +import com.pulumi.dockerbuild.inputs.CacheFromLocalArgs; +import com.pulumi.dockerbuild.inputs.CacheFromRegistryArgs; +import com.pulumi.dockerbuild.inputs.CacheFromS3Args; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class CacheFromArgs extends com.pulumi.resources.ResourceArgs { + + public static final CacheFromArgs Empty = new CacheFromArgs(); + + /** + * Upload build caches to Azure's blob storage service. + * + */ + @Import(name="azblob") + private @Nullable Output azblob; + + /** + * @return Upload build caches to Azure's blob storage service. + * + */ + public Optional> azblob() { + return Optional.ofNullable(this.azblob); + } + + /** + * When `true` this entry will be excluded. Defaults to `false`. + * + */ + @Import(name="disabled") + private @Nullable Output disabled; + + /** + * @return When `true` this entry will be excluded. Defaults to `false`. + * + */ + public Optional> disabled() { + return Optional.ofNullable(this.disabled); + } + + /** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + */ + @Import(name="gha") + private @Nullable Output gha; + + /** + * @return Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + */ + public Optional> gha() { + return Optional.ofNullable(this.gha); + } + + /** + * A simple backend which caches images on your local filesystem. + * + */ + @Import(name="local") + private @Nullable Output local; + + /** + * @return A simple backend which caches images on your local filesystem. + * + */ + public Optional> local() { + return Optional.ofNullable(this.local); + } + + /** + * A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`). + * + */ + @Import(name="raw") + private @Nullable Output raw; + + /** + * @return A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`). + * + */ + public Optional> raw() { + return Optional.ofNullable(this.raw); + } + + /** + * Upload build caches to remote registries. + * + */ + @Import(name="registry") + private @Nullable Output registry; + + /** + * @return Upload build caches to remote registries. + * + */ + public Optional> registry() { + return Optional.ofNullable(this.registry); + } + + /** + * Upload build caches to AWS S3 or an S3-compatible services such as + * MinIO. + * + */ + @Import(name="s3") + private @Nullable Output s3; + + /** + * @return Upload build caches to AWS S3 or an S3-compatible services such as + * MinIO. + * + */ + public Optional> s3() { + return Optional.ofNullable(this.s3); + } + + private CacheFromArgs() {} + + private CacheFromArgs(CacheFromArgs $) { + this.azblob = $.azblob; + this.disabled = $.disabled; + this.gha = $.gha; + this.local = $.local; + this.raw = $.raw; + this.registry = $.registry; + this.s3 = $.s3; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheFromArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheFromArgs $; + + public Builder() { + $ = new CacheFromArgs(); + } + + public Builder(CacheFromArgs defaults) { + $ = new CacheFromArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param azblob Upload build caches to Azure's blob storage service. + * + * @return builder + * + */ + public Builder azblob(@Nullable Output azblob) { + $.azblob = azblob; + return this; + } + + /** + * @param azblob Upload build caches to Azure's blob storage service. + * + * @return builder + * + */ + public Builder azblob(CacheFromAzureBlobArgs azblob) { + return azblob(Output.of(azblob)); + } + + /** + * @param disabled When `true` this entry will be excluded. Defaults to `false`. + * + * @return builder + * + */ + public Builder disabled(@Nullable Output disabled) { + $.disabled = disabled; + return this; + } + + /** + * @param disabled When `true` this entry will be excluded. Defaults to `false`. + * + * @return builder + * + */ + public Builder disabled(Boolean disabled) { + return disabled(Output.of(disabled)); + } + + /** + * @param gha Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + * @return builder + * + */ + public Builder gha(@Nullable Output gha) { + $.gha = gha; + return this; + } + + /** + * @param gha Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + * @return builder + * + */ + public Builder gha(CacheFromGitHubActionsArgs gha) { + return gha(Output.of(gha)); + } + + /** + * @param local A simple backend which caches images on your local filesystem. + * + * @return builder + * + */ + public Builder local(@Nullable Output local) { + $.local = local; + return this; + } + + /** + * @param local A simple backend which caches images on your local filesystem. + * + * @return builder + * + */ + public Builder local(CacheFromLocalArgs local) { + return local(Output.of(local)); + } + + /** + * @param raw A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`). + * + * @return builder + * + */ + public Builder raw(@Nullable Output raw) { + $.raw = raw; + return this; + } + + /** + * @param raw A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`). + * + * @return builder + * + */ + public Builder raw(String raw) { + return raw(Output.of(raw)); + } + + /** + * @param registry Upload build caches to remote registries. + * + * @return builder + * + */ + public Builder registry(@Nullable Output registry) { + $.registry = registry; + return this; + } + + /** + * @param registry Upload build caches to remote registries. + * + * @return builder + * + */ + public Builder registry(CacheFromRegistryArgs registry) { + return registry(Output.of(registry)); + } + + /** + * @param s3 Upload build caches to AWS S3 or an S3-compatible services such as + * MinIO. + * + * @return builder + * + */ + public Builder s3(@Nullable Output s3) { + $.s3 = s3; + return this; + } + + /** + * @param s3 Upload build caches to AWS S3 or an S3-compatible services such as + * MinIO. + * + * @return builder + * + */ + public Builder s3(CacheFromS3Args s3) { + return s3(Output.of(s3)); + } + + public CacheFromArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromAzureBlobArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromAzureBlobArgs.java new file mode 100644 index 0000000..5c3fca8 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromAzureBlobArgs.java @@ -0,0 +1,161 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class CacheFromAzureBlobArgs extends com.pulumi.resources.ResourceArgs { + + public static final CacheFromAzureBlobArgs Empty = new CacheFromAzureBlobArgs(); + + /** + * Base URL of the storage account. + * + */ + @Import(name="accountUrl") + private @Nullable Output accountUrl; + + /** + * @return Base URL of the storage account. + * + */ + public Optional> accountUrl() { + return Optional.ofNullable(this.accountUrl); + } + + /** + * The name of the cache image. + * + */ + @Import(name="name", required=true) + private Output name; + + /** + * @return The name of the cache image. + * + */ + public Output name() { + return this.name; + } + + /** + * Blob storage account key. + * + */ + @Import(name="secretAccessKey") + private @Nullable Output secretAccessKey; + + /** + * @return Blob storage account key. + * + */ + public Optional> secretAccessKey() { + return Optional.ofNullable(this.secretAccessKey); + } + + private CacheFromAzureBlobArgs() {} + + private CacheFromAzureBlobArgs(CacheFromAzureBlobArgs $) { + this.accountUrl = $.accountUrl; + this.name = $.name; + this.secretAccessKey = $.secretAccessKey; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheFromAzureBlobArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheFromAzureBlobArgs $; + + public Builder() { + $ = new CacheFromAzureBlobArgs(); + } + + public Builder(CacheFromAzureBlobArgs defaults) { + $ = new CacheFromAzureBlobArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param accountUrl Base URL of the storage account. + * + * @return builder + * + */ + public Builder accountUrl(@Nullable Output accountUrl) { + $.accountUrl = accountUrl; + return this; + } + + /** + * @param accountUrl Base URL of the storage account. + * + * @return builder + * + */ + public Builder accountUrl(String accountUrl) { + return accountUrl(Output.of(accountUrl)); + } + + /** + * @param name The name of the cache image. + * + * @return builder + * + */ + public Builder name(Output name) { + $.name = name; + return this; + } + + /** + * @param name The name of the cache image. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param secretAccessKey Blob storage account key. + * + * @return builder + * + */ + public Builder secretAccessKey(@Nullable Output secretAccessKey) { + $.secretAccessKey = secretAccessKey; + return this; + } + + /** + * @param secretAccessKey Blob storage account key. + * + * @return builder + * + */ + public Builder secretAccessKey(String secretAccessKey) { + return secretAccessKey(Output.of(secretAccessKey)); + } + + public CacheFromAzureBlobArgs build() { + if ($.name == null) { + throw new MissingRequiredPropertyException("CacheFromAzureBlobArgs", "name"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromGitHubActionsArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromGitHubActionsArgs.java new file mode 100644 index 0000000..7a9f344 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromGitHubActionsArgs.java @@ -0,0 +1,209 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class CacheFromGitHubActionsArgs extends com.pulumi.resources.ResourceArgs { + + public static final CacheFromGitHubActionsArgs Empty = new CacheFromGitHubActionsArgs(); + + /** + * The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + */ + @Import(name="scope") + private @Nullable Output scope; + + /** + * @return The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + */ + public Optional> scope() { + return Optional.ofNullable(this.scope); + } + + /** + * The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + @Import(name="token") + private @Nullable Output token; + + /** + * @return The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + public Optional> token() { + return Optional.ofNullable(this.token); + } + + /** + * The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + @Import(name="url") + private @Nullable Output url; + + /** + * @return The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + public Optional> url() { + return Optional.ofNullable(this.url); + } + + private CacheFromGitHubActionsArgs() {} + + private CacheFromGitHubActionsArgs(CacheFromGitHubActionsArgs $) { + this.scope = $.scope; + this.token = $.token; + this.url = $.url; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheFromGitHubActionsArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheFromGitHubActionsArgs $; + + public Builder() { + $ = new CacheFromGitHubActionsArgs(); + } + + public Builder(CacheFromGitHubActionsArgs defaults) { + $ = new CacheFromGitHubActionsArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param scope The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + * @return builder + * + */ + public Builder scope(@Nullable Output scope) { + $.scope = scope; + return this; + } + + /** + * @param scope The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + * @return builder + * + */ + public Builder scope(String scope) { + return scope(Output.of(scope)); + } + + /** + * @param token The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + * @return builder + * + */ + public Builder token(@Nullable Output token) { + $.token = token; + return this; + } + + /** + * @param token The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + * @return builder + * + */ + public Builder token(String token) { + return token(Output.of(token)); + } + + /** + * @param url The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + * @return builder + * + */ + public Builder url(@Nullable Output url) { + $.url = url; + return this; + } + + /** + * @param url The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + * @return builder + * + */ + public Builder url(String url) { + return url(Output.of(url)); + } + + public CacheFromGitHubActionsArgs build() { + $.scope = Codegen.stringProp("scope").output().arg($.scope).env("buildkit").def("").getNullable(); + $.token = Codegen.stringProp("token").secret().arg($.token).env("ACTIONS_RUNTIME_TOKEN").def("").getNullable(); + $.url = Codegen.stringProp("url").output().arg($.url).env("ACTIONS_RUNTIME_URL").def("").getNullable(); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromLocalArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromLocalArgs.java new file mode 100644 index 0000000..ce2a89a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromLocalArgs.java @@ -0,0 +1,124 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class CacheFromLocalArgs extends com.pulumi.resources.ResourceArgs { + + public static final CacheFromLocalArgs Empty = new CacheFromLocalArgs(); + + /** + * Digest of manifest to import. + * + */ + @Import(name="digest") + private @Nullable Output digest; + + /** + * @return Digest of manifest to import. + * + */ + public Optional> digest() { + return Optional.ofNullable(this.digest); + } + + /** + * Path of the local directory where cache gets imported from. + * + */ + @Import(name="src", required=true) + private Output src; + + /** + * @return Path of the local directory where cache gets imported from. + * + */ + public Output src() { + return this.src; + } + + private CacheFromLocalArgs() {} + + private CacheFromLocalArgs(CacheFromLocalArgs $) { + this.digest = $.digest; + this.src = $.src; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheFromLocalArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheFromLocalArgs $; + + public Builder() { + $ = new CacheFromLocalArgs(); + } + + public Builder(CacheFromLocalArgs defaults) { + $ = new CacheFromLocalArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param digest Digest of manifest to import. + * + * @return builder + * + */ + public Builder digest(@Nullable Output digest) { + $.digest = digest; + return this; + } + + /** + * @param digest Digest of manifest to import. + * + * @return builder + * + */ + public Builder digest(String digest) { + return digest(Output.of(digest)); + } + + /** + * @param src Path of the local directory where cache gets imported from. + * + * @return builder + * + */ + public Builder src(Output src) { + $.src = src; + return this; + } + + /** + * @param src Path of the local directory where cache gets imported from. + * + * @return builder + * + */ + public Builder src(String src) { + return src(Output.of(src)); + } + + public CacheFromLocalArgs build() { + if ($.src == null) { + throw new MissingRequiredPropertyException("CacheFromLocalArgs", "src"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromRegistryArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromRegistryArgs.java new file mode 100644 index 0000000..901419c --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromRegistryArgs.java @@ -0,0 +1,85 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class CacheFromRegistryArgs extends com.pulumi.resources.ResourceArgs { + + public static final CacheFromRegistryArgs Empty = new CacheFromRegistryArgs(); + + /** + * Fully qualified name of the cache image to import. + * + */ + @Import(name="ref", required=true) + private Output ref; + + /** + * @return Fully qualified name of the cache image to import. + * + */ + public Output ref() { + return this.ref; + } + + private CacheFromRegistryArgs() {} + + private CacheFromRegistryArgs(CacheFromRegistryArgs $) { + this.ref = $.ref; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheFromRegistryArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheFromRegistryArgs $; + + public Builder() { + $ = new CacheFromRegistryArgs(); + } + + public Builder(CacheFromRegistryArgs defaults) { + $ = new CacheFromRegistryArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param ref Fully qualified name of the cache image to import. + * + * @return builder + * + */ + public Builder ref(Output ref) { + $.ref = ref; + return this; + } + + /** + * @param ref Fully qualified name of the cache image to import. + * + * @return builder + * + */ + public Builder ref(String ref) { + return ref(Output.of(ref)); + } + + public CacheFromRegistryArgs build() { + if ($.ref == null) { + throw new MissingRequiredPropertyException("CacheFromRegistryArgs", "ref"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromS3Args.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromS3Args.java new file mode 100644 index 0000000..1fafcda --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheFromS3Args.java @@ -0,0 +1,426 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class CacheFromS3Args extends com.pulumi.resources.ResourceArgs { + + public static final CacheFromS3Args Empty = new CacheFromS3Args(); + + /** + * Defaults to `$AWS_ACCESS_KEY_ID`. + * + */ + @Import(name="accessKeyId") + private @Nullable Output accessKeyId; + + /** + * @return Defaults to `$AWS_ACCESS_KEY_ID`. + * + */ + public Optional> accessKeyId() { + return Optional.ofNullable(this.accessKeyId); + } + + /** + * Prefix to prepend to blob filenames. + * + */ + @Import(name="blobsPrefix") + private @Nullable Output blobsPrefix; + + /** + * @return Prefix to prepend to blob filenames. + * + */ + public Optional> blobsPrefix() { + return Optional.ofNullable(this.blobsPrefix); + } + + /** + * Name of the S3 bucket. + * + */ + @Import(name="bucket", required=true) + private Output bucket; + + /** + * @return Name of the S3 bucket. + * + */ + public Output bucket() { + return this.bucket; + } + + /** + * Endpoint of the S3 bucket. + * + */ + @Import(name="endpointUrl") + private @Nullable Output endpointUrl; + + /** + * @return Endpoint of the S3 bucket. + * + */ + public Optional> endpointUrl() { + return Optional.ofNullable(this.endpointUrl); + } + + /** + * Prefix to prepend on manifest filenames. + * + */ + @Import(name="manifestsPrefix") + private @Nullable Output manifestsPrefix; + + /** + * @return Prefix to prepend on manifest filenames. + * + */ + public Optional> manifestsPrefix() { + return Optional.ofNullable(this.manifestsPrefix); + } + + /** + * Name of the cache image. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return Name of the cache image. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + */ + @Import(name="region", required=true) + private Output region; + + /** + * @return The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + */ + public Output region() { + return this.region; + } + + /** + * Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + */ + @Import(name="secretAccessKey") + private @Nullable Output secretAccessKey; + + /** + * @return Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + */ + public Optional> secretAccessKey() { + return Optional.ofNullable(this.secretAccessKey); + } + + /** + * Defaults to `$AWS_SESSION_TOKEN`. + * + */ + @Import(name="sessionToken") + private @Nullable Output sessionToken; + + /** + * @return Defaults to `$AWS_SESSION_TOKEN`. + * + */ + public Optional> sessionToken() { + return Optional.ofNullable(this.sessionToken); + } + + /** + * Uses `bucket` in the URL instead of hostname when `true`. + * + */ + @Import(name="usePathStyle") + private @Nullable Output usePathStyle; + + /** + * @return Uses `bucket` in the URL instead of hostname when `true`. + * + */ + public Optional> usePathStyle() { + return Optional.ofNullable(this.usePathStyle); + } + + private CacheFromS3Args() {} + + private CacheFromS3Args(CacheFromS3Args $) { + this.accessKeyId = $.accessKeyId; + this.blobsPrefix = $.blobsPrefix; + this.bucket = $.bucket; + this.endpointUrl = $.endpointUrl; + this.manifestsPrefix = $.manifestsPrefix; + this.name = $.name; + this.region = $.region; + this.secretAccessKey = $.secretAccessKey; + this.sessionToken = $.sessionToken; + this.usePathStyle = $.usePathStyle; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheFromS3Args defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheFromS3Args $; + + public Builder() { + $ = new CacheFromS3Args(); + } + + public Builder(CacheFromS3Args defaults) { + $ = new CacheFromS3Args(Objects.requireNonNull(defaults)); + } + + /** + * @param accessKeyId Defaults to `$AWS_ACCESS_KEY_ID`. + * + * @return builder + * + */ + public Builder accessKeyId(@Nullable Output accessKeyId) { + $.accessKeyId = accessKeyId; + return this; + } + + /** + * @param accessKeyId Defaults to `$AWS_ACCESS_KEY_ID`. + * + * @return builder + * + */ + public Builder accessKeyId(String accessKeyId) { + return accessKeyId(Output.of(accessKeyId)); + } + + /** + * @param blobsPrefix Prefix to prepend to blob filenames. + * + * @return builder + * + */ + public Builder blobsPrefix(@Nullable Output blobsPrefix) { + $.blobsPrefix = blobsPrefix; + return this; + } + + /** + * @param blobsPrefix Prefix to prepend to blob filenames. + * + * @return builder + * + */ + public Builder blobsPrefix(String blobsPrefix) { + return blobsPrefix(Output.of(blobsPrefix)); + } + + /** + * @param bucket Name of the S3 bucket. + * + * @return builder + * + */ + public Builder bucket(Output bucket) { + $.bucket = bucket; + return this; + } + + /** + * @param bucket Name of the S3 bucket. + * + * @return builder + * + */ + public Builder bucket(String bucket) { + return bucket(Output.of(bucket)); + } + + /** + * @param endpointUrl Endpoint of the S3 bucket. + * + * @return builder + * + */ + public Builder endpointUrl(@Nullable Output endpointUrl) { + $.endpointUrl = endpointUrl; + return this; + } + + /** + * @param endpointUrl Endpoint of the S3 bucket. + * + * @return builder + * + */ + public Builder endpointUrl(String endpointUrl) { + return endpointUrl(Output.of(endpointUrl)); + } + + /** + * @param manifestsPrefix Prefix to prepend on manifest filenames. + * + * @return builder + * + */ + public Builder manifestsPrefix(@Nullable Output manifestsPrefix) { + $.manifestsPrefix = manifestsPrefix; + return this; + } + + /** + * @param manifestsPrefix Prefix to prepend on manifest filenames. + * + * @return builder + * + */ + public Builder manifestsPrefix(String manifestsPrefix) { + return manifestsPrefix(Output.of(manifestsPrefix)); + } + + /** + * @param name Name of the cache image. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name Name of the cache image. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param region The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + * @return builder + * + */ + public Builder region(Output region) { + $.region = region; + return this; + } + + /** + * @param region The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + * @return builder + * + */ + public Builder region(String region) { + return region(Output.of(region)); + } + + /** + * @param secretAccessKey Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + * @return builder + * + */ + public Builder secretAccessKey(@Nullable Output secretAccessKey) { + $.secretAccessKey = secretAccessKey; + return this; + } + + /** + * @param secretAccessKey Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + * @return builder + * + */ + public Builder secretAccessKey(String secretAccessKey) { + return secretAccessKey(Output.of(secretAccessKey)); + } + + /** + * @param sessionToken Defaults to `$AWS_SESSION_TOKEN`. + * + * @return builder + * + */ + public Builder sessionToken(@Nullable Output sessionToken) { + $.sessionToken = sessionToken; + return this; + } + + /** + * @param sessionToken Defaults to `$AWS_SESSION_TOKEN`. + * + * @return builder + * + */ + public Builder sessionToken(String sessionToken) { + return sessionToken(Output.of(sessionToken)); + } + + /** + * @param usePathStyle Uses `bucket` in the URL instead of hostname when `true`. + * + * @return builder + * + */ + public Builder usePathStyle(@Nullable Output usePathStyle) { + $.usePathStyle = usePathStyle; + return this; + } + + /** + * @param usePathStyle Uses `bucket` in the URL instead of hostname when `true`. + * + * @return builder + * + */ + public Builder usePathStyle(Boolean usePathStyle) { + return usePathStyle(Output.of(usePathStyle)); + } + + public CacheFromS3Args build() { + $.accessKeyId = Codegen.stringProp("accessKeyId").output().arg($.accessKeyId).env("AWS_ACCESS_KEY_ID").def("").getNullable(); + if ($.bucket == null) { + throw new MissingRequiredPropertyException("CacheFromS3Args", "bucket"); + } + $.region = Codegen.stringProp("region").output().arg($.region).env("AWS_REGION").def("").require(); + $.secretAccessKey = Codegen.stringProp("secretAccessKey").secret().arg($.secretAccessKey).env("AWS_SECRET_ACCESS_KEY").def("").getNullable(); + $.sessionToken = Codegen.stringProp("sessionToken").secret().arg($.sessionToken).env("AWS_SESSION_TOKEN").def("").getNullable(); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToArgs.java new file mode 100644 index 0000000..22cc53b --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToArgs.java @@ -0,0 +1,377 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.dockerbuild.inputs.CacheToAzureBlobArgs; +import com.pulumi.dockerbuild.inputs.CacheToGitHubActionsArgs; +import com.pulumi.dockerbuild.inputs.CacheToInlineArgs; +import com.pulumi.dockerbuild.inputs.CacheToLocalArgs; +import com.pulumi.dockerbuild.inputs.CacheToRegistryArgs; +import com.pulumi.dockerbuild.inputs.CacheToS3Args; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class CacheToArgs extends com.pulumi.resources.ResourceArgs { + + public static final CacheToArgs Empty = new CacheToArgs(); + + /** + * Push cache to Azure's blob storage service. + * + */ + @Import(name="azblob") + private @Nullable Output azblob; + + /** + * @return Push cache to Azure's blob storage service. + * + */ + public Optional> azblob() { + return Optional.ofNullable(this.azblob); + } + + /** + * When `true` this entry will be excluded. Defaults to `false`. + * + */ + @Import(name="disabled") + private @Nullable Output disabled; + + /** + * @return When `true` this entry will be excluded. Defaults to `false`. + * + */ + public Optional> disabled() { + return Optional.ofNullable(this.disabled); + } + + /** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + */ + @Import(name="gha") + private @Nullable Output gha; + + /** + * @return Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + */ + public Optional> gha() { + return Optional.ofNullable(this.gha); + } + + /** + * The inline cache storage backend is the simplest implementation to get + * started with, but it does not handle multi-stage builds. Consider the + * `registry` cache backend instead. + * + */ + @Import(name="inline") + private @Nullable Output inline; + + /** + * @return The inline cache storage backend is the simplest implementation to get + * started with, but it does not handle multi-stage builds. Consider the + * `registry` cache backend instead. + * + */ + public Optional> inline() { + return Optional.ofNullable(this.inline); + } + + /** + * A simple backend which caches imagines on your local filesystem. + * + */ + @Import(name="local") + private @Nullable Output local; + + /** + * @return A simple backend which caches imagines on your local filesystem. + * + */ + public Optional> local() { + return Optional.ofNullable(this.local); + } + + /** + * A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`) + * + */ + @Import(name="raw") + private @Nullable Output raw; + + /** + * @return A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`) + * + */ + public Optional> raw() { + return Optional.ofNullable(this.raw); + } + + /** + * Push caches to remote registries. Incompatible with the `docker` build + * driver. + * + */ + @Import(name="registry") + private @Nullable Output registry; + + /** + * @return Push caches to remote registries. Incompatible with the `docker` build + * driver. + * + */ + public Optional> registry() { + return Optional.ofNullable(this.registry); + } + + /** + * Push cache to AWS S3 or S3-compatible services such as MinIO. + * + */ + @Import(name="s3") + private @Nullable Output s3; + + /** + * @return Push cache to AWS S3 or S3-compatible services such as MinIO. + * + */ + public Optional> s3() { + return Optional.ofNullable(this.s3); + } + + private CacheToArgs() {} + + private CacheToArgs(CacheToArgs $) { + this.azblob = $.azblob; + this.disabled = $.disabled; + this.gha = $.gha; + this.inline = $.inline; + this.local = $.local; + this.raw = $.raw; + this.registry = $.registry; + this.s3 = $.s3; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheToArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheToArgs $; + + public Builder() { + $ = new CacheToArgs(); + } + + public Builder(CacheToArgs defaults) { + $ = new CacheToArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param azblob Push cache to Azure's blob storage service. + * + * @return builder + * + */ + public Builder azblob(@Nullable Output azblob) { + $.azblob = azblob; + return this; + } + + /** + * @param azblob Push cache to Azure's blob storage service. + * + * @return builder + * + */ + public Builder azblob(CacheToAzureBlobArgs azblob) { + return azblob(Output.of(azblob)); + } + + /** + * @param disabled When `true` this entry will be excluded. Defaults to `false`. + * + * @return builder + * + */ + public Builder disabled(@Nullable Output disabled) { + $.disabled = disabled; + return this; + } + + /** + * @param disabled When `true` this entry will be excluded. Defaults to `false`. + * + * @return builder + * + */ + public Builder disabled(Boolean disabled) { + return disabled(Output.of(disabled)); + } + + /** + * @param gha Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + * @return builder + * + */ + public Builder gha(@Nullable Output gha) { + $.gha = gha; + return this; + } + + /** + * @param gha Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + * @return builder + * + */ + public Builder gha(CacheToGitHubActionsArgs gha) { + return gha(Output.of(gha)); + } + + /** + * @param inline The inline cache storage backend is the simplest implementation to get + * started with, but it does not handle multi-stage builds. Consider the + * `registry` cache backend instead. + * + * @return builder + * + */ + public Builder inline(@Nullable Output inline) { + $.inline = inline; + return this; + } + + /** + * @param inline The inline cache storage backend is the simplest implementation to get + * started with, but it does not handle multi-stage builds. Consider the + * `registry` cache backend instead. + * + * @return builder + * + */ + public Builder inline(CacheToInlineArgs inline) { + return inline(Output.of(inline)); + } + + /** + * @param local A simple backend which caches imagines on your local filesystem. + * + * @return builder + * + */ + public Builder local(@Nullable Output local) { + $.local = local; + return this; + } + + /** + * @param local A simple backend which caches imagines on your local filesystem. + * + * @return builder + * + */ + public Builder local(CacheToLocalArgs local) { + return local(Output.of(local)); + } + + /** + * @param raw A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`) + * + * @return builder + * + */ + public Builder raw(@Nullable Output raw) { + $.raw = raw; + return this; + } + + /** + * @param raw A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`) + * + * @return builder + * + */ + public Builder raw(String raw) { + return raw(Output.of(raw)); + } + + /** + * @param registry Push caches to remote registries. Incompatible with the `docker` build + * driver. + * + * @return builder + * + */ + public Builder registry(@Nullable Output registry) { + $.registry = registry; + return this; + } + + /** + * @param registry Push caches to remote registries. Incompatible with the `docker` build + * driver. + * + * @return builder + * + */ + public Builder registry(CacheToRegistryArgs registry) { + return registry(Output.of(registry)); + } + + /** + * @param s3 Push cache to AWS S3 or S3-compatible services such as MinIO. + * + * @return builder + * + */ + public Builder s3(@Nullable Output s3) { + $.s3 = s3; + return this; + } + + /** + * @param s3 Push cache to AWS S3 or S3-compatible services such as MinIO. + * + * @return builder + * + */ + public Builder s3(CacheToS3Args s3) { + return s3(Output.of(s3)); + } + + public CacheToArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToAzureBlobArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToAzureBlobArgs.java new file mode 100644 index 0000000..2b4e50b --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToAzureBlobArgs.java @@ -0,0 +1,240 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.enums.CacheMode; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class CacheToAzureBlobArgs extends com.pulumi.resources.ResourceArgs { + + public static final CacheToAzureBlobArgs Empty = new CacheToAzureBlobArgs(); + + /** + * Base URL of the storage account. + * + */ + @Import(name="accountUrl") + private @Nullable Output accountUrl; + + /** + * @return Base URL of the storage account. + * + */ + public Optional> accountUrl() { + return Optional.ofNullable(this.accountUrl); + } + + /** + * Ignore errors caused by failed cache exports. + * + */ + @Import(name="ignoreError") + private @Nullable Output ignoreError; + + /** + * @return Ignore errors caused by failed cache exports. + * + */ + public Optional> ignoreError() { + return Optional.ofNullable(this.ignoreError); + } + + /** + * The cache mode to use. Defaults to `min`. + * + */ + @Import(name="mode") + private @Nullable Output mode; + + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + public Optional> mode() { + return Optional.ofNullable(this.mode); + } + + /** + * The name of the cache image. + * + */ + @Import(name="name", required=true) + private Output name; + + /** + * @return The name of the cache image. + * + */ + public Output name() { + return this.name; + } + + /** + * Blob storage account key. + * + */ + @Import(name="secretAccessKey") + private @Nullable Output secretAccessKey; + + /** + * @return Blob storage account key. + * + */ + public Optional> secretAccessKey() { + return Optional.ofNullable(this.secretAccessKey); + } + + private CacheToAzureBlobArgs() {} + + private CacheToAzureBlobArgs(CacheToAzureBlobArgs $) { + this.accountUrl = $.accountUrl; + this.ignoreError = $.ignoreError; + this.mode = $.mode; + this.name = $.name; + this.secretAccessKey = $.secretAccessKey; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheToAzureBlobArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheToAzureBlobArgs $; + + public Builder() { + $ = new CacheToAzureBlobArgs(); + } + + public Builder(CacheToAzureBlobArgs defaults) { + $ = new CacheToAzureBlobArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param accountUrl Base URL of the storage account. + * + * @return builder + * + */ + public Builder accountUrl(@Nullable Output accountUrl) { + $.accountUrl = accountUrl; + return this; + } + + /** + * @param accountUrl Base URL of the storage account. + * + * @return builder + * + */ + public Builder accountUrl(String accountUrl) { + return accountUrl(Output.of(accountUrl)); + } + + /** + * @param ignoreError Ignore errors caused by failed cache exports. + * + * @return builder + * + */ + public Builder ignoreError(@Nullable Output ignoreError) { + $.ignoreError = ignoreError; + return this; + } + + /** + * @param ignoreError Ignore errors caused by failed cache exports. + * + * @return builder + * + */ + public Builder ignoreError(Boolean ignoreError) { + return ignoreError(Output.of(ignoreError)); + } + + /** + * @param mode The cache mode to use. Defaults to `min`. + * + * @return builder + * + */ + public Builder mode(@Nullable Output mode) { + $.mode = mode; + return this; + } + + /** + * @param mode The cache mode to use. Defaults to `min`. + * + * @return builder + * + */ + public Builder mode(CacheMode mode) { + return mode(Output.of(mode)); + } + + /** + * @param name The name of the cache image. + * + * @return builder + * + */ + public Builder name(Output name) { + $.name = name; + return this; + } + + /** + * @param name The name of the cache image. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param secretAccessKey Blob storage account key. + * + * @return builder + * + */ + public Builder secretAccessKey(@Nullable Output secretAccessKey) { + $.secretAccessKey = secretAccessKey; + return this; + } + + /** + * @param secretAccessKey Blob storage account key. + * + * @return builder + * + */ + public Builder secretAccessKey(String secretAccessKey) { + return secretAccessKey(Output.of(secretAccessKey)); + } + + public CacheToAzureBlobArgs build() { + $.ignoreError = Codegen.booleanProp("ignoreError").output().arg($.ignoreError).def(false).getNullable(); + $.mode = Codegen.objectProp("mode", CacheMode.class).output().arg($.mode).def(CacheMode.Min).getNullable(); + if ($.name == null) { + throw new MissingRequiredPropertyException("CacheToAzureBlobArgs", "name"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToGitHubActionsArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToGitHubActionsArgs.java new file mode 100644 index 0000000..7126d32 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToGitHubActionsArgs.java @@ -0,0 +1,287 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.enums.CacheMode; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class CacheToGitHubActionsArgs extends com.pulumi.resources.ResourceArgs { + + public static final CacheToGitHubActionsArgs Empty = new CacheToGitHubActionsArgs(); + + /** + * Ignore errors caused by failed cache exports. + * + */ + @Import(name="ignoreError") + private @Nullable Output ignoreError; + + /** + * @return Ignore errors caused by failed cache exports. + * + */ + public Optional> ignoreError() { + return Optional.ofNullable(this.ignoreError); + } + + /** + * The cache mode to use. Defaults to `min`. + * + */ + @Import(name="mode") + private @Nullable Output mode; + + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + public Optional> mode() { + return Optional.ofNullable(this.mode); + } + + /** + * The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + */ + @Import(name="scope") + private @Nullable Output scope; + + /** + * @return The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + */ + public Optional> scope() { + return Optional.ofNullable(this.scope); + } + + /** + * The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + @Import(name="token") + private @Nullable Output token; + + /** + * @return The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + public Optional> token() { + return Optional.ofNullable(this.token); + } + + /** + * The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + @Import(name="url") + private @Nullable Output url; + + /** + * @return The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + public Optional> url() { + return Optional.ofNullable(this.url); + } + + private CacheToGitHubActionsArgs() {} + + private CacheToGitHubActionsArgs(CacheToGitHubActionsArgs $) { + this.ignoreError = $.ignoreError; + this.mode = $.mode; + this.scope = $.scope; + this.token = $.token; + this.url = $.url; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheToGitHubActionsArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheToGitHubActionsArgs $; + + public Builder() { + $ = new CacheToGitHubActionsArgs(); + } + + public Builder(CacheToGitHubActionsArgs defaults) { + $ = new CacheToGitHubActionsArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param ignoreError Ignore errors caused by failed cache exports. + * + * @return builder + * + */ + public Builder ignoreError(@Nullable Output ignoreError) { + $.ignoreError = ignoreError; + return this; + } + + /** + * @param ignoreError Ignore errors caused by failed cache exports. + * + * @return builder + * + */ + public Builder ignoreError(Boolean ignoreError) { + return ignoreError(Output.of(ignoreError)); + } + + /** + * @param mode The cache mode to use. Defaults to `min`. + * + * @return builder + * + */ + public Builder mode(@Nullable Output mode) { + $.mode = mode; + return this; + } + + /** + * @param mode The cache mode to use. Defaults to `min`. + * + * @return builder + * + */ + public Builder mode(CacheMode mode) { + return mode(Output.of(mode)); + } + + /** + * @param scope The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + * @return builder + * + */ + public Builder scope(@Nullable Output scope) { + $.scope = scope; + return this; + } + + /** + * @param scope The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + * @return builder + * + */ + public Builder scope(String scope) { + return scope(Output.of(scope)); + } + + /** + * @param token The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + * @return builder + * + */ + public Builder token(@Nullable Output token) { + $.token = token; + return this; + } + + /** + * @param token The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + * @return builder + * + */ + public Builder token(String token) { + return token(Output.of(token)); + } + + /** + * @param url The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + * @return builder + * + */ + public Builder url(@Nullable Output url) { + $.url = url; + return this; + } + + /** + * @param url The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + * @return builder + * + */ + public Builder url(String url) { + return url(Output.of(url)); + } + + public CacheToGitHubActionsArgs build() { + $.ignoreError = Codegen.booleanProp("ignoreError").output().arg($.ignoreError).def(false).getNullable(); + $.mode = Codegen.objectProp("mode", CacheMode.class).output().arg($.mode).def(CacheMode.Min).getNullable(); + $.scope = Codegen.stringProp("scope").output().arg($.scope).env("buildkit").def("").getNullable(); + $.token = Codegen.stringProp("token").secret().arg($.token).env("ACTIONS_RUNTIME_TOKEN").def("").getNullable(); + $.url = Codegen.stringProp("url").output().arg($.url).env("ACTIONS_RUNTIME_URL").def("").getNullable(); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToInlineArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToInlineArgs.java new file mode 100644 index 0000000..bc54717 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToInlineArgs.java @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + + + + +/** + * Include an inline cache with the exported image. + * + */ +public final class CacheToInlineArgs extends com.pulumi.resources.ResourceArgs { + + public static final CacheToInlineArgs Empty = new CacheToInlineArgs(); + + public static Builder builder() { + return new Builder(); + } + + public static final class Builder { + private CacheToInlineArgs $; + + public Builder() { + $ = new CacheToInlineArgs(); + } + public CacheToInlineArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToLocalArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToLocalArgs.java new file mode 100644 index 0000000..aed92e0 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToLocalArgs.java @@ -0,0 +1,282 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.enums.CacheMode; +import com.pulumi.dockerbuild.enums.CompressionType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class CacheToLocalArgs extends com.pulumi.resources.ResourceArgs { + + public static final CacheToLocalArgs Empty = new CacheToLocalArgs(); + + /** + * The compression type to use. + * + */ + @Import(name="compression") + private @Nullable Output compression; + + /** + * @return The compression type to use. + * + */ + public Optional> compression() { + return Optional.ofNullable(this.compression); + } + + /** + * Compression level from 0 to 22. + * + */ + @Import(name="compressionLevel") + private @Nullable Output compressionLevel; + + /** + * @return Compression level from 0 to 22. + * + */ + public Optional> compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + + /** + * Path of the local directory to export the cache. + * + */ + @Import(name="dest", required=true) + private Output dest; + + /** + * @return Path of the local directory to export the cache. + * + */ + public Output dest() { + return this.dest; + } + + /** + * Forcefully apply compression. + * + */ + @Import(name="forceCompression") + private @Nullable Output forceCompression; + + /** + * @return Forcefully apply compression. + * + */ + public Optional> forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + + /** + * Ignore errors caused by failed cache exports. + * + */ + @Import(name="ignoreError") + private @Nullable Output ignoreError; + + /** + * @return Ignore errors caused by failed cache exports. + * + */ + public Optional> ignoreError() { + return Optional.ofNullable(this.ignoreError); + } + + /** + * The cache mode to use. Defaults to `min`. + * + */ + @Import(name="mode") + private @Nullable Output mode; + + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + public Optional> mode() { + return Optional.ofNullable(this.mode); + } + + private CacheToLocalArgs() {} + + private CacheToLocalArgs(CacheToLocalArgs $) { + this.compression = $.compression; + this.compressionLevel = $.compressionLevel; + this.dest = $.dest; + this.forceCompression = $.forceCompression; + this.ignoreError = $.ignoreError; + this.mode = $.mode; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheToLocalArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheToLocalArgs $; + + public Builder() { + $ = new CacheToLocalArgs(); + } + + public Builder(CacheToLocalArgs defaults) { + $ = new CacheToLocalArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(@Nullable Output compression) { + $.compression = compression; + return this; + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(CompressionType compression) { + return compression(Output.of(compression)); + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(@Nullable Output compressionLevel) { + $.compressionLevel = compressionLevel; + return this; + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(Integer compressionLevel) { + return compressionLevel(Output.of(compressionLevel)); + } + + /** + * @param dest Path of the local directory to export the cache. + * + * @return builder + * + */ + public Builder dest(Output dest) { + $.dest = dest; + return this; + } + + /** + * @param dest Path of the local directory to export the cache. + * + * @return builder + * + */ + public Builder dest(String dest) { + return dest(Output.of(dest)); + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(@Nullable Output forceCompression) { + $.forceCompression = forceCompression; + return this; + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(Boolean forceCompression) { + return forceCompression(Output.of(forceCompression)); + } + + /** + * @param ignoreError Ignore errors caused by failed cache exports. + * + * @return builder + * + */ + public Builder ignoreError(@Nullable Output ignoreError) { + $.ignoreError = ignoreError; + return this; + } + + /** + * @param ignoreError Ignore errors caused by failed cache exports. + * + * @return builder + * + */ + public Builder ignoreError(Boolean ignoreError) { + return ignoreError(Output.of(ignoreError)); + } + + /** + * @param mode The cache mode to use. Defaults to `min`. + * + * @return builder + * + */ + public Builder mode(@Nullable Output mode) { + $.mode = mode; + return this; + } + + /** + * @param mode The cache mode to use. Defaults to `min`. + * + * @return builder + * + */ + public Builder mode(CacheMode mode) { + return mode(Output.of(mode)); + } + + public CacheToLocalArgs build() { + $.compression = Codegen.objectProp("compression", CompressionType.class).output().arg($.compression).def(CompressionType.Gzip).getNullable(); + $.compressionLevel = Codegen.integerProp("compressionLevel").output().arg($.compressionLevel).def(0).getNullable(); + if ($.dest == null) { + throw new MissingRequiredPropertyException("CacheToLocalArgs", "dest"); + } + $.forceCompression = Codegen.booleanProp("forceCompression").output().arg($.forceCompression).def(false).getNullable(); + $.ignoreError = Codegen.booleanProp("ignoreError").output().arg($.ignoreError).def(false).getNullable(); + $.mode = Codegen.objectProp("mode", CacheMode.class).output().arg($.mode).def(CacheMode.Min).getNullable(); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToRegistryArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToRegistryArgs.java new file mode 100644 index 0000000..5144527 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToRegistryArgs.java @@ -0,0 +1,386 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.enums.CacheMode; +import com.pulumi.dockerbuild.enums.CompressionType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class CacheToRegistryArgs extends com.pulumi.resources.ResourceArgs { + + public static final CacheToRegistryArgs Empty = new CacheToRegistryArgs(); + + /** + * The compression type to use. + * + */ + @Import(name="compression") + private @Nullable Output compression; + + /** + * @return The compression type to use. + * + */ + public Optional> compression() { + return Optional.ofNullable(this.compression); + } + + /** + * Compression level from 0 to 22. + * + */ + @Import(name="compressionLevel") + private @Nullable Output compressionLevel; + + /** + * @return Compression level from 0 to 22. + * + */ + public Optional> compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + + /** + * Forcefully apply compression. + * + */ + @Import(name="forceCompression") + private @Nullable Output forceCompression; + + /** + * @return Forcefully apply compression. + * + */ + public Optional> forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + + /** + * Ignore errors caused by failed cache exports. + * + */ + @Import(name="ignoreError") + private @Nullable Output ignoreError; + + /** + * @return Ignore errors caused by failed cache exports. + * + */ + public Optional> ignoreError() { + return Optional.ofNullable(this.ignoreError); + } + + /** + * Export cache manifest as an OCI-compatible image manifest instead of a + * manifest list. Requires `ociMediaTypes` to also be `true`. + * + * Some registries like AWS ECR will not work with caching if this is + * `false`. + * + * Defaults to `false` to match Docker's default behavior. + * + */ + @Import(name="imageManifest") + private @Nullable Output imageManifest; + + /** + * @return Export cache manifest as an OCI-compatible image manifest instead of a + * manifest list. Requires `ociMediaTypes` to also be `true`. + * + * Some registries like AWS ECR will not work with caching if this is + * `false`. + * + * Defaults to `false` to match Docker's default behavior. + * + */ + public Optional> imageManifest() { + return Optional.ofNullable(this.imageManifest); + } + + /** + * The cache mode to use. Defaults to `min`. + * + */ + @Import(name="mode") + private @Nullable Output mode; + + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + public Optional> mode() { + return Optional.ofNullable(this.mode); + } + + /** + * Whether to use OCI media types in exported manifests. Defaults to + * `true`. + * + */ + @Import(name="ociMediaTypes") + private @Nullable Output ociMediaTypes; + + /** + * @return Whether to use OCI media types in exported manifests. Defaults to + * `true`. + * + */ + public Optional> ociMediaTypes() { + return Optional.ofNullable(this.ociMediaTypes); + } + + /** + * Fully qualified name of the cache image to import. + * + */ + @Import(name="ref", required=true) + private Output ref; + + /** + * @return Fully qualified name of the cache image to import. + * + */ + public Output ref() { + return this.ref; + } + + private CacheToRegistryArgs() {} + + private CacheToRegistryArgs(CacheToRegistryArgs $) { + this.compression = $.compression; + this.compressionLevel = $.compressionLevel; + this.forceCompression = $.forceCompression; + this.ignoreError = $.ignoreError; + this.imageManifest = $.imageManifest; + this.mode = $.mode; + this.ociMediaTypes = $.ociMediaTypes; + this.ref = $.ref; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheToRegistryArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheToRegistryArgs $; + + public Builder() { + $ = new CacheToRegistryArgs(); + } + + public Builder(CacheToRegistryArgs defaults) { + $ = new CacheToRegistryArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(@Nullable Output compression) { + $.compression = compression; + return this; + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(CompressionType compression) { + return compression(Output.of(compression)); + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(@Nullable Output compressionLevel) { + $.compressionLevel = compressionLevel; + return this; + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(Integer compressionLevel) { + return compressionLevel(Output.of(compressionLevel)); + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(@Nullable Output forceCompression) { + $.forceCompression = forceCompression; + return this; + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(Boolean forceCompression) { + return forceCompression(Output.of(forceCompression)); + } + + /** + * @param ignoreError Ignore errors caused by failed cache exports. + * + * @return builder + * + */ + public Builder ignoreError(@Nullable Output ignoreError) { + $.ignoreError = ignoreError; + return this; + } + + /** + * @param ignoreError Ignore errors caused by failed cache exports. + * + * @return builder + * + */ + public Builder ignoreError(Boolean ignoreError) { + return ignoreError(Output.of(ignoreError)); + } + + /** + * @param imageManifest Export cache manifest as an OCI-compatible image manifest instead of a + * manifest list. Requires `ociMediaTypes` to also be `true`. + * + * Some registries like AWS ECR will not work with caching if this is + * `false`. + * + * Defaults to `false` to match Docker's default behavior. + * + * @return builder + * + */ + public Builder imageManifest(@Nullable Output imageManifest) { + $.imageManifest = imageManifest; + return this; + } + + /** + * @param imageManifest Export cache manifest as an OCI-compatible image manifest instead of a + * manifest list. Requires `ociMediaTypes` to also be `true`. + * + * Some registries like AWS ECR will not work with caching if this is + * `false`. + * + * Defaults to `false` to match Docker's default behavior. + * + * @return builder + * + */ + public Builder imageManifest(Boolean imageManifest) { + return imageManifest(Output.of(imageManifest)); + } + + /** + * @param mode The cache mode to use. Defaults to `min`. + * + * @return builder + * + */ + public Builder mode(@Nullable Output mode) { + $.mode = mode; + return this; + } + + /** + * @param mode The cache mode to use. Defaults to `min`. + * + * @return builder + * + */ + public Builder mode(CacheMode mode) { + return mode(Output.of(mode)); + } + + /** + * @param ociMediaTypes Whether to use OCI media types in exported manifests. Defaults to + * `true`. + * + * @return builder + * + */ + public Builder ociMediaTypes(@Nullable Output ociMediaTypes) { + $.ociMediaTypes = ociMediaTypes; + return this; + } + + /** + * @param ociMediaTypes Whether to use OCI media types in exported manifests. Defaults to + * `true`. + * + * @return builder + * + */ + public Builder ociMediaTypes(Boolean ociMediaTypes) { + return ociMediaTypes(Output.of(ociMediaTypes)); + } + + /** + * @param ref Fully qualified name of the cache image to import. + * + * @return builder + * + */ + public Builder ref(Output ref) { + $.ref = ref; + return this; + } + + /** + * @param ref Fully qualified name of the cache image to import. + * + * @return builder + * + */ + public Builder ref(String ref) { + return ref(Output.of(ref)); + } + + public CacheToRegistryArgs build() { + $.compression = Codegen.objectProp("compression", CompressionType.class).output().arg($.compression).def(CompressionType.Gzip).getNullable(); + $.compressionLevel = Codegen.integerProp("compressionLevel").output().arg($.compressionLevel).def(0).getNullable(); + $.forceCompression = Codegen.booleanProp("forceCompression").output().arg($.forceCompression).def(false).getNullable(); + $.ignoreError = Codegen.booleanProp("ignoreError").output().arg($.ignoreError).def(false).getNullable(); + $.imageManifest = Codegen.booleanProp("imageManifest").output().arg($.imageManifest).def(false).getNullable(); + $.mode = Codegen.objectProp("mode", CacheMode.class).output().arg($.mode).def(CacheMode.Min).getNullable(); + $.ociMediaTypes = Codegen.booleanProp("ociMediaTypes").output().arg($.ociMediaTypes).def(true).getNullable(); + if ($.ref == null) { + throw new MissingRequiredPropertyException("CacheToRegistryArgs", "ref"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToS3Args.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToS3Args.java new file mode 100644 index 0000000..0bb6934 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/CacheToS3Args.java @@ -0,0 +1,503 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.enums.CacheMode; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class CacheToS3Args extends com.pulumi.resources.ResourceArgs { + + public static final CacheToS3Args Empty = new CacheToS3Args(); + + /** + * Defaults to `$AWS_ACCESS_KEY_ID`. + * + */ + @Import(name="accessKeyId") + private @Nullable Output accessKeyId; + + /** + * @return Defaults to `$AWS_ACCESS_KEY_ID`. + * + */ + public Optional> accessKeyId() { + return Optional.ofNullable(this.accessKeyId); + } + + /** + * Prefix to prepend to blob filenames. + * + */ + @Import(name="blobsPrefix") + private @Nullable Output blobsPrefix; + + /** + * @return Prefix to prepend to blob filenames. + * + */ + public Optional> blobsPrefix() { + return Optional.ofNullable(this.blobsPrefix); + } + + /** + * Name of the S3 bucket. + * + */ + @Import(name="bucket", required=true) + private Output bucket; + + /** + * @return Name of the S3 bucket. + * + */ + public Output bucket() { + return this.bucket; + } + + /** + * Endpoint of the S3 bucket. + * + */ + @Import(name="endpointUrl") + private @Nullable Output endpointUrl; + + /** + * @return Endpoint of the S3 bucket. + * + */ + public Optional> endpointUrl() { + return Optional.ofNullable(this.endpointUrl); + } + + /** + * Ignore errors caused by failed cache exports. + * + */ + @Import(name="ignoreError") + private @Nullable Output ignoreError; + + /** + * @return Ignore errors caused by failed cache exports. + * + */ + public Optional> ignoreError() { + return Optional.ofNullable(this.ignoreError); + } + + /** + * Prefix to prepend on manifest filenames. + * + */ + @Import(name="manifestsPrefix") + private @Nullable Output manifestsPrefix; + + /** + * @return Prefix to prepend on manifest filenames. + * + */ + public Optional> manifestsPrefix() { + return Optional.ofNullable(this.manifestsPrefix); + } + + /** + * The cache mode to use. Defaults to `min`. + * + */ + @Import(name="mode") + private @Nullable Output mode; + + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + public Optional> mode() { + return Optional.ofNullable(this.mode); + } + + /** + * Name of the cache image. + * + */ + @Import(name="name") + private @Nullable Output name; + + /** + * @return Name of the cache image. + * + */ + public Optional> name() { + return Optional.ofNullable(this.name); + } + + /** + * The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + */ + @Import(name="region", required=true) + private Output region; + + /** + * @return The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + */ + public Output region() { + return this.region; + } + + /** + * Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + */ + @Import(name="secretAccessKey") + private @Nullable Output secretAccessKey; + + /** + * @return Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + */ + public Optional> secretAccessKey() { + return Optional.ofNullable(this.secretAccessKey); + } + + /** + * Defaults to `$AWS_SESSION_TOKEN`. + * + */ + @Import(name="sessionToken") + private @Nullable Output sessionToken; + + /** + * @return Defaults to `$AWS_SESSION_TOKEN`. + * + */ + public Optional> sessionToken() { + return Optional.ofNullable(this.sessionToken); + } + + /** + * Uses `bucket` in the URL instead of hostname when `true`. + * + */ + @Import(name="usePathStyle") + private @Nullable Output usePathStyle; + + /** + * @return Uses `bucket` in the URL instead of hostname when `true`. + * + */ + public Optional> usePathStyle() { + return Optional.ofNullable(this.usePathStyle); + } + + private CacheToS3Args() {} + + private CacheToS3Args(CacheToS3Args $) { + this.accessKeyId = $.accessKeyId; + this.blobsPrefix = $.blobsPrefix; + this.bucket = $.bucket; + this.endpointUrl = $.endpointUrl; + this.ignoreError = $.ignoreError; + this.manifestsPrefix = $.manifestsPrefix; + this.mode = $.mode; + this.name = $.name; + this.region = $.region; + this.secretAccessKey = $.secretAccessKey; + this.sessionToken = $.sessionToken; + this.usePathStyle = $.usePathStyle; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(CacheToS3Args defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private CacheToS3Args $; + + public Builder() { + $ = new CacheToS3Args(); + } + + public Builder(CacheToS3Args defaults) { + $ = new CacheToS3Args(Objects.requireNonNull(defaults)); + } + + /** + * @param accessKeyId Defaults to `$AWS_ACCESS_KEY_ID`. + * + * @return builder + * + */ + public Builder accessKeyId(@Nullable Output accessKeyId) { + $.accessKeyId = accessKeyId; + return this; + } + + /** + * @param accessKeyId Defaults to `$AWS_ACCESS_KEY_ID`. + * + * @return builder + * + */ + public Builder accessKeyId(String accessKeyId) { + return accessKeyId(Output.of(accessKeyId)); + } + + /** + * @param blobsPrefix Prefix to prepend to blob filenames. + * + * @return builder + * + */ + public Builder blobsPrefix(@Nullable Output blobsPrefix) { + $.blobsPrefix = blobsPrefix; + return this; + } + + /** + * @param blobsPrefix Prefix to prepend to blob filenames. + * + * @return builder + * + */ + public Builder blobsPrefix(String blobsPrefix) { + return blobsPrefix(Output.of(blobsPrefix)); + } + + /** + * @param bucket Name of the S3 bucket. + * + * @return builder + * + */ + public Builder bucket(Output bucket) { + $.bucket = bucket; + return this; + } + + /** + * @param bucket Name of the S3 bucket. + * + * @return builder + * + */ + public Builder bucket(String bucket) { + return bucket(Output.of(bucket)); + } + + /** + * @param endpointUrl Endpoint of the S3 bucket. + * + * @return builder + * + */ + public Builder endpointUrl(@Nullable Output endpointUrl) { + $.endpointUrl = endpointUrl; + return this; + } + + /** + * @param endpointUrl Endpoint of the S3 bucket. + * + * @return builder + * + */ + public Builder endpointUrl(String endpointUrl) { + return endpointUrl(Output.of(endpointUrl)); + } + + /** + * @param ignoreError Ignore errors caused by failed cache exports. + * + * @return builder + * + */ + public Builder ignoreError(@Nullable Output ignoreError) { + $.ignoreError = ignoreError; + return this; + } + + /** + * @param ignoreError Ignore errors caused by failed cache exports. + * + * @return builder + * + */ + public Builder ignoreError(Boolean ignoreError) { + return ignoreError(Output.of(ignoreError)); + } + + /** + * @param manifestsPrefix Prefix to prepend on manifest filenames. + * + * @return builder + * + */ + public Builder manifestsPrefix(@Nullable Output manifestsPrefix) { + $.manifestsPrefix = manifestsPrefix; + return this; + } + + /** + * @param manifestsPrefix Prefix to prepend on manifest filenames. + * + * @return builder + * + */ + public Builder manifestsPrefix(String manifestsPrefix) { + return manifestsPrefix(Output.of(manifestsPrefix)); + } + + /** + * @param mode The cache mode to use. Defaults to `min`. + * + * @return builder + * + */ + public Builder mode(@Nullable Output mode) { + $.mode = mode; + return this; + } + + /** + * @param mode The cache mode to use. Defaults to `min`. + * + * @return builder + * + */ + public Builder mode(CacheMode mode) { + return mode(Output.of(mode)); + } + + /** + * @param name Name of the cache image. + * + * @return builder + * + */ + public Builder name(@Nullable Output name) { + $.name = name; + return this; + } + + /** + * @param name Name of the cache image. + * + * @return builder + * + */ + public Builder name(String name) { + return name(Output.of(name)); + } + + /** + * @param region The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + * @return builder + * + */ + public Builder region(Output region) { + $.region = region; + return this; + } + + /** + * @param region The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + * @return builder + * + */ + public Builder region(String region) { + return region(Output.of(region)); + } + + /** + * @param secretAccessKey Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + * @return builder + * + */ + public Builder secretAccessKey(@Nullable Output secretAccessKey) { + $.secretAccessKey = secretAccessKey; + return this; + } + + /** + * @param secretAccessKey Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + * @return builder + * + */ + public Builder secretAccessKey(String secretAccessKey) { + return secretAccessKey(Output.of(secretAccessKey)); + } + + /** + * @param sessionToken Defaults to `$AWS_SESSION_TOKEN`. + * + * @return builder + * + */ + public Builder sessionToken(@Nullable Output sessionToken) { + $.sessionToken = sessionToken; + return this; + } + + /** + * @param sessionToken Defaults to `$AWS_SESSION_TOKEN`. + * + * @return builder + * + */ + public Builder sessionToken(String sessionToken) { + return sessionToken(Output.of(sessionToken)); + } + + /** + * @param usePathStyle Uses `bucket` in the URL instead of hostname when `true`. + * + * @return builder + * + */ + public Builder usePathStyle(@Nullable Output usePathStyle) { + $.usePathStyle = usePathStyle; + return this; + } + + /** + * @param usePathStyle Uses `bucket` in the URL instead of hostname when `true`. + * + * @return builder + * + */ + public Builder usePathStyle(Boolean usePathStyle) { + return usePathStyle(Output.of(usePathStyle)); + } + + public CacheToS3Args build() { + $.accessKeyId = Codegen.stringProp("accessKeyId").output().arg($.accessKeyId).env("AWS_ACCESS_KEY_ID").def("").getNullable(); + if ($.bucket == null) { + throw new MissingRequiredPropertyException("CacheToS3Args", "bucket"); + } + $.ignoreError = Codegen.booleanProp("ignoreError").output().arg($.ignoreError).def(false).getNullable(); + $.mode = Codegen.objectProp("mode", CacheMode.class).output().arg($.mode).def(CacheMode.Min).getNullable(); + $.region = Codegen.stringProp("region").output().arg($.region).env("AWS_REGION").def("").require(); + $.secretAccessKey = Codegen.stringProp("secretAccessKey").secret().arg($.secretAccessKey).env("AWS_SECRET_ACCESS_KEY").def("").getNullable(); + $.sessionToken = Codegen.stringProp("sessionToken").secret().arg($.sessionToken).env("AWS_SESSION_TOKEN").def("").getNullable(); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ContextArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ContextArgs.java new file mode 100644 index 0000000..4f187e8 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ContextArgs.java @@ -0,0 +1,113 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class ContextArgs extends com.pulumi.resources.ResourceArgs { + + public static final ContextArgs Empty = new ContextArgs(); + + /** + * Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + */ + @Import(name="location", required=true) + private Output location; + + /** + * @return Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + */ + public Output location() { + return this.location; + } + + private ContextArgs() {} + + private ContextArgs(ContextArgs $) { + this.location = $.location; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(ContextArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private ContextArgs $; + + public Builder() { + $ = new ContextArgs(); + } + + public Builder(ContextArgs defaults) { + $ = new ContextArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param location Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + * @return builder + * + */ + public Builder location(Output location) { + $.location = location; + return this; + } + + /** + * @param location Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + * @return builder + * + */ + public Builder location(String location) { + return location(Output.of(location)); + } + + public ContextArgs build() { + if ($.location == null) { + throw new MissingRequiredPropertyException("ContextArgs", "location"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/DockerfileArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/DockerfileArgs.java new file mode 100644 index 0000000..389d794 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/DockerfileArgs.java @@ -0,0 +1,160 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class DockerfileArgs extends com.pulumi.resources.ResourceArgs { + + public static final DockerfileArgs Empty = new DockerfileArgs(); + + /** + * Raw Dockerfile contents. + * + * Conflicts with `location`. + * + * Equivalent to invoking Docker with `-f -`. + * + */ + @Import(name="inline") + private @Nullable Output inline; + + /** + * @return Raw Dockerfile contents. + * + * Conflicts with `location`. + * + * Equivalent to invoking Docker with `-f -`. + * + */ + public Optional> inline() { + return Optional.ofNullable(this.inline); + } + + /** + * Location of the Dockerfile to use. + * + * Can be a relative or absolute path to a local file, or a remote URL. + * + * Defaults to `${context.location}/Dockerfile` if context is on-disk. + * + * Conflicts with `inline`. + * + */ + @Import(name="location") + private @Nullable Output location; + + /** + * @return Location of the Dockerfile to use. + * + * Can be a relative or absolute path to a local file, or a remote URL. + * + * Defaults to `${context.location}/Dockerfile` if context is on-disk. + * + * Conflicts with `inline`. + * + */ + public Optional> location() { + return Optional.ofNullable(this.location); + } + + private DockerfileArgs() {} + + private DockerfileArgs(DockerfileArgs $) { + this.inline = $.inline; + this.location = $.location; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(DockerfileArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private DockerfileArgs $; + + public Builder() { + $ = new DockerfileArgs(); + } + + public Builder(DockerfileArgs defaults) { + $ = new DockerfileArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param inline Raw Dockerfile contents. + * + * Conflicts with `location`. + * + * Equivalent to invoking Docker with `-f -`. + * + * @return builder + * + */ + public Builder inline(@Nullable Output inline) { + $.inline = inline; + return this; + } + + /** + * @param inline Raw Dockerfile contents. + * + * Conflicts with `location`. + * + * Equivalent to invoking Docker with `-f -`. + * + * @return builder + * + */ + public Builder inline(String inline) { + return inline(Output.of(inline)); + } + + /** + * @param location Location of the Dockerfile to use. + * + * Can be a relative or absolute path to a local file, or a remote URL. + * + * Defaults to `${context.location}/Dockerfile` if context is on-disk. + * + * Conflicts with `inline`. + * + * @return builder + * + */ + public Builder location(@Nullable Output location) { + $.location = location; + return this; + } + + /** + * @param location Location of the Dockerfile to use. + * + * Can be a relative or absolute path to a local file, or a remote URL. + * + * Defaults to `${context.location}/Dockerfile` if context is on-disk. + * + * Conflicts with `inline`. + * + * @return builder + * + */ + public Builder location(String location) { + return location(Output.of(location)); + } + + public DockerfileArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportArgs.java new file mode 100644 index 0000000..9952a9e --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportArgs.java @@ -0,0 +1,395 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.dockerbuild.inputs.ExportCacheOnlyArgs; +import com.pulumi.dockerbuild.inputs.ExportDockerArgs; +import com.pulumi.dockerbuild.inputs.ExportImageArgs; +import com.pulumi.dockerbuild.inputs.ExportLocalArgs; +import com.pulumi.dockerbuild.inputs.ExportOCIArgs; +import com.pulumi.dockerbuild.inputs.ExportRegistryArgs; +import com.pulumi.dockerbuild.inputs.ExportTarArgs; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class ExportArgs extends com.pulumi.resources.ResourceArgs { + + public static final ExportArgs Empty = new ExportArgs(); + + /** + * A no-op export. Helpful for silencing the 'no exports' warning if you + * just want to populate caches. + * + */ + @Import(name="cacheonly") + private @Nullable Output cacheonly; + + /** + * @return A no-op export. Helpful for silencing the 'no exports' warning if you + * just want to populate caches. + * + */ + public Optional> cacheonly() { + return Optional.ofNullable(this.cacheonly); + } + + /** + * When `true` this entry will be excluded. Defaults to `false`. + * + */ + @Import(name="disabled") + private @Nullable Output disabled; + + /** + * @return When `true` this entry will be excluded. Defaults to `false`. + * + */ + public Optional> disabled() { + return Optional.ofNullable(this.disabled); + } + + /** + * Export as a Docker image layout. + * + */ + @Import(name="docker") + private @Nullable Output docker; + + /** + * @return Export as a Docker image layout. + * + */ + public Optional> docker() { + return Optional.ofNullable(this.docker); + } + + /** + * Outputs the build result into a container image format. + * + */ + @Import(name="image") + private @Nullable Output image; + + /** + * @return Outputs the build result into a container image format. + * + */ + public Optional> image() { + return Optional.ofNullable(this.image); + } + + /** + * Export to a local directory as files and directories. + * + */ + @Import(name="local") + private @Nullable Output local; + + /** + * @return Export to a local directory as files and directories. + * + */ + public Optional> local() { + return Optional.ofNullable(this.local); + } + + /** + * Identical to the Docker exporter but uses OCI media types by default. + * + */ + @Import(name="oci") + private @Nullable Output oci; + + /** + * @return Identical to the Docker exporter but uses OCI media types by default. + * + */ + public Optional> oci() { + return Optional.ofNullable(this.oci); + } + + /** + * A raw string as you would provide it to the Docker CLI (e.g., + * `type=docker`) + * + */ + @Import(name="raw") + private @Nullable Output raw; + + /** + * @return A raw string as you would provide it to the Docker CLI (e.g., + * `type=docker`) + * + */ + public Optional> raw() { + return Optional.ofNullable(this.raw); + } + + /** + * Identical to the Image exporter, but pushes by default. + * + */ + @Import(name="registry") + private @Nullable Output registry; + + /** + * @return Identical to the Image exporter, but pushes by default. + * + */ + public Optional> registry() { + return Optional.ofNullable(this.registry); + } + + /** + * Export to a local directory as a tarball. + * + */ + @Import(name="tar") + private @Nullable Output tar; + + /** + * @return Export to a local directory as a tarball. + * + */ + public Optional> tar() { + return Optional.ofNullable(this.tar); + } + + private ExportArgs() {} + + private ExportArgs(ExportArgs $) { + this.cacheonly = $.cacheonly; + this.disabled = $.disabled; + this.docker = $.docker; + this.image = $.image; + this.local = $.local; + this.oci = $.oci; + this.raw = $.raw; + this.registry = $.registry; + this.tar = $.tar; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(ExportArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private ExportArgs $; + + public Builder() { + $ = new ExportArgs(); + } + + public Builder(ExportArgs defaults) { + $ = new ExportArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param cacheonly A no-op export. Helpful for silencing the 'no exports' warning if you + * just want to populate caches. + * + * @return builder + * + */ + public Builder cacheonly(@Nullable Output cacheonly) { + $.cacheonly = cacheonly; + return this; + } + + /** + * @param cacheonly A no-op export. Helpful for silencing the 'no exports' warning if you + * just want to populate caches. + * + * @return builder + * + */ + public Builder cacheonly(ExportCacheOnlyArgs cacheonly) { + return cacheonly(Output.of(cacheonly)); + } + + /** + * @param disabled When `true` this entry will be excluded. Defaults to `false`. + * + * @return builder + * + */ + public Builder disabled(@Nullable Output disabled) { + $.disabled = disabled; + return this; + } + + /** + * @param disabled When `true` this entry will be excluded. Defaults to `false`. + * + * @return builder + * + */ + public Builder disabled(Boolean disabled) { + return disabled(Output.of(disabled)); + } + + /** + * @param docker Export as a Docker image layout. + * + * @return builder + * + */ + public Builder docker(@Nullable Output docker) { + $.docker = docker; + return this; + } + + /** + * @param docker Export as a Docker image layout. + * + * @return builder + * + */ + public Builder docker(ExportDockerArgs docker) { + return docker(Output.of(docker)); + } + + /** + * @param image Outputs the build result into a container image format. + * + * @return builder + * + */ + public Builder image(@Nullable Output image) { + $.image = image; + return this; + } + + /** + * @param image Outputs the build result into a container image format. + * + * @return builder + * + */ + public Builder image(ExportImageArgs image) { + return image(Output.of(image)); + } + + /** + * @param local Export to a local directory as files and directories. + * + * @return builder + * + */ + public Builder local(@Nullable Output local) { + $.local = local; + return this; + } + + /** + * @param local Export to a local directory as files and directories. + * + * @return builder + * + */ + public Builder local(ExportLocalArgs local) { + return local(Output.of(local)); + } + + /** + * @param oci Identical to the Docker exporter but uses OCI media types by default. + * + * @return builder + * + */ + public Builder oci(@Nullable Output oci) { + $.oci = oci; + return this; + } + + /** + * @param oci Identical to the Docker exporter but uses OCI media types by default. + * + * @return builder + * + */ + public Builder oci(ExportOCIArgs oci) { + return oci(Output.of(oci)); + } + + /** + * @param raw A raw string as you would provide it to the Docker CLI (e.g., + * `type=docker`) + * + * @return builder + * + */ + public Builder raw(@Nullable Output raw) { + $.raw = raw; + return this; + } + + /** + * @param raw A raw string as you would provide it to the Docker CLI (e.g., + * `type=docker`) + * + * @return builder + * + */ + public Builder raw(String raw) { + return raw(Output.of(raw)); + } + + /** + * @param registry Identical to the Image exporter, but pushes by default. + * + * @return builder + * + */ + public Builder registry(@Nullable Output registry) { + $.registry = registry; + return this; + } + + /** + * @param registry Identical to the Image exporter, but pushes by default. + * + * @return builder + * + */ + public Builder registry(ExportRegistryArgs registry) { + return registry(Output.of(registry)); + } + + /** + * @param tar Export to a local directory as a tarball. + * + * @return builder + * + */ + public Builder tar(@Nullable Output tar) { + $.tar = tar; + return this; + } + + /** + * @param tar Export to a local directory as a tarball. + * + * @return builder + * + */ + public Builder tar(ExportTarArgs tar) { + return tar(Output.of(tar)); + } + + public ExportArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportCacheOnlyArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportCacheOnlyArgs.java new file mode 100644 index 0000000..8e7158b --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportCacheOnlyArgs.java @@ -0,0 +1,28 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + + + + +public final class ExportCacheOnlyArgs extends com.pulumi.resources.ResourceArgs { + + public static final ExportCacheOnlyArgs Empty = new ExportCacheOnlyArgs(); + + public static Builder builder() { + return new Builder(); + } + + public static final class Builder { + private ExportCacheOnlyArgs $; + + public Builder() { + $ = new ExportCacheOnlyArgs(); + } + public ExportCacheOnlyArgs build() { + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportDockerArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportDockerArgs.java new file mode 100644 index 0000000..14c75af --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportDockerArgs.java @@ -0,0 +1,363 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.enums.CompressionType; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class ExportDockerArgs extends com.pulumi.resources.ResourceArgs { + + public static final ExportDockerArgs Empty = new ExportDockerArgs(); + + /** + * Attach an arbitrary key/value annotation to the image. + * + */ + @Import(name="annotations") + private @Nullable Output> annotations; + + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + public Optional>> annotations() { + return Optional.ofNullable(this.annotations); + } + + /** + * The compression type to use. + * + */ + @Import(name="compression") + private @Nullable Output compression; + + /** + * @return The compression type to use. + * + */ + public Optional> compression() { + return Optional.ofNullable(this.compression); + } + + /** + * Compression level from 0 to 22. + * + */ + @Import(name="compressionLevel") + private @Nullable Output compressionLevel; + + /** + * @return Compression level from 0 to 22. + * + */ + public Optional> compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + + /** + * The local export path. + * + */ + @Import(name="dest") + private @Nullable Output dest; + + /** + * @return The local export path. + * + */ + public Optional> dest() { + return Optional.ofNullable(this.dest); + } + + /** + * Forcefully apply compression. + * + */ + @Import(name="forceCompression") + private @Nullable Output forceCompression; + + /** + * @return Forcefully apply compression. + * + */ + public Optional> forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + + /** + * Specify images names to export. This is overridden if tags are already specified. + * + */ + @Import(name="names") + private @Nullable Output> names; + + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + public Optional>> names() { + return Optional.ofNullable(this.names); + } + + /** + * Use OCI media types in exporter manifests. + * + */ + @Import(name="ociMediaTypes") + private @Nullable Output ociMediaTypes; + + /** + * @return Use OCI media types in exporter manifests. + * + */ + public Optional> ociMediaTypes() { + return Optional.ofNullable(this.ociMediaTypes); + } + + /** + * Bundle the output into a tarball layout. + * + */ + @Import(name="tar") + private @Nullable Output tar; + + /** + * @return Bundle the output into a tarball layout. + * + */ + public Optional> tar() { + return Optional.ofNullable(this.tar); + } + + private ExportDockerArgs() {} + + private ExportDockerArgs(ExportDockerArgs $) { + this.annotations = $.annotations; + this.compression = $.compression; + this.compressionLevel = $.compressionLevel; + this.dest = $.dest; + this.forceCompression = $.forceCompression; + this.names = $.names; + this.ociMediaTypes = $.ociMediaTypes; + this.tar = $.tar; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(ExportDockerArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private ExportDockerArgs $; + + public Builder() { + $ = new ExportDockerArgs(); + } + + public Builder(ExportDockerArgs defaults) { + $ = new ExportDockerArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param annotations Attach an arbitrary key/value annotation to the image. + * + * @return builder + * + */ + public Builder annotations(@Nullable Output> annotations) { + $.annotations = annotations; + return this; + } + + /** + * @param annotations Attach an arbitrary key/value annotation to the image. + * + * @return builder + * + */ + public Builder annotations(Map annotations) { + return annotations(Output.of(annotations)); + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(@Nullable Output compression) { + $.compression = compression; + return this; + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(CompressionType compression) { + return compression(Output.of(compression)); + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(@Nullable Output compressionLevel) { + $.compressionLevel = compressionLevel; + return this; + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(Integer compressionLevel) { + return compressionLevel(Output.of(compressionLevel)); + } + + /** + * @param dest The local export path. + * + * @return builder + * + */ + public Builder dest(@Nullable Output dest) { + $.dest = dest; + return this; + } + + /** + * @param dest The local export path. + * + * @return builder + * + */ + public Builder dest(String dest) { + return dest(Output.of(dest)); + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(@Nullable Output forceCompression) { + $.forceCompression = forceCompression; + return this; + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(Boolean forceCompression) { + return forceCompression(Output.of(forceCompression)); + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(@Nullable Output> names) { + $.names = names; + return this; + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(List names) { + return names(Output.of(names)); + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(String... names) { + return names(List.of(names)); + } + + /** + * @param ociMediaTypes Use OCI media types in exporter manifests. + * + * @return builder + * + */ + public Builder ociMediaTypes(@Nullable Output ociMediaTypes) { + $.ociMediaTypes = ociMediaTypes; + return this; + } + + /** + * @param ociMediaTypes Use OCI media types in exporter manifests. + * + * @return builder + * + */ + public Builder ociMediaTypes(Boolean ociMediaTypes) { + return ociMediaTypes(Output.of(ociMediaTypes)); + } + + /** + * @param tar Bundle the output into a tarball layout. + * + * @return builder + * + */ + public Builder tar(@Nullable Output tar) { + $.tar = tar; + return this; + } + + /** + * @param tar Bundle the output into a tarball layout. + * + * @return builder + * + */ + public Builder tar(Boolean tar) { + return tar(Output.of(tar)); + } + + public ExportDockerArgs build() { + $.compression = Codegen.objectProp("compression", CompressionType.class).output().arg($.compression).def(CompressionType.Gzip).getNullable(); + $.compressionLevel = Codegen.integerProp("compressionLevel").output().arg($.compressionLevel).def(0).getNullable(); + $.forceCompression = Codegen.booleanProp("forceCompression").output().arg($.forceCompression).def(false).getNullable(); + $.ociMediaTypes = Codegen.booleanProp("ociMediaTypes").output().arg($.ociMediaTypes).def(false).getNullable(); + $.tar = Codegen.booleanProp("tar").output().arg($.tar).def(true).getNullable(); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportImageArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportImageArgs.java new file mode 100644 index 0000000..ee15d15 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportImageArgs.java @@ -0,0 +1,576 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.enums.CompressionType; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class ExportImageArgs extends com.pulumi.resources.ResourceArgs { + + public static final ExportImageArgs Empty = new ExportImageArgs(); + + /** + * Attach an arbitrary key/value annotation to the image. + * + */ + @Import(name="annotations") + private @Nullable Output> annotations; + + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + public Optional>> annotations() { + return Optional.ofNullable(this.annotations); + } + + /** + * The compression type to use. + * + */ + @Import(name="compression") + private @Nullable Output compression; + + /** + * @return The compression type to use. + * + */ + public Optional> compression() { + return Optional.ofNullable(this.compression); + } + + /** + * Compression level from 0 to 22. + * + */ + @Import(name="compressionLevel") + private @Nullable Output compressionLevel; + + /** + * @return Compression level from 0 to 22. + * + */ + public Optional> compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + + /** + * Name image with `prefix@<digest>`, used for anonymous images. + * + */ + @Import(name="danglingNamePrefix") + private @Nullable Output danglingNamePrefix; + + /** + * @return Name image with `prefix@<digest>`, used for anonymous images. + * + */ + public Optional> danglingNamePrefix() { + return Optional.ofNullable(this.danglingNamePrefix); + } + + /** + * Forcefully apply compression. + * + */ + @Import(name="forceCompression") + private @Nullable Output forceCompression; + + /** + * @return Forcefully apply compression. + * + */ + public Optional> forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + + /** + * Allow pushing to an insecure registry. + * + */ + @Import(name="insecure") + private @Nullable Output insecure; + + /** + * @return Allow pushing to an insecure registry. + * + */ + public Optional> insecure() { + return Optional.ofNullable(this.insecure); + } + + /** + * Add additional canonical name (`name@<digest>`). + * + */ + @Import(name="nameCanonical") + private @Nullable Output nameCanonical; + + /** + * @return Add additional canonical name (`name@<digest>`). + * + */ + public Optional> nameCanonical() { + return Optional.ofNullable(this.nameCanonical); + } + + /** + * Specify images names to export. This is overridden if tags are already specified. + * + */ + @Import(name="names") + private @Nullable Output> names; + + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + public Optional>> names() { + return Optional.ofNullable(this.names); + } + + /** + * Use OCI media types in exporter manifests. + * + */ + @Import(name="ociMediaTypes") + private @Nullable Output ociMediaTypes; + + /** + * @return Use OCI media types in exporter manifests. + * + */ + public Optional> ociMediaTypes() { + return Optional.ofNullable(this.ociMediaTypes); + } + + /** + * Push after creating the image. Defaults to `false`. + * + */ + @Import(name="push") + private @Nullable Output push; + + /** + * @return Push after creating the image. Defaults to `false`. + * + */ + public Optional> push() { + return Optional.ofNullable(this.push); + } + + /** + * Push image without name. + * + */ + @Import(name="pushByDigest") + private @Nullable Output pushByDigest; + + /** + * @return Push image without name. + * + */ + public Optional> pushByDigest() { + return Optional.ofNullable(this.pushByDigest); + } + + /** + * Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + */ + @Import(name="store") + private @Nullable Output store; + + /** + * @return Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + */ + public Optional> store() { + return Optional.ofNullable(this.store); + } + + /** + * Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + */ + @Import(name="unpack") + private @Nullable Output unpack; + + /** + * @return Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + */ + public Optional> unpack() { + return Optional.ofNullable(this.unpack); + } + + private ExportImageArgs() {} + + private ExportImageArgs(ExportImageArgs $) { + this.annotations = $.annotations; + this.compression = $.compression; + this.compressionLevel = $.compressionLevel; + this.danglingNamePrefix = $.danglingNamePrefix; + this.forceCompression = $.forceCompression; + this.insecure = $.insecure; + this.nameCanonical = $.nameCanonical; + this.names = $.names; + this.ociMediaTypes = $.ociMediaTypes; + this.push = $.push; + this.pushByDigest = $.pushByDigest; + this.store = $.store; + this.unpack = $.unpack; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(ExportImageArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private ExportImageArgs $; + + public Builder() { + $ = new ExportImageArgs(); + } + + public Builder(ExportImageArgs defaults) { + $ = new ExportImageArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param annotations Attach an arbitrary key/value annotation to the image. + * + * @return builder + * + */ + public Builder annotations(@Nullable Output> annotations) { + $.annotations = annotations; + return this; + } + + /** + * @param annotations Attach an arbitrary key/value annotation to the image. + * + * @return builder + * + */ + public Builder annotations(Map annotations) { + return annotations(Output.of(annotations)); + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(@Nullable Output compression) { + $.compression = compression; + return this; + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(CompressionType compression) { + return compression(Output.of(compression)); + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(@Nullable Output compressionLevel) { + $.compressionLevel = compressionLevel; + return this; + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(Integer compressionLevel) { + return compressionLevel(Output.of(compressionLevel)); + } + + /** + * @param danglingNamePrefix Name image with `prefix@<digest>`, used for anonymous images. + * + * @return builder + * + */ + public Builder danglingNamePrefix(@Nullable Output danglingNamePrefix) { + $.danglingNamePrefix = danglingNamePrefix; + return this; + } + + /** + * @param danglingNamePrefix Name image with `prefix@<digest>`, used for anonymous images. + * + * @return builder + * + */ + public Builder danglingNamePrefix(String danglingNamePrefix) { + return danglingNamePrefix(Output.of(danglingNamePrefix)); + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(@Nullable Output forceCompression) { + $.forceCompression = forceCompression; + return this; + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(Boolean forceCompression) { + return forceCompression(Output.of(forceCompression)); + } + + /** + * @param insecure Allow pushing to an insecure registry. + * + * @return builder + * + */ + public Builder insecure(@Nullable Output insecure) { + $.insecure = insecure; + return this; + } + + /** + * @param insecure Allow pushing to an insecure registry. + * + * @return builder + * + */ + public Builder insecure(Boolean insecure) { + return insecure(Output.of(insecure)); + } + + /** + * @param nameCanonical Add additional canonical name (`name@<digest>`). + * + * @return builder + * + */ + public Builder nameCanonical(@Nullable Output nameCanonical) { + $.nameCanonical = nameCanonical; + return this; + } + + /** + * @param nameCanonical Add additional canonical name (`name@<digest>`). + * + * @return builder + * + */ + public Builder nameCanonical(Boolean nameCanonical) { + return nameCanonical(Output.of(nameCanonical)); + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(@Nullable Output> names) { + $.names = names; + return this; + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(List names) { + return names(Output.of(names)); + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(String... names) { + return names(List.of(names)); + } + + /** + * @param ociMediaTypes Use OCI media types in exporter manifests. + * + * @return builder + * + */ + public Builder ociMediaTypes(@Nullable Output ociMediaTypes) { + $.ociMediaTypes = ociMediaTypes; + return this; + } + + /** + * @param ociMediaTypes Use OCI media types in exporter manifests. + * + * @return builder + * + */ + public Builder ociMediaTypes(Boolean ociMediaTypes) { + return ociMediaTypes(Output.of(ociMediaTypes)); + } + + /** + * @param push Push after creating the image. Defaults to `false`. + * + * @return builder + * + */ + public Builder push(@Nullable Output push) { + $.push = push; + return this; + } + + /** + * @param push Push after creating the image. Defaults to `false`. + * + * @return builder + * + */ + public Builder push(Boolean push) { + return push(Output.of(push)); + } + + /** + * @param pushByDigest Push image without name. + * + * @return builder + * + */ + public Builder pushByDigest(@Nullable Output pushByDigest) { + $.pushByDigest = pushByDigest; + return this; + } + + /** + * @param pushByDigest Push image without name. + * + * @return builder + * + */ + public Builder pushByDigest(Boolean pushByDigest) { + return pushByDigest(Output.of(pushByDigest)); + } + + /** + * @param store Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + * @return builder + * + */ + public Builder store(@Nullable Output store) { + $.store = store; + return this; + } + + /** + * @param store Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + * @return builder + * + */ + public Builder store(Boolean store) { + return store(Output.of(store)); + } + + /** + * @param unpack Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + * @return builder + * + */ + public Builder unpack(@Nullable Output unpack) { + $.unpack = unpack; + return this; + } + + /** + * @param unpack Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + * @return builder + * + */ + public Builder unpack(Boolean unpack) { + return unpack(Output.of(unpack)); + } + + public ExportImageArgs build() { + $.compression = Codegen.objectProp("compression", CompressionType.class).output().arg($.compression).def(CompressionType.Gzip).getNullable(); + $.compressionLevel = Codegen.integerProp("compressionLevel").output().arg($.compressionLevel).def(0).getNullable(); + $.forceCompression = Codegen.booleanProp("forceCompression").output().arg($.forceCompression).def(false).getNullable(); + $.ociMediaTypes = Codegen.booleanProp("ociMediaTypes").output().arg($.ociMediaTypes).def(false).getNullable(); + $.store = Codegen.booleanProp("store").output().arg($.store).def(true).getNullable(); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportLocalArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportLocalArgs.java new file mode 100644 index 0000000..e29295d --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportLocalArgs.java @@ -0,0 +1,85 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class ExportLocalArgs extends com.pulumi.resources.ResourceArgs { + + public static final ExportLocalArgs Empty = new ExportLocalArgs(); + + /** + * Output path. + * + */ + @Import(name="dest", required=true) + private Output dest; + + /** + * @return Output path. + * + */ + public Output dest() { + return this.dest; + } + + private ExportLocalArgs() {} + + private ExportLocalArgs(ExportLocalArgs $) { + this.dest = $.dest; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(ExportLocalArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private ExportLocalArgs $; + + public Builder() { + $ = new ExportLocalArgs(); + } + + public Builder(ExportLocalArgs defaults) { + $ = new ExportLocalArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param dest Output path. + * + * @return builder + * + */ + public Builder dest(Output dest) { + $.dest = dest; + return this; + } + + /** + * @param dest Output path. + * + * @return builder + * + */ + public Builder dest(String dest) { + return dest(Output.of(dest)); + } + + public ExportLocalArgs build() { + if ($.dest == null) { + throw new MissingRequiredPropertyException("ExportLocalArgs", "dest"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportOCIArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportOCIArgs.java new file mode 100644 index 0000000..bdabd49 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportOCIArgs.java @@ -0,0 +1,363 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.enums.CompressionType; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class ExportOCIArgs extends com.pulumi.resources.ResourceArgs { + + public static final ExportOCIArgs Empty = new ExportOCIArgs(); + + /** + * Attach an arbitrary key/value annotation to the image. + * + */ + @Import(name="annotations") + private @Nullable Output> annotations; + + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + public Optional>> annotations() { + return Optional.ofNullable(this.annotations); + } + + /** + * The compression type to use. + * + */ + @Import(name="compression") + private @Nullable Output compression; + + /** + * @return The compression type to use. + * + */ + public Optional> compression() { + return Optional.ofNullable(this.compression); + } + + /** + * Compression level from 0 to 22. + * + */ + @Import(name="compressionLevel") + private @Nullable Output compressionLevel; + + /** + * @return Compression level from 0 to 22. + * + */ + public Optional> compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + + /** + * The local export path. + * + */ + @Import(name="dest") + private @Nullable Output dest; + + /** + * @return The local export path. + * + */ + public Optional> dest() { + return Optional.ofNullable(this.dest); + } + + /** + * Forcefully apply compression. + * + */ + @Import(name="forceCompression") + private @Nullable Output forceCompression; + + /** + * @return Forcefully apply compression. + * + */ + public Optional> forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + + /** + * Specify images names to export. This is overridden if tags are already specified. + * + */ + @Import(name="names") + private @Nullable Output> names; + + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + public Optional>> names() { + return Optional.ofNullable(this.names); + } + + /** + * Use OCI media types in exporter manifests. + * + */ + @Import(name="ociMediaTypes") + private @Nullable Output ociMediaTypes; + + /** + * @return Use OCI media types in exporter manifests. + * + */ + public Optional> ociMediaTypes() { + return Optional.ofNullable(this.ociMediaTypes); + } + + /** + * Bundle the output into a tarball layout. + * + */ + @Import(name="tar") + private @Nullable Output tar; + + /** + * @return Bundle the output into a tarball layout. + * + */ + public Optional> tar() { + return Optional.ofNullable(this.tar); + } + + private ExportOCIArgs() {} + + private ExportOCIArgs(ExportOCIArgs $) { + this.annotations = $.annotations; + this.compression = $.compression; + this.compressionLevel = $.compressionLevel; + this.dest = $.dest; + this.forceCompression = $.forceCompression; + this.names = $.names; + this.ociMediaTypes = $.ociMediaTypes; + this.tar = $.tar; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(ExportOCIArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private ExportOCIArgs $; + + public Builder() { + $ = new ExportOCIArgs(); + } + + public Builder(ExportOCIArgs defaults) { + $ = new ExportOCIArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param annotations Attach an arbitrary key/value annotation to the image. + * + * @return builder + * + */ + public Builder annotations(@Nullable Output> annotations) { + $.annotations = annotations; + return this; + } + + /** + * @param annotations Attach an arbitrary key/value annotation to the image. + * + * @return builder + * + */ + public Builder annotations(Map annotations) { + return annotations(Output.of(annotations)); + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(@Nullable Output compression) { + $.compression = compression; + return this; + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(CompressionType compression) { + return compression(Output.of(compression)); + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(@Nullable Output compressionLevel) { + $.compressionLevel = compressionLevel; + return this; + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(Integer compressionLevel) { + return compressionLevel(Output.of(compressionLevel)); + } + + /** + * @param dest The local export path. + * + * @return builder + * + */ + public Builder dest(@Nullable Output dest) { + $.dest = dest; + return this; + } + + /** + * @param dest The local export path. + * + * @return builder + * + */ + public Builder dest(String dest) { + return dest(Output.of(dest)); + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(@Nullable Output forceCompression) { + $.forceCompression = forceCompression; + return this; + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(Boolean forceCompression) { + return forceCompression(Output.of(forceCompression)); + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(@Nullable Output> names) { + $.names = names; + return this; + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(List names) { + return names(Output.of(names)); + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(String... names) { + return names(List.of(names)); + } + + /** + * @param ociMediaTypes Use OCI media types in exporter manifests. + * + * @return builder + * + */ + public Builder ociMediaTypes(@Nullable Output ociMediaTypes) { + $.ociMediaTypes = ociMediaTypes; + return this; + } + + /** + * @param ociMediaTypes Use OCI media types in exporter manifests. + * + * @return builder + * + */ + public Builder ociMediaTypes(Boolean ociMediaTypes) { + return ociMediaTypes(Output.of(ociMediaTypes)); + } + + /** + * @param tar Bundle the output into a tarball layout. + * + * @return builder + * + */ + public Builder tar(@Nullable Output tar) { + $.tar = tar; + return this; + } + + /** + * @param tar Bundle the output into a tarball layout. + * + * @return builder + * + */ + public Builder tar(Boolean tar) { + return tar(Output.of(tar)); + } + + public ExportOCIArgs build() { + $.compression = Codegen.objectProp("compression", CompressionType.class).output().arg($.compression).def(CompressionType.Gzip).getNullable(); + $.compressionLevel = Codegen.integerProp("compressionLevel").output().arg($.compressionLevel).def(0).getNullable(); + $.forceCompression = Codegen.booleanProp("forceCompression").output().arg($.forceCompression).def(false).getNullable(); + $.ociMediaTypes = Codegen.booleanProp("ociMediaTypes").output().arg($.ociMediaTypes).def(true).getNullable(); + $.tar = Codegen.booleanProp("tar").output().arg($.tar).def(true).getNullable(); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportRegistryArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportRegistryArgs.java new file mode 100644 index 0000000..f6945d4 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportRegistryArgs.java @@ -0,0 +1,577 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.core.internal.Codegen; +import com.pulumi.dockerbuild.enums.CompressionType; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class ExportRegistryArgs extends com.pulumi.resources.ResourceArgs { + + public static final ExportRegistryArgs Empty = new ExportRegistryArgs(); + + /** + * Attach an arbitrary key/value annotation to the image. + * + */ + @Import(name="annotations") + private @Nullable Output> annotations; + + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + public Optional>> annotations() { + return Optional.ofNullable(this.annotations); + } + + /** + * The compression type to use. + * + */ + @Import(name="compression") + private @Nullable Output compression; + + /** + * @return The compression type to use. + * + */ + public Optional> compression() { + return Optional.ofNullable(this.compression); + } + + /** + * Compression level from 0 to 22. + * + */ + @Import(name="compressionLevel") + private @Nullable Output compressionLevel; + + /** + * @return Compression level from 0 to 22. + * + */ + public Optional> compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + + /** + * Name image with `prefix@<digest>`, used for anonymous images. + * + */ + @Import(name="danglingNamePrefix") + private @Nullable Output danglingNamePrefix; + + /** + * @return Name image with `prefix@<digest>`, used for anonymous images. + * + */ + public Optional> danglingNamePrefix() { + return Optional.ofNullable(this.danglingNamePrefix); + } + + /** + * Forcefully apply compression. + * + */ + @Import(name="forceCompression") + private @Nullable Output forceCompression; + + /** + * @return Forcefully apply compression. + * + */ + public Optional> forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + + /** + * Allow pushing to an insecure registry. + * + */ + @Import(name="insecure") + private @Nullable Output insecure; + + /** + * @return Allow pushing to an insecure registry. + * + */ + public Optional> insecure() { + return Optional.ofNullable(this.insecure); + } + + /** + * Add additional canonical name (`name@<digest>`). + * + */ + @Import(name="nameCanonical") + private @Nullable Output nameCanonical; + + /** + * @return Add additional canonical name (`name@<digest>`). + * + */ + public Optional> nameCanonical() { + return Optional.ofNullable(this.nameCanonical); + } + + /** + * Specify images names to export. This is overridden if tags are already specified. + * + */ + @Import(name="names") + private @Nullable Output> names; + + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + public Optional>> names() { + return Optional.ofNullable(this.names); + } + + /** + * Use OCI media types in exporter manifests. + * + */ + @Import(name="ociMediaTypes") + private @Nullable Output ociMediaTypes; + + /** + * @return Use OCI media types in exporter manifests. + * + */ + public Optional> ociMediaTypes() { + return Optional.ofNullable(this.ociMediaTypes); + } + + /** + * Push after creating the image. Defaults to `true`. + * + */ + @Import(name="push") + private @Nullable Output push; + + /** + * @return Push after creating the image. Defaults to `true`. + * + */ + public Optional> push() { + return Optional.ofNullable(this.push); + } + + /** + * Push image without name. + * + */ + @Import(name="pushByDigest") + private @Nullable Output pushByDigest; + + /** + * @return Push image without name. + * + */ + public Optional> pushByDigest() { + return Optional.ofNullable(this.pushByDigest); + } + + /** + * Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + */ + @Import(name="store") + private @Nullable Output store; + + /** + * @return Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + */ + public Optional> store() { + return Optional.ofNullable(this.store); + } + + /** + * Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + */ + @Import(name="unpack") + private @Nullable Output unpack; + + /** + * @return Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + */ + public Optional> unpack() { + return Optional.ofNullable(this.unpack); + } + + private ExportRegistryArgs() {} + + private ExportRegistryArgs(ExportRegistryArgs $) { + this.annotations = $.annotations; + this.compression = $.compression; + this.compressionLevel = $.compressionLevel; + this.danglingNamePrefix = $.danglingNamePrefix; + this.forceCompression = $.forceCompression; + this.insecure = $.insecure; + this.nameCanonical = $.nameCanonical; + this.names = $.names; + this.ociMediaTypes = $.ociMediaTypes; + this.push = $.push; + this.pushByDigest = $.pushByDigest; + this.store = $.store; + this.unpack = $.unpack; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(ExportRegistryArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private ExportRegistryArgs $; + + public Builder() { + $ = new ExportRegistryArgs(); + } + + public Builder(ExportRegistryArgs defaults) { + $ = new ExportRegistryArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param annotations Attach an arbitrary key/value annotation to the image. + * + * @return builder + * + */ + public Builder annotations(@Nullable Output> annotations) { + $.annotations = annotations; + return this; + } + + /** + * @param annotations Attach an arbitrary key/value annotation to the image. + * + * @return builder + * + */ + public Builder annotations(Map annotations) { + return annotations(Output.of(annotations)); + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(@Nullable Output compression) { + $.compression = compression; + return this; + } + + /** + * @param compression The compression type to use. + * + * @return builder + * + */ + public Builder compression(CompressionType compression) { + return compression(Output.of(compression)); + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(@Nullable Output compressionLevel) { + $.compressionLevel = compressionLevel; + return this; + } + + /** + * @param compressionLevel Compression level from 0 to 22. + * + * @return builder + * + */ + public Builder compressionLevel(Integer compressionLevel) { + return compressionLevel(Output.of(compressionLevel)); + } + + /** + * @param danglingNamePrefix Name image with `prefix@<digest>`, used for anonymous images. + * + * @return builder + * + */ + public Builder danglingNamePrefix(@Nullable Output danglingNamePrefix) { + $.danglingNamePrefix = danglingNamePrefix; + return this; + } + + /** + * @param danglingNamePrefix Name image with `prefix@<digest>`, used for anonymous images. + * + * @return builder + * + */ + public Builder danglingNamePrefix(String danglingNamePrefix) { + return danglingNamePrefix(Output.of(danglingNamePrefix)); + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(@Nullable Output forceCompression) { + $.forceCompression = forceCompression; + return this; + } + + /** + * @param forceCompression Forcefully apply compression. + * + * @return builder + * + */ + public Builder forceCompression(Boolean forceCompression) { + return forceCompression(Output.of(forceCompression)); + } + + /** + * @param insecure Allow pushing to an insecure registry. + * + * @return builder + * + */ + public Builder insecure(@Nullable Output insecure) { + $.insecure = insecure; + return this; + } + + /** + * @param insecure Allow pushing to an insecure registry. + * + * @return builder + * + */ + public Builder insecure(Boolean insecure) { + return insecure(Output.of(insecure)); + } + + /** + * @param nameCanonical Add additional canonical name (`name@<digest>`). + * + * @return builder + * + */ + public Builder nameCanonical(@Nullable Output nameCanonical) { + $.nameCanonical = nameCanonical; + return this; + } + + /** + * @param nameCanonical Add additional canonical name (`name@<digest>`). + * + * @return builder + * + */ + public Builder nameCanonical(Boolean nameCanonical) { + return nameCanonical(Output.of(nameCanonical)); + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(@Nullable Output> names) { + $.names = names; + return this; + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(List names) { + return names(Output.of(names)); + } + + /** + * @param names Specify images names to export. This is overridden if tags are already specified. + * + * @return builder + * + */ + public Builder names(String... names) { + return names(List.of(names)); + } + + /** + * @param ociMediaTypes Use OCI media types in exporter manifests. + * + * @return builder + * + */ + public Builder ociMediaTypes(@Nullable Output ociMediaTypes) { + $.ociMediaTypes = ociMediaTypes; + return this; + } + + /** + * @param ociMediaTypes Use OCI media types in exporter manifests. + * + * @return builder + * + */ + public Builder ociMediaTypes(Boolean ociMediaTypes) { + return ociMediaTypes(Output.of(ociMediaTypes)); + } + + /** + * @param push Push after creating the image. Defaults to `true`. + * + * @return builder + * + */ + public Builder push(@Nullable Output push) { + $.push = push; + return this; + } + + /** + * @param push Push after creating the image. Defaults to `true`. + * + * @return builder + * + */ + public Builder push(Boolean push) { + return push(Output.of(push)); + } + + /** + * @param pushByDigest Push image without name. + * + * @return builder + * + */ + public Builder pushByDigest(@Nullable Output pushByDigest) { + $.pushByDigest = pushByDigest; + return this; + } + + /** + * @param pushByDigest Push image without name. + * + * @return builder + * + */ + public Builder pushByDigest(Boolean pushByDigest) { + return pushByDigest(Output.of(pushByDigest)); + } + + /** + * @param store Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + * @return builder + * + */ + public Builder store(@Nullable Output store) { + $.store = store; + return this; + } + + /** + * @param store Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + * @return builder + * + */ + public Builder store(Boolean store) { + return store(Output.of(store)); + } + + /** + * @param unpack Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + * @return builder + * + */ + public Builder unpack(@Nullable Output unpack) { + $.unpack = unpack; + return this; + } + + /** + * @param unpack Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + * @return builder + * + */ + public Builder unpack(Boolean unpack) { + return unpack(Output.of(unpack)); + } + + public ExportRegistryArgs build() { + $.compression = Codegen.objectProp("compression", CompressionType.class).output().arg($.compression).def(CompressionType.Gzip).getNullable(); + $.compressionLevel = Codegen.integerProp("compressionLevel").output().arg($.compressionLevel).def(0).getNullable(); + $.forceCompression = Codegen.booleanProp("forceCompression").output().arg($.forceCompression).def(false).getNullable(); + $.ociMediaTypes = Codegen.booleanProp("ociMediaTypes").output().arg($.ociMediaTypes).def(false).getNullable(); + $.push = Codegen.booleanProp("push").output().arg($.push).def(true).getNullable(); + $.store = Codegen.booleanProp("store").output().arg($.store).def(true).getNullable(); + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportTarArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportTarArgs.java new file mode 100644 index 0000000..4d124fd --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/ExportTarArgs.java @@ -0,0 +1,85 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + + +public final class ExportTarArgs extends com.pulumi.resources.ResourceArgs { + + public static final ExportTarArgs Empty = new ExportTarArgs(); + + /** + * Output path. + * + */ + @Import(name="dest", required=true) + private Output dest; + + /** + * @return Output path. + * + */ + public Output dest() { + return this.dest; + } + + private ExportTarArgs() {} + + private ExportTarArgs(ExportTarArgs $) { + this.dest = $.dest; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(ExportTarArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private ExportTarArgs $; + + public Builder() { + $ = new ExportTarArgs(); + } + + public Builder(ExportTarArgs defaults) { + $ = new ExportTarArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param dest Output path. + * + * @return builder + * + */ + public Builder dest(Output dest) { + $.dest = dest; + return this; + } + + /** + * @param dest Output path. + * + * @return builder + * + */ + public Builder dest(String dest) { + return dest(Output.of(dest)); + } + + public ExportTarArgs build() { + if ($.dest == null) { + throw new MissingRequiredPropertyException("ExportTarArgs", "dest"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/Registry.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/Registry.java new file mode 100644 index 0000000..f00c078 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/Registry.java @@ -0,0 +1,102 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class Registry { + /** + * @return The registry's address (e.g. "docker.io"). + * + */ + private String address; + /** + * @return Password or token for the registry. + * + */ + private @Nullable String password; + /** + * @return Username for the registry. + * + */ + private @Nullable String username; + + private Registry() {} + /** + * @return The registry's address (e.g. "docker.io"). + * + */ + public String address() { + return this.address; + } + /** + * @return Password or token for the registry. + * + */ + public Optional password() { + return Optional.ofNullable(this.password); + } + /** + * @return Username for the registry. + * + */ + public Optional username() { + return Optional.ofNullable(this.username); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(Registry defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String address; + private @Nullable String password; + private @Nullable String username; + public Builder() {} + public Builder(Registry defaults) { + Objects.requireNonNull(defaults); + this.address = defaults.address; + this.password = defaults.password; + this.username = defaults.username; + } + + @CustomType.Setter + public Builder address(String address) { + if (address == null) { + throw new MissingRequiredPropertyException("Registry", "address"); + } + this.address = address; + return this; + } + @CustomType.Setter + public Builder password(@Nullable String password) { + + this.password = password; + return this; + } + @CustomType.Setter + public Builder username(@Nullable String username) { + + this.username = username; + return this; + } + public Registry build() { + final var _resultValue = new Registry(); + _resultValue.address = address; + _resultValue.password = password; + _resultValue.username = username; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/RegistryArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/RegistryArgs.java new file mode 100644 index 0000000..7475b73 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/RegistryArgs.java @@ -0,0 +1,161 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class RegistryArgs extends com.pulumi.resources.ResourceArgs { + + public static final RegistryArgs Empty = new RegistryArgs(); + + /** + * The registry's address (e.g. "docker.io"). + * + */ + @Import(name="address", required=true) + private Output address; + + /** + * @return The registry's address (e.g. "docker.io"). + * + */ + public Output address() { + return this.address; + } + + /** + * Password or token for the registry. + * + */ + @Import(name="password") + private @Nullable Output password; + + /** + * @return Password or token for the registry. + * + */ + public Optional> password() { + return Optional.ofNullable(this.password); + } + + /** + * Username for the registry. + * + */ + @Import(name="username") + private @Nullable Output username; + + /** + * @return Username for the registry. + * + */ + public Optional> username() { + return Optional.ofNullable(this.username); + } + + private RegistryArgs() {} + + private RegistryArgs(RegistryArgs $) { + this.address = $.address; + this.password = $.password; + this.username = $.username; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(RegistryArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private RegistryArgs $; + + public Builder() { + $ = new RegistryArgs(); + } + + public Builder(RegistryArgs defaults) { + $ = new RegistryArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param address The registry's address (e.g. "docker.io"). + * + * @return builder + * + */ + public Builder address(Output address) { + $.address = address; + return this; + } + + /** + * @param address The registry's address (e.g. "docker.io"). + * + * @return builder + * + */ + public Builder address(String address) { + return address(Output.of(address)); + } + + /** + * @param password Password or token for the registry. + * + * @return builder + * + */ + public Builder password(@Nullable Output password) { + $.password = password; + return this; + } + + /** + * @param password Password or token for the registry. + * + * @return builder + * + */ + public Builder password(String password) { + return password(Output.of(password)); + } + + /** + * @param username Username for the registry. + * + * @return builder + * + */ + public Builder username(@Nullable Output username) { + $.username = username; + return this; + } + + /** + * @param username Username for the registry. + * + * @return builder + * + */ + public Builder username(String username) { + return username(Output.of(username)); + } + + public RegistryArgs build() { + if ($.address == null) { + throw new MissingRequiredPropertyException("RegistryArgs", "address"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/SSHArgs.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/SSHArgs.java new file mode 100644 index 0000000..788599d --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/inputs/SSHArgs.java @@ -0,0 +1,182 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.inputs; + +import com.pulumi.core.Output; +import com.pulumi.core.annotations.Import; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + + +public final class SSHArgs extends com.pulumi.resources.ResourceArgs { + + public static final SSHArgs Empty = new SSHArgs(); + + /** + * Useful for distinguishing different servers that are part of the same + * build. + * + * A value of `default` is appropriate if only dealing with a single host. + * + */ + @Import(name="id", required=true) + private Output id; + + /** + * @return Useful for distinguishing different servers that are part of the same + * build. + * + * A value of `default` is appropriate if only dealing with a single host. + * + */ + public Output id() { + return this.id; + } + + /** + * SSH agent socket or private keys to expose to the build under the given + * identifier. + * + * Defaults to `[$SSH_AUTH_SOCK]`. + * + * Note that your keys are **not** automatically added when using an + * agent. Run `ssh-add -l` locally to confirm which public keys are + * visible to the agent; these will be exposed to your build. + * + */ + @Import(name="paths") + private @Nullable Output> paths; + + /** + * @return SSH agent socket or private keys to expose to the build under the given + * identifier. + * + * Defaults to `[$SSH_AUTH_SOCK]`. + * + * Note that your keys are **not** automatically added when using an + * agent. Run `ssh-add -l` locally to confirm which public keys are + * visible to the agent; these will be exposed to your build. + * + */ + public Optional>> paths() { + return Optional.ofNullable(this.paths); + } + + private SSHArgs() {} + + private SSHArgs(SSHArgs $) { + this.id = $.id; + this.paths = $.paths; + } + + public static Builder builder() { + return new Builder(); + } + public static Builder builder(SSHArgs defaults) { + return new Builder(defaults); + } + + public static final class Builder { + private SSHArgs $; + + public Builder() { + $ = new SSHArgs(); + } + + public Builder(SSHArgs defaults) { + $ = new SSHArgs(Objects.requireNonNull(defaults)); + } + + /** + * @param id Useful for distinguishing different servers that are part of the same + * build. + * + * A value of `default` is appropriate if only dealing with a single host. + * + * @return builder + * + */ + public Builder id(Output id) { + $.id = id; + return this; + } + + /** + * @param id Useful for distinguishing different servers that are part of the same + * build. + * + * A value of `default` is appropriate if only dealing with a single host. + * + * @return builder + * + */ + public Builder id(String id) { + return id(Output.of(id)); + } + + /** + * @param paths SSH agent socket or private keys to expose to the build under the given + * identifier. + * + * Defaults to `[$SSH_AUTH_SOCK]`. + * + * Note that your keys are **not** automatically added when using an + * agent. Run `ssh-add -l` locally to confirm which public keys are + * visible to the agent; these will be exposed to your build. + * + * @return builder + * + */ + public Builder paths(@Nullable Output> paths) { + $.paths = paths; + return this; + } + + /** + * @param paths SSH agent socket or private keys to expose to the build under the given + * identifier. + * + * Defaults to `[$SSH_AUTH_SOCK]`. + * + * Note that your keys are **not** automatically added when using an + * agent. Run `ssh-add -l` locally to confirm which public keys are + * visible to the agent; these will be exposed to your build. + * + * @return builder + * + */ + public Builder paths(List paths) { + return paths(Output.of(paths)); + } + + /** + * @param paths SSH agent socket or private keys to expose to the build under the given + * identifier. + * + * Defaults to `[$SSH_AUTH_SOCK]`. + * + * Note that your keys are **not** automatically added when using an + * agent. Run `ssh-add -l` locally to confirm which public keys are + * visible to the agent; these will be exposed to your build. + * + * @return builder + * + */ + public Builder paths(String... paths) { + return paths(List.of(paths)); + } + + public SSHArgs build() { + if ($.id == null) { + throw new MissingRequiredPropertyException("SSHArgs", "id"); + } + return $; + } + } + +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/BuildContext.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/BuildContext.java new file mode 100644 index 0000000..71713b3 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/BuildContext.java @@ -0,0 +1,106 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.outputs.Context; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Nullable; + +@CustomType +public final class BuildContext { + /** + * @return Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + */ + private String location; + /** + * @return Additional build contexts to use. + * + * These contexts are accessed with `FROM name` or `--from=name` + * statements when using Dockerfile 1.4+ syntax. + * + * Values can be local paths, HTTP URLs, or `docker-image://` images. + * + */ + private @Nullable Map named; + + private BuildContext() {} + /** + * @return Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + */ + public String location() { + return this.location; + } + /** + * @return Additional build contexts to use. + * + * These contexts are accessed with `FROM name` or `--from=name` + * statements when using Dockerfile 1.4+ syntax. + * + * Values can be local paths, HTTP URLs, or `docker-image://` images. + * + */ + public Map named() { + return this.named == null ? Map.of() : this.named; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(BuildContext defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String location; + private @Nullable Map named; + public Builder() {} + public Builder(BuildContext defaults) { + Objects.requireNonNull(defaults); + this.location = defaults.location; + this.named = defaults.named; + } + + @CustomType.Setter + public Builder location(String location) { + if (location == null) { + throw new MissingRequiredPropertyException("BuildContext", "location"); + } + this.location = location; + return this; + } + @CustomType.Setter + public Builder named(@Nullable Map named) { + + this.named = named; + return this; + } + public BuildContext build() { + final var _resultValue = new BuildContext(); + _resultValue.location = location; + _resultValue.named = named; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/BuilderConfig.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/BuilderConfig.java new file mode 100644 index 0000000..dbfa0ad --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/BuilderConfig.java @@ -0,0 +1,67 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class BuilderConfig { + /** + * @return Name of an existing buildx builder to use. + * + * Only `docker-container`, `kubernetes`, or `remote` drivers are + * supported. The legacy `docker` driver is not supported. + * + * Equivalent to Docker's `--builder` flag. + * + */ + private @Nullable String name; + + private BuilderConfig() {} + /** + * @return Name of an existing buildx builder to use. + * + * Only `docker-container`, `kubernetes`, or `remote` drivers are + * supported. The legacy `docker` driver is not supported. + * + * Equivalent to Docker's `--builder` flag. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(BuilderConfig defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String name; + public Builder() {} + public Builder(BuilderConfig defaults) { + Objects.requireNonNull(defaults); + this.name = defaults.name; + } + + @CustomType.Setter + public Builder name(@Nullable String name) { + + this.name = name; + return this; + } + public BuilderConfig build() { + final var _resultValue = new BuilderConfig(); + _resultValue.name = name; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFrom.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFrom.java new file mode 100644 index 0000000..dfc24b8 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFrom.java @@ -0,0 +1,199 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.outputs.CacheFromAzureBlob; +import com.pulumi.dockerbuild.outputs.CacheFromGitHubActions; +import com.pulumi.dockerbuild.outputs.CacheFromLocal; +import com.pulumi.dockerbuild.outputs.CacheFromRegistry; +import com.pulumi.dockerbuild.outputs.CacheFromS3; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class CacheFrom { + /** + * @return Upload build caches to Azure's blob storage service. + * + */ + private @Nullable CacheFromAzureBlob azblob; + /** + * @return When `true` this entry will be excluded. Defaults to `false`. + * + */ + private @Nullable Boolean disabled; + /** + * @return Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + */ + private @Nullable CacheFromGitHubActions gha; + /** + * @return A simple backend which caches images on your local filesystem. + * + */ + private @Nullable CacheFromLocal local; + /** + * @return A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`). + * + */ + private @Nullable String raw; + /** + * @return Upload build caches to remote registries. + * + */ + private @Nullable CacheFromRegistry registry; + /** + * @return Upload build caches to AWS S3 or an S3-compatible services such as + * MinIO. + * + */ + private @Nullable CacheFromS3 s3; + + private CacheFrom() {} + /** + * @return Upload build caches to Azure's blob storage service. + * + */ + public Optional azblob() { + return Optional.ofNullable(this.azblob); + } + /** + * @return When `true` this entry will be excluded. Defaults to `false`. + * + */ + public Optional disabled() { + return Optional.ofNullable(this.disabled); + } + /** + * @return Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + */ + public Optional gha() { + return Optional.ofNullable(this.gha); + } + /** + * @return A simple backend which caches images on your local filesystem. + * + */ + public Optional local() { + return Optional.ofNullable(this.local); + } + /** + * @return A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`). + * + */ + public Optional raw() { + return Optional.ofNullable(this.raw); + } + /** + * @return Upload build caches to remote registries. + * + */ + public Optional registry() { + return Optional.ofNullable(this.registry); + } + /** + * @return Upload build caches to AWS S3 or an S3-compatible services such as + * MinIO. + * + */ + public Optional s3() { + return Optional.ofNullable(this.s3); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheFrom defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable CacheFromAzureBlob azblob; + private @Nullable Boolean disabled; + private @Nullable CacheFromGitHubActions gha; + private @Nullable CacheFromLocal local; + private @Nullable String raw; + private @Nullable CacheFromRegistry registry; + private @Nullable CacheFromS3 s3; + public Builder() {} + public Builder(CacheFrom defaults) { + Objects.requireNonNull(defaults); + this.azblob = defaults.azblob; + this.disabled = defaults.disabled; + this.gha = defaults.gha; + this.local = defaults.local; + this.raw = defaults.raw; + this.registry = defaults.registry; + this.s3 = defaults.s3; + } + + @CustomType.Setter + public Builder azblob(@Nullable CacheFromAzureBlob azblob) { + + this.azblob = azblob; + return this; + } + @CustomType.Setter + public Builder disabled(@Nullable Boolean disabled) { + + this.disabled = disabled; + return this; + } + @CustomType.Setter + public Builder gha(@Nullable CacheFromGitHubActions gha) { + + this.gha = gha; + return this; + } + @CustomType.Setter + public Builder local(@Nullable CacheFromLocal local) { + + this.local = local; + return this; + } + @CustomType.Setter + public Builder raw(@Nullable String raw) { + + this.raw = raw; + return this; + } + @CustomType.Setter + public Builder registry(@Nullable CacheFromRegistry registry) { + + this.registry = registry; + return this; + } + @CustomType.Setter + public Builder s3(@Nullable CacheFromS3 s3) { + + this.s3 = s3; + return this; + } + public CacheFrom build() { + final var _resultValue = new CacheFrom(); + _resultValue.azblob = azblob; + _resultValue.disabled = disabled; + _resultValue.gha = gha; + _resultValue.local = local; + _resultValue.raw = raw; + _resultValue.registry = registry; + _resultValue.s3 = s3; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromAzureBlob.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromAzureBlob.java new file mode 100644 index 0000000..92a25a9 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromAzureBlob.java @@ -0,0 +1,102 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class CacheFromAzureBlob { + /** + * @return Base URL of the storage account. + * + */ + private @Nullable String accountUrl; + /** + * @return The name of the cache image. + * + */ + private String name; + /** + * @return Blob storage account key. + * + */ + private @Nullable String secretAccessKey; + + private CacheFromAzureBlob() {} + /** + * @return Base URL of the storage account. + * + */ + public Optional accountUrl() { + return Optional.ofNullable(this.accountUrl); + } + /** + * @return The name of the cache image. + * + */ + public String name() { + return this.name; + } + /** + * @return Blob storage account key. + * + */ + public Optional secretAccessKey() { + return Optional.ofNullable(this.secretAccessKey); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheFromAzureBlob defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String accountUrl; + private String name; + private @Nullable String secretAccessKey; + public Builder() {} + public Builder(CacheFromAzureBlob defaults) { + Objects.requireNonNull(defaults); + this.accountUrl = defaults.accountUrl; + this.name = defaults.name; + this.secretAccessKey = defaults.secretAccessKey; + } + + @CustomType.Setter + public Builder accountUrl(@Nullable String accountUrl) { + + this.accountUrl = accountUrl; + return this; + } + @CustomType.Setter + public Builder name(String name) { + if (name == null) { + throw new MissingRequiredPropertyException("CacheFromAzureBlob", "name"); + } + this.name = name; + return this; + } + @CustomType.Setter + public Builder secretAccessKey(@Nullable String secretAccessKey) { + + this.secretAccessKey = secretAccessKey; + return this; + } + public CacheFromAzureBlob build() { + final var _resultValue = new CacheFromAzureBlob(); + _resultValue.accountUrl = accountUrl; + _resultValue.name = name; + _resultValue.secretAccessKey = secretAccessKey; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromGitHubActions.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromGitHubActions.java new file mode 100644 index 0000000..3b015c1 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromGitHubActions.java @@ -0,0 +1,123 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class CacheFromGitHubActions { + /** + * @return The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + */ + private @Nullable String scope; + /** + * @return The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + private @Nullable String token; + /** + * @return The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + private @Nullable String url; + + private CacheFromGitHubActions() {} + /** + * @return The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + */ + public Optional scope() { + return Optional.ofNullable(this.scope); + } + /** + * @return The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + public Optional token() { + return Optional.ofNullable(this.token); + } + /** + * @return The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + public Optional url() { + return Optional.ofNullable(this.url); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheFromGitHubActions defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String scope; + private @Nullable String token; + private @Nullable String url; + public Builder() {} + public Builder(CacheFromGitHubActions defaults) { + Objects.requireNonNull(defaults); + this.scope = defaults.scope; + this.token = defaults.token; + this.url = defaults.url; + } + + @CustomType.Setter + public Builder scope(@Nullable String scope) { + + this.scope = scope; + return this; + } + @CustomType.Setter + public Builder token(@Nullable String token) { + + this.token = token; + return this; + } + @CustomType.Setter + public Builder url(@Nullable String url) { + + this.url = url; + return this; + } + public CacheFromGitHubActions build() { + final var _resultValue = new CacheFromGitHubActions(); + _resultValue.scope = scope; + _resultValue.token = token; + _resultValue.url = url; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromLocal.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromLocal.java new file mode 100644 index 0000000..cd1362d --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromLocal.java @@ -0,0 +1,81 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class CacheFromLocal { + /** + * @return Digest of manifest to import. + * + */ + private @Nullable String digest; + /** + * @return Path of the local directory where cache gets imported from. + * + */ + private String src; + + private CacheFromLocal() {} + /** + * @return Digest of manifest to import. + * + */ + public Optional digest() { + return Optional.ofNullable(this.digest); + } + /** + * @return Path of the local directory where cache gets imported from. + * + */ + public String src() { + return this.src; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheFromLocal defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String digest; + private String src; + public Builder() {} + public Builder(CacheFromLocal defaults) { + Objects.requireNonNull(defaults); + this.digest = defaults.digest; + this.src = defaults.src; + } + + @CustomType.Setter + public Builder digest(@Nullable String digest) { + + this.digest = digest; + return this; + } + @CustomType.Setter + public Builder src(String src) { + if (src == null) { + throw new MissingRequiredPropertyException("CacheFromLocal", "src"); + } + this.src = src; + return this; + } + public CacheFromLocal build() { + final var _resultValue = new CacheFromLocal(); + _resultValue.digest = digest; + _resultValue.src = src; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromRegistry.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromRegistry.java new file mode 100644 index 0000000..5202fd2 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromRegistry.java @@ -0,0 +1,58 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + +@CustomType +public final class CacheFromRegistry { + /** + * @return Fully qualified name of the cache image to import. + * + */ + private String ref; + + private CacheFromRegistry() {} + /** + * @return Fully qualified name of the cache image to import. + * + */ + public String ref() { + return this.ref; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheFromRegistry defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String ref; + public Builder() {} + public Builder(CacheFromRegistry defaults) { + Objects.requireNonNull(defaults); + this.ref = defaults.ref; + } + + @CustomType.Setter + public Builder ref(String ref) { + if (ref == null) { + throw new MissingRequiredPropertyException("CacheFromRegistry", "ref"); + } + this.ref = ref; + return this; + } + public CacheFromRegistry build() { + final var _resultValue = new CacheFromRegistry(); + _resultValue.ref = ref; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromS3.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromS3.java new file mode 100644 index 0000000..230713b --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheFromS3.java @@ -0,0 +1,252 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class CacheFromS3 { + /** + * @return Defaults to `$AWS_ACCESS_KEY_ID`. + * + */ + private @Nullable String accessKeyId; + /** + * @return Prefix to prepend to blob filenames. + * + */ + private @Nullable String blobsPrefix; + /** + * @return Name of the S3 bucket. + * + */ + private String bucket; + /** + * @return Endpoint of the S3 bucket. + * + */ + private @Nullable String endpointUrl; + /** + * @return Prefix to prepend on manifest filenames. + * + */ + private @Nullable String manifestsPrefix; + /** + * @return Name of the cache image. + * + */ + private @Nullable String name; + /** + * @return The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + */ + private String region; + /** + * @return Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + */ + private @Nullable String secretAccessKey; + /** + * @return Defaults to `$AWS_SESSION_TOKEN`. + * + */ + private @Nullable String sessionToken; + /** + * @return Uses `bucket` in the URL instead of hostname when `true`. + * + */ + private @Nullable Boolean usePathStyle; + + private CacheFromS3() {} + /** + * @return Defaults to `$AWS_ACCESS_KEY_ID`. + * + */ + public Optional accessKeyId() { + return Optional.ofNullable(this.accessKeyId); + } + /** + * @return Prefix to prepend to blob filenames. + * + */ + public Optional blobsPrefix() { + return Optional.ofNullable(this.blobsPrefix); + } + /** + * @return Name of the S3 bucket. + * + */ + public String bucket() { + return this.bucket; + } + /** + * @return Endpoint of the S3 bucket. + * + */ + public Optional endpointUrl() { + return Optional.ofNullable(this.endpointUrl); + } + /** + * @return Prefix to prepend on manifest filenames. + * + */ + public Optional manifestsPrefix() { + return Optional.ofNullable(this.manifestsPrefix); + } + /** + * @return Name of the cache image. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + */ + public String region() { + return this.region; + } + /** + * @return Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + */ + public Optional secretAccessKey() { + return Optional.ofNullable(this.secretAccessKey); + } + /** + * @return Defaults to `$AWS_SESSION_TOKEN`. + * + */ + public Optional sessionToken() { + return Optional.ofNullable(this.sessionToken); + } + /** + * @return Uses `bucket` in the URL instead of hostname when `true`. + * + */ + public Optional usePathStyle() { + return Optional.ofNullable(this.usePathStyle); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheFromS3 defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String accessKeyId; + private @Nullable String blobsPrefix; + private String bucket; + private @Nullable String endpointUrl; + private @Nullable String manifestsPrefix; + private @Nullable String name; + private String region; + private @Nullable String secretAccessKey; + private @Nullable String sessionToken; + private @Nullable Boolean usePathStyle; + public Builder() {} + public Builder(CacheFromS3 defaults) { + Objects.requireNonNull(defaults); + this.accessKeyId = defaults.accessKeyId; + this.blobsPrefix = defaults.blobsPrefix; + this.bucket = defaults.bucket; + this.endpointUrl = defaults.endpointUrl; + this.manifestsPrefix = defaults.manifestsPrefix; + this.name = defaults.name; + this.region = defaults.region; + this.secretAccessKey = defaults.secretAccessKey; + this.sessionToken = defaults.sessionToken; + this.usePathStyle = defaults.usePathStyle; + } + + @CustomType.Setter + public Builder accessKeyId(@Nullable String accessKeyId) { + + this.accessKeyId = accessKeyId; + return this; + } + @CustomType.Setter + public Builder blobsPrefix(@Nullable String blobsPrefix) { + + this.blobsPrefix = blobsPrefix; + return this; + } + @CustomType.Setter + public Builder bucket(String bucket) { + if (bucket == null) { + throw new MissingRequiredPropertyException("CacheFromS3", "bucket"); + } + this.bucket = bucket; + return this; + } + @CustomType.Setter + public Builder endpointUrl(@Nullable String endpointUrl) { + + this.endpointUrl = endpointUrl; + return this; + } + @CustomType.Setter + public Builder manifestsPrefix(@Nullable String manifestsPrefix) { + + this.manifestsPrefix = manifestsPrefix; + return this; + } + @CustomType.Setter + public Builder name(@Nullable String name) { + + this.name = name; + return this; + } + @CustomType.Setter + public Builder region(String region) { + if (region == null) { + throw new MissingRequiredPropertyException("CacheFromS3", "region"); + } + this.region = region; + return this; + } + @CustomType.Setter + public Builder secretAccessKey(@Nullable String secretAccessKey) { + + this.secretAccessKey = secretAccessKey; + return this; + } + @CustomType.Setter + public Builder sessionToken(@Nullable String sessionToken) { + + this.sessionToken = sessionToken; + return this; + } + @CustomType.Setter + public Builder usePathStyle(@Nullable Boolean usePathStyle) { + + this.usePathStyle = usePathStyle; + return this; + } + public CacheFromS3 build() { + final var _resultValue = new CacheFromS3(); + _resultValue.accessKeyId = accessKeyId; + _resultValue.blobsPrefix = blobsPrefix; + _resultValue.bucket = bucket; + _resultValue.endpointUrl = endpointUrl; + _resultValue.manifestsPrefix = manifestsPrefix; + _resultValue.name = name; + _resultValue.region = region; + _resultValue.secretAccessKey = secretAccessKey; + _resultValue.sessionToken = sessionToken; + _resultValue.usePathStyle = usePathStyle; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheTo.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheTo.java new file mode 100644 index 0000000..1a87645 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheTo.java @@ -0,0 +1,225 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.outputs.CacheToAzureBlob; +import com.pulumi.dockerbuild.outputs.CacheToGitHubActions; +import com.pulumi.dockerbuild.outputs.CacheToInline; +import com.pulumi.dockerbuild.outputs.CacheToLocal; +import com.pulumi.dockerbuild.outputs.CacheToRegistry; +import com.pulumi.dockerbuild.outputs.CacheToS3; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class CacheTo { + /** + * @return Push cache to Azure's blob storage service. + * + */ + private @Nullable CacheToAzureBlob azblob; + /** + * @return When `true` this entry will be excluded. Defaults to `false`. + * + */ + private @Nullable Boolean disabled; + /** + * @return Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + */ + private @Nullable CacheToGitHubActions gha; + /** + * @return The inline cache storage backend is the simplest implementation to get + * started with, but it does not handle multi-stage builds. Consider the + * `registry` cache backend instead. + * + */ + private @Nullable CacheToInline inline; + /** + * @return A simple backend which caches imagines on your local filesystem. + * + */ + private @Nullable CacheToLocal local; + /** + * @return A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`) + * + */ + private @Nullable String raw; + /** + * @return Push caches to remote registries. Incompatible with the `docker` build + * driver. + * + */ + private @Nullable CacheToRegistry registry; + /** + * @return Push cache to AWS S3 or S3-compatible services such as MinIO. + * + */ + private @Nullable CacheToS3 s3; + + private CacheTo() {} + /** + * @return Push cache to Azure's blob storage service. + * + */ + public Optional azblob() { + return Optional.ofNullable(this.azblob); + } + /** + * @return When `true` this entry will be excluded. Defaults to `false`. + * + */ + public Optional disabled() { + return Optional.ofNullable(this.disabled); + } + /** + * @return Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + * + */ + public Optional gha() { + return Optional.ofNullable(this.gha); + } + /** + * @return The inline cache storage backend is the simplest implementation to get + * started with, but it does not handle multi-stage builds. Consider the + * `registry` cache backend instead. + * + */ + public Optional inline() { + return Optional.ofNullable(this.inline); + } + /** + * @return A simple backend which caches imagines on your local filesystem. + * + */ + public Optional local() { + return Optional.ofNullable(this.local); + } + /** + * @return A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`) + * + */ + public Optional raw() { + return Optional.ofNullable(this.raw); + } + /** + * @return Push caches to remote registries. Incompatible with the `docker` build + * driver. + * + */ + public Optional registry() { + return Optional.ofNullable(this.registry); + } + /** + * @return Push cache to AWS S3 or S3-compatible services such as MinIO. + * + */ + public Optional s3() { + return Optional.ofNullable(this.s3); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheTo defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable CacheToAzureBlob azblob; + private @Nullable Boolean disabled; + private @Nullable CacheToGitHubActions gha; + private @Nullable CacheToInline inline; + private @Nullable CacheToLocal local; + private @Nullable String raw; + private @Nullable CacheToRegistry registry; + private @Nullable CacheToS3 s3; + public Builder() {} + public Builder(CacheTo defaults) { + Objects.requireNonNull(defaults); + this.azblob = defaults.azblob; + this.disabled = defaults.disabled; + this.gha = defaults.gha; + this.inline = defaults.inline; + this.local = defaults.local; + this.raw = defaults.raw; + this.registry = defaults.registry; + this.s3 = defaults.s3; + } + + @CustomType.Setter + public Builder azblob(@Nullable CacheToAzureBlob azblob) { + + this.azblob = azblob; + return this; + } + @CustomType.Setter + public Builder disabled(@Nullable Boolean disabled) { + + this.disabled = disabled; + return this; + } + @CustomType.Setter + public Builder gha(@Nullable CacheToGitHubActions gha) { + + this.gha = gha; + return this; + } + @CustomType.Setter + public Builder inline(@Nullable CacheToInline inline) { + + this.inline = inline; + return this; + } + @CustomType.Setter + public Builder local(@Nullable CacheToLocal local) { + + this.local = local; + return this; + } + @CustomType.Setter + public Builder raw(@Nullable String raw) { + + this.raw = raw; + return this; + } + @CustomType.Setter + public Builder registry(@Nullable CacheToRegistry registry) { + + this.registry = registry; + return this; + } + @CustomType.Setter + public Builder s3(@Nullable CacheToS3 s3) { + + this.s3 = s3; + return this; + } + public CacheTo build() { + final var _resultValue = new CacheTo(); + _resultValue.azblob = azblob; + _resultValue.disabled = disabled; + _resultValue.gha = gha; + _resultValue.inline = inline; + _resultValue.local = local; + _resultValue.raw = raw; + _resultValue.registry = registry; + _resultValue.s3 = s3; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToAzureBlob.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToAzureBlob.java new file mode 100644 index 0000000..1c79892 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToAzureBlob.java @@ -0,0 +1,146 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.enums.CacheMode; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class CacheToAzureBlob { + /** + * @return Base URL of the storage account. + * + */ + private @Nullable String accountUrl; + /** + * @return Ignore errors caused by failed cache exports. + * + */ + private @Nullable Boolean ignoreError; + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + private @Nullable CacheMode mode; + /** + * @return The name of the cache image. + * + */ + private String name; + /** + * @return Blob storage account key. + * + */ + private @Nullable String secretAccessKey; + + private CacheToAzureBlob() {} + /** + * @return Base URL of the storage account. + * + */ + public Optional accountUrl() { + return Optional.ofNullable(this.accountUrl); + } + /** + * @return Ignore errors caused by failed cache exports. + * + */ + public Optional ignoreError() { + return Optional.ofNullable(this.ignoreError); + } + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + public Optional mode() { + return Optional.ofNullable(this.mode); + } + /** + * @return The name of the cache image. + * + */ + public String name() { + return this.name; + } + /** + * @return Blob storage account key. + * + */ + public Optional secretAccessKey() { + return Optional.ofNullable(this.secretAccessKey); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheToAzureBlob defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String accountUrl; + private @Nullable Boolean ignoreError; + private @Nullable CacheMode mode; + private String name; + private @Nullable String secretAccessKey; + public Builder() {} + public Builder(CacheToAzureBlob defaults) { + Objects.requireNonNull(defaults); + this.accountUrl = defaults.accountUrl; + this.ignoreError = defaults.ignoreError; + this.mode = defaults.mode; + this.name = defaults.name; + this.secretAccessKey = defaults.secretAccessKey; + } + + @CustomType.Setter + public Builder accountUrl(@Nullable String accountUrl) { + + this.accountUrl = accountUrl; + return this; + } + @CustomType.Setter + public Builder ignoreError(@Nullable Boolean ignoreError) { + + this.ignoreError = ignoreError; + return this; + } + @CustomType.Setter + public Builder mode(@Nullable CacheMode mode) { + + this.mode = mode; + return this; + } + @CustomType.Setter + public Builder name(String name) { + if (name == null) { + throw new MissingRequiredPropertyException("CacheToAzureBlob", "name"); + } + this.name = name; + return this; + } + @CustomType.Setter + public Builder secretAccessKey(@Nullable String secretAccessKey) { + + this.secretAccessKey = secretAccessKey; + return this; + } + public CacheToAzureBlob build() { + final var _resultValue = new CacheToAzureBlob(); + _resultValue.accountUrl = accountUrl; + _resultValue.ignoreError = ignoreError; + _resultValue.mode = mode; + _resultValue.name = name; + _resultValue.secretAccessKey = secretAccessKey; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToGitHubActions.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToGitHubActions.java new file mode 100644 index 0000000..e9cd6f0 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToGitHubActions.java @@ -0,0 +1,167 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.enums.CacheMode; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class CacheToGitHubActions { + /** + * @return Ignore errors caused by failed cache exports. + * + */ + private @Nullable Boolean ignoreError; + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + private @Nullable CacheMode mode; + /** + * @return The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + */ + private @Nullable String scope; + /** + * @return The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + private @Nullable String token; + /** + * @return The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + private @Nullable String url; + + private CacheToGitHubActions() {} + /** + * @return Ignore errors caused by failed cache exports. + * + */ + public Optional ignoreError() { + return Optional.ofNullable(this.ignoreError); + } + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + public Optional mode() { + return Optional.ofNullable(this.mode); + } + /** + * @return The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + * + */ + public Optional scope() { + return Optional.ofNullable(this.scope); + } + /** + * @return The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + public Optional token() { + return Optional.ofNullable(this.token); + } + /** + * @return The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + * + */ + public Optional url() { + return Optional.ofNullable(this.url); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheToGitHubActions defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable Boolean ignoreError; + private @Nullable CacheMode mode; + private @Nullable String scope; + private @Nullable String token; + private @Nullable String url; + public Builder() {} + public Builder(CacheToGitHubActions defaults) { + Objects.requireNonNull(defaults); + this.ignoreError = defaults.ignoreError; + this.mode = defaults.mode; + this.scope = defaults.scope; + this.token = defaults.token; + this.url = defaults.url; + } + + @CustomType.Setter + public Builder ignoreError(@Nullable Boolean ignoreError) { + + this.ignoreError = ignoreError; + return this; + } + @CustomType.Setter + public Builder mode(@Nullable CacheMode mode) { + + this.mode = mode; + return this; + } + @CustomType.Setter + public Builder scope(@Nullable String scope) { + + this.scope = scope; + return this; + } + @CustomType.Setter + public Builder token(@Nullable String token) { + + this.token = token; + return this; + } + @CustomType.Setter + public Builder url(@Nullable String url) { + + this.url = url; + return this; + } + public CacheToGitHubActions build() { + final var _resultValue = new CacheToGitHubActions(); + _resultValue.ignoreError = ignoreError; + _resultValue.mode = mode; + _resultValue.scope = scope; + _resultValue.token = token; + _resultValue.url = url; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToInline.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToInline.java new file mode 100644 index 0000000..509470b --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToInline.java @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.util.Objects; + +@CustomType +public final class CacheToInline { + private CacheToInline() {} + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheToInline defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + public Builder() {} + public Builder(CacheToInline defaults) { + Objects.requireNonNull(defaults); + } + + public CacheToInline build() { + final var _resultValue = new CacheToInline(); + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToLocal.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToLocal.java new file mode 100644 index 0000000..2711ae9 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToLocal.java @@ -0,0 +1,169 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.enums.CacheMode; +import com.pulumi.dockerbuild.enums.CompressionType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class CacheToLocal { + /** + * @return The compression type to use. + * + */ + private @Nullable CompressionType compression; + /** + * @return Compression level from 0 to 22. + * + */ + private @Nullable Integer compressionLevel; + /** + * @return Path of the local directory to export the cache. + * + */ + private String dest; + /** + * @return Forcefully apply compression. + * + */ + private @Nullable Boolean forceCompression; + /** + * @return Ignore errors caused by failed cache exports. + * + */ + private @Nullable Boolean ignoreError; + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + private @Nullable CacheMode mode; + + private CacheToLocal() {} + /** + * @return The compression type to use. + * + */ + public Optional compression() { + return Optional.ofNullable(this.compression); + } + /** + * @return Compression level from 0 to 22. + * + */ + public Optional compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + /** + * @return Path of the local directory to export the cache. + * + */ + public String dest() { + return this.dest; + } + /** + * @return Forcefully apply compression. + * + */ + public Optional forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + /** + * @return Ignore errors caused by failed cache exports. + * + */ + public Optional ignoreError() { + return Optional.ofNullable(this.ignoreError); + } + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + public Optional mode() { + return Optional.ofNullable(this.mode); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheToLocal defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable CompressionType compression; + private @Nullable Integer compressionLevel; + private String dest; + private @Nullable Boolean forceCompression; + private @Nullable Boolean ignoreError; + private @Nullable CacheMode mode; + public Builder() {} + public Builder(CacheToLocal defaults) { + Objects.requireNonNull(defaults); + this.compression = defaults.compression; + this.compressionLevel = defaults.compressionLevel; + this.dest = defaults.dest; + this.forceCompression = defaults.forceCompression; + this.ignoreError = defaults.ignoreError; + this.mode = defaults.mode; + } + + @CustomType.Setter + public Builder compression(@Nullable CompressionType compression) { + + this.compression = compression; + return this; + } + @CustomType.Setter + public Builder compressionLevel(@Nullable Integer compressionLevel) { + + this.compressionLevel = compressionLevel; + return this; + } + @CustomType.Setter + public Builder dest(String dest) { + if (dest == null) { + throw new MissingRequiredPropertyException("CacheToLocal", "dest"); + } + this.dest = dest; + return this; + } + @CustomType.Setter + public Builder forceCompression(@Nullable Boolean forceCompression) { + + this.forceCompression = forceCompression; + return this; + } + @CustomType.Setter + public Builder ignoreError(@Nullable Boolean ignoreError) { + + this.ignoreError = ignoreError; + return this; + } + @CustomType.Setter + public Builder mode(@Nullable CacheMode mode) { + + this.mode = mode; + return this; + } + public CacheToLocal build() { + final var _resultValue = new CacheToLocal(); + _resultValue.compression = compression; + _resultValue.compressionLevel = compressionLevel; + _resultValue.dest = dest; + _resultValue.forceCompression = forceCompression; + _resultValue.ignoreError = ignoreError; + _resultValue.mode = mode; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToRegistry.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToRegistry.java new file mode 100644 index 0000000..0ceb1c0 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToRegistry.java @@ -0,0 +1,225 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.enums.CacheMode; +import com.pulumi.dockerbuild.enums.CompressionType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class CacheToRegistry { + /** + * @return The compression type to use. + * + */ + private @Nullable CompressionType compression; + /** + * @return Compression level from 0 to 22. + * + */ + private @Nullable Integer compressionLevel; + /** + * @return Forcefully apply compression. + * + */ + private @Nullable Boolean forceCompression; + /** + * @return Ignore errors caused by failed cache exports. + * + */ + private @Nullable Boolean ignoreError; + /** + * @return Export cache manifest as an OCI-compatible image manifest instead of a + * manifest list. Requires `ociMediaTypes` to also be `true`. + * + * Some registries like AWS ECR will not work with caching if this is + * `false`. + * + * Defaults to `false` to match Docker's default behavior. + * + */ + private @Nullable Boolean imageManifest; + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + private @Nullable CacheMode mode; + /** + * @return Whether to use OCI media types in exported manifests. Defaults to + * `true`. + * + */ + private @Nullable Boolean ociMediaTypes; + /** + * @return Fully qualified name of the cache image to import. + * + */ + private String ref; + + private CacheToRegistry() {} + /** + * @return The compression type to use. + * + */ + public Optional compression() { + return Optional.ofNullable(this.compression); + } + /** + * @return Compression level from 0 to 22. + * + */ + public Optional compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + /** + * @return Forcefully apply compression. + * + */ + public Optional forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + /** + * @return Ignore errors caused by failed cache exports. + * + */ + public Optional ignoreError() { + return Optional.ofNullable(this.ignoreError); + } + /** + * @return Export cache manifest as an OCI-compatible image manifest instead of a + * manifest list. Requires `ociMediaTypes` to also be `true`. + * + * Some registries like AWS ECR will not work with caching if this is + * `false`. + * + * Defaults to `false` to match Docker's default behavior. + * + */ + public Optional imageManifest() { + return Optional.ofNullable(this.imageManifest); + } + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + public Optional mode() { + return Optional.ofNullable(this.mode); + } + /** + * @return Whether to use OCI media types in exported manifests. Defaults to + * `true`. + * + */ + public Optional ociMediaTypes() { + return Optional.ofNullable(this.ociMediaTypes); + } + /** + * @return Fully qualified name of the cache image to import. + * + */ + public String ref() { + return this.ref; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheToRegistry defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable CompressionType compression; + private @Nullable Integer compressionLevel; + private @Nullable Boolean forceCompression; + private @Nullable Boolean ignoreError; + private @Nullable Boolean imageManifest; + private @Nullable CacheMode mode; + private @Nullable Boolean ociMediaTypes; + private String ref; + public Builder() {} + public Builder(CacheToRegistry defaults) { + Objects.requireNonNull(defaults); + this.compression = defaults.compression; + this.compressionLevel = defaults.compressionLevel; + this.forceCompression = defaults.forceCompression; + this.ignoreError = defaults.ignoreError; + this.imageManifest = defaults.imageManifest; + this.mode = defaults.mode; + this.ociMediaTypes = defaults.ociMediaTypes; + this.ref = defaults.ref; + } + + @CustomType.Setter + public Builder compression(@Nullable CompressionType compression) { + + this.compression = compression; + return this; + } + @CustomType.Setter + public Builder compressionLevel(@Nullable Integer compressionLevel) { + + this.compressionLevel = compressionLevel; + return this; + } + @CustomType.Setter + public Builder forceCompression(@Nullable Boolean forceCompression) { + + this.forceCompression = forceCompression; + return this; + } + @CustomType.Setter + public Builder ignoreError(@Nullable Boolean ignoreError) { + + this.ignoreError = ignoreError; + return this; + } + @CustomType.Setter + public Builder imageManifest(@Nullable Boolean imageManifest) { + + this.imageManifest = imageManifest; + return this; + } + @CustomType.Setter + public Builder mode(@Nullable CacheMode mode) { + + this.mode = mode; + return this; + } + @CustomType.Setter + public Builder ociMediaTypes(@Nullable Boolean ociMediaTypes) { + + this.ociMediaTypes = ociMediaTypes; + return this; + } + @CustomType.Setter + public Builder ref(String ref) { + if (ref == null) { + throw new MissingRequiredPropertyException("CacheToRegistry", "ref"); + } + this.ref = ref; + return this; + } + public CacheToRegistry build() { + final var _resultValue = new CacheToRegistry(); + _resultValue.compression = compression; + _resultValue.compressionLevel = compressionLevel; + _resultValue.forceCompression = forceCompression; + _resultValue.ignoreError = ignoreError; + _resultValue.imageManifest = imageManifest; + _resultValue.mode = mode; + _resultValue.ociMediaTypes = ociMediaTypes; + _resultValue.ref = ref; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToS3.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToS3.java new file mode 100644 index 0000000..c2e21e4 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/CacheToS3.java @@ -0,0 +1,295 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.enums.CacheMode; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class CacheToS3 { + /** + * @return Defaults to `$AWS_ACCESS_KEY_ID`. + * + */ + private @Nullable String accessKeyId; + /** + * @return Prefix to prepend to blob filenames. + * + */ + private @Nullable String blobsPrefix; + /** + * @return Name of the S3 bucket. + * + */ + private String bucket; + /** + * @return Endpoint of the S3 bucket. + * + */ + private @Nullable String endpointUrl; + /** + * @return Ignore errors caused by failed cache exports. + * + */ + private @Nullable Boolean ignoreError; + /** + * @return Prefix to prepend on manifest filenames. + * + */ + private @Nullable String manifestsPrefix; + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + private @Nullable CacheMode mode; + /** + * @return Name of the cache image. + * + */ + private @Nullable String name; + /** + * @return The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + */ + private String region; + /** + * @return Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + */ + private @Nullable String secretAccessKey; + /** + * @return Defaults to `$AWS_SESSION_TOKEN`. + * + */ + private @Nullable String sessionToken; + /** + * @return Uses `bucket` in the URL instead of hostname when `true`. + * + */ + private @Nullable Boolean usePathStyle; + + private CacheToS3() {} + /** + * @return Defaults to `$AWS_ACCESS_KEY_ID`. + * + */ + public Optional accessKeyId() { + return Optional.ofNullable(this.accessKeyId); + } + /** + * @return Prefix to prepend to blob filenames. + * + */ + public Optional blobsPrefix() { + return Optional.ofNullable(this.blobsPrefix); + } + /** + * @return Name of the S3 bucket. + * + */ + public String bucket() { + return this.bucket; + } + /** + * @return Endpoint of the S3 bucket. + * + */ + public Optional endpointUrl() { + return Optional.ofNullable(this.endpointUrl); + } + /** + * @return Ignore errors caused by failed cache exports. + * + */ + public Optional ignoreError() { + return Optional.ofNullable(this.ignoreError); + } + /** + * @return Prefix to prepend on manifest filenames. + * + */ + public Optional manifestsPrefix() { + return Optional.ofNullable(this.manifestsPrefix); + } + /** + * @return The cache mode to use. Defaults to `min`. + * + */ + public Optional mode() { + return Optional.ofNullable(this.mode); + } + /** + * @return Name of the cache image. + * + */ + public Optional name() { + return Optional.ofNullable(this.name); + } + /** + * @return The geographic location of the bucket. Defaults to `$AWS_REGION`. + * + */ + public String region() { + return this.region; + } + /** + * @return Defaults to `$AWS_SECRET_ACCESS_KEY`. + * + */ + public Optional secretAccessKey() { + return Optional.ofNullable(this.secretAccessKey); + } + /** + * @return Defaults to `$AWS_SESSION_TOKEN`. + * + */ + public Optional sessionToken() { + return Optional.ofNullable(this.sessionToken); + } + /** + * @return Uses `bucket` in the URL instead of hostname when `true`. + * + */ + public Optional usePathStyle() { + return Optional.ofNullable(this.usePathStyle); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(CacheToS3 defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String accessKeyId; + private @Nullable String blobsPrefix; + private String bucket; + private @Nullable String endpointUrl; + private @Nullable Boolean ignoreError; + private @Nullable String manifestsPrefix; + private @Nullable CacheMode mode; + private @Nullable String name; + private String region; + private @Nullable String secretAccessKey; + private @Nullable String sessionToken; + private @Nullable Boolean usePathStyle; + public Builder() {} + public Builder(CacheToS3 defaults) { + Objects.requireNonNull(defaults); + this.accessKeyId = defaults.accessKeyId; + this.blobsPrefix = defaults.blobsPrefix; + this.bucket = defaults.bucket; + this.endpointUrl = defaults.endpointUrl; + this.ignoreError = defaults.ignoreError; + this.manifestsPrefix = defaults.manifestsPrefix; + this.mode = defaults.mode; + this.name = defaults.name; + this.region = defaults.region; + this.secretAccessKey = defaults.secretAccessKey; + this.sessionToken = defaults.sessionToken; + this.usePathStyle = defaults.usePathStyle; + } + + @CustomType.Setter + public Builder accessKeyId(@Nullable String accessKeyId) { + + this.accessKeyId = accessKeyId; + return this; + } + @CustomType.Setter + public Builder blobsPrefix(@Nullable String blobsPrefix) { + + this.blobsPrefix = blobsPrefix; + return this; + } + @CustomType.Setter + public Builder bucket(String bucket) { + if (bucket == null) { + throw new MissingRequiredPropertyException("CacheToS3", "bucket"); + } + this.bucket = bucket; + return this; + } + @CustomType.Setter + public Builder endpointUrl(@Nullable String endpointUrl) { + + this.endpointUrl = endpointUrl; + return this; + } + @CustomType.Setter + public Builder ignoreError(@Nullable Boolean ignoreError) { + + this.ignoreError = ignoreError; + return this; + } + @CustomType.Setter + public Builder manifestsPrefix(@Nullable String manifestsPrefix) { + + this.manifestsPrefix = manifestsPrefix; + return this; + } + @CustomType.Setter + public Builder mode(@Nullable CacheMode mode) { + + this.mode = mode; + return this; + } + @CustomType.Setter + public Builder name(@Nullable String name) { + + this.name = name; + return this; + } + @CustomType.Setter + public Builder region(String region) { + if (region == null) { + throw new MissingRequiredPropertyException("CacheToS3", "region"); + } + this.region = region; + return this; + } + @CustomType.Setter + public Builder secretAccessKey(@Nullable String secretAccessKey) { + + this.secretAccessKey = secretAccessKey; + return this; + } + @CustomType.Setter + public Builder sessionToken(@Nullable String sessionToken) { + + this.sessionToken = sessionToken; + return this; + } + @CustomType.Setter + public Builder usePathStyle(@Nullable Boolean usePathStyle) { + + this.usePathStyle = usePathStyle; + return this; + } + public CacheToS3 build() { + final var _resultValue = new CacheToS3(); + _resultValue.accessKeyId = accessKeyId; + _resultValue.blobsPrefix = blobsPrefix; + _resultValue.bucket = bucket; + _resultValue.endpointUrl = endpointUrl; + _resultValue.ignoreError = ignoreError; + _resultValue.manifestsPrefix = manifestsPrefix; + _resultValue.mode = mode; + _resultValue.name = name; + _resultValue.region = region; + _resultValue.secretAccessKey = secretAccessKey; + _resultValue.sessionToken = sessionToken; + _resultValue.usePathStyle = usePathStyle; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Context.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Context.java new file mode 100644 index 0000000..829614a --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Context.java @@ -0,0 +1,72 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + +@CustomType +public final class Context { + /** + * @return Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + */ + private String location; + + private Context() {} + /** + * @return Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + * + */ + public String location() { + return this.location; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(Context defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String location; + public Builder() {} + public Builder(Context defaults) { + Objects.requireNonNull(defaults); + this.location = defaults.location; + } + + @CustomType.Setter + public Builder location(String location) { + if (location == null) { + throw new MissingRequiredPropertyException("Context", "location"); + } + this.location = location; + return this; + } + public Context build() { + final var _resultValue = new Context(); + _resultValue.location = location; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Dockerfile.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Dockerfile.java new file mode 100644 index 0000000..a47d107 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Dockerfile.java @@ -0,0 +1,98 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class Dockerfile { + /** + * @return Raw Dockerfile contents. + * + * Conflicts with `location`. + * + * Equivalent to invoking Docker with `-f -`. + * + */ + private @Nullable String inline; + /** + * @return Location of the Dockerfile to use. + * + * Can be a relative or absolute path to a local file, or a remote URL. + * + * Defaults to `${context.location}/Dockerfile` if context is on-disk. + * + * Conflicts with `inline`. + * + */ + private @Nullable String location; + + private Dockerfile() {} + /** + * @return Raw Dockerfile contents. + * + * Conflicts with `location`. + * + * Equivalent to invoking Docker with `-f -`. + * + */ + public Optional inline() { + return Optional.ofNullable(this.inline); + } + /** + * @return Location of the Dockerfile to use. + * + * Can be a relative or absolute path to a local file, or a remote URL. + * + * Defaults to `${context.location}/Dockerfile` if context is on-disk. + * + * Conflicts with `inline`. + * + */ + public Optional location() { + return Optional.ofNullable(this.location); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(Dockerfile defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable String inline; + private @Nullable String location; + public Builder() {} + public Builder(Dockerfile defaults) { + Objects.requireNonNull(defaults); + this.inline = defaults.inline; + this.location = defaults.location; + } + + @CustomType.Setter + public Builder inline(@Nullable String inline) { + + this.inline = inline; + return this; + } + @CustomType.Setter + public Builder location(@Nullable String location) { + + this.location = location; + return this; + } + public Dockerfile build() { + final var _resultValue = new Dockerfile(); + _resultValue.inline = inline; + _resultValue.location = location; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Export.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Export.java new file mode 100644 index 0000000..8a6a167 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Export.java @@ -0,0 +1,237 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.outputs.ExportCacheOnly; +import com.pulumi.dockerbuild.outputs.ExportDocker; +import com.pulumi.dockerbuild.outputs.ExportImage; +import com.pulumi.dockerbuild.outputs.ExportLocal; +import com.pulumi.dockerbuild.outputs.ExportOCI; +import com.pulumi.dockerbuild.outputs.ExportRegistry; +import com.pulumi.dockerbuild.outputs.ExportTar; +import java.lang.Boolean; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class Export { + /** + * @return A no-op export. Helpful for silencing the 'no exports' warning if you + * just want to populate caches. + * + */ + private @Nullable ExportCacheOnly cacheonly; + /** + * @return When `true` this entry will be excluded. Defaults to `false`. + * + */ + private @Nullable Boolean disabled; + /** + * @return Export as a Docker image layout. + * + */ + private @Nullable ExportDocker docker; + /** + * @return Outputs the build result into a container image format. + * + */ + private @Nullable ExportImage image; + /** + * @return Export to a local directory as files and directories. + * + */ + private @Nullable ExportLocal local; + /** + * @return Identical to the Docker exporter but uses OCI media types by default. + * + */ + private @Nullable ExportOCI oci; + /** + * @return A raw string as you would provide it to the Docker CLI (e.g., + * `type=docker`) + * + */ + private @Nullable String raw; + /** + * @return Identical to the Image exporter, but pushes by default. + * + */ + private @Nullable ExportRegistry registry; + /** + * @return Export to a local directory as a tarball. + * + */ + private @Nullable ExportTar tar; + + private Export() {} + /** + * @return A no-op export. Helpful for silencing the 'no exports' warning if you + * just want to populate caches. + * + */ + public Optional cacheonly() { + return Optional.ofNullable(this.cacheonly); + } + /** + * @return When `true` this entry will be excluded. Defaults to `false`. + * + */ + public Optional disabled() { + return Optional.ofNullable(this.disabled); + } + /** + * @return Export as a Docker image layout. + * + */ + public Optional docker() { + return Optional.ofNullable(this.docker); + } + /** + * @return Outputs the build result into a container image format. + * + */ + public Optional image() { + return Optional.ofNullable(this.image); + } + /** + * @return Export to a local directory as files and directories. + * + */ + public Optional local() { + return Optional.ofNullable(this.local); + } + /** + * @return Identical to the Docker exporter but uses OCI media types by default. + * + */ + public Optional oci() { + return Optional.ofNullable(this.oci); + } + /** + * @return A raw string as you would provide it to the Docker CLI (e.g., + * `type=docker`) + * + */ + public Optional raw() { + return Optional.ofNullable(this.raw); + } + /** + * @return Identical to the Image exporter, but pushes by default. + * + */ + public Optional registry() { + return Optional.ofNullable(this.registry); + } + /** + * @return Export to a local directory as a tarball. + * + */ + public Optional tar() { + return Optional.ofNullable(this.tar); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(Export defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable ExportCacheOnly cacheonly; + private @Nullable Boolean disabled; + private @Nullable ExportDocker docker; + private @Nullable ExportImage image; + private @Nullable ExportLocal local; + private @Nullable ExportOCI oci; + private @Nullable String raw; + private @Nullable ExportRegistry registry; + private @Nullable ExportTar tar; + public Builder() {} + public Builder(Export defaults) { + Objects.requireNonNull(defaults); + this.cacheonly = defaults.cacheonly; + this.disabled = defaults.disabled; + this.docker = defaults.docker; + this.image = defaults.image; + this.local = defaults.local; + this.oci = defaults.oci; + this.raw = defaults.raw; + this.registry = defaults.registry; + this.tar = defaults.tar; + } + + @CustomType.Setter + public Builder cacheonly(@Nullable ExportCacheOnly cacheonly) { + + this.cacheonly = cacheonly; + return this; + } + @CustomType.Setter + public Builder disabled(@Nullable Boolean disabled) { + + this.disabled = disabled; + return this; + } + @CustomType.Setter + public Builder docker(@Nullable ExportDocker docker) { + + this.docker = docker; + return this; + } + @CustomType.Setter + public Builder image(@Nullable ExportImage image) { + + this.image = image; + return this; + } + @CustomType.Setter + public Builder local(@Nullable ExportLocal local) { + + this.local = local; + return this; + } + @CustomType.Setter + public Builder oci(@Nullable ExportOCI oci) { + + this.oci = oci; + return this; + } + @CustomType.Setter + public Builder raw(@Nullable String raw) { + + this.raw = raw; + return this; + } + @CustomType.Setter + public Builder registry(@Nullable ExportRegistry registry) { + + this.registry = registry; + return this; + } + @CustomType.Setter + public Builder tar(@Nullable ExportTar tar) { + + this.tar = tar; + return this; + } + public Export build() { + final var _resultValue = new Export(); + _resultValue.cacheonly = cacheonly; + _resultValue.disabled = disabled; + _resultValue.docker = docker; + _resultValue.image = image; + _resultValue.local = local; + _resultValue.oci = oci; + _resultValue.raw = raw; + _resultValue.registry = registry; + _resultValue.tar = tar; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportCacheOnly.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportCacheOnly.java new file mode 100644 index 0000000..f25be65 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportCacheOnly.java @@ -0,0 +1,32 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import java.util.Objects; + +@CustomType +public final class ExportCacheOnly { + private ExportCacheOnly() {} + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(ExportCacheOnly defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + public Builder() {} + public Builder(ExportCacheOnly defaults) { + Objects.requireNonNull(defaults); + } + + public ExportCacheOnly build() { + final var _resultValue = new ExportCacheOnly(); + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportDocker.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportDocker.java new file mode 100644 index 0000000..e96c714 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportDocker.java @@ -0,0 +1,212 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.enums.CompressionType; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class ExportDocker { + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + private @Nullable Map annotations; + /** + * @return The compression type to use. + * + */ + private @Nullable CompressionType compression; + /** + * @return Compression level from 0 to 22. + * + */ + private @Nullable Integer compressionLevel; + /** + * @return The local export path. + * + */ + private @Nullable String dest; + /** + * @return Forcefully apply compression. + * + */ + private @Nullable Boolean forceCompression; + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + private @Nullable List names; + /** + * @return Use OCI media types in exporter manifests. + * + */ + private @Nullable Boolean ociMediaTypes; + /** + * @return Bundle the output into a tarball layout. + * + */ + private @Nullable Boolean tar; + + private ExportDocker() {} + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + public Map annotations() { + return this.annotations == null ? Map.of() : this.annotations; + } + /** + * @return The compression type to use. + * + */ + public Optional compression() { + return Optional.ofNullable(this.compression); + } + /** + * @return Compression level from 0 to 22. + * + */ + public Optional compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + /** + * @return The local export path. + * + */ + public Optional dest() { + return Optional.ofNullable(this.dest); + } + /** + * @return Forcefully apply compression. + * + */ + public Optional forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + public List names() { + return this.names == null ? List.of() : this.names; + } + /** + * @return Use OCI media types in exporter manifests. + * + */ + public Optional ociMediaTypes() { + return Optional.ofNullable(this.ociMediaTypes); + } + /** + * @return Bundle the output into a tarball layout. + * + */ + public Optional tar() { + return Optional.ofNullable(this.tar); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(ExportDocker defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable Map annotations; + private @Nullable CompressionType compression; + private @Nullable Integer compressionLevel; + private @Nullable String dest; + private @Nullable Boolean forceCompression; + private @Nullable List names; + private @Nullable Boolean ociMediaTypes; + private @Nullable Boolean tar; + public Builder() {} + public Builder(ExportDocker defaults) { + Objects.requireNonNull(defaults); + this.annotations = defaults.annotations; + this.compression = defaults.compression; + this.compressionLevel = defaults.compressionLevel; + this.dest = defaults.dest; + this.forceCompression = defaults.forceCompression; + this.names = defaults.names; + this.ociMediaTypes = defaults.ociMediaTypes; + this.tar = defaults.tar; + } + + @CustomType.Setter + public Builder annotations(@Nullable Map annotations) { + + this.annotations = annotations; + return this; + } + @CustomType.Setter + public Builder compression(@Nullable CompressionType compression) { + + this.compression = compression; + return this; + } + @CustomType.Setter + public Builder compressionLevel(@Nullable Integer compressionLevel) { + + this.compressionLevel = compressionLevel; + return this; + } + @CustomType.Setter + public Builder dest(@Nullable String dest) { + + this.dest = dest; + return this; + } + @CustomType.Setter + public Builder forceCompression(@Nullable Boolean forceCompression) { + + this.forceCompression = forceCompression; + return this; + } + @CustomType.Setter + public Builder names(@Nullable List names) { + + this.names = names; + return this; + } + public Builder names(String... names) { + return names(List.of(names)); + } + @CustomType.Setter + public Builder ociMediaTypes(@Nullable Boolean ociMediaTypes) { + + this.ociMediaTypes = ociMediaTypes; + return this; + } + @CustomType.Setter + public Builder tar(@Nullable Boolean tar) { + + this.tar = tar; + return this; + } + public ExportDocker build() { + final var _resultValue = new ExportDocker(); + _resultValue.annotations = annotations; + _resultValue.compression = compression; + _resultValue.compressionLevel = compressionLevel; + _resultValue.dest = dest; + _resultValue.forceCompression = forceCompression; + _resultValue.names = names; + _resultValue.ociMediaTypes = ociMediaTypes; + _resultValue.tar = tar; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportImage.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportImage.java new file mode 100644 index 0000000..4b59e2f --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportImage.java @@ -0,0 +1,331 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.enums.CompressionType; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class ExportImage { + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + private @Nullable Map annotations; + /** + * @return The compression type to use. + * + */ + private @Nullable CompressionType compression; + /** + * @return Compression level from 0 to 22. + * + */ + private @Nullable Integer compressionLevel; + /** + * @return Name image with `prefix@<digest>`, used for anonymous images. + * + */ + private @Nullable String danglingNamePrefix; + /** + * @return Forcefully apply compression. + * + */ + private @Nullable Boolean forceCompression; + /** + * @return Allow pushing to an insecure registry. + * + */ + private @Nullable Boolean insecure; + /** + * @return Add additional canonical name (`name@<digest>`). + * + */ + private @Nullable Boolean nameCanonical; + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + private @Nullable List names; + /** + * @return Use OCI media types in exporter manifests. + * + */ + private @Nullable Boolean ociMediaTypes; + /** + * @return Push after creating the image. Defaults to `false`. + * + */ + private @Nullable Boolean push; + /** + * @return Push image without name. + * + */ + private @Nullable Boolean pushByDigest; + /** + * @return Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + */ + private @Nullable Boolean store; + /** + * @return Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + */ + private @Nullable Boolean unpack; + + private ExportImage() {} + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + public Map annotations() { + return this.annotations == null ? Map.of() : this.annotations; + } + /** + * @return The compression type to use. + * + */ + public Optional compression() { + return Optional.ofNullable(this.compression); + } + /** + * @return Compression level from 0 to 22. + * + */ + public Optional compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + /** + * @return Name image with `prefix@<digest>`, used for anonymous images. + * + */ + public Optional danglingNamePrefix() { + return Optional.ofNullable(this.danglingNamePrefix); + } + /** + * @return Forcefully apply compression. + * + */ + public Optional forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + /** + * @return Allow pushing to an insecure registry. + * + */ + public Optional insecure() { + return Optional.ofNullable(this.insecure); + } + /** + * @return Add additional canonical name (`name@<digest>`). + * + */ + public Optional nameCanonical() { + return Optional.ofNullable(this.nameCanonical); + } + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + public List names() { + return this.names == null ? List.of() : this.names; + } + /** + * @return Use OCI media types in exporter manifests. + * + */ + public Optional ociMediaTypes() { + return Optional.ofNullable(this.ociMediaTypes); + } + /** + * @return Push after creating the image. Defaults to `false`. + * + */ + public Optional push() { + return Optional.ofNullable(this.push); + } + /** + * @return Push image without name. + * + */ + public Optional pushByDigest() { + return Optional.ofNullable(this.pushByDigest); + } + /** + * @return Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + */ + public Optional store() { + return Optional.ofNullable(this.store); + } + /** + * @return Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + */ + public Optional unpack() { + return Optional.ofNullable(this.unpack); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(ExportImage defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable Map annotations; + private @Nullable CompressionType compression; + private @Nullable Integer compressionLevel; + private @Nullable String danglingNamePrefix; + private @Nullable Boolean forceCompression; + private @Nullable Boolean insecure; + private @Nullable Boolean nameCanonical; + private @Nullable List names; + private @Nullable Boolean ociMediaTypes; + private @Nullable Boolean push; + private @Nullable Boolean pushByDigest; + private @Nullable Boolean store; + private @Nullable Boolean unpack; + public Builder() {} + public Builder(ExportImage defaults) { + Objects.requireNonNull(defaults); + this.annotations = defaults.annotations; + this.compression = defaults.compression; + this.compressionLevel = defaults.compressionLevel; + this.danglingNamePrefix = defaults.danglingNamePrefix; + this.forceCompression = defaults.forceCompression; + this.insecure = defaults.insecure; + this.nameCanonical = defaults.nameCanonical; + this.names = defaults.names; + this.ociMediaTypes = defaults.ociMediaTypes; + this.push = defaults.push; + this.pushByDigest = defaults.pushByDigest; + this.store = defaults.store; + this.unpack = defaults.unpack; + } + + @CustomType.Setter + public Builder annotations(@Nullable Map annotations) { + + this.annotations = annotations; + return this; + } + @CustomType.Setter + public Builder compression(@Nullable CompressionType compression) { + + this.compression = compression; + return this; + } + @CustomType.Setter + public Builder compressionLevel(@Nullable Integer compressionLevel) { + + this.compressionLevel = compressionLevel; + return this; + } + @CustomType.Setter + public Builder danglingNamePrefix(@Nullable String danglingNamePrefix) { + + this.danglingNamePrefix = danglingNamePrefix; + return this; + } + @CustomType.Setter + public Builder forceCompression(@Nullable Boolean forceCompression) { + + this.forceCompression = forceCompression; + return this; + } + @CustomType.Setter + public Builder insecure(@Nullable Boolean insecure) { + + this.insecure = insecure; + return this; + } + @CustomType.Setter + public Builder nameCanonical(@Nullable Boolean nameCanonical) { + + this.nameCanonical = nameCanonical; + return this; + } + @CustomType.Setter + public Builder names(@Nullable List names) { + + this.names = names; + return this; + } + public Builder names(String... names) { + return names(List.of(names)); + } + @CustomType.Setter + public Builder ociMediaTypes(@Nullable Boolean ociMediaTypes) { + + this.ociMediaTypes = ociMediaTypes; + return this; + } + @CustomType.Setter + public Builder push(@Nullable Boolean push) { + + this.push = push; + return this; + } + @CustomType.Setter + public Builder pushByDigest(@Nullable Boolean pushByDigest) { + + this.pushByDigest = pushByDigest; + return this; + } + @CustomType.Setter + public Builder store(@Nullable Boolean store) { + + this.store = store; + return this; + } + @CustomType.Setter + public Builder unpack(@Nullable Boolean unpack) { + + this.unpack = unpack; + return this; + } + public ExportImage build() { + final var _resultValue = new ExportImage(); + _resultValue.annotations = annotations; + _resultValue.compression = compression; + _resultValue.compressionLevel = compressionLevel; + _resultValue.danglingNamePrefix = danglingNamePrefix; + _resultValue.forceCompression = forceCompression; + _resultValue.insecure = insecure; + _resultValue.nameCanonical = nameCanonical; + _resultValue.names = names; + _resultValue.ociMediaTypes = ociMediaTypes; + _resultValue.push = push; + _resultValue.pushByDigest = pushByDigest; + _resultValue.store = store; + _resultValue.unpack = unpack; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportLocal.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportLocal.java new file mode 100644 index 0000000..c09cc50 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportLocal.java @@ -0,0 +1,58 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + +@CustomType +public final class ExportLocal { + /** + * @return Output path. + * + */ + private String dest; + + private ExportLocal() {} + /** + * @return Output path. + * + */ + public String dest() { + return this.dest; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(ExportLocal defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String dest; + public Builder() {} + public Builder(ExportLocal defaults) { + Objects.requireNonNull(defaults); + this.dest = defaults.dest; + } + + @CustomType.Setter + public Builder dest(String dest) { + if (dest == null) { + throw new MissingRequiredPropertyException("ExportLocal", "dest"); + } + this.dest = dest; + return this; + } + public ExportLocal build() { + final var _resultValue = new ExportLocal(); + _resultValue.dest = dest; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportOCI.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportOCI.java new file mode 100644 index 0000000..bd0d6d7 --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportOCI.java @@ -0,0 +1,212 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.enums.CompressionType; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class ExportOCI { + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + private @Nullable Map annotations; + /** + * @return The compression type to use. + * + */ + private @Nullable CompressionType compression; + /** + * @return Compression level from 0 to 22. + * + */ + private @Nullable Integer compressionLevel; + /** + * @return The local export path. + * + */ + private @Nullable String dest; + /** + * @return Forcefully apply compression. + * + */ + private @Nullable Boolean forceCompression; + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + private @Nullable List names; + /** + * @return Use OCI media types in exporter manifests. + * + */ + private @Nullable Boolean ociMediaTypes; + /** + * @return Bundle the output into a tarball layout. + * + */ + private @Nullable Boolean tar; + + private ExportOCI() {} + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + public Map annotations() { + return this.annotations == null ? Map.of() : this.annotations; + } + /** + * @return The compression type to use. + * + */ + public Optional compression() { + return Optional.ofNullable(this.compression); + } + /** + * @return Compression level from 0 to 22. + * + */ + public Optional compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + /** + * @return The local export path. + * + */ + public Optional dest() { + return Optional.ofNullable(this.dest); + } + /** + * @return Forcefully apply compression. + * + */ + public Optional forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + public List names() { + return this.names == null ? List.of() : this.names; + } + /** + * @return Use OCI media types in exporter manifests. + * + */ + public Optional ociMediaTypes() { + return Optional.ofNullable(this.ociMediaTypes); + } + /** + * @return Bundle the output into a tarball layout. + * + */ + public Optional tar() { + return Optional.ofNullable(this.tar); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(ExportOCI defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable Map annotations; + private @Nullable CompressionType compression; + private @Nullable Integer compressionLevel; + private @Nullable String dest; + private @Nullable Boolean forceCompression; + private @Nullable List names; + private @Nullable Boolean ociMediaTypes; + private @Nullable Boolean tar; + public Builder() {} + public Builder(ExportOCI defaults) { + Objects.requireNonNull(defaults); + this.annotations = defaults.annotations; + this.compression = defaults.compression; + this.compressionLevel = defaults.compressionLevel; + this.dest = defaults.dest; + this.forceCompression = defaults.forceCompression; + this.names = defaults.names; + this.ociMediaTypes = defaults.ociMediaTypes; + this.tar = defaults.tar; + } + + @CustomType.Setter + public Builder annotations(@Nullable Map annotations) { + + this.annotations = annotations; + return this; + } + @CustomType.Setter + public Builder compression(@Nullable CompressionType compression) { + + this.compression = compression; + return this; + } + @CustomType.Setter + public Builder compressionLevel(@Nullable Integer compressionLevel) { + + this.compressionLevel = compressionLevel; + return this; + } + @CustomType.Setter + public Builder dest(@Nullable String dest) { + + this.dest = dest; + return this; + } + @CustomType.Setter + public Builder forceCompression(@Nullable Boolean forceCompression) { + + this.forceCompression = forceCompression; + return this; + } + @CustomType.Setter + public Builder names(@Nullable List names) { + + this.names = names; + return this; + } + public Builder names(String... names) { + return names(List.of(names)); + } + @CustomType.Setter + public Builder ociMediaTypes(@Nullable Boolean ociMediaTypes) { + + this.ociMediaTypes = ociMediaTypes; + return this; + } + @CustomType.Setter + public Builder tar(@Nullable Boolean tar) { + + this.tar = tar; + return this; + } + public ExportOCI build() { + final var _resultValue = new ExportOCI(); + _resultValue.annotations = annotations; + _resultValue.compression = compression; + _resultValue.compressionLevel = compressionLevel; + _resultValue.dest = dest; + _resultValue.forceCompression = forceCompression; + _resultValue.names = names; + _resultValue.ociMediaTypes = ociMediaTypes; + _resultValue.tar = tar; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportRegistry.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportRegistry.java new file mode 100644 index 0000000..ce2f4cb --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportRegistry.java @@ -0,0 +1,331 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.dockerbuild.enums.CompressionType; +import java.lang.Boolean; +import java.lang.Integer; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class ExportRegistry { + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + private @Nullable Map annotations; + /** + * @return The compression type to use. + * + */ + private @Nullable CompressionType compression; + /** + * @return Compression level from 0 to 22. + * + */ + private @Nullable Integer compressionLevel; + /** + * @return Name image with `prefix@<digest>`, used for anonymous images. + * + */ + private @Nullable String danglingNamePrefix; + /** + * @return Forcefully apply compression. + * + */ + private @Nullable Boolean forceCompression; + /** + * @return Allow pushing to an insecure registry. + * + */ + private @Nullable Boolean insecure; + /** + * @return Add additional canonical name (`name@<digest>`). + * + */ + private @Nullable Boolean nameCanonical; + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + private @Nullable List names; + /** + * @return Use OCI media types in exporter manifests. + * + */ + private @Nullable Boolean ociMediaTypes; + /** + * @return Push after creating the image. Defaults to `true`. + * + */ + private @Nullable Boolean push; + /** + * @return Push image without name. + * + */ + private @Nullable Boolean pushByDigest; + /** + * @return Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + */ + private @Nullable Boolean store; + /** + * @return Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + */ + private @Nullable Boolean unpack; + + private ExportRegistry() {} + /** + * @return Attach an arbitrary key/value annotation to the image. + * + */ + public Map annotations() { + return this.annotations == null ? Map.of() : this.annotations; + } + /** + * @return The compression type to use. + * + */ + public Optional compression() { + return Optional.ofNullable(this.compression); + } + /** + * @return Compression level from 0 to 22. + * + */ + public Optional compressionLevel() { + return Optional.ofNullable(this.compressionLevel); + } + /** + * @return Name image with `prefix@<digest>`, used for anonymous images. + * + */ + public Optional danglingNamePrefix() { + return Optional.ofNullable(this.danglingNamePrefix); + } + /** + * @return Forcefully apply compression. + * + */ + public Optional forceCompression() { + return Optional.ofNullable(this.forceCompression); + } + /** + * @return Allow pushing to an insecure registry. + * + */ + public Optional insecure() { + return Optional.ofNullable(this.insecure); + } + /** + * @return Add additional canonical name (`name@<digest>`). + * + */ + public Optional nameCanonical() { + return Optional.ofNullable(this.nameCanonical); + } + /** + * @return Specify images names to export. This is overridden if tags are already specified. + * + */ + public List names() { + return this.names == null ? List.of() : this.names; + } + /** + * @return Use OCI media types in exporter manifests. + * + */ + public Optional ociMediaTypes() { + return Optional.ofNullable(this.ociMediaTypes); + } + /** + * @return Push after creating the image. Defaults to `true`. + * + */ + public Optional push() { + return Optional.ofNullable(this.push); + } + /** + * @return Push image without name. + * + */ + public Optional pushByDigest() { + return Optional.ofNullable(this.pushByDigest); + } + /** + * @return Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + * + */ + public Optional store() { + return Optional.ofNullable(this.store); + } + /** + * @return Unpack image after creation (for use with containerd). Defaults to + * `false`. + * + */ + public Optional unpack() { + return Optional.ofNullable(this.unpack); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(ExportRegistry defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private @Nullable Map annotations; + private @Nullable CompressionType compression; + private @Nullable Integer compressionLevel; + private @Nullable String danglingNamePrefix; + private @Nullable Boolean forceCompression; + private @Nullable Boolean insecure; + private @Nullable Boolean nameCanonical; + private @Nullable List names; + private @Nullable Boolean ociMediaTypes; + private @Nullable Boolean push; + private @Nullable Boolean pushByDigest; + private @Nullable Boolean store; + private @Nullable Boolean unpack; + public Builder() {} + public Builder(ExportRegistry defaults) { + Objects.requireNonNull(defaults); + this.annotations = defaults.annotations; + this.compression = defaults.compression; + this.compressionLevel = defaults.compressionLevel; + this.danglingNamePrefix = defaults.danglingNamePrefix; + this.forceCompression = defaults.forceCompression; + this.insecure = defaults.insecure; + this.nameCanonical = defaults.nameCanonical; + this.names = defaults.names; + this.ociMediaTypes = defaults.ociMediaTypes; + this.push = defaults.push; + this.pushByDigest = defaults.pushByDigest; + this.store = defaults.store; + this.unpack = defaults.unpack; + } + + @CustomType.Setter + public Builder annotations(@Nullable Map annotations) { + + this.annotations = annotations; + return this; + } + @CustomType.Setter + public Builder compression(@Nullable CompressionType compression) { + + this.compression = compression; + return this; + } + @CustomType.Setter + public Builder compressionLevel(@Nullable Integer compressionLevel) { + + this.compressionLevel = compressionLevel; + return this; + } + @CustomType.Setter + public Builder danglingNamePrefix(@Nullable String danglingNamePrefix) { + + this.danglingNamePrefix = danglingNamePrefix; + return this; + } + @CustomType.Setter + public Builder forceCompression(@Nullable Boolean forceCompression) { + + this.forceCompression = forceCompression; + return this; + } + @CustomType.Setter + public Builder insecure(@Nullable Boolean insecure) { + + this.insecure = insecure; + return this; + } + @CustomType.Setter + public Builder nameCanonical(@Nullable Boolean nameCanonical) { + + this.nameCanonical = nameCanonical; + return this; + } + @CustomType.Setter + public Builder names(@Nullable List names) { + + this.names = names; + return this; + } + public Builder names(String... names) { + return names(List.of(names)); + } + @CustomType.Setter + public Builder ociMediaTypes(@Nullable Boolean ociMediaTypes) { + + this.ociMediaTypes = ociMediaTypes; + return this; + } + @CustomType.Setter + public Builder push(@Nullable Boolean push) { + + this.push = push; + return this; + } + @CustomType.Setter + public Builder pushByDigest(@Nullable Boolean pushByDigest) { + + this.pushByDigest = pushByDigest; + return this; + } + @CustomType.Setter + public Builder store(@Nullable Boolean store) { + + this.store = store; + return this; + } + @CustomType.Setter + public Builder unpack(@Nullable Boolean unpack) { + + this.unpack = unpack; + return this; + } + public ExportRegistry build() { + final var _resultValue = new ExportRegistry(); + _resultValue.annotations = annotations; + _resultValue.compression = compression; + _resultValue.compressionLevel = compressionLevel; + _resultValue.danglingNamePrefix = danglingNamePrefix; + _resultValue.forceCompression = forceCompression; + _resultValue.insecure = insecure; + _resultValue.nameCanonical = nameCanonical; + _resultValue.names = names; + _resultValue.ociMediaTypes = ociMediaTypes; + _resultValue.push = push; + _resultValue.pushByDigest = pushByDigest; + _resultValue.store = store; + _resultValue.unpack = unpack; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportTar.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportTar.java new file mode 100644 index 0000000..44dd20b --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/ExportTar.java @@ -0,0 +1,58 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; + +@CustomType +public final class ExportTar { + /** + * @return Output path. + * + */ + private String dest; + + private ExportTar() {} + /** + * @return Output path. + * + */ + public String dest() { + return this.dest; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(ExportTar defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String dest; + public Builder() {} + public Builder(ExportTar defaults) { + Objects.requireNonNull(defaults); + this.dest = defaults.dest; + } + + @CustomType.Setter + public Builder dest(String dest) { + if (dest == null) { + throw new MissingRequiredPropertyException("ExportTar", "dest"); + } + this.dest = dest; + return this; + } + public ExportTar build() { + final var _resultValue = new ExportTar(); + _resultValue.dest = dest; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Registry.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Registry.java new file mode 100644 index 0000000..f1853fc --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/Registry.java @@ -0,0 +1,102 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; +import javax.annotation.Nullable; + +@CustomType +public final class Registry { + /** + * @return The registry's address (e.g. "docker.io"). + * + */ + private String address; + /** + * @return Password or token for the registry. + * + */ + private @Nullable String password; + /** + * @return Username for the registry. + * + */ + private @Nullable String username; + + private Registry() {} + /** + * @return The registry's address (e.g. "docker.io"). + * + */ + public String address() { + return this.address; + } + /** + * @return Password or token for the registry. + * + */ + public Optional password() { + return Optional.ofNullable(this.password); + } + /** + * @return Username for the registry. + * + */ + public Optional username() { + return Optional.ofNullable(this.username); + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(Registry defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String address; + private @Nullable String password; + private @Nullable String username; + public Builder() {} + public Builder(Registry defaults) { + Objects.requireNonNull(defaults); + this.address = defaults.address; + this.password = defaults.password; + this.username = defaults.username; + } + + @CustomType.Setter + public Builder address(String address) { + if (address == null) { + throw new MissingRequiredPropertyException("Registry", "address"); + } + this.address = address; + return this; + } + @CustomType.Setter + public Builder password(@Nullable String password) { + + this.password = password; + return this; + } + @CustomType.Setter + public Builder username(@Nullable String username) { + + this.username = username; + return this; + } + public Registry build() { + final var _resultValue = new Registry(); + _resultValue.address = address; + _resultValue.password = password; + _resultValue.username = username; + return _resultValue; + } + } +} diff --git a/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/SSH.java b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/SSH.java new file mode 100644 index 0000000..48bcf4c --- /dev/null +++ b/sdk/java/src/main/java/com/pulumi/dockerbuild/outputs/SSH.java @@ -0,0 +1,104 @@ +// *** WARNING: this file was generated by pulumi. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +package com.pulumi.dockerbuild.outputs; + +import com.pulumi.core.annotations.CustomType; +import com.pulumi.exceptions.MissingRequiredPropertyException; +import java.lang.String; +import java.util.List; +import java.util.Objects; +import javax.annotation.Nullable; + +@CustomType +public final class SSH { + /** + * @return Useful for distinguishing different servers that are part of the same + * build. + * + * A value of `default` is appropriate if only dealing with a single host. + * + */ + private String id; + /** + * @return SSH agent socket or private keys to expose to the build under the given + * identifier. + * + * Defaults to `[$SSH_AUTH_SOCK]`. + * + * Note that your keys are **not** automatically added when using an + * agent. Run `ssh-add -l` locally to confirm which public keys are + * visible to the agent; these will be exposed to your build. + * + */ + private @Nullable List paths; + + private SSH() {} + /** + * @return Useful for distinguishing different servers that are part of the same + * build. + * + * A value of `default` is appropriate if only dealing with a single host. + * + */ + public String id() { + return this.id; + } + /** + * @return SSH agent socket or private keys to expose to the build under the given + * identifier. + * + * Defaults to `[$SSH_AUTH_SOCK]`. + * + * Note that your keys are **not** automatically added when using an + * agent. Run `ssh-add -l` locally to confirm which public keys are + * visible to the agent; these will be exposed to your build. + * + */ + public List paths() { + return this.paths == null ? List.of() : this.paths; + } + + public static Builder builder() { + return new Builder(); + } + + public static Builder builder(SSH defaults) { + return new Builder(defaults); + } + @CustomType.Builder + public static final class Builder { + private String id; + private @Nullable List paths; + public Builder() {} + public Builder(SSH defaults) { + Objects.requireNonNull(defaults); + this.id = defaults.id; + this.paths = defaults.paths; + } + + @CustomType.Setter + public Builder id(String id) { + if (id == null) { + throw new MissingRequiredPropertyException("SSH", "id"); + } + this.id = id; + return this; + } + @CustomType.Setter + public Builder paths(@Nullable List paths) { + + this.paths = paths; + return this; + } + public Builder paths(String... paths) { + return paths(List.of(paths)); + } + public SSH build() { + final var _resultValue = new SSH(); + _resultValue.id = id; + _resultValue.paths = paths; + return _resultValue; + } + } +} diff --git a/sdk/nodejs/README.md b/sdk/nodejs/README.md index 4a0b457..a4a8af5 100644 --- a/sdk/nodejs/README.md +++ b/sdk/nodejs/README.md @@ -1,106 +1,23 @@ -# Pulumi Native Provider Boilerplate +[![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) +[![NPM version](https://badge.fury.io/js/%40pulumi%2fdocker-build.svg)](https://www.npmjs.com/package/@pulumi/docker-build) +[![Python version](https://badge.fury.io/py/pulumi-docker-build.svg)](https://pypi.org/project/pulumi-docker-build) +[![NuGet version](https://badge.fury.io/nu/pulumi.dockerbuild.svg)](https://badge.fury.io/nu/pulumi.dockerbuild) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-docker-build/sdk/go)](https://pkg.go.dev/github.com/pulumi/pulumi-docker-build/sdk/go) +[![License](https://img.shields.io/npm/l/%40pulumi%2Fpulumi.svg)](https://github.com/pulumi/pulumi-docker-build/blob/main/LICENSE) -This repository is a boilerplate showing how to create and locally test a native Pulumi provider. +# Docker-Build Resource Provider -## Authoring a Pulumi Native Provider +A [Pulumi](http://pulumi.com) provider for building modern Docker images with [buildx](https://docs.docker.com/build/architecture/) and [BuildKit](https://docs.docker.com/build/buildkit/). -This boilerplate creates a working Pulumi-owned provider named `xyz`. -It implements a random number generator that you can [build and test out for yourself](#test-against-the-example) and then replace the Random code with code specific to your provider. +Not to be confused with the earlier +[Docker](http://github.com/pulumi/pulumi-docker) provider, which is still +appropriate for managing resources unrelated to building images. +| Provider | Use cases | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `@pulumi/docker-build` | Anything related to building images with `docker build`. | +| `@pulumi/docker` | Everything else -- including running containers and creating networks. | -### Prerequisites +## Reference -Prerequisites for this repository are already satisfied by the [Pulumi Devcontainer](https://github.com/pulumi/devcontainer) if you are using Github Codespaces, or VSCode. - -If you are not using VSCode, you will need to ensure the following tools are installed and present in your `$PATH`: - -* [`pulumictl`](https://github.com/pulumi/pulumictl#installation) -* [Go 1.21](https://golang.org/dl/) or 1.latest -* [NodeJS](https://nodejs.org/en/) 14.x. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS installations. -* [Yarn](https://yarnpkg.com/) -* [TypeScript](https://www.typescriptlang.org/) -* [Python](https://www.python.org/downloads/) (called as `python3`). For recent versions of MacOS, the system-installed version is fine. -* [.NET](https://dotnet.microsoft.com/download) - - -### Build & test the boilerplate XYZ provider - -1. Create a new Github CodeSpaces environment using this repository. -1. Open a terminal in the CodeSpaces environment. -1. Run `make build install` to build and install the provider. -1. Run `make gen_examples` to generate the example programs in `examples/` off of the source `examples/yaml` example program. -1. Run `make up` to run the example program in `examples/yaml`. -1. Run `make down` to tear down the example program. - -### Creating a new provider repository - -Pulumi offers this repository as a [GitHub template repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) for convenience. From this repository: - -1. Click "Use this template". -1. Set the following options: - * Owner: pulumi - * Repository name: pulumi-xyz-native (replace "xyz" with the name of your provider) - * Description: Pulumi provider for xyz - * Repository type: Public -1. Clone the generated repository. - -From the templated repository: - -1. Search-replace `xyz` with the name of your desired provider. - -#### Build the provider and install the plugin - - ```bash - $ make build install - ``` - -This will: - -1. Create the SDK codegen binary and place it in a `./bin` folder (gitignored) -2. Create the provider binary and place it in the `./bin` folder (gitignored) -3. Generate the dotnet, Go, Node, and Python SDKs and place them in the `./sdk` folder -4. Install the provider on your machine. - -#### Test against the example - -```bash -$ cd examples/simple -$ yarn link @pulumi/xyz -$ yarn install -$ pulumi stack init test -$ pulumi up -``` - -Now that you have completed all of the above steps, you have a working provider that generates a random string for you. - -#### A brief repository overview - -You now have: - -1. A `provider/` folder containing the building and implementation logic - 1. `cmd/pulumi-resource-xyz/main.go` - holds the provider's sample implementation logic. -2. `deployment-templates` - a set of files to help you around deployment and publication -3. `sdk` - holds the generated code libraries created by `pulumi-gen-xyz/main.go` -4. `examples` a folder of Pulumi programs to try locally and/or use in CI. -5. A `Makefile` and this `README`. - -#### Additional Details - -This repository depends on the pulumi-go-provider library. For more details on building providers, please check -the [Pulumi Go Provider docs](https://github.com/pulumi/pulumi-go-provider). - -### Build Examples - -Create an example program using the resources defined in your provider, and place it in the `examples/` folder. - -You can now repeat the steps for [build, install, and test](#test-against-the-example). - -## Configuring CI and releases - -1. Follow the instructions laid out in the [deployment templates](./deployment-templates/README-DEPLOYMENT.md). - -## References - -Other resources/examples for implementing providers: -* [Pulumi Command provider](https://github.com/pulumi/pulumi-command/blob/master/provider/pkg/provider/provider.go) -* [Pulumi Go Provider repository](https://github.com/pulumi/pulumi-go-provider) +For more information, including examples and migration guidance, please see the Docker-Build provider's detailed [API documentation](https://www.pulumi.com/registry/packages/docker-build/). diff --git a/sdk/nodejs/config/index.ts b/sdk/nodejs/config/index.ts new file mode 100644 index 0000000..3fbadc8 --- /dev/null +++ b/sdk/nodejs/config/index.ts @@ -0,0 +1,5 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +// Export members: +export * from "./vars"; diff --git a/sdk/nodejs/config/vars.ts b/sdk/nodejs/config/vars.ts new file mode 100644 index 0000000..4a074ee --- /dev/null +++ b/sdk/nodejs/config/vars.ts @@ -0,0 +1,31 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "../types/input"; +import * as outputs from "../types/output"; +import * as enums from "../types/enums"; +import * as utilities from "../utilities"; + +declare var exports: any; +const __config = new pulumi.Config("docker-build"); + +/** + * The build daemon's address. + */ +export declare const host: string; +Object.defineProperty(exports, "host", { + get() { + return __config.get("host") ?? (utilities.getEnv("DOCKER_HOST") || ""); + }, + enumerable: true, +}); + +export declare const registries: outputs.Registry[] | undefined; +Object.defineProperty(exports, "registries", { + get() { + return __config.getObject("registries"); + }, + enumerable: true, +}); + diff --git a/sdk/nodejs/image.ts b/sdk/nodejs/image.ts new file mode 100644 index 0000000..535dae5 --- /dev/null +++ b/sdk/nodejs/image.ts @@ -0,0 +1,984 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as enums from "./types/enums"; +import * as utilities from "./utilities"; + +/** + * A Docker image built using buildx -- Docker's interface to the improved + * BuildKit backend. + * + * ## Stability + * + * **This resource is pre-1.0 and in public preview.** + * + * We will strive to keep APIs and behavior as stable as possible, but we + * cannot guarantee stability until version 1.0. + * + * ## Migrating Pulumi Docker v3 and v4 Image resources + * + * This provider's `Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider. + * Existing `Image` resources can be converted to the docker-build `Image` resources with minor modifications. + * + * ### Behavioral differences + * + * There are several key behavioral differences to keep in mind when transitioning images to the new `Image` resource. + * + * #### Previews + * + * Version `3.x` of the Pulumi Docker provider always builds images during preview operations. + * This is helpful as a safeguard to prevent "broken" images from merging, but users found the behavior unnecessarily redundant when running previews and updates locally. + * + * 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. + * Several users reported outages due to the default behavior allowing bad images to accidentally sneak through CI. + * + * The default behavior of this provider's `Image` resource is similar to `3.x` and will build images during previews. + * This behavior can be changed by specifying `buildOnPreview`. + * + * #### Push behavior + * + * 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. + * + * This provider's `Image` resource matches the Docker CLI's behavior and does not push images anywhere by default. + * + * To push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`). + * Like Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally. + * + * #### Secrets + * + * Version `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field. + * + * Version `4.x` of the Pulumi Docker provider does not support secrets. + * + * The `Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables. + * Instead, they should be passed directly as values. + * (Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).) + * Pulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments. + * + * #### Caching + * + * Version `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`. + * It builds targets individually and pushes them to separate images for caching. + * + * Version `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches. + * + * Both versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior. + * This can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc. + * + * The `Image` resource delegates all caching behavior to Docker. + * `cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc. + * + * #### Outputs + * + * Versions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest. + * In `4.x` this could also be a single sha256 hash if the image wasn't pushed. + * + * Unlike earlier providers the `Image` resource can push multiple tags. + * As a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed. + * If multiple tags were pushed this uses one at random. + * + * If you need more control over tag references you can use the `digest` output, which is always a single sha256 hash as long as the image was exported somewhere. + * + * #### Tag deletion and refreshes + * + * Versions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` resource is deleted, nor do they confirm expected tags exist during `refresh` operations. + * + * The `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist. + * If any are missing a subsequent `update` will push them. + * + * When a `Image` is deleted, it will _attempt_ to also delete any pushed tags. + * Deletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular). + * Manifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace. + * + * Use the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted. + * + * ### Example migration + * + * Examples of "fully-featured" `v3` and `v4` `Image` resources are shown below, along with an example `Image` resource showing how they would look after migration. + * + * The `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`. + * After migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`. + * In almost all cases, properties of `Image` are named after the Docker CLI flag they correspond to. + * + * The `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`. + * It it is shown with parameters similar to the `v3` example for completeness. + * + * ## Example Usage + * ### v3/v4 migration + * + * ```typescript + * + * // v3 Image + * const v3 = new docker.Image("v3-image", { + * imageName: "myregistry.com/user/repo:latest", + * localImageName: "local-tag", + * skipPush: false, + * build: { + * dockerfile: "./Dockerfile", + * context: "../app", + * target: "mytarget", + * args: { + * MY_BUILD_ARG: "foo", + * }, + * env: { + * DOCKER_BUILDKIT: "1", + * }, + * extraOptions: [ + * "--cache-from", + * "type=registry,myregistry.com/user/repo:cache", + * "--cache-to", + * "type=registry,myregistry.com/user/repo:cache", + * "--add-host", + * "metadata.google.internal:169.254.169.254", + * "--secret", + * "id=mysecret,src=/local/secret", + * "--ssh", + * "default=/home/runner/.ssh/id_ed25519", + * "--network", + * "host", + * "--platform", + * "linux/amd64", + * ], + * }, + * registry: { + * server: "myregistry.com", + * username: "username", + * password: pulumi.secret("password"), + * }, + * }); + * + * // v3 Image after migrating to docker-build.Image + * const v3Migrated = new dockerbuild.Image("v3-to-buildx", { + * tags: ["myregistry.com/user/repo:latest", "local-tag"], + * push: true, + * dockerfile: { + * location: "./Dockerfile", + * }, + * context: { + * location: "../app", + * }, + * target: "mytarget", + * buildArgs: { + * MY_BUILD_ARG: "foo", + * }, + * cacheFrom: [{ registry: { ref: "myregistry.com/user/repo:cache" } }], + * cacheTo: [{ registry: { ref: "myregistry.com/user/repo:cache" } }], + * secrets: { + * mysecret: "value", + * }, + * addHosts: ["metadata.google.internal:169.254.169.254"], + * ssh: { + * default: ["/home/runner/.ssh/id_ed25519"], + * }, + * network: "host", + * platforms: ["linux/amd64"], + * registries: [{ + * address: "myregistry.com", + * username: "username", + * password: pulumi.secret("password"), + * }], + * }); + * + * + * // v4 Image + * const v4 = new docker.Image("v4-image", { + * imageName: "myregistry.com/user/repo:latest", + * skipPush: false, + * build: { + * dockerfile: "./Dockerfile", + * context: "../app", + * target: "mytarget", + * args: { + * MY_BUILD_ARG: "foo", + * }, + * cacheFrom: { + * images: ["myregistry.com/user/repo:cache"], + * }, + * addHosts: ["metadata.google.internal:169.254.169.254"], + * network: "host", + * platform: "linux/amd64", + * }, + * buildOnPreview: true, + * registry: { + * server: "myregistry.com", + * username: "username", + * password: pulumi.secret("password"), + * }, + * }); + * + * // v4 Image after migrating to docker-build.Image + * const v4Migrated = new dockerbuild.Image("v4-to-buildx", { + * tags: ["myregistry.com/user/repo:latest"], + * push: true, + * dockerfile: { + * location: "./Dockerfile", + * }, + * context: { + * location: "../app", + * }, + * target: "mytarget", + * buildArgs: { + * MY_BUILD_ARG: "foo", + * }, + * cacheFrom: [{ registry: { ref: "myregistry.com/user/repo:cache" } }], + * cacheTo: [{ registry: { ref: "myregistry.com/user/repo:cache" } }], + * addHosts: ["metadata.google.internal:169.254.169.254"], + * network: "host", + * platforms: ["linux/amd64"], + * registries: [{ + * address: "myregistry.com", + * username: "username", + * password: pulumi.secret("password"), + * }], + * }); + * + * ``` + * + * ## Example Usage + * ### Push to AWS ECR with caching + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as aws from "@pulumi/aws"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const ecrRepository = new aws.ecr.Repository("ecr-repository", {}); + * const authToken = aws.ecr.getAuthorizationTokenOutput({ + * registryId: ecrRepository.registryId, + * }); + * const myImage = new docker_build.Image("my-image", { + * cacheFrom: [{ + * registry: { + * ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`, + * }, + * }], + * cacheTo: [{ + * registry: { + * imageManifest: true, + * ociMediaTypes: true, + * ref: pulumi.interpolate`${ecrRepository.repositoryUrl}:cache`, + * }, + * }], + * context: { + * location: "./app", + * }, + * push: true, + * registries: [{ + * address: ecrRepository.repositoryUrl, + * password: authToken.apply(authToken => authToken.password), + * username: authToken.apply(authToken => authToken.userName), + * }], + * tags: [pulumi.interpolate`${ecrRepository.repositoryUrl}:latest`], + * }); + * export const ref = myImage.ref; + * ``` + * ### Multi-platform image + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const image = new docker_build.Image("image", { + * context: { + * location: "app", + * }, + * platforms: [ + * docker_build.Platform.Plan9_amd64, + * docker_build.Platform.Plan9_386, + * ], + * push: false, + * }); + * ``` + * ### Registry export + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const image = new docker_build.Image("image", { + * context: { + * location: "app", + * }, + * push: true, + * registries: [{ + * address: "docker.io", + * password: dockerHubPassword, + * username: "pulumibot", + * }], + * tags: ["docker.io/pulumi/pulumi:3.107.0"], + * }); + * export const ref = myImage.ref; + * ``` + * ### Caching + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const image = new docker_build.Image("image", { + * cacheFrom: [{ + * local: { + * src: "tmp/cache", + * }, + * }], + * cacheTo: [{ + * local: { + * dest: "tmp/cache", + * mode: docker_build.CacheMode.Max, + * }, + * }], + * context: { + * location: "app", + * }, + * push: false, + * }); + * ``` + * ### Docker Build Cloud + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const image = new docker_build.Image("image", { + * builder: { + * name: "cloud-builder-name", + * }, + * context: { + * location: "app", + * }, + * exec: true, + * push: false, + * }); + * ``` + * ### Build arguments + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const image = new docker_build.Image("image", { + * buildArgs: { + * SET_ME_TO_TRUE: "true", + * }, + * context: { + * location: "app", + * }, + * push: false, + * }); + * ``` + * ### Build target + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const image = new docker_build.Image("image", { + * context: { + * location: "app", + * }, + * push: false, + * target: "build-me", + * }); + * ``` + * ### Named contexts + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const image = new docker_build.Image("image", { + * context: { + * location: "app", + * named: { + * "golang:latest": { + * location: "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", + * }, + * }, + * }, + * push: false, + * }); + * ``` + * ### Remote context + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const image = new docker_build.Image("image", { + * context: { + * location: "https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + * }, + * push: false, + * }); + * ``` + * ### Inline Dockerfile + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const image = new docker_build.Image("image", { + * context: { + * location: "app", + * }, + * dockerfile: { + * inline: `FROM busybox + * COPY hello.c ./ + * `, + * }, + * push: false, + * }); + * ``` + * ### Remote context + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const image = new docker_build.Image("image", { + * context: { + * location: "https://github.com/docker-library/hello-world.git", + * }, + * dockerfile: { + * location: "app/Dockerfile", + * }, + * push: false, + * }); + * ``` + * ### Local export + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const image = new docker_build.Image("image", { + * context: { + * location: "app", + * }, + * exports: [{ + * docker: { + * tar: true, + * }, + * }], + * push: false, + * }); + * ``` + */ +export class Image extends pulumi.CustomResource { + /** + * Get an existing Image resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Image { + return new Image(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'docker-build:index:Image'; + + /** + * Returns true if the given object is an instance of Image. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is Image { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === Image.__pulumiType; + } + + /** + * Custom `host:ip` mappings to use during the build. + * + * Equivalent to Docker's `--add-host` flag. + */ + public readonly addHosts!: pulumi.Output; + /** + * `ARG` names and values to set during the build. + * + * These variables are accessed like environment variables inside `RUN` + * instructions. + * + * Build arguments are persisted in the image, so you should use `secrets` + * if these arguments are sensitive. + * + * Equivalent to Docker's `--build-arg` flag. + */ + public readonly buildArgs!: pulumi.Output<{[key: string]: string} | undefined>; + /** + * Setting this to `false` will always skip image builds during previews, + * and setting it to `true` will always build images during previews. + * + * Images built during previews are never exported to registries, however + * cache manifests are still exported. + * + * On-disk Dockerfiles are always validated for syntactic correctness + * regardless of this setting. + * + * Defaults to `true` as a safeguard against broken images merging as part + * of CI pipelines. + */ + public readonly buildOnPreview!: pulumi.Output; + /** + * Builder configuration. + */ + public readonly builder!: pulumi.Output; + /** + * Cache export configuration. + * + * Equivalent to Docker's `--cache-from` flag. + */ + public readonly cacheFrom!: pulumi.Output; + /** + * Cache import configuration. + * + * Equivalent to Docker's `--cache-to` flag. + */ + public readonly cacheTo!: pulumi.Output; + /** + * Build context settings. + * + * Equivalent to Docker's `PATH | URL | -` positional argument. + */ + public readonly context!: pulumi.Output; + /** + * A preliminary hash of the image's build context. + * + * Pulumi uses this to determine if an image _may_ need to be re-built. + */ + public /*out*/ readonly contextHash!: pulumi.Output; + /** + * A SHA256 digest of the image if it was exported to a registry or + * elsewhere. + * + * Empty if the image was not exported. + * + * Registry images can be referenced precisely as `@`. The + * `ref` output provides one such reference as a convenience. + */ + public /*out*/ readonly digest!: pulumi.Output; + /** + * Dockerfile settings. + * + * Equivalent to Docker's `--file` flag. + */ + public readonly dockerfile!: pulumi.Output; + /** + * Use `exec` mode to build this image. + * + * By default the provider embeds a v25 Docker client with v0.12 buildx + * support. This helps ensure consistent behavior across environments and + * is compatible with alternative build backends (e.g. `buildkitd`), but + * it may not be desirable if you require a specific version of buildx. + * For example you may want to run a custom `docker-buildx` binary with + * support for [Docker Build + * Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + * + * When this is set to `true` the provider will instead execute the + * `docker-buildx` binary directly to perform its operations. The user is + * responsible for ensuring this binary exists, with correct permissions + * and pre-configured builders, at a path Docker expects (e.g. + * `~/.docker/cli-plugins`). + * + * Debugging `exec` mode may be more difficult as Pulumi will not be able + * to surface fine-grained errors and warnings. Additionally credentials + * are temporarily written to disk in order to provide them to the + * `docker-buildx` binary. + */ + public readonly exec!: pulumi.Output; + /** + * Controls where images are persisted after building. + * + * Images are only stored in the local cache unless `exports` are + * explicitly configured. + * + * Exporting to multiple destinations requires a daemon running BuildKit + * 0.13 or later. + * + * Equivalent to Docker's `--output` flag. + */ + public readonly exports!: pulumi.Output; + /** + * Attach arbitrary key/value metadata to the image. + * + * Equivalent to Docker's `--label` flag. + */ + public readonly labels!: pulumi.Output<{[key: string]: string} | undefined>; + /** + * When `true` the build will automatically include a `docker` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--load` flag. + */ + public readonly load!: pulumi.Output; + /** + * Set the network mode for `RUN` instructions. Defaults to `default`. + * + * For custom networks, configure your builder with `--driver-opt network=...`. + * + * Equivalent to Docker's `--network` flag. + */ + public readonly network!: pulumi.Output; + /** + * Do not import cache manifests when building the image. + * + * Equivalent to Docker's `--no-cache` flag. + */ + public readonly noCache!: pulumi.Output; + /** + * Set target platform(s) for the build. Defaults to the host's platform. + * + * Equivalent to Docker's `--platform` flag. + */ + public readonly platforms!: pulumi.Output; + /** + * Always pull referenced images. + * + * Equivalent to Docker's `--pull` flag. + */ + public readonly pull!: pulumi.Output; + /** + * When `true` the build will automatically include a `registry` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--push` flag. + */ + public readonly push!: pulumi.Output; + /** + * If the image was pushed to any registries then this will contain a + * single fully-qualified tag including the build's digest. + * + * If the image had tags but was not exported, this will take on a value + * of one of those tags. + * + * This will be empty if the image had no exports and no tags. + * + * This is only for convenience and may not be appropriate for situations + * where multiple tags or registries are involved. In those cases this + * output is not guaranteed to be stable. + * + * For more control over tags consumed by downstream resources you should + * use the `digest` output. + */ + public /*out*/ readonly ref!: pulumi.Output; + /** + * Registry credentials. Required if reading or exporting to private + * repositories. + * + * Credentials are kept in-memory and do not pollute pre-existing + * credentials on the host. + * + * Similar to `docker login`. + */ + public readonly registries!: pulumi.Output; + /** + * A mapping of secret names to their corresponding values. + * + * Unlike the Docker CLI, these can be passed by value and do not need to + * exist on-disk or in environment variables. + * + * Build arguments and environment variables are persistent in the final + * image, so you should use this for sensitive values. + * + * Similar to Docker's `--secret` flag. + */ + public readonly secrets!: pulumi.Output<{[key: string]: string} | undefined>; + /** + * SSH agent socket or keys to expose to the build. + * + * Equivalent to Docker's `--ssh` flag. + */ + public readonly ssh!: pulumi.Output; + /** + * Name and optionally a tag (format: `name:tag`). + * + * If exporting to a registry, the name should include the fully qualified + * registry address (e.g. `docker.io/pulumi/pulumi:latest`). + * + * Equivalent to Docker's `--tag` flag. + */ + public readonly tags!: pulumi.Output; + /** + * Set the target build stage(s) to build. + * + * If not specified all targets will be built by default. + * + * Equivalent to Docker's `--target` flag. + */ + public readonly target!: pulumi.Output; + + /** + * Create a Image resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: ImageArgs, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + if ((!args || args.push === undefined) && !opts.urn) { + throw new Error("Missing required property 'push'"); + } + resourceInputs["addHosts"] = args ? args.addHosts : undefined; + resourceInputs["buildArgs"] = args ? args.buildArgs : undefined; + resourceInputs["buildOnPreview"] = (args ? args.buildOnPreview : undefined) ?? true; + resourceInputs["builder"] = args ? args.builder : undefined; + resourceInputs["cacheFrom"] = args ? args.cacheFrom : undefined; + resourceInputs["cacheTo"] = args ? args.cacheTo : undefined; + resourceInputs["context"] = args ? args.context : undefined; + resourceInputs["dockerfile"] = args ? args.dockerfile : undefined; + resourceInputs["exec"] = args ? args.exec : undefined; + resourceInputs["exports"] = args ? args.exports : undefined; + resourceInputs["labels"] = args ? args.labels : undefined; + resourceInputs["load"] = args ? args.load : undefined; + resourceInputs["network"] = (args ? args.network : undefined) ?? "default"; + resourceInputs["noCache"] = args ? args.noCache : undefined; + resourceInputs["platforms"] = args ? args.platforms : undefined; + resourceInputs["pull"] = args ? args.pull : undefined; + resourceInputs["push"] = args ? args.push : undefined; + resourceInputs["registries"] = args ? args.registries : undefined; + resourceInputs["secrets"] = args ? args.secrets : undefined; + resourceInputs["ssh"] = args ? args.ssh : undefined; + resourceInputs["tags"] = args ? args.tags : undefined; + resourceInputs["target"] = args ? args.target : undefined; + resourceInputs["contextHash"] = undefined /*out*/; + resourceInputs["digest"] = undefined /*out*/; + resourceInputs["ref"] = undefined /*out*/; + } else { + resourceInputs["addHosts"] = undefined /*out*/; + resourceInputs["buildArgs"] = undefined /*out*/; + resourceInputs["buildOnPreview"] = undefined /*out*/; + resourceInputs["builder"] = undefined /*out*/; + resourceInputs["cacheFrom"] = undefined /*out*/; + resourceInputs["cacheTo"] = undefined /*out*/; + resourceInputs["context"] = undefined /*out*/; + resourceInputs["contextHash"] = undefined /*out*/; + resourceInputs["digest"] = undefined /*out*/; + resourceInputs["dockerfile"] = undefined /*out*/; + resourceInputs["exec"] = undefined /*out*/; + resourceInputs["exports"] = undefined /*out*/; + resourceInputs["labels"] = undefined /*out*/; + resourceInputs["load"] = undefined /*out*/; + resourceInputs["network"] = undefined /*out*/; + resourceInputs["noCache"] = undefined /*out*/; + resourceInputs["platforms"] = undefined /*out*/; + resourceInputs["pull"] = undefined /*out*/; + resourceInputs["push"] = undefined /*out*/; + resourceInputs["ref"] = undefined /*out*/; + resourceInputs["registries"] = undefined /*out*/; + resourceInputs["secrets"] = undefined /*out*/; + resourceInputs["ssh"] = undefined /*out*/; + resourceInputs["tags"] = undefined /*out*/; + resourceInputs["target"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Image.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * The set of arguments for constructing a Image resource. + */ +export interface ImageArgs { + /** + * Custom `host:ip` mappings to use during the build. + * + * Equivalent to Docker's `--add-host` flag. + */ + addHosts?: pulumi.Input[]>; + /** + * `ARG` names and values to set during the build. + * + * These variables are accessed like environment variables inside `RUN` + * instructions. + * + * Build arguments are persisted in the image, so you should use `secrets` + * if these arguments are sensitive. + * + * Equivalent to Docker's `--build-arg` flag. + */ + buildArgs?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * Setting this to `false` will always skip image builds during previews, + * and setting it to `true` will always build images during previews. + * + * Images built during previews are never exported to registries, however + * cache manifests are still exported. + * + * On-disk Dockerfiles are always validated for syntactic correctness + * regardless of this setting. + * + * Defaults to `true` as a safeguard against broken images merging as part + * of CI pipelines. + */ + buildOnPreview?: pulumi.Input; + /** + * Builder configuration. + */ + builder?: pulumi.Input; + /** + * Cache export configuration. + * + * Equivalent to Docker's `--cache-from` flag. + */ + cacheFrom?: pulumi.Input[]>; + /** + * Cache import configuration. + * + * Equivalent to Docker's `--cache-to` flag. + */ + cacheTo?: pulumi.Input[]>; + /** + * Build context settings. + * + * Equivalent to Docker's `PATH | URL | -` positional argument. + */ + context?: pulumi.Input; + /** + * Dockerfile settings. + * + * Equivalent to Docker's `--file` flag. + */ + dockerfile?: pulumi.Input; + /** + * Use `exec` mode to build this image. + * + * By default the provider embeds a v25 Docker client with v0.12 buildx + * support. This helps ensure consistent behavior across environments and + * is compatible with alternative build backends (e.g. `buildkitd`), but + * it may not be desirable if you require a specific version of buildx. + * For example you may want to run a custom `docker-buildx` binary with + * support for [Docker Build + * Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + * + * When this is set to `true` the provider will instead execute the + * `docker-buildx` binary directly to perform its operations. The user is + * responsible for ensuring this binary exists, with correct permissions + * and pre-configured builders, at a path Docker expects (e.g. + * `~/.docker/cli-plugins`). + * + * Debugging `exec` mode may be more difficult as Pulumi will not be able + * to surface fine-grained errors and warnings. Additionally credentials + * are temporarily written to disk in order to provide them to the + * `docker-buildx` binary. + */ + exec?: pulumi.Input; + /** + * Controls where images are persisted after building. + * + * Images are only stored in the local cache unless `exports` are + * explicitly configured. + * + * Exporting to multiple destinations requires a daemon running BuildKit + * 0.13 or later. + * + * Equivalent to Docker's `--output` flag. + */ + exports?: pulumi.Input[]>; + /** + * Attach arbitrary key/value metadata to the image. + * + * Equivalent to Docker's `--label` flag. + */ + labels?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * When `true` the build will automatically include a `docker` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--load` flag. + */ + load?: pulumi.Input; + /** + * Set the network mode for `RUN` instructions. Defaults to `default`. + * + * For custom networks, configure your builder with `--driver-opt network=...`. + * + * Equivalent to Docker's `--network` flag. + */ + network?: pulumi.Input; + /** + * Do not import cache manifests when building the image. + * + * Equivalent to Docker's `--no-cache` flag. + */ + noCache?: pulumi.Input; + /** + * Set target platform(s) for the build. Defaults to the host's platform. + * + * Equivalent to Docker's `--platform` flag. + */ + platforms?: pulumi.Input[]>; + /** + * Always pull referenced images. + * + * Equivalent to Docker's `--pull` flag. + */ + pull?: pulumi.Input; + /** + * When `true` the build will automatically include a `registry` export. + * + * Defaults to `false`. + * + * Equivalent to Docker's `--push` flag. + */ + push: pulumi.Input; + /** + * Registry credentials. Required if reading or exporting to private + * repositories. + * + * Credentials are kept in-memory and do not pollute pre-existing + * credentials on the host. + * + * Similar to `docker login`. + */ + registries?: pulumi.Input[]>; + /** + * A mapping of secret names to their corresponding values. + * + * Unlike the Docker CLI, these can be passed by value and do not need to + * exist on-disk or in environment variables. + * + * Build arguments and environment variables are persistent in the final + * image, so you should use this for sensitive values. + * + * Similar to Docker's `--secret` flag. + */ + secrets?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * SSH agent socket or keys to expose to the build. + * + * Equivalent to Docker's `--ssh` flag. + */ + ssh?: pulumi.Input[]>; + /** + * Name and optionally a tag (format: `name:tag`). + * + * If exporting to a registry, the name should include the fully qualified + * registry address (e.g. `docker.io/pulumi/pulumi:latest`). + * + * Equivalent to Docker's `--tag` flag. + */ + tags?: pulumi.Input[]>; + /** + * Set the target build stage(s) to build. + * + * If not specified all targets will be built by default. + * + * Equivalent to Docker's `--target` flag. + */ + target?: pulumi.Input; +} diff --git a/sdk/nodejs/index.ts b/sdk/nodejs/index.ts index 6bd3320..778a45c 100644 --- a/sdk/nodejs/index.ts +++ b/sdk/nodejs/index.ts @@ -5,33 +5,52 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; // Export members: +export { ImageArgs } from "./image"; +export type Image = import("./image").Image; +export const Image: typeof import("./image").Image = null as any; +utilities.lazyLoad(exports, ["Image"], () => require("./image")); + +export { IndexArgs } from "./index_"; +export type Index = import("./index_").Index; +export const Index: typeof import("./index_").Index = null as any; +utilities.lazyLoad(exports, ["Index"], () => require("./index_")); + export { ProviderArgs } from "./provider"; export type Provider = import("./provider").Provider; export const Provider: typeof import("./provider").Provider = null as any; utilities.lazyLoad(exports, ["Provider"], () => require("./provider")); -export { RandomArgs } from "./random"; -export type Random = import("./random").Random; -export const Random: typeof import("./random").Random = null as any; -utilities.lazyLoad(exports, ["Random"], () => require("./random")); +// Export enums: +export * from "./types/enums"; + +// Export sub-modules: +import * as config from "./config"; +import * as types from "./types"; + +export { + config, + types, +}; const _module = { version: utilities.getVersion(), construct: (name: string, type: string, urn: string): pulumi.Resource => { switch (type) { - case "dockerbuild:index:Random": - return new Random(name, undefined, { urn }) + case "docker-build:index:Image": + return new Image(name, undefined, { urn }) + case "docker-build:index:Index": + return new Index(name, undefined, { urn }) default: throw new Error(`unknown resource type ${type}`); } }, }; -pulumi.runtime.registerResourceModule("dockerbuild", "index", _module) -pulumi.runtime.registerResourcePackage("dockerbuild", { +pulumi.runtime.registerResourceModule("docker-build", "index", _module) +pulumi.runtime.registerResourcePackage("docker-build", { version: utilities.getVersion(), constructProvider: (name: string, type: string, urn: string): pulumi.ProviderResource => { - if (type !== "pulumi:providers:dockerbuild") { + if (type !== "pulumi:providers:docker-build") { throw new Error(`unknown provider type ${type}`); } return new Provider(name, undefined, { urn }); diff --git a/sdk/nodejs/index_.ts b/sdk/nodejs/index_.ts new file mode 100644 index 0000000..e2986c6 --- /dev/null +++ b/sdk/nodejs/index_.ts @@ -0,0 +1,196 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as enums from "./types/enums"; +import * as utilities from "./utilities"; + +/** + * A wrapper around `docker buildx imagetools create` to create an index + * (or manifest list) referencing one or more existing images. + * + * In most cases you do not need an `Index` to build a multi-platform + * image -- specifying multiple platforms on the `Image` will handle this + * for you automatically. + * + * However, as of April 2024, building multi-platform images _with + * caching_ will only export a cache for one platform at a time (see [this + * discussion](https://github.com/docker/buildx/discussions/1382) for more + * details). + * + * Therefore this resource can be helpful if you are building + * multi-platform images with caching: each platform can be built and + * cached separately, and an `Index` can join them all together. An + * example of this is shown below. + * + * This resource creates an OCI image index or a Docker manifest list + * depending on the media types of the source images. + * + * ## Example Usage + * ### Multi-platform registry caching + * + * ```typescript + * import * as pulumi from "@pulumi/pulumi"; + * import * as docker_build from "@pulumi/docker-build"; + * + * const amd64 = new docker_build.Image("amd64", { + * cacheFrom: [{ + * registry: { + * ref: "docker.io/pulumi/pulumi:cache-amd64", + * }, + * }], + * cacheTo: [{ + * registry: { + * mode: docker_build.CacheMode.Max, + * ref: "docker.io/pulumi/pulumi:cache-amd64", + * }, + * }], + * context: { + * location: "app", + * }, + * platforms: [docker_build.Platform.Linux_amd64], + * tags: ["docker.io/pulumi/pulumi:3.107.0-amd64"], + * }); + * const arm64 = new docker_build.Image("arm64", { + * cacheFrom: [{ + * registry: { + * ref: "docker.io/pulumi/pulumi:cache-arm64", + * }, + * }], + * cacheTo: [{ + * registry: { + * mode: docker_build.CacheMode.Max, + * ref: "docker.io/pulumi/pulumi:cache-arm64", + * }, + * }], + * context: { + * location: "app", + * }, + * platforms: [docker_build.Platform.Linux_arm64], + * tags: ["docker.io/pulumi/pulumi:3.107.0-arm64"], + * }); + * const index = new docker_build.Index("index", { + * sources: [ + * amd64.ref, + * arm64.ref, + * ], + * tag: "docker.io/pulumi/pulumi:3.107.0", + * }); + * export const ref = index.ref; + * ``` + */ +export class Index extends pulumi.CustomResource { + /** + * Get an existing Index resource's state with the given name, ID, and optional extra + * properties used to qualify the lookup. + * + * @param name The _unique_ name of the resulting resource. + * @param id The _unique_ provider ID of the resource to lookup. + * @param opts Optional settings to control the behavior of the CustomResource. + */ + public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Index { + return new Index(name, undefined as any, { ...opts, id: id }); + } + + /** @internal */ + public static readonly __pulumiType = 'docker-build:index:Index'; + + /** + * Returns true if the given object is an instance of Index. This is designed to work even + * when multiple copies of the Pulumi SDK have been loaded into the same process. + */ + public static isInstance(obj: any): obj is Index { + if (obj === undefined || obj === null) { + return false; + } + return obj['__pulumiType'] === Index.__pulumiType; + } + + /** + * If true, push the index to the target registry. + * + * Defaults to `true`. + */ + public readonly push!: pulumi.Output; + /** + * The pushed tag with digest. + * + * Identical to the tag if the index was not pushed. + */ + public /*out*/ readonly ref!: pulumi.Output; + /** + * Authentication for the registry where the tagged index will be pushed. + * + * Credentials can also be included with the provider's configuration. + */ + public readonly registry!: pulumi.Output; + /** + * Existing images to include in the index. + */ + public readonly sources!: pulumi.Output; + /** + * The tag to apply to the index. + */ + public readonly tag!: pulumi.Output; + + /** + * Create a Index resource with the given unique name, arguments, and options. + * + * @param name The _unique_ name of the resource. + * @param args The arguments to use to populate this resource's properties. + * @param opts A bag of options that control this resource's behavior. + */ + constructor(name: string, args: IndexArgs, opts?: pulumi.CustomResourceOptions) { + let resourceInputs: pulumi.Inputs = {}; + opts = opts || {}; + if (!opts.id) { + if ((!args || args.sources === undefined) && !opts.urn) { + throw new Error("Missing required property 'sources'"); + } + if ((!args || args.tag === undefined) && !opts.urn) { + throw new Error("Missing required property 'tag'"); + } + resourceInputs["push"] = (args ? args.push : undefined) ?? true; + resourceInputs["registry"] = args ? args.registry : undefined; + resourceInputs["sources"] = args ? args.sources : undefined; + resourceInputs["tag"] = args ? args.tag : undefined; + resourceInputs["ref"] = undefined /*out*/; + } else { + resourceInputs["push"] = undefined /*out*/; + resourceInputs["ref"] = undefined /*out*/; + resourceInputs["registry"] = undefined /*out*/; + resourceInputs["sources"] = undefined /*out*/; + resourceInputs["tag"] = undefined /*out*/; + } + opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); + super(Index.__pulumiType, name, resourceInputs, opts); + } +} + +/** + * The set of arguments for constructing a Index resource. + */ +export interface IndexArgs { + /** + * If true, push the index to the target registry. + * + * Defaults to `true`. + */ + push?: pulumi.Input; + /** + * Authentication for the registry where the tagged index will be pushed. + * + * Credentials can also be included with the provider's configuration. + */ + registry?: pulumi.Input; + /** + * Existing images to include in the index. + */ + sources: pulumi.Input[]>; + /** + * The tag to apply to the index. + */ + tag: pulumi.Input; +} diff --git a/sdk/nodejs/package.json b/sdk/nodejs/package.json index 9818ef6..5e14775 100644 --- a/sdk/nodejs/package.json +++ b/sdk/nodejs/package.json @@ -1,11 +1,15 @@ { - "name": "@pulumi/dockerbuild", + "name": "@pulumi/docker-build", "version": "${VERSION}", "keywords": [ - "keywords" + "docker", + "buildkit", + "buildx", + "kind/native" ], - "homepage": "pulumi.com", - "repository": "https://github.com/pulumi/pulumi-dockerbuild", + "homepage": "https://pulumi.com", + "repository": "https://github.com/pulumi/pulumi-docker-build", + "license": "Apache-2.0", "scripts": { "build": "tsc" }, @@ -18,7 +22,6 @@ }, "pulumi": { "resource": true, - "name": "dockerbuild", - "server": "github.com/pulumi/pulumi-dockerbuild" + "name": "docker-build" } } diff --git a/sdk/nodejs/provider.ts b/sdk/nodejs/provider.ts index 2805cd5..a2ed3e7 100644 --- a/sdk/nodejs/provider.ts +++ b/sdk/nodejs/provider.ts @@ -2,11 +2,14 @@ // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "./types/input"; +import * as outputs from "./types/output"; +import * as enums from "./types/enums"; import * as utilities from "./utilities"; export class Provider extends pulumi.ProviderResource { /** @internal */ - public static readonly __pulumiType = 'dockerbuild'; + public static readonly __pulumiType = 'docker-build'; /** * Returns true if the given object is an instance of Provider. This is designed to work even @@ -19,6 +22,10 @@ export class Provider extends pulumi.ProviderResource { return obj['__pulumiType'] === "pulumi:providers:" + Provider.__pulumiType; } + /** + * The build daemon's address. + */ + public readonly host!: pulumi.Output; /** * Create a Provider resource with the given unique name, arguments, and options. @@ -31,6 +38,8 @@ export class Provider extends pulumi.ProviderResource { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; { + resourceInputs["host"] = (args ? args.host : undefined) ?? (utilities.getEnv("DOCKER_HOST") || ""); + resourceInputs["registries"] = pulumi.output(args ? args.registries : undefined).apply(JSON.stringify); } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(Provider.__pulumiType, name, resourceInputs, opts); @@ -41,4 +50,9 @@ export class Provider extends pulumi.ProviderResource { * The set of arguments for constructing a Provider resource. */ export interface ProviderArgs { + /** + * The build daemon's address. + */ + host?: pulumi.Input; + registries?: pulumi.Input[]>; } diff --git a/sdk/nodejs/random.ts b/sdk/nodejs/random.ts deleted file mode 100644 index b56d471..0000000 --- a/sdk/nodejs/random.ts +++ /dev/null @@ -1,67 +0,0 @@ -// *** WARNING: this file was generated by pulumi-language-nodejs. *** -// *** Do not edit by hand unless you're certain you know what you are doing! *** - -import * as pulumi from "@pulumi/pulumi"; -import * as utilities from "./utilities"; - -export class Random extends pulumi.CustomResource { - /** - * Get an existing Random resource's state with the given name, ID, and optional extra - * properties used to qualify the lookup. - * - * @param name The _unique_ name of the resulting resource. - * @param id The _unique_ provider ID of the resource to lookup. - * @param opts Optional settings to control the behavior of the CustomResource. - */ - public static get(name: string, id: pulumi.Input, opts?: pulumi.CustomResourceOptions): Random { - return new Random(name, undefined as any, { ...opts, id: id }); - } - - /** @internal */ - public static readonly __pulumiType = 'dockerbuild:index:Random'; - - /** - * Returns true if the given object is an instance of Random. This is designed to work even - * when multiple copies of the Pulumi SDK have been loaded into the same process. - */ - public static isInstance(obj: any): obj is Random { - if (obj === undefined || obj === null) { - return false; - } - return obj['__pulumiType'] === Random.__pulumiType; - } - - public readonly length!: pulumi.Output; - public /*out*/ readonly result!: pulumi.Output; - - /** - * Create a Random resource with the given unique name, arguments, and options. - * - * @param name The _unique_ name of the resource. - * @param args The arguments to use to populate this resource's properties. - * @param opts A bag of options that control this resource's behavior. - */ - constructor(name: string, args: RandomArgs, opts?: pulumi.CustomResourceOptions) { - let resourceInputs: pulumi.Inputs = {}; - opts = opts || {}; - if (!opts.id) { - if ((!args || args.length === undefined) && !opts.urn) { - throw new Error("Missing required property 'length'"); - } - resourceInputs["length"] = args ? args.length : undefined; - resourceInputs["result"] = undefined /*out*/; - } else { - resourceInputs["length"] = undefined /*out*/; - resourceInputs["result"] = undefined /*out*/; - } - opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - super(Random.__pulumiType, name, resourceInputs, opts); - } -} - -/** - * The set of arguments for constructing a Random resource. - */ -export interface RandomArgs { - length: pulumi.Input; -} diff --git a/sdk/nodejs/tsconfig.json b/sdk/nodejs/tsconfig.json index 9a9f35c..276795b 100644 --- a/sdk/nodejs/tsconfig.json +++ b/sdk/nodejs/tsconfig.json @@ -13,9 +13,16 @@ "strict": true }, "files": [ + "config/index.ts", + "config/vars.ts", + "image.ts", "index.ts", + "index_.ts", "provider.ts", - "random.ts", + "types/enums/index.ts", + "types/index.ts", + "types/input.ts", + "types/output.ts", "utilities.ts" ] } diff --git a/sdk/nodejs/types/enums/index.ts b/sdk/nodejs/types/enums/index.ts new file mode 100644 index 0000000..7f166a6 --- /dev/null +++ b/sdk/nodejs/types/enums/index.ts @@ -0,0 +1,83 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + + +export const CacheMode = { + /** + * Only layers that are exported into the resulting image are cached. + */ + Min: "min", + /** + * All layers are cached, even those of intermediate steps. + */ + Max: "max", +} as const; + +export type CacheMode = (typeof CacheMode)[keyof typeof CacheMode]; + +export const CompressionType = { + /** + * Use `gzip` for compression. + */ + Gzip: "gzip", + /** + * Use `estargz` for compression. + */ + Estargz: "estargz", + /** + * Use `zstd` for compression. + */ + Zstd: "zstd", +} as const; + +export type CompressionType = (typeof CompressionType)[keyof typeof CompressionType]; + +export const NetworkMode = { + /** + * The default sandbox network mode. + */ + Default: "default", + /** + * Host network mode. + */ + Host: "host", + /** + * Disable network access. + */ + None: "none", +} as const; + +export type NetworkMode = (typeof NetworkMode)[keyof typeof NetworkMode]; + +export const Platform = { + Darwin_386: "darwin/386", + Darwin_amd64: "darwin/amd64", + Darwin_arm: "darwin/arm", + Darwin_arm64: "darwin/arm64", + Dragonfly_amd64: "dragonfly/amd64", + Freebsd_386: "freebsd/386", + Freebsd_amd64: "freebsd/amd64", + Freebsd_arm: "freebsd/arm", + Linux_386: "linux/386", + Linux_amd64: "linux/amd64", + Linux_arm: "linux/arm", + Linux_arm64: "linux/arm64", + Linux_mips64: "linux/mips64", + Linux_mips64le: "linux/mips64le", + Linux_ppc64le: "linux/ppc64le", + Linux_riscv64: "linux/riscv64", + Linux_s390x: "linux/s390x", + Netbsd_386: "netbsd/386", + Netbsd_amd64: "netbsd/amd64", + Netbsd_arm: "netbsd/arm", + Openbsd_386: "openbsd/386", + Openbsd_amd64: "openbsd/amd64", + Openbsd_arm: "openbsd/arm", + Plan9_386: "plan9/386", + Plan9_amd64: "plan9/amd64", + Solaris_amd64: "solaris/amd64", + Windows_386: "windows/386", + Windows_amd64: "windows/amd64", +} as const; + +export type Platform = (typeof Platform)[keyof typeof Platform]; diff --git a/sdk/nodejs/types/index.ts b/sdk/nodejs/types/index.ts new file mode 100644 index 0000000..0833653 --- /dev/null +++ b/sdk/nodejs/types/index.ts @@ -0,0 +1,15 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as utilities from "../utilities"; + +// Export sub-modules: +import * as enums from "./enums"; +import * as input from "./input"; +import * as output from "./output"; + +export { + enums, + input, + output, +}; diff --git a/sdk/nodejs/types/input.ts b/sdk/nodejs/types/input.ts new file mode 100644 index 0000000..74b83ba --- /dev/null +++ b/sdk/nodejs/types/input.ts @@ -0,0 +1,908 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "../types/input"; +import * as outputs from "../types/output"; +import * as enums from "../types/enums"; + +import * as utilities from "../utilities"; + +export interface BuildContextArgs { + /** + * Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + */ + location: pulumi.Input; + /** + * Additional build contexts to use. + * + * These contexts are accessed with `FROM name` or `--from=name` + * statements when using Dockerfile 1.4+ syntax. + * + * Values can be local paths, HTTP URLs, or `docker-image://` images. + */ + named?: pulumi.Input<{[key: string]: pulumi.Input}>; +} + +export interface BuilderConfigArgs { + /** + * Name of an existing buildx builder to use. + * + * Only `docker-container`, `kubernetes`, or `remote` drivers are + * supported. The legacy `docker` driver is not supported. + * + * Equivalent to Docker's `--builder` flag. + */ + name?: pulumi.Input; +} + +export interface CacheFromArgs { + /** + * Upload build caches to Azure's blob storage service. + */ + azblob?: pulumi.Input; + /** + * When `true` this entry will be excluded. Defaults to `false`. + */ + disabled?: pulumi.Input; + /** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + */ + gha?: pulumi.Input; + /** + * A simple backend which caches images on your local filesystem. + */ + local?: pulumi.Input; + /** + * A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`). + */ + raw?: pulumi.Input; + /** + * Upload build caches to remote registries. + */ + registry?: pulumi.Input; + /** + * Upload build caches to AWS S3 or an S3-compatible services such as + * MinIO. + */ + s3?: pulumi.Input; +} +/** + * cacheFromArgsProvideDefaults sets the appropriate defaults for CacheFromArgs + */ +export function cacheFromArgsProvideDefaults(val: CacheFromArgs): CacheFromArgs { + return { + ...val, + gha: (val.gha ? pulumi.output(val.gha).apply(inputs.cacheFromGitHubActionsArgsProvideDefaults) : undefined), + s3: (val.s3 ? pulumi.output(val.s3).apply(inputs.cacheFromS3ArgsProvideDefaults) : undefined), + }; +} + +export interface CacheFromAzureBlobArgs { + /** + * Base URL of the storage account. + */ + accountUrl?: pulumi.Input; + /** + * The name of the cache image. + */ + name: pulumi.Input; + /** + * Blob storage account key. + */ + secretAccessKey?: pulumi.Input; +} + +export interface CacheFromGitHubActionsArgs { + /** + * The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + */ + scope?: pulumi.Input; + /** + * The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + */ + token?: pulumi.Input; + /** + * The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + */ + url?: pulumi.Input; +} +/** + * cacheFromGitHubActionsArgsProvideDefaults sets the appropriate defaults for CacheFromGitHubActionsArgs + */ +export function cacheFromGitHubActionsArgsProvideDefaults(val: CacheFromGitHubActionsArgs): CacheFromGitHubActionsArgs { + return { + ...val, + scope: (val.scope) ?? (utilities.getEnv("buildkit") || ""), + token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""), + url: (val.url) ?? (utilities.getEnv("ACTIONS_RUNTIME_URL") || ""), + }; +} + +export interface CacheFromLocalArgs { + /** + * Digest of manifest to import. + */ + digest?: pulumi.Input; + /** + * Path of the local directory where cache gets imported from. + */ + src: pulumi.Input; +} + +export interface CacheFromRegistryArgs { + /** + * Fully qualified name of the cache image to import. + */ + ref: pulumi.Input; +} + +export interface CacheFromS3Args { + /** + * Defaults to `$AWS_ACCESS_KEY_ID`. + */ + accessKeyId?: pulumi.Input; + /** + * Prefix to prepend to blob filenames. + */ + blobsPrefix?: pulumi.Input; + /** + * Name of the S3 bucket. + */ + bucket: pulumi.Input; + /** + * Endpoint of the S3 bucket. + */ + endpointUrl?: pulumi.Input; + /** + * Prefix to prepend on manifest filenames. + */ + manifestsPrefix?: pulumi.Input; + /** + * Name of the cache image. + */ + name?: pulumi.Input; + /** + * The geographic location of the bucket. Defaults to `$AWS_REGION`. + */ + region: pulumi.Input; + /** + * Defaults to `$AWS_SECRET_ACCESS_KEY`. + */ + secretAccessKey?: pulumi.Input; + /** + * Defaults to `$AWS_SESSION_TOKEN`. + */ + sessionToken?: pulumi.Input; + /** + * Uses `bucket` in the URL instead of hostname when `true`. + */ + usePathStyle?: pulumi.Input; +} +/** + * cacheFromS3ArgsProvideDefaults sets the appropriate defaults for CacheFromS3Args + */ +export function cacheFromS3ArgsProvideDefaults(val: CacheFromS3Args): CacheFromS3Args { + return { + ...val, + accessKeyId: (val.accessKeyId) ?? (utilities.getEnv("AWS_ACCESS_KEY_ID") || ""), + region: (val.region) ?? (utilities.getEnv("AWS_REGION") || ""), + secretAccessKey: (val.secretAccessKey) ?? (utilities.getEnv("AWS_SECRET_ACCESS_KEY") || ""), + sessionToken: (val.sessionToken) ?? (utilities.getEnv("AWS_SESSION_TOKEN") || ""), + }; +} + +export interface CacheToArgs { + /** + * Push cache to Azure's blob storage service. + */ + azblob?: pulumi.Input; + /** + * When `true` this entry will be excluded. Defaults to `false`. + */ + disabled?: pulumi.Input; + /** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + */ + gha?: pulumi.Input; + /** + * The inline cache storage backend is the simplest implementation to get + * started with, but it does not handle multi-stage builds. Consider the + * `registry` cache backend instead. + */ + inline?: pulumi.Input; + /** + * A simple backend which caches imagines on your local filesystem. + */ + local?: pulumi.Input; + /** + * A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`) + */ + raw?: pulumi.Input; + /** + * Push caches to remote registries. Incompatible with the `docker` build + * driver. + */ + registry?: pulumi.Input; + /** + * Push cache to AWS S3 or S3-compatible services such as MinIO. + */ + s3?: pulumi.Input; +} +/** + * cacheToArgsProvideDefaults sets the appropriate defaults for CacheToArgs + */ +export function cacheToArgsProvideDefaults(val: CacheToArgs): CacheToArgs { + return { + ...val, + azblob: (val.azblob ? pulumi.output(val.azblob).apply(inputs.cacheToAzureBlobArgsProvideDefaults) : undefined), + gha: (val.gha ? pulumi.output(val.gha).apply(inputs.cacheToGitHubActionsArgsProvideDefaults) : undefined), + local: (val.local ? pulumi.output(val.local).apply(inputs.cacheToLocalArgsProvideDefaults) : undefined), + registry: (val.registry ? pulumi.output(val.registry).apply(inputs.cacheToRegistryArgsProvideDefaults) : undefined), + s3: (val.s3 ? pulumi.output(val.s3).apply(inputs.cacheToS3ArgsProvideDefaults) : undefined), + }; +} + +export interface CacheToAzureBlobArgs { + /** + * Base URL of the storage account. + */ + accountUrl?: pulumi.Input; + /** + * Ignore errors caused by failed cache exports. + */ + ignoreError?: pulumi.Input; + /** + * The cache mode to use. Defaults to `min`. + */ + mode?: pulumi.Input; + /** + * The name of the cache image. + */ + name: pulumi.Input; + /** + * Blob storage account key. + */ + secretAccessKey?: pulumi.Input; +} +/** + * cacheToAzureBlobArgsProvideDefaults sets the appropriate defaults for CacheToAzureBlobArgs + */ +export function cacheToAzureBlobArgsProvideDefaults(val: CacheToAzureBlobArgs): CacheToAzureBlobArgs { + return { + ...val, + ignoreError: (val.ignoreError) ?? false, + mode: (val.mode) ?? "min", + }; +} + +export interface CacheToGitHubActionsArgs { + /** + * Ignore errors caused by failed cache exports. + */ + ignoreError?: pulumi.Input; + /** + * The cache mode to use. Defaults to `min`. + */ + mode?: pulumi.Input; + /** + * The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + */ + scope?: pulumi.Input; + /** + * The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + */ + token?: pulumi.Input; + /** + * The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + */ + url?: pulumi.Input; +} +/** + * cacheToGitHubActionsArgsProvideDefaults sets the appropriate defaults for CacheToGitHubActionsArgs + */ +export function cacheToGitHubActionsArgsProvideDefaults(val: CacheToGitHubActionsArgs): CacheToGitHubActionsArgs { + return { + ...val, + ignoreError: (val.ignoreError) ?? false, + mode: (val.mode) ?? "min", + scope: (val.scope) ?? (utilities.getEnv("buildkit") || ""), + token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""), + url: (val.url) ?? (utilities.getEnv("ACTIONS_RUNTIME_URL") || ""), + }; +} + +/** + * Include an inline cache with the exported image. + */ +export interface CacheToInlineArgs { +} + +export interface CacheToLocalArgs { + /** + * The compression type to use. + */ + compression?: pulumi.Input; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: pulumi.Input; + /** + * Path of the local directory to export the cache. + */ + dest: pulumi.Input; + /** + * Forcefully apply compression. + */ + forceCompression?: pulumi.Input; + /** + * Ignore errors caused by failed cache exports. + */ + ignoreError?: pulumi.Input; + /** + * The cache mode to use. Defaults to `min`. + */ + mode?: pulumi.Input; +} +/** + * cacheToLocalArgsProvideDefaults sets the appropriate defaults for CacheToLocalArgs + */ +export function cacheToLocalArgsProvideDefaults(val: CacheToLocalArgs): CacheToLocalArgs { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ignoreError: (val.ignoreError) ?? false, + mode: (val.mode) ?? "min", + }; +} + +export interface CacheToRegistryArgs { + /** + * The compression type to use. + */ + compression?: pulumi.Input; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: pulumi.Input; + /** + * Forcefully apply compression. + */ + forceCompression?: pulumi.Input; + /** + * Ignore errors caused by failed cache exports. + */ + ignoreError?: pulumi.Input; + /** + * Export cache manifest as an OCI-compatible image manifest instead of a + * manifest list. Requires `ociMediaTypes` to also be `true`. + * + * Some registries like AWS ECR will not work with caching if this is + * `false`. + * + * Defaults to `false` to match Docker's default behavior. + */ + imageManifest?: pulumi.Input; + /** + * The cache mode to use. Defaults to `min`. + */ + mode?: pulumi.Input; + /** + * Whether to use OCI media types in exported manifests. Defaults to + * `true`. + */ + ociMediaTypes?: pulumi.Input; + /** + * Fully qualified name of the cache image to import. + */ + ref: pulumi.Input; +} +/** + * cacheToRegistryArgsProvideDefaults sets the appropriate defaults for CacheToRegistryArgs + */ +export function cacheToRegistryArgsProvideDefaults(val: CacheToRegistryArgs): CacheToRegistryArgs { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ignoreError: (val.ignoreError) ?? false, + imageManifest: (val.imageManifest) ?? false, + mode: (val.mode) ?? "min", + ociMediaTypes: (val.ociMediaTypes) ?? true, + }; +} + +export interface CacheToS3Args { + /** + * Defaults to `$AWS_ACCESS_KEY_ID`. + */ + accessKeyId?: pulumi.Input; + /** + * Prefix to prepend to blob filenames. + */ + blobsPrefix?: pulumi.Input; + /** + * Name of the S3 bucket. + */ + bucket: pulumi.Input; + /** + * Endpoint of the S3 bucket. + */ + endpointUrl?: pulumi.Input; + /** + * Ignore errors caused by failed cache exports. + */ + ignoreError?: pulumi.Input; + /** + * Prefix to prepend on manifest filenames. + */ + manifestsPrefix?: pulumi.Input; + /** + * The cache mode to use. Defaults to `min`. + */ + mode?: pulumi.Input; + /** + * Name of the cache image. + */ + name?: pulumi.Input; + /** + * The geographic location of the bucket. Defaults to `$AWS_REGION`. + */ + region: pulumi.Input; + /** + * Defaults to `$AWS_SECRET_ACCESS_KEY`. + */ + secretAccessKey?: pulumi.Input; + /** + * Defaults to `$AWS_SESSION_TOKEN`. + */ + sessionToken?: pulumi.Input; + /** + * Uses `bucket` in the URL instead of hostname when `true`. + */ + usePathStyle?: pulumi.Input; +} +/** + * cacheToS3ArgsProvideDefaults sets the appropriate defaults for CacheToS3Args + */ +export function cacheToS3ArgsProvideDefaults(val: CacheToS3Args): CacheToS3Args { + return { + ...val, + accessKeyId: (val.accessKeyId) ?? (utilities.getEnv("AWS_ACCESS_KEY_ID") || ""), + ignoreError: (val.ignoreError) ?? false, + mode: (val.mode) ?? "min", + region: (val.region) ?? (utilities.getEnv("AWS_REGION") || ""), + secretAccessKey: (val.secretAccessKey) ?? (utilities.getEnv("AWS_SECRET_ACCESS_KEY") || ""), + sessionToken: (val.sessionToken) ?? (utilities.getEnv("AWS_SESSION_TOKEN") || ""), + }; +} + +export interface ContextArgs { + /** + * Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + */ + location: pulumi.Input; +} + +export interface DockerfileArgs { + /** + * Raw Dockerfile contents. + * + * Conflicts with `location`. + * + * Equivalent to invoking Docker with `-f -`. + */ + inline?: pulumi.Input; + /** + * Location of the Dockerfile to use. + * + * Can be a relative or absolute path to a local file, or a remote URL. + * + * Defaults to `${context.location}/Dockerfile` if context is on-disk. + * + * Conflicts with `inline`. + */ + location?: pulumi.Input; +} + +export interface ExportArgs { + /** + * A no-op export. Helpful for silencing the 'no exports' warning if you + * just want to populate caches. + */ + cacheonly?: pulumi.Input; + /** + * When `true` this entry will be excluded. Defaults to `false`. + */ + disabled?: pulumi.Input; + /** + * Export as a Docker image layout. + */ + docker?: pulumi.Input; + /** + * Outputs the build result into a container image format. + */ + image?: pulumi.Input; + /** + * Export to a local directory as files and directories. + */ + local?: pulumi.Input; + /** + * Identical to the Docker exporter but uses OCI media types by default. + */ + oci?: pulumi.Input; + /** + * A raw string as you would provide it to the Docker CLI (e.g., + * `type=docker`) + */ + raw?: pulumi.Input; + /** + * Identical to the Image exporter, but pushes by default. + */ + registry?: pulumi.Input; + /** + * Export to a local directory as a tarball. + */ + tar?: pulumi.Input; +} +/** + * exportArgsProvideDefaults sets the appropriate defaults for ExportArgs + */ +export function exportArgsProvideDefaults(val: ExportArgs): ExportArgs { + return { + ...val, + docker: (val.docker ? pulumi.output(val.docker).apply(inputs.exportDockerArgsProvideDefaults) : undefined), + image: (val.image ? pulumi.output(val.image).apply(inputs.exportImageArgsProvideDefaults) : undefined), + oci: (val.oci ? pulumi.output(val.oci).apply(inputs.exportOCIArgsProvideDefaults) : undefined), + registry: (val.registry ? pulumi.output(val.registry).apply(inputs.exportRegistryArgsProvideDefaults) : undefined), + }; +} + +export interface ExportCacheOnlyArgs { +} + +export interface ExportDockerArgs { + /** + * Attach an arbitrary key/value annotation to the image. + */ + annotations?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * The compression type to use. + */ + compression?: pulumi.Input; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: pulumi.Input; + /** + * The local export path. + */ + dest?: pulumi.Input; + /** + * Forcefully apply compression. + */ + forceCompression?: pulumi.Input; + /** + * Specify images names to export. This is overridden if tags are already specified. + */ + names?: pulumi.Input[]>; + /** + * Use OCI media types in exporter manifests. + */ + ociMediaTypes?: pulumi.Input; + /** + * Bundle the output into a tarball layout. + */ + tar?: pulumi.Input; +} +/** + * exportDockerArgsProvideDefaults sets the appropriate defaults for ExportDockerArgs + */ +export function exportDockerArgsProvideDefaults(val: ExportDockerArgs): ExportDockerArgs { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ociMediaTypes: (val.ociMediaTypes) ?? false, + tar: (val.tar) ?? true, + }; +} + +export interface ExportImageArgs { + /** + * Attach an arbitrary key/value annotation to the image. + */ + annotations?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * The compression type to use. + */ + compression?: pulumi.Input; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: pulumi.Input; + /** + * Name image with `prefix@`, used for anonymous images. + */ + danglingNamePrefix?: pulumi.Input; + /** + * Forcefully apply compression. + */ + forceCompression?: pulumi.Input; + /** + * Allow pushing to an insecure registry. + */ + insecure?: pulumi.Input; + /** + * Add additional canonical name (`name@`). + */ + nameCanonical?: pulumi.Input; + /** + * Specify images names to export. This is overridden if tags are already specified. + */ + names?: pulumi.Input[]>; + /** + * Use OCI media types in exporter manifests. + */ + ociMediaTypes?: pulumi.Input; + /** + * Push after creating the image. Defaults to `false`. + */ + push?: pulumi.Input; + /** + * Push image without name. + */ + pushByDigest?: pulumi.Input; + /** + * Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + */ + store?: pulumi.Input; + /** + * Unpack image after creation (for use with containerd). Defaults to + * `false`. + */ + unpack?: pulumi.Input; +} +/** + * exportImageArgsProvideDefaults sets the appropriate defaults for ExportImageArgs + */ +export function exportImageArgsProvideDefaults(val: ExportImageArgs): ExportImageArgs { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ociMediaTypes: (val.ociMediaTypes) ?? false, + store: (val.store) ?? true, + }; +} + +export interface ExportLocalArgs { + /** + * Output path. + */ + dest: pulumi.Input; +} + +export interface ExportOCIArgs { + /** + * Attach an arbitrary key/value annotation to the image. + */ + annotations?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * The compression type to use. + */ + compression?: pulumi.Input; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: pulumi.Input; + /** + * The local export path. + */ + dest?: pulumi.Input; + /** + * Forcefully apply compression. + */ + forceCompression?: pulumi.Input; + /** + * Specify images names to export. This is overridden if tags are already specified. + */ + names?: pulumi.Input[]>; + /** + * Use OCI media types in exporter manifests. + */ + ociMediaTypes?: pulumi.Input; + /** + * Bundle the output into a tarball layout. + */ + tar?: pulumi.Input; +} +/** + * exportOCIArgsProvideDefaults sets the appropriate defaults for ExportOCIArgs + */ +export function exportOCIArgsProvideDefaults(val: ExportOCIArgs): ExportOCIArgs { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ociMediaTypes: (val.ociMediaTypes) ?? true, + tar: (val.tar) ?? true, + }; +} + +export interface ExportRegistryArgs { + /** + * Attach an arbitrary key/value annotation to the image. + */ + annotations?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * The compression type to use. + */ + compression?: pulumi.Input; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: pulumi.Input; + /** + * Name image with `prefix@`, used for anonymous images. + */ + danglingNamePrefix?: pulumi.Input; + /** + * Forcefully apply compression. + */ + forceCompression?: pulumi.Input; + /** + * Allow pushing to an insecure registry. + */ + insecure?: pulumi.Input; + /** + * Add additional canonical name (`name@`). + */ + nameCanonical?: pulumi.Input; + /** + * Specify images names to export. This is overridden if tags are already specified. + */ + names?: pulumi.Input[]>; + /** + * Use OCI media types in exporter manifests. + */ + ociMediaTypes?: pulumi.Input; + /** + * Push after creating the image. Defaults to `true`. + */ + push?: pulumi.Input; + /** + * Push image without name. + */ + pushByDigest?: pulumi.Input; + /** + * Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + */ + store?: pulumi.Input; + /** + * Unpack image after creation (for use with containerd). Defaults to + * `false`. + */ + unpack?: pulumi.Input; +} +/** + * exportRegistryArgsProvideDefaults sets the appropriate defaults for ExportRegistryArgs + */ +export function exportRegistryArgsProvideDefaults(val: ExportRegistryArgs): ExportRegistryArgs { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ociMediaTypes: (val.ociMediaTypes) ?? false, + push: (val.push) ?? true, + store: (val.store) ?? true, + }; +} + +export interface ExportTarArgs { + /** + * Output path. + */ + dest: pulumi.Input; +} + +export interface RegistryArgs { + /** + * The registry's address (e.g. "docker.io"). + */ + address: pulumi.Input; + /** + * Password or token for the registry. + */ + password?: pulumi.Input; + /** + * Username for the registry. + */ + username?: pulumi.Input; +} + +export interface SSHArgs { + /** + * Useful for distinguishing different servers that are part of the same + * build. + * + * A value of `default` is appropriate if only dealing with a single host. + */ + id: pulumi.Input; + /** + * SSH agent socket or private keys to expose to the build under the given + * identifier. + * + * Defaults to `[$SSH_AUTH_SOCK]`. + * + * Note that your keys are **not** automatically added when using an + * agent. Run `ssh-add -l` locally to confirm which public keys are + * visible to the agent; these will be exposed to your build. + */ + paths?: pulumi.Input[]>; +} diff --git a/sdk/nodejs/types/output.ts b/sdk/nodejs/types/output.ts new file mode 100644 index 0000000..c026441 --- /dev/null +++ b/sdk/nodejs/types/output.ts @@ -0,0 +1,909 @@ +// *** WARNING: this file was generated by pulumi-language-nodejs. *** +// *** Do not edit by hand unless you're certain you know what you are doing! *** + +import * as pulumi from "@pulumi/pulumi"; +import * as inputs from "../types/input"; +import * as outputs from "../types/output"; +import * as enums from "../types/enums"; + +import * as utilities from "../utilities"; + +export interface BuildContext { + /** + * Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + */ + location: string; + /** + * Additional build contexts to use. + * + * These contexts are accessed with `FROM name` or `--from=name` + * statements when using Dockerfile 1.4+ syntax. + * + * Values can be local paths, HTTP URLs, or `docker-image://` images. + */ + named?: {[key: string]: outputs.Context}; +} + +export interface BuilderConfig { + /** + * Name of an existing buildx builder to use. + * + * Only `docker-container`, `kubernetes`, or `remote` drivers are + * supported. The legacy `docker` driver is not supported. + * + * Equivalent to Docker's `--builder` flag. + */ + name?: string; +} + +export interface CacheFrom { + /** + * Upload build caches to Azure's blob storage service. + */ + azblob?: outputs.CacheFromAzureBlob; + /** + * When `true` this entry will be excluded. Defaults to `false`. + */ + disabled?: boolean; + /** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + */ + gha?: outputs.CacheFromGitHubActions; + /** + * A simple backend which caches images on your local filesystem. + */ + local?: outputs.CacheFromLocal; + /** + * A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`). + */ + raw?: string; + /** + * Upload build caches to remote registries. + */ + registry?: outputs.CacheFromRegistry; + /** + * Upload build caches to AWS S3 or an S3-compatible services such as + * MinIO. + */ + s3?: outputs.CacheFromS3; +} +/** + * cacheFromProvideDefaults sets the appropriate defaults for CacheFrom + */ +export function cacheFromProvideDefaults(val: CacheFrom): CacheFrom { + return { + ...val, + gha: (val.gha ? outputs.cacheFromGitHubActionsProvideDefaults(val.gha) : undefined), + s3: (val.s3 ? outputs.cacheFromS3ProvideDefaults(val.s3) : undefined), + }; +} + +export interface CacheFromAzureBlob { + /** + * Base URL of the storage account. + */ + accountUrl?: string; + /** + * The name of the cache image. + */ + name: string; + /** + * Blob storage account key. + */ + secretAccessKey?: string; +} + +export interface CacheFromGitHubActions { + /** + * The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + */ + scope?: string; + /** + * The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + */ + token?: string; + /** + * The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + */ + url?: string; +} +/** + * cacheFromGitHubActionsProvideDefaults sets the appropriate defaults for CacheFromGitHubActions + */ +export function cacheFromGitHubActionsProvideDefaults(val: CacheFromGitHubActions): CacheFromGitHubActions { + return { + ...val, + scope: (val.scope) ?? (utilities.getEnv("buildkit") || ""), + token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""), + url: (val.url) ?? (utilities.getEnv("ACTIONS_RUNTIME_URL") || ""), + }; +} + +export interface CacheFromLocal { + /** + * Digest of manifest to import. + */ + digest?: string; + /** + * Path of the local directory where cache gets imported from. + */ + src: string; +} + +export interface CacheFromRegistry { + /** + * Fully qualified name of the cache image to import. + */ + ref: string; +} + +export interface CacheFromS3 { + /** + * Defaults to `$AWS_ACCESS_KEY_ID`. + */ + accessKeyId?: string; + /** + * Prefix to prepend to blob filenames. + */ + blobsPrefix?: string; + /** + * Name of the S3 bucket. + */ + bucket: string; + /** + * Endpoint of the S3 bucket. + */ + endpointUrl?: string; + /** + * Prefix to prepend on manifest filenames. + */ + manifestsPrefix?: string; + /** + * Name of the cache image. + */ + name?: string; + /** + * The geographic location of the bucket. Defaults to `$AWS_REGION`. + */ + region: string; + /** + * Defaults to `$AWS_SECRET_ACCESS_KEY`. + */ + secretAccessKey?: string; + /** + * Defaults to `$AWS_SESSION_TOKEN`. + */ + sessionToken?: string; + /** + * Uses `bucket` in the URL instead of hostname when `true`. + */ + usePathStyle?: boolean; +} +/** + * cacheFromS3ProvideDefaults sets the appropriate defaults for CacheFromS3 + */ +export function cacheFromS3ProvideDefaults(val: CacheFromS3): CacheFromS3 { + return { + ...val, + accessKeyId: (val.accessKeyId) ?? (utilities.getEnv("AWS_ACCESS_KEY_ID") || ""), + region: (val.region) ?? (utilities.getEnv("AWS_REGION") || ""), + secretAccessKey: (val.secretAccessKey) ?? (utilities.getEnv("AWS_SECRET_ACCESS_KEY") || ""), + sessionToken: (val.sessionToken) ?? (utilities.getEnv("AWS_SESSION_TOKEN") || ""), + }; +} + +export interface CacheTo { + /** + * Push cache to Azure's blob storage service. + */ + azblob?: outputs.CacheToAzureBlob; + /** + * When `true` this entry will be excluded. Defaults to `false`. + */ + disabled?: boolean; + /** + * Recommended for use with GitHub Actions workflows. + * + * An action like `crazy-max/ghaction-github-runtime` is recommended to + * expose appropriate credentials to your GitHub workflow. + */ + gha?: outputs.CacheToGitHubActions; + /** + * The inline cache storage backend is the simplest implementation to get + * started with, but it does not handle multi-stage builds. Consider the + * `registry` cache backend instead. + */ + inline?: outputs.CacheToInline; + /** + * A simple backend which caches imagines on your local filesystem. + */ + local?: outputs.CacheToLocal; + /** + * A raw string as you would provide it to the Docker CLI (e.g., + * `type=inline`) + */ + raw?: string; + /** + * Push caches to remote registries. Incompatible with the `docker` build + * driver. + */ + registry?: outputs.CacheToRegistry; + /** + * Push cache to AWS S3 or S3-compatible services such as MinIO. + */ + s3?: outputs.CacheToS3; +} +/** + * cacheToProvideDefaults sets the appropriate defaults for CacheTo + */ +export function cacheToProvideDefaults(val: CacheTo): CacheTo { + return { + ...val, + azblob: (val.azblob ? outputs.cacheToAzureBlobProvideDefaults(val.azblob) : undefined), + gha: (val.gha ? outputs.cacheToGitHubActionsProvideDefaults(val.gha) : undefined), + local: (val.local ? outputs.cacheToLocalProvideDefaults(val.local) : undefined), + registry: (val.registry ? outputs.cacheToRegistryProvideDefaults(val.registry) : undefined), + s3: (val.s3 ? outputs.cacheToS3ProvideDefaults(val.s3) : undefined), + }; +} + +export interface CacheToAzureBlob { + /** + * Base URL of the storage account. + */ + accountUrl?: string; + /** + * Ignore errors caused by failed cache exports. + */ + ignoreError?: boolean; + /** + * The cache mode to use. Defaults to `min`. + */ + mode?: enums.CacheMode; + /** + * The name of the cache image. + */ + name: string; + /** + * Blob storage account key. + */ + secretAccessKey?: string; +} +/** + * cacheToAzureBlobProvideDefaults sets the appropriate defaults for CacheToAzureBlob + */ +export function cacheToAzureBlobProvideDefaults(val: CacheToAzureBlob): CacheToAzureBlob { + return { + ...val, + ignoreError: (val.ignoreError) ?? false, + mode: (val.mode) ?? "min", + }; +} + +export interface CacheToGitHubActions { + /** + * Ignore errors caused by failed cache exports. + */ + ignoreError?: boolean; + /** + * The cache mode to use. Defaults to `min`. + */ + mode?: enums.CacheMode; + /** + * The scope to use for cache keys. Defaults to `buildkit`. + * + * This should be set if building and caching multiple images in one + * workflow, otherwise caches will overwrite each other. + */ + scope?: string; + /** + * The GitHub Actions token to use. This is not a personal access tokens + * and is typically generated automatically as part of each job. + * + * Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + */ + token?: string; + /** + * The cache server URL to use for artifacts. + * + * Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + * `crazy-max/ghaction-github-runtime` is recommended to expose this + * environment variable to your jobs. + */ + url?: string; +} +/** + * cacheToGitHubActionsProvideDefaults sets the appropriate defaults for CacheToGitHubActions + */ +export function cacheToGitHubActionsProvideDefaults(val: CacheToGitHubActions): CacheToGitHubActions { + return { + ...val, + ignoreError: (val.ignoreError) ?? false, + mode: (val.mode) ?? "min", + scope: (val.scope) ?? (utilities.getEnv("buildkit") || ""), + token: (val.token) ?? (utilities.getEnv("ACTIONS_RUNTIME_TOKEN") || ""), + url: (val.url) ?? (utilities.getEnv("ACTIONS_RUNTIME_URL") || ""), + }; +} + +/** + * Include an inline cache with the exported image. + */ +export interface CacheToInline { +} + +export interface CacheToLocal { + /** + * The compression type to use. + */ + compression?: enums.CompressionType; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: number; + /** + * Path of the local directory to export the cache. + */ + dest: string; + /** + * Forcefully apply compression. + */ + forceCompression?: boolean; + /** + * Ignore errors caused by failed cache exports. + */ + ignoreError?: boolean; + /** + * The cache mode to use. Defaults to `min`. + */ + mode?: enums.CacheMode; +} +/** + * cacheToLocalProvideDefaults sets the appropriate defaults for CacheToLocal + */ +export function cacheToLocalProvideDefaults(val: CacheToLocal): CacheToLocal { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ignoreError: (val.ignoreError) ?? false, + mode: (val.mode) ?? "min", + }; +} + +export interface CacheToRegistry { + /** + * The compression type to use. + */ + compression?: enums.CompressionType; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: number; + /** + * Forcefully apply compression. + */ + forceCompression?: boolean; + /** + * Ignore errors caused by failed cache exports. + */ + ignoreError?: boolean; + /** + * Export cache manifest as an OCI-compatible image manifest instead of a + * manifest list. Requires `ociMediaTypes` to also be `true`. + * + * Some registries like AWS ECR will not work with caching if this is + * `false`. + * + * Defaults to `false` to match Docker's default behavior. + */ + imageManifest?: boolean; + /** + * The cache mode to use. Defaults to `min`. + */ + mode?: enums.CacheMode; + /** + * Whether to use OCI media types in exported manifests. Defaults to + * `true`. + */ + ociMediaTypes?: boolean; + /** + * Fully qualified name of the cache image to import. + */ + ref: string; +} +/** + * cacheToRegistryProvideDefaults sets the appropriate defaults for CacheToRegistry + */ +export function cacheToRegistryProvideDefaults(val: CacheToRegistry): CacheToRegistry { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ignoreError: (val.ignoreError) ?? false, + imageManifest: (val.imageManifest) ?? false, + mode: (val.mode) ?? "min", + ociMediaTypes: (val.ociMediaTypes) ?? true, + }; +} + +export interface CacheToS3 { + /** + * Defaults to `$AWS_ACCESS_KEY_ID`. + */ + accessKeyId?: string; + /** + * Prefix to prepend to blob filenames. + */ + blobsPrefix?: string; + /** + * Name of the S3 bucket. + */ + bucket: string; + /** + * Endpoint of the S3 bucket. + */ + endpointUrl?: string; + /** + * Ignore errors caused by failed cache exports. + */ + ignoreError?: boolean; + /** + * Prefix to prepend on manifest filenames. + */ + manifestsPrefix?: string; + /** + * The cache mode to use. Defaults to `min`. + */ + mode?: enums.CacheMode; + /** + * Name of the cache image. + */ + name?: string; + /** + * The geographic location of the bucket. Defaults to `$AWS_REGION`. + */ + region: string; + /** + * Defaults to `$AWS_SECRET_ACCESS_KEY`. + */ + secretAccessKey?: string; + /** + * Defaults to `$AWS_SESSION_TOKEN`. + */ + sessionToken?: string; + /** + * Uses `bucket` in the URL instead of hostname when `true`. + */ + usePathStyle?: boolean; +} +/** + * cacheToS3ProvideDefaults sets the appropriate defaults for CacheToS3 + */ +export function cacheToS3ProvideDefaults(val: CacheToS3): CacheToS3 { + return { + ...val, + accessKeyId: (val.accessKeyId) ?? (utilities.getEnv("AWS_ACCESS_KEY_ID") || ""), + ignoreError: (val.ignoreError) ?? false, + mode: (val.mode) ?? "min", + region: (val.region) ?? (utilities.getEnv("AWS_REGION") || ""), + secretAccessKey: (val.secretAccessKey) ?? (utilities.getEnv("AWS_SECRET_ACCESS_KEY") || ""), + sessionToken: (val.sessionToken) ?? (utilities.getEnv("AWS_SESSION_TOKEN") || ""), + }; +} + +export interface Context { + /** + * Resources to use for build context. + * + * The location can be: + * * A relative or absolute path to a local directory (`.`, `./app`, + * `/app`, etc.). + * * A remote URL of a Git repository, tarball, or plain text file + * (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + * etc.). + */ + location: string; +} + +export interface Dockerfile { + /** + * Raw Dockerfile contents. + * + * Conflicts with `location`. + * + * Equivalent to invoking Docker with `-f -`. + */ + inline?: string; + /** + * Location of the Dockerfile to use. + * + * Can be a relative or absolute path to a local file, or a remote URL. + * + * Defaults to `${context.location}/Dockerfile` if context is on-disk. + * + * Conflicts with `inline`. + */ + location?: string; +} + +export interface Export { + /** + * A no-op export. Helpful for silencing the 'no exports' warning if you + * just want to populate caches. + */ + cacheonly?: outputs.ExportCacheOnly; + /** + * When `true` this entry will be excluded. Defaults to `false`. + */ + disabled?: boolean; + /** + * Export as a Docker image layout. + */ + docker?: outputs.ExportDocker; + /** + * Outputs the build result into a container image format. + */ + image?: outputs.ExportImage; + /** + * Export to a local directory as files and directories. + */ + local?: outputs.ExportLocal; + /** + * Identical to the Docker exporter but uses OCI media types by default. + */ + oci?: outputs.ExportOCI; + /** + * A raw string as you would provide it to the Docker CLI (e.g., + * `type=docker`) + */ + raw?: string; + /** + * Identical to the Image exporter, but pushes by default. + */ + registry?: outputs.ExportRegistry; + /** + * Export to a local directory as a tarball. + */ + tar?: outputs.ExportTar; +} +/** + * exportProvideDefaults sets the appropriate defaults for Export + */ +export function exportProvideDefaults(val: Export): Export { + return { + ...val, + docker: (val.docker ? outputs.exportDockerProvideDefaults(val.docker) : undefined), + image: (val.image ? outputs.exportImageProvideDefaults(val.image) : undefined), + oci: (val.oci ? outputs.exportOCIProvideDefaults(val.oci) : undefined), + registry: (val.registry ? outputs.exportRegistryProvideDefaults(val.registry) : undefined), + }; +} + +export interface ExportCacheOnly { +} + +export interface ExportDocker { + /** + * Attach an arbitrary key/value annotation to the image. + */ + annotations?: {[key: string]: string}; + /** + * The compression type to use. + */ + compression?: enums.CompressionType; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: number; + /** + * The local export path. + */ + dest?: string; + /** + * Forcefully apply compression. + */ + forceCompression?: boolean; + /** + * Specify images names to export. This is overridden if tags are already specified. + */ + names?: string[]; + /** + * Use OCI media types in exporter manifests. + */ + ociMediaTypes?: boolean; + /** + * Bundle the output into a tarball layout. + */ + tar?: boolean; +} +/** + * exportDockerProvideDefaults sets the appropriate defaults for ExportDocker + */ +export function exportDockerProvideDefaults(val: ExportDocker): ExportDocker { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ociMediaTypes: (val.ociMediaTypes) ?? false, + tar: (val.tar) ?? true, + }; +} + +export interface ExportImage { + /** + * Attach an arbitrary key/value annotation to the image. + */ + annotations?: {[key: string]: string}; + /** + * The compression type to use. + */ + compression?: enums.CompressionType; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: number; + /** + * Name image with `prefix@`, used for anonymous images. + */ + danglingNamePrefix?: string; + /** + * Forcefully apply compression. + */ + forceCompression?: boolean; + /** + * Allow pushing to an insecure registry. + */ + insecure?: boolean; + /** + * Add additional canonical name (`name@`). + */ + nameCanonical?: boolean; + /** + * Specify images names to export. This is overridden if tags are already specified. + */ + names?: string[]; + /** + * Use OCI media types in exporter manifests. + */ + ociMediaTypes?: boolean; + /** + * Push after creating the image. Defaults to `false`. + */ + push?: boolean; + /** + * Push image without name. + */ + pushByDigest?: boolean; + /** + * Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + */ + store?: boolean; + /** + * Unpack image after creation (for use with containerd). Defaults to + * `false`. + */ + unpack?: boolean; +} +/** + * exportImageProvideDefaults sets the appropriate defaults for ExportImage + */ +export function exportImageProvideDefaults(val: ExportImage): ExportImage { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ociMediaTypes: (val.ociMediaTypes) ?? false, + store: (val.store) ?? true, + }; +} + +export interface ExportLocal { + /** + * Output path. + */ + dest: string; +} + +export interface ExportOCI { + /** + * Attach an arbitrary key/value annotation to the image. + */ + annotations?: {[key: string]: string}; + /** + * The compression type to use. + */ + compression?: enums.CompressionType; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: number; + /** + * The local export path. + */ + dest?: string; + /** + * Forcefully apply compression. + */ + forceCompression?: boolean; + /** + * Specify images names to export. This is overridden if tags are already specified. + */ + names?: string[]; + /** + * Use OCI media types in exporter manifests. + */ + ociMediaTypes?: boolean; + /** + * Bundle the output into a tarball layout. + */ + tar?: boolean; +} +/** + * exportOCIProvideDefaults sets the appropriate defaults for ExportOCI + */ +export function exportOCIProvideDefaults(val: ExportOCI): ExportOCI { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ociMediaTypes: (val.ociMediaTypes) ?? true, + tar: (val.tar) ?? true, + }; +} + +export interface ExportRegistry { + /** + * Attach an arbitrary key/value annotation to the image. + */ + annotations?: {[key: string]: string}; + /** + * The compression type to use. + */ + compression?: enums.CompressionType; + /** + * Compression level from 0 to 22. + */ + compressionLevel?: number; + /** + * Name image with `prefix@`, used for anonymous images. + */ + danglingNamePrefix?: string; + /** + * Forcefully apply compression. + */ + forceCompression?: boolean; + /** + * Allow pushing to an insecure registry. + */ + insecure?: boolean; + /** + * Add additional canonical name (`name@`). + */ + nameCanonical?: boolean; + /** + * Specify images names to export. This is overridden if tags are already specified. + */ + names?: string[]; + /** + * Use OCI media types in exporter manifests. + */ + ociMediaTypes?: boolean; + /** + * Push after creating the image. Defaults to `true`. + */ + push?: boolean; + /** + * Push image without name. + */ + pushByDigest?: boolean; + /** + * Store resulting images to the worker's image store and ensure all of + * its blobs are in the content store. + * + * Defaults to `true`. + * + * Ignored if the worker doesn't have image store (when using OCI workers, + * for example). + */ + store?: boolean; + /** + * Unpack image after creation (for use with containerd). Defaults to + * `false`. + */ + unpack?: boolean; +} +/** + * exportRegistryProvideDefaults sets the appropriate defaults for ExportRegistry + */ +export function exportRegistryProvideDefaults(val: ExportRegistry): ExportRegistry { + return { + ...val, + compression: (val.compression) ?? "gzip", + compressionLevel: (val.compressionLevel) ?? 0, + forceCompression: (val.forceCompression) ?? false, + ociMediaTypes: (val.ociMediaTypes) ?? false, + push: (val.push) ?? true, + store: (val.store) ?? true, + }; +} + +export interface ExportTar { + /** + * Output path. + */ + dest: string; +} + +export interface Registry { + /** + * The registry's address (e.g. "docker.io"). + */ + address: string; + /** + * Password or token for the registry. + */ + password?: string; + /** + * Username for the registry. + */ + username?: string; +} + +export interface SSH { + /** + * Useful for distinguishing different servers that are part of the same + * build. + * + * A value of `default` is appropriate if only dealing with a single host. + */ + id: string; + /** + * SSH agent socket or private keys to expose to the build under the given + * identifier. + * + * Defaults to `[$SSH_AUTH_SOCK]`. + * + * Note that your keys are **not** automatically added when using an + * agent. Run `ssh-add -l` locally to confirm which public keys are + * visible to the agent; these will be exposed to your build. + */ + paths?: string[]; +} + diff --git a/sdk/nodejs/utilities.ts b/sdk/nodejs/utilities.ts index 0641e23..fb0d823 100644 --- a/sdk/nodejs/utilities.ts +++ b/sdk/nodejs/utilities.ts @@ -53,7 +53,7 @@ export function getVersion(): string { /** @internal */ export function resourceOptsDefaults(): any { - return { version: getVersion(), pluginDownloadURL: "github.com/pulumi/pulumi-dockerbuild" }; + return { version: getVersion() }; } /** @internal */ diff --git a/sdk/python/README.md b/sdk/python/README.md index 4a0b457..a4a8af5 100644 --- a/sdk/python/README.md +++ b/sdk/python/README.md @@ -1,106 +1,23 @@ -# Pulumi Native Provider Boilerplate +[![Slack](http://www.pulumi.com/images/docs/badges/slack.svg)](https://slack.pulumi.com) +[![NPM version](https://badge.fury.io/js/%40pulumi%2fdocker-build.svg)](https://www.npmjs.com/package/@pulumi/docker-build) +[![Python version](https://badge.fury.io/py/pulumi-docker-build.svg)](https://pypi.org/project/pulumi-docker-build) +[![NuGet version](https://badge.fury.io/nu/pulumi.dockerbuild.svg)](https://badge.fury.io/nu/pulumi.dockerbuild) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/pulumi/pulumi-docker-build/sdk/go)](https://pkg.go.dev/github.com/pulumi/pulumi-docker-build/sdk/go) +[![License](https://img.shields.io/npm/l/%40pulumi%2Fpulumi.svg)](https://github.com/pulumi/pulumi-docker-build/blob/main/LICENSE) -This repository is a boilerplate showing how to create and locally test a native Pulumi provider. +# Docker-Build Resource Provider -## Authoring a Pulumi Native Provider +A [Pulumi](http://pulumi.com) provider for building modern Docker images with [buildx](https://docs.docker.com/build/architecture/) and [BuildKit](https://docs.docker.com/build/buildkit/). -This boilerplate creates a working Pulumi-owned provider named `xyz`. -It implements a random number generator that you can [build and test out for yourself](#test-against-the-example) and then replace the Random code with code specific to your provider. +Not to be confused with the earlier +[Docker](http://github.com/pulumi/pulumi-docker) provider, which is still +appropriate for managing resources unrelated to building images. +| Provider | Use cases | +| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `@pulumi/docker-build` | Anything related to building images with `docker build`. | +| `@pulumi/docker` | Everything else -- including running containers and creating networks. | -### Prerequisites +## Reference -Prerequisites for this repository are already satisfied by the [Pulumi Devcontainer](https://github.com/pulumi/devcontainer) if you are using Github Codespaces, or VSCode. - -If you are not using VSCode, you will need to ensure the following tools are installed and present in your `$PATH`: - -* [`pulumictl`](https://github.com/pulumi/pulumictl#installation) -* [Go 1.21](https://golang.org/dl/) or 1.latest -* [NodeJS](https://nodejs.org/en/) 14.x. We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage NodeJS installations. -* [Yarn](https://yarnpkg.com/) -* [TypeScript](https://www.typescriptlang.org/) -* [Python](https://www.python.org/downloads/) (called as `python3`). For recent versions of MacOS, the system-installed version is fine. -* [.NET](https://dotnet.microsoft.com/download) - - -### Build & test the boilerplate XYZ provider - -1. Create a new Github CodeSpaces environment using this repository. -1. Open a terminal in the CodeSpaces environment. -1. Run `make build install` to build and install the provider. -1. Run `make gen_examples` to generate the example programs in `examples/` off of the source `examples/yaml` example program. -1. Run `make up` to run the example program in `examples/yaml`. -1. Run `make down` to tear down the example program. - -### Creating a new provider repository - -Pulumi offers this repository as a [GitHub template repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) for convenience. From this repository: - -1. Click "Use this template". -1. Set the following options: - * Owner: pulumi - * Repository name: pulumi-xyz-native (replace "xyz" with the name of your provider) - * Description: Pulumi provider for xyz - * Repository type: Public -1. Clone the generated repository. - -From the templated repository: - -1. Search-replace `xyz` with the name of your desired provider. - -#### Build the provider and install the plugin - - ```bash - $ make build install - ``` - -This will: - -1. Create the SDK codegen binary and place it in a `./bin` folder (gitignored) -2. Create the provider binary and place it in the `./bin` folder (gitignored) -3. Generate the dotnet, Go, Node, and Python SDKs and place them in the `./sdk` folder -4. Install the provider on your machine. - -#### Test against the example - -```bash -$ cd examples/simple -$ yarn link @pulumi/xyz -$ yarn install -$ pulumi stack init test -$ pulumi up -``` - -Now that you have completed all of the above steps, you have a working provider that generates a random string for you. - -#### A brief repository overview - -You now have: - -1. A `provider/` folder containing the building and implementation logic - 1. `cmd/pulumi-resource-xyz/main.go` - holds the provider's sample implementation logic. -2. `deployment-templates` - a set of files to help you around deployment and publication -3. `sdk` - holds the generated code libraries created by `pulumi-gen-xyz/main.go` -4. `examples` a folder of Pulumi programs to try locally and/or use in CI. -5. A `Makefile` and this `README`. - -#### Additional Details - -This repository depends on the pulumi-go-provider library. For more details on building providers, please check -the [Pulumi Go Provider docs](https://github.com/pulumi/pulumi-go-provider). - -### Build Examples - -Create an example program using the resources defined in your provider, and place it in the `examples/` folder. - -You can now repeat the steps for [build, install, and test](#test-against-the-example). - -## Configuring CI and releases - -1. Follow the instructions laid out in the [deployment templates](./deployment-templates/README-DEPLOYMENT.md). - -## References - -Other resources/examples for implementing providers: -* [Pulumi Command provider](https://github.com/pulumi/pulumi-command/blob/master/provider/pkg/provider/provider.go) -* [Pulumi Go Provider repository](https://github.com/pulumi/pulumi-go-provider) +For more information, including examples and migration guidance, please see the Docker-Build provider's detailed [API documentation](https://www.pulumi.com/registry/packages/docker-build/). diff --git a/sdk/python/pulumi_docker_build/README.md b/sdk/python/pulumi_docker_build/README.md new file mode 100644 index 0000000..a778720 --- /dev/null +++ b/sdk/python/pulumi_docker_build/README.md @@ -0,0 +1 @@ +A Pulumi provider for building modern Docker images with buildx and BuildKit. diff --git a/sdk/python/pulumi_docker_build/__init__.py b/sdk/python/pulumi_docker_build/__init__.py new file mode 100644 index 0000000..b15e3e3 --- /dev/null +++ b/sdk/python/pulumi_docker_build/__init__.py @@ -0,0 +1,46 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +from . import _utilities +import typing +# Export this package's modules as members: +from ._enums import * +from .image import * +from .index import * +from .provider import * +from ._inputs import * +from . import outputs + +# Make subpackages available: +if typing.TYPE_CHECKING: + import pulumi_docker_build.config as __config + config = __config +else: + config = _utilities.lazy_import('pulumi_docker_build.config') + +_utilities.register( + resource_modules=""" +[ + { + "pkg": "docker-build", + "mod": "index", + "fqn": "pulumi_docker_build", + "classes": { + "docker-build:index:Image": "Image", + "docker-build:index:Index": "Index" + } + } +] +""", + resource_packages=""" +[ + { + "pkg": "docker-build", + "token": "pulumi:providers:docker-build", + "fqn": "pulumi_docker_build", + "class": "Provider" + } +] +""" +) diff --git a/sdk/python/pulumi_docker_build/_enums.py b/sdk/python/pulumi_docker_build/_enums.py new file mode 100644 index 0000000..24609b7 --- /dev/null +++ b/sdk/python/pulumi_docker_build/_enums.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +from enum import Enum + +__all__ = [ + 'CacheMode', + 'CompressionType', + 'NetworkMode', + 'Platform', +] + + +class CacheMode(str, Enum): + MIN = "min" + """ + Only layers that are exported into the resulting image are cached. + """ + MAX = "max" + """ + All layers are cached, even those of intermediate steps. + """ + + +class CompressionType(str, Enum): + GZIP = "gzip" + """ + Use `gzip` for compression. + """ + ESTARGZ = "estargz" + """ + Use `estargz` for compression. + """ + ZSTD = "zstd" + """ + Use `zstd` for compression. + """ + + +class NetworkMode(str, Enum): + DEFAULT = "default" + """ + The default sandbox network mode. + """ + HOST = "host" + """ + Host network mode. + """ + NONE = "none" + """ + Disable network access. + """ + + +class Platform(str, Enum): + DARWIN_386 = "darwin/386" + DARWIN_AMD64 = "darwin/amd64" + DARWIN_ARM = "darwin/arm" + DARWIN_ARM64 = "darwin/arm64" + DRAGONFLY_AMD64 = "dragonfly/amd64" + FREEBSD_386 = "freebsd/386" + FREEBSD_AMD64 = "freebsd/amd64" + FREEBSD_ARM = "freebsd/arm" + LINUX_386 = "linux/386" + LINUX_AMD64 = "linux/amd64" + LINUX_ARM = "linux/arm" + LINUX_ARM64 = "linux/arm64" + LINUX_MIPS64 = "linux/mips64" + LINUX_MIPS64LE = "linux/mips64le" + LINUX_PPC64LE = "linux/ppc64le" + LINUX_RISCV64 = "linux/riscv64" + LINUX_S390X = "linux/s390x" + NETBSD_386 = "netbsd/386" + NETBSD_AMD64 = "netbsd/amd64" + NETBSD_ARM = "netbsd/arm" + OPENBSD_386 = "openbsd/386" + OPENBSD_AMD64 = "openbsd/amd64" + OPENBSD_ARM = "openbsd/arm" + PLAN9_386 = "plan9/386" + PLAN9_AMD64 = "plan9/amd64" + SOLARIS_AMD64 = "solaris/amd64" + WINDOWS_386 = "windows/386" + WINDOWS_AMD64 = "windows/amd64" diff --git a/sdk/python/pulumi_docker_build/_inputs.py b/sdk/python/pulumi_docker_build/_inputs.py new file mode 100644 index 0000000..78596f2 --- /dev/null +++ b/sdk/python/pulumi_docker_build/_inputs.py @@ -0,0 +1,2672 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities +from ._enums import * + +__all__ = [ + 'BuildContextArgs', + 'BuilderConfigArgs', + 'CacheFromAzureBlobArgs', + 'CacheFromGitHubActionsArgs', + 'CacheFromLocalArgs', + 'CacheFromRegistryArgs', + 'CacheFromS3Args', + 'CacheFromArgs', + 'CacheToAzureBlobArgs', + 'CacheToGitHubActionsArgs', + 'CacheToInlineArgs', + 'CacheToLocalArgs', + 'CacheToRegistryArgs', + 'CacheToS3Args', + 'CacheToArgs', + 'ContextArgs', + 'DockerfileArgs', + 'ExportCacheOnlyArgs', + 'ExportDockerArgs', + 'ExportImageArgs', + 'ExportLocalArgs', + 'ExportOCIArgs', + 'ExportRegistryArgs', + 'ExportTarArgs', + 'ExportArgs', + 'RegistryArgs', + 'SSHArgs', +] + +@pulumi.input_type +class BuildContextArgs: + def __init__(__self__, *, + location: pulumi.Input[str], + named: Optional[pulumi.Input[Mapping[str, pulumi.Input['ContextArgs']]]] = None): + """ + :param pulumi.Input[str] location: Resources to use for build context. + + The location can be: + * A relative or absolute path to a local directory (`.`, `./app`, + `/app`, etc.). + * A remote URL of a Git repository, tarball, or plain text file + (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + etc.). + :param pulumi.Input[Mapping[str, pulumi.Input['ContextArgs']]] named: Additional build contexts to use. + + These contexts are accessed with `FROM name` or `--from=name` + statements when using Dockerfile 1.4+ syntax. + + Values can be local paths, HTTP URLs, or `docker-image://` images. + """ + pulumi.set(__self__, "location", location) + if named is not None: + pulumi.set(__self__, "named", named) + + @property + @pulumi.getter + def location(self) -> pulumi.Input[str]: + """ + Resources to use for build context. + + The location can be: + * A relative or absolute path to a local directory (`.`, `./app`, + `/app`, etc.). + * A remote URL of a Git repository, tarball, or plain text file + (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + etc.). + """ + return pulumi.get(self, "location") + + @location.setter + def location(self, value: pulumi.Input[str]): + pulumi.set(self, "location", value) + + @property + @pulumi.getter + def named(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input['ContextArgs']]]]: + """ + Additional build contexts to use. + + These contexts are accessed with `FROM name` or `--from=name` + statements when using Dockerfile 1.4+ syntax. + + Values can be local paths, HTTP URLs, or `docker-image://` images. + """ + return pulumi.get(self, "named") + + @named.setter + def named(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input['ContextArgs']]]]): + pulumi.set(self, "named", value) + + +@pulumi.input_type +class BuilderConfigArgs: + def __init__(__self__, *, + name: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] name: Name of an existing buildx builder to use. + + Only `docker-container`, `kubernetes`, or `remote` drivers are + supported. The legacy `docker` driver is not supported. + + Equivalent to Docker's `--builder` flag. + """ + if name is not None: + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + Name of an existing buildx builder to use. + + Only `docker-container`, `kubernetes`, or `remote` drivers are + supported. The legacy `docker` driver is not supported. + + Equivalent to Docker's `--builder` flag. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + +@pulumi.input_type +class CacheFromAzureBlobArgs: + def __init__(__self__, *, + name: pulumi.Input[str], + account_url: Optional[pulumi.Input[str]] = None, + secret_access_key: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] name: The name of the cache image. + :param pulumi.Input[str] account_url: Base URL of the storage account. + :param pulumi.Input[str] secret_access_key: Blob storage account key. + """ + pulumi.set(__self__, "name", name) + if account_url is not None: + pulumi.set(__self__, "account_url", account_url) + if secret_access_key is not None: + pulumi.set(__self__, "secret_access_key", secret_access_key) + + @property + @pulumi.getter + def name(self) -> pulumi.Input[str]: + """ + The name of the cache image. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: pulumi.Input[str]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter(name="accountUrl") + def account_url(self) -> Optional[pulumi.Input[str]]: + """ + Base URL of the storage account. + """ + return pulumi.get(self, "account_url") + + @account_url.setter + def account_url(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "account_url", value) + + @property + @pulumi.getter(name="secretAccessKey") + def secret_access_key(self) -> Optional[pulumi.Input[str]]: + """ + Blob storage account key. + """ + return pulumi.get(self, "secret_access_key") + + @secret_access_key.setter + def secret_access_key(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "secret_access_key", value) + + +@pulumi.input_type +class CacheFromGitHubActionsArgs: + def __init__(__self__, *, + scope: Optional[pulumi.Input[str]] = None, + token: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] scope: The scope to use for cache keys. Defaults to `buildkit`. + + This should be set if building and caching multiple images in one + workflow, otherwise caches will overwrite each other. + :param pulumi.Input[str] token: The GitHub Actions token to use. This is not a personal access tokens + and is typically generated automatically as part of each job. + + Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + :param pulumi.Input[str] url: The cache server URL to use for artifacts. + + Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + if scope is None: + scope = (_utilities.get_env('buildkit') or '') + if scope is not None: + pulumi.set(__self__, "scope", scope) + if token is None: + token = (_utilities.get_env('ACTIONS_RUNTIME_TOKEN') or '') + if token is not None: + pulumi.set(__self__, "token", token) + if url is None: + url = (_utilities.get_env('ACTIONS_RUNTIME_URL') or '') + if url is not None: + pulumi.set(__self__, "url", url) + + @property + @pulumi.getter + def scope(self) -> Optional[pulumi.Input[str]]: + """ + The scope to use for cache keys. Defaults to `buildkit`. + + This should be set if building and caching multiple images in one + workflow, otherwise caches will overwrite each other. + """ + return pulumi.get(self, "scope") + + @scope.setter + def scope(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "scope", value) + + @property + @pulumi.getter + def token(self) -> Optional[pulumi.Input[str]]: + """ + The GitHub Actions token to use. This is not a personal access tokens + and is typically generated automatically as part of each job. + + Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + return pulumi.get(self, "token") + + @token.setter + def token(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "token", value) + + @property + @pulumi.getter + def url(self) -> Optional[pulumi.Input[str]]: + """ + The cache server URL to use for artifacts. + + Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + return pulumi.get(self, "url") + + @url.setter + def url(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "url", value) + + +@pulumi.input_type +class CacheFromLocalArgs: + def __init__(__self__, *, + src: pulumi.Input[str], + digest: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] src: Path of the local directory where cache gets imported from. + :param pulumi.Input[str] digest: Digest of manifest to import. + """ + pulumi.set(__self__, "src", src) + if digest is not None: + pulumi.set(__self__, "digest", digest) + + @property + @pulumi.getter + def src(self) -> pulumi.Input[str]: + """ + Path of the local directory where cache gets imported from. + """ + return pulumi.get(self, "src") + + @src.setter + def src(self, value: pulumi.Input[str]): + pulumi.set(self, "src", value) + + @property + @pulumi.getter + def digest(self) -> Optional[pulumi.Input[str]]: + """ + Digest of manifest to import. + """ + return pulumi.get(self, "digest") + + @digest.setter + def digest(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "digest", value) + + +@pulumi.input_type +class CacheFromRegistryArgs: + def __init__(__self__, *, + ref: pulumi.Input[str]): + """ + :param pulumi.Input[str] ref: Fully qualified name of the cache image to import. + """ + pulumi.set(__self__, "ref", ref) + + @property + @pulumi.getter + def ref(self) -> pulumi.Input[str]: + """ + Fully qualified name of the cache image to import. + """ + return pulumi.get(self, "ref") + + @ref.setter + def ref(self, value: pulumi.Input[str]): + pulumi.set(self, "ref", value) + + +@pulumi.input_type +class CacheFromS3Args: + def __init__(__self__, *, + bucket: pulumi.Input[str], + region: Optional[pulumi.Input[str]] = None, + access_key_id: Optional[pulumi.Input[str]] = None, + blobs_prefix: Optional[pulumi.Input[str]] = None, + endpoint_url: Optional[pulumi.Input[str]] = None, + manifests_prefix: Optional[pulumi.Input[str]] = None, + name: Optional[pulumi.Input[str]] = None, + secret_access_key: Optional[pulumi.Input[str]] = None, + session_token: Optional[pulumi.Input[str]] = None, + use_path_style: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] bucket: Name of the S3 bucket. + :param pulumi.Input[str] region: The geographic location of the bucket. Defaults to `$AWS_REGION`. + :param pulumi.Input[str] access_key_id: Defaults to `$AWS_ACCESS_KEY_ID`. + :param pulumi.Input[str] blobs_prefix: Prefix to prepend to blob filenames. + :param pulumi.Input[str] endpoint_url: Endpoint of the S3 bucket. + :param pulumi.Input[str] manifests_prefix: Prefix to prepend on manifest filenames. + :param pulumi.Input[str] name: Name of the cache image. + :param pulumi.Input[str] secret_access_key: Defaults to `$AWS_SECRET_ACCESS_KEY`. + :param pulumi.Input[str] session_token: Defaults to `$AWS_SESSION_TOKEN`. + :param pulumi.Input[bool] use_path_style: Uses `bucket` in the URL instead of hostname when `true`. + """ + pulumi.set(__self__, "bucket", bucket) + if region is None: + region = (_utilities.get_env('AWS_REGION') or '') + pulumi.set(__self__, "region", region) + if access_key_id is None: + access_key_id = (_utilities.get_env('AWS_ACCESS_KEY_ID') or '') + if access_key_id is not None: + pulumi.set(__self__, "access_key_id", access_key_id) + if blobs_prefix is not None: + pulumi.set(__self__, "blobs_prefix", blobs_prefix) + if endpoint_url is not None: + pulumi.set(__self__, "endpoint_url", endpoint_url) + if manifests_prefix is not None: + pulumi.set(__self__, "manifests_prefix", manifests_prefix) + if name is not None: + pulumi.set(__self__, "name", name) + if secret_access_key is None: + secret_access_key = (_utilities.get_env('AWS_SECRET_ACCESS_KEY') or '') + if secret_access_key is not None: + pulumi.set(__self__, "secret_access_key", secret_access_key) + if session_token is None: + session_token = (_utilities.get_env('AWS_SESSION_TOKEN') or '') + if session_token is not None: + pulumi.set(__self__, "session_token", session_token) + if use_path_style is not None: + pulumi.set(__self__, "use_path_style", use_path_style) + + @property + @pulumi.getter + def bucket(self) -> pulumi.Input[str]: + """ + Name of the S3 bucket. + """ + return pulumi.get(self, "bucket") + + @bucket.setter + def bucket(self, value: pulumi.Input[str]): + pulumi.set(self, "bucket", value) + + @property + @pulumi.getter + def region(self) -> pulumi.Input[str]: + """ + The geographic location of the bucket. Defaults to `$AWS_REGION`. + """ + return pulumi.get(self, "region") + + @region.setter + def region(self, value: pulumi.Input[str]): + pulumi.set(self, "region", value) + + @property + @pulumi.getter(name="accessKeyId") + def access_key_id(self) -> Optional[pulumi.Input[str]]: + """ + Defaults to `$AWS_ACCESS_KEY_ID`. + """ + return pulumi.get(self, "access_key_id") + + @access_key_id.setter + def access_key_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "access_key_id", value) + + @property + @pulumi.getter(name="blobsPrefix") + def blobs_prefix(self) -> Optional[pulumi.Input[str]]: + """ + Prefix to prepend to blob filenames. + """ + return pulumi.get(self, "blobs_prefix") + + @blobs_prefix.setter + def blobs_prefix(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "blobs_prefix", value) + + @property + @pulumi.getter(name="endpointUrl") + def endpoint_url(self) -> Optional[pulumi.Input[str]]: + """ + Endpoint of the S3 bucket. + """ + return pulumi.get(self, "endpoint_url") + + @endpoint_url.setter + def endpoint_url(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "endpoint_url", value) + + @property + @pulumi.getter(name="manifestsPrefix") + def manifests_prefix(self) -> Optional[pulumi.Input[str]]: + """ + Prefix to prepend on manifest filenames. + """ + return pulumi.get(self, "manifests_prefix") + + @manifests_prefix.setter + def manifests_prefix(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "manifests_prefix", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + Name of the cache image. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter(name="secretAccessKey") + def secret_access_key(self) -> Optional[pulumi.Input[str]]: + """ + Defaults to `$AWS_SECRET_ACCESS_KEY`. + """ + return pulumi.get(self, "secret_access_key") + + @secret_access_key.setter + def secret_access_key(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "secret_access_key", value) + + @property + @pulumi.getter(name="sessionToken") + def session_token(self) -> Optional[pulumi.Input[str]]: + """ + Defaults to `$AWS_SESSION_TOKEN`. + """ + return pulumi.get(self, "session_token") + + @session_token.setter + def session_token(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "session_token", value) + + @property + @pulumi.getter(name="usePathStyle") + def use_path_style(self) -> Optional[pulumi.Input[bool]]: + """ + Uses `bucket` in the URL instead of hostname when `true`. + """ + return pulumi.get(self, "use_path_style") + + @use_path_style.setter + def use_path_style(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "use_path_style", value) + + +@pulumi.input_type +class CacheFromArgs: + def __init__(__self__, *, + azblob: Optional[pulumi.Input['CacheFromAzureBlobArgs']] = None, + disabled: Optional[pulumi.Input[bool]] = None, + gha: Optional[pulumi.Input['CacheFromGitHubActionsArgs']] = None, + local: Optional[pulumi.Input['CacheFromLocalArgs']] = None, + raw: Optional[pulumi.Input[str]] = None, + registry: Optional[pulumi.Input['CacheFromRegistryArgs']] = None, + s3: Optional[pulumi.Input['CacheFromS3Args']] = None): + """ + :param pulumi.Input['CacheFromAzureBlobArgs'] azblob: Upload build caches to Azure's blob storage service. + :param pulumi.Input[bool] disabled: When `true` this entry will be excluded. Defaults to `false`. + :param pulumi.Input['CacheFromGitHubActionsArgs'] gha: Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to + expose appropriate credentials to your GitHub workflow. + :param pulumi.Input['CacheFromLocalArgs'] local: A simple backend which caches images on your local filesystem. + :param pulumi.Input[str] raw: A raw string as you would provide it to the Docker CLI (e.g., + `type=inline`). + :param pulumi.Input['CacheFromRegistryArgs'] registry: Upload build caches to remote registries. + :param pulumi.Input['CacheFromS3Args'] s3: Upload build caches to AWS S3 or an S3-compatible services such as + MinIO. + """ + if azblob is not None: + pulumi.set(__self__, "azblob", azblob) + if disabled is not None: + pulumi.set(__self__, "disabled", disabled) + if gha is not None: + pulumi.set(__self__, "gha", gha) + if local is not None: + pulumi.set(__self__, "local", local) + if raw is not None: + pulumi.set(__self__, "raw", raw) + if registry is not None: + pulumi.set(__self__, "registry", registry) + if s3 is not None: + pulumi.set(__self__, "s3", s3) + + @property + @pulumi.getter + def azblob(self) -> Optional[pulumi.Input['CacheFromAzureBlobArgs']]: + """ + Upload build caches to Azure's blob storage service. + """ + return pulumi.get(self, "azblob") + + @azblob.setter + def azblob(self, value: Optional[pulumi.Input['CacheFromAzureBlobArgs']]): + pulumi.set(self, "azblob", value) + + @property + @pulumi.getter + def disabled(self) -> Optional[pulumi.Input[bool]]: + """ + When `true` this entry will be excluded. Defaults to `false`. + """ + return pulumi.get(self, "disabled") + + @disabled.setter + def disabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "disabled", value) + + @property + @pulumi.getter + def gha(self) -> Optional[pulumi.Input['CacheFromGitHubActionsArgs']]: + """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to + expose appropriate credentials to your GitHub workflow. + """ + return pulumi.get(self, "gha") + + @gha.setter + def gha(self, value: Optional[pulumi.Input['CacheFromGitHubActionsArgs']]): + pulumi.set(self, "gha", value) + + @property + @pulumi.getter + def local(self) -> Optional[pulumi.Input['CacheFromLocalArgs']]: + """ + A simple backend which caches images on your local filesystem. + """ + return pulumi.get(self, "local") + + @local.setter + def local(self, value: Optional[pulumi.Input['CacheFromLocalArgs']]): + pulumi.set(self, "local", value) + + @property + @pulumi.getter + def raw(self) -> Optional[pulumi.Input[str]]: + """ + A raw string as you would provide it to the Docker CLI (e.g., + `type=inline`). + """ + return pulumi.get(self, "raw") + + @raw.setter + def raw(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "raw", value) + + @property + @pulumi.getter + def registry(self) -> Optional[pulumi.Input['CacheFromRegistryArgs']]: + """ + Upload build caches to remote registries. + """ + return pulumi.get(self, "registry") + + @registry.setter + def registry(self, value: Optional[pulumi.Input['CacheFromRegistryArgs']]): + pulumi.set(self, "registry", value) + + @property + @pulumi.getter + def s3(self) -> Optional[pulumi.Input['CacheFromS3Args']]: + """ + Upload build caches to AWS S3 or an S3-compatible services such as + MinIO. + """ + return pulumi.get(self, "s3") + + @s3.setter + def s3(self, value: Optional[pulumi.Input['CacheFromS3Args']]): + pulumi.set(self, "s3", value) + + +@pulumi.input_type +class CacheToAzureBlobArgs: + def __init__(__self__, *, + name: pulumi.Input[str], + account_url: Optional[pulumi.Input[str]] = None, + ignore_error: Optional[pulumi.Input[bool]] = None, + mode: Optional[pulumi.Input['CacheMode']] = None, + secret_access_key: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] name: The name of the cache image. + :param pulumi.Input[str] account_url: Base URL of the storage account. + :param pulumi.Input[bool] ignore_error: Ignore errors caused by failed cache exports. + :param pulumi.Input['CacheMode'] mode: The cache mode to use. Defaults to `min`. + :param pulumi.Input[str] secret_access_key: Blob storage account key. + """ + pulumi.set(__self__, "name", name) + if account_url is not None: + pulumi.set(__self__, "account_url", account_url) + if ignore_error is None: + ignore_error = False + if ignore_error is not None: + pulumi.set(__self__, "ignore_error", ignore_error) + if mode is None: + mode = 'min' + if mode is not None: + pulumi.set(__self__, "mode", mode) + if secret_access_key is not None: + pulumi.set(__self__, "secret_access_key", secret_access_key) + + @property + @pulumi.getter + def name(self) -> pulumi.Input[str]: + """ + The name of the cache image. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: pulumi.Input[str]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter(name="accountUrl") + def account_url(self) -> Optional[pulumi.Input[str]]: + """ + Base URL of the storage account. + """ + return pulumi.get(self, "account_url") + + @account_url.setter + def account_url(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "account_url", value) + + @property + @pulumi.getter(name="ignoreError") + def ignore_error(self) -> Optional[pulumi.Input[bool]]: + """ + Ignore errors caused by failed cache exports. + """ + return pulumi.get(self, "ignore_error") + + @ignore_error.setter + def ignore_error(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "ignore_error", value) + + @property + @pulumi.getter + def mode(self) -> Optional[pulumi.Input['CacheMode']]: + """ + The cache mode to use. Defaults to `min`. + """ + return pulumi.get(self, "mode") + + @mode.setter + def mode(self, value: Optional[pulumi.Input['CacheMode']]): + pulumi.set(self, "mode", value) + + @property + @pulumi.getter(name="secretAccessKey") + def secret_access_key(self) -> Optional[pulumi.Input[str]]: + """ + Blob storage account key. + """ + return pulumi.get(self, "secret_access_key") + + @secret_access_key.setter + def secret_access_key(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "secret_access_key", value) + + +@pulumi.input_type +class CacheToGitHubActionsArgs: + def __init__(__self__, *, + ignore_error: Optional[pulumi.Input[bool]] = None, + mode: Optional[pulumi.Input['CacheMode']] = None, + scope: Optional[pulumi.Input[str]] = None, + token: Optional[pulumi.Input[str]] = None, + url: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[bool] ignore_error: Ignore errors caused by failed cache exports. + :param pulumi.Input['CacheMode'] mode: The cache mode to use. Defaults to `min`. + :param pulumi.Input[str] scope: The scope to use for cache keys. Defaults to `buildkit`. + + This should be set if building and caching multiple images in one + workflow, otherwise caches will overwrite each other. + :param pulumi.Input[str] token: The GitHub Actions token to use. This is not a personal access tokens + and is typically generated automatically as part of each job. + + Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + :param pulumi.Input[str] url: The cache server URL to use for artifacts. + + Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + if ignore_error is None: + ignore_error = False + if ignore_error is not None: + pulumi.set(__self__, "ignore_error", ignore_error) + if mode is None: + mode = 'min' + if mode is not None: + pulumi.set(__self__, "mode", mode) + if scope is None: + scope = (_utilities.get_env('buildkit') or '') + if scope is not None: + pulumi.set(__self__, "scope", scope) + if token is None: + token = (_utilities.get_env('ACTIONS_RUNTIME_TOKEN') or '') + if token is not None: + pulumi.set(__self__, "token", token) + if url is None: + url = (_utilities.get_env('ACTIONS_RUNTIME_URL') or '') + if url is not None: + pulumi.set(__self__, "url", url) + + @property + @pulumi.getter(name="ignoreError") + def ignore_error(self) -> Optional[pulumi.Input[bool]]: + """ + Ignore errors caused by failed cache exports. + """ + return pulumi.get(self, "ignore_error") + + @ignore_error.setter + def ignore_error(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "ignore_error", value) + + @property + @pulumi.getter + def mode(self) -> Optional[pulumi.Input['CacheMode']]: + """ + The cache mode to use. Defaults to `min`. + """ + return pulumi.get(self, "mode") + + @mode.setter + def mode(self, value: Optional[pulumi.Input['CacheMode']]): + pulumi.set(self, "mode", value) + + @property + @pulumi.getter + def scope(self) -> Optional[pulumi.Input[str]]: + """ + The scope to use for cache keys. Defaults to `buildkit`. + + This should be set if building and caching multiple images in one + workflow, otherwise caches will overwrite each other. + """ + return pulumi.get(self, "scope") + + @scope.setter + def scope(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "scope", value) + + @property + @pulumi.getter + def token(self) -> Optional[pulumi.Input[str]]: + """ + The GitHub Actions token to use. This is not a personal access tokens + and is typically generated automatically as part of each job. + + Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + return pulumi.get(self, "token") + + @token.setter + def token(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "token", value) + + @property + @pulumi.getter + def url(self) -> Optional[pulumi.Input[str]]: + """ + The cache server URL to use for artifacts. + + Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + return pulumi.get(self, "url") + + @url.setter + def url(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "url", value) + + +@pulumi.input_type +class CacheToInlineArgs: + def __init__(__self__): + """ + Include an inline cache with the exported image. + """ + pass + + +@pulumi.input_type +class CacheToLocalArgs: + def __init__(__self__, *, + dest: pulumi.Input[str], + compression: Optional[pulumi.Input['CompressionType']] = None, + compression_level: Optional[pulumi.Input[int]] = None, + force_compression: Optional[pulumi.Input[bool]] = None, + ignore_error: Optional[pulumi.Input[bool]] = None, + mode: Optional[pulumi.Input['CacheMode']] = None): + """ + :param pulumi.Input[str] dest: Path of the local directory to export the cache. + :param pulumi.Input['CompressionType'] compression: The compression type to use. + :param pulumi.Input[int] compression_level: Compression level from 0 to 22. + :param pulumi.Input[bool] force_compression: Forcefully apply compression. + :param pulumi.Input[bool] ignore_error: Ignore errors caused by failed cache exports. + :param pulumi.Input['CacheMode'] mode: The cache mode to use. Defaults to `min`. + """ + pulumi.set(__self__, "dest", dest) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if ignore_error is None: + ignore_error = False + if ignore_error is not None: + pulumi.set(__self__, "ignore_error", ignore_error) + if mode is None: + mode = 'min' + if mode is not None: + pulumi.set(__self__, "mode", mode) + + @property + @pulumi.getter + def dest(self) -> pulumi.Input[str]: + """ + Path of the local directory to export the cache. + """ + return pulumi.get(self, "dest") + + @dest.setter + def dest(self, value: pulumi.Input[str]): + pulumi.set(self, "dest", value) + + @property + @pulumi.getter + def compression(self) -> Optional[pulumi.Input['CompressionType']]: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @compression.setter + def compression(self, value: Optional[pulumi.Input['CompressionType']]): + pulumi.set(self, "compression", value) + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[pulumi.Input[int]]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @compression_level.setter + def compression_level(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "compression_level", value) + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[pulumi.Input[bool]]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @force_compression.setter + def force_compression(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "force_compression", value) + + @property + @pulumi.getter(name="ignoreError") + def ignore_error(self) -> Optional[pulumi.Input[bool]]: + """ + Ignore errors caused by failed cache exports. + """ + return pulumi.get(self, "ignore_error") + + @ignore_error.setter + def ignore_error(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "ignore_error", value) + + @property + @pulumi.getter + def mode(self) -> Optional[pulumi.Input['CacheMode']]: + """ + The cache mode to use. Defaults to `min`. + """ + return pulumi.get(self, "mode") + + @mode.setter + def mode(self, value: Optional[pulumi.Input['CacheMode']]): + pulumi.set(self, "mode", value) + + +@pulumi.input_type +class CacheToRegistryArgs: + def __init__(__self__, *, + ref: pulumi.Input[str], + compression: Optional[pulumi.Input['CompressionType']] = None, + compression_level: Optional[pulumi.Input[int]] = None, + force_compression: Optional[pulumi.Input[bool]] = None, + ignore_error: Optional[pulumi.Input[bool]] = None, + image_manifest: Optional[pulumi.Input[bool]] = None, + mode: Optional[pulumi.Input['CacheMode']] = None, + oci_media_types: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] ref: Fully qualified name of the cache image to import. + :param pulumi.Input['CompressionType'] compression: The compression type to use. + :param pulumi.Input[int] compression_level: Compression level from 0 to 22. + :param pulumi.Input[bool] force_compression: Forcefully apply compression. + :param pulumi.Input[bool] ignore_error: Ignore errors caused by failed cache exports. + :param pulumi.Input[bool] image_manifest: Export cache manifest as an OCI-compatible image manifest instead of a + manifest list. Requires `ociMediaTypes` to also be `true`. + + Some registries like AWS ECR will not work with caching if this is + `false`. + + Defaults to `false` to match Docker's default behavior. + :param pulumi.Input['CacheMode'] mode: The cache mode to use. Defaults to `min`. + :param pulumi.Input[bool] oci_media_types: Whether to use OCI media types in exported manifests. Defaults to + `true`. + """ + pulumi.set(__self__, "ref", ref) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if ignore_error is None: + ignore_error = False + if ignore_error is not None: + pulumi.set(__self__, "ignore_error", ignore_error) + if image_manifest is None: + image_manifest = False + if image_manifest is not None: + pulumi.set(__self__, "image_manifest", image_manifest) + if mode is None: + mode = 'min' + if mode is not None: + pulumi.set(__self__, "mode", mode) + if oci_media_types is None: + oci_media_types = True + if oci_media_types is not None: + pulumi.set(__self__, "oci_media_types", oci_media_types) + + @property + @pulumi.getter + def ref(self) -> pulumi.Input[str]: + """ + Fully qualified name of the cache image to import. + """ + return pulumi.get(self, "ref") + + @ref.setter + def ref(self, value: pulumi.Input[str]): + pulumi.set(self, "ref", value) + + @property + @pulumi.getter + def compression(self) -> Optional[pulumi.Input['CompressionType']]: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @compression.setter + def compression(self, value: Optional[pulumi.Input['CompressionType']]): + pulumi.set(self, "compression", value) + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[pulumi.Input[int]]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @compression_level.setter + def compression_level(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "compression_level", value) + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[pulumi.Input[bool]]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @force_compression.setter + def force_compression(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "force_compression", value) + + @property + @pulumi.getter(name="ignoreError") + def ignore_error(self) -> Optional[pulumi.Input[bool]]: + """ + Ignore errors caused by failed cache exports. + """ + return pulumi.get(self, "ignore_error") + + @ignore_error.setter + def ignore_error(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "ignore_error", value) + + @property + @pulumi.getter(name="imageManifest") + def image_manifest(self) -> Optional[pulumi.Input[bool]]: + """ + Export cache manifest as an OCI-compatible image manifest instead of a + manifest list. Requires `ociMediaTypes` to also be `true`. + + Some registries like AWS ECR will not work with caching if this is + `false`. + + Defaults to `false` to match Docker's default behavior. + """ + return pulumi.get(self, "image_manifest") + + @image_manifest.setter + def image_manifest(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "image_manifest", value) + + @property + @pulumi.getter + def mode(self) -> Optional[pulumi.Input['CacheMode']]: + """ + The cache mode to use. Defaults to `min`. + """ + return pulumi.get(self, "mode") + + @mode.setter + def mode(self, value: Optional[pulumi.Input['CacheMode']]): + pulumi.set(self, "mode", value) + + @property + @pulumi.getter(name="ociMediaTypes") + def oci_media_types(self) -> Optional[pulumi.Input[bool]]: + """ + Whether to use OCI media types in exported manifests. Defaults to + `true`. + """ + return pulumi.get(self, "oci_media_types") + + @oci_media_types.setter + def oci_media_types(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "oci_media_types", value) + + +@pulumi.input_type +class CacheToS3Args: + def __init__(__self__, *, + bucket: pulumi.Input[str], + region: Optional[pulumi.Input[str]] = None, + access_key_id: Optional[pulumi.Input[str]] = None, + blobs_prefix: Optional[pulumi.Input[str]] = None, + endpoint_url: Optional[pulumi.Input[str]] = None, + ignore_error: Optional[pulumi.Input[bool]] = None, + manifests_prefix: Optional[pulumi.Input[str]] = None, + mode: Optional[pulumi.Input['CacheMode']] = None, + name: Optional[pulumi.Input[str]] = None, + secret_access_key: Optional[pulumi.Input[str]] = None, + session_token: Optional[pulumi.Input[str]] = None, + use_path_style: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[str] bucket: Name of the S3 bucket. + :param pulumi.Input[str] region: The geographic location of the bucket. Defaults to `$AWS_REGION`. + :param pulumi.Input[str] access_key_id: Defaults to `$AWS_ACCESS_KEY_ID`. + :param pulumi.Input[str] blobs_prefix: Prefix to prepend to blob filenames. + :param pulumi.Input[str] endpoint_url: Endpoint of the S3 bucket. + :param pulumi.Input[bool] ignore_error: Ignore errors caused by failed cache exports. + :param pulumi.Input[str] manifests_prefix: Prefix to prepend on manifest filenames. + :param pulumi.Input['CacheMode'] mode: The cache mode to use. Defaults to `min`. + :param pulumi.Input[str] name: Name of the cache image. + :param pulumi.Input[str] secret_access_key: Defaults to `$AWS_SECRET_ACCESS_KEY`. + :param pulumi.Input[str] session_token: Defaults to `$AWS_SESSION_TOKEN`. + :param pulumi.Input[bool] use_path_style: Uses `bucket` in the URL instead of hostname when `true`. + """ + pulumi.set(__self__, "bucket", bucket) + if region is None: + region = (_utilities.get_env('AWS_REGION') or '') + pulumi.set(__self__, "region", region) + if access_key_id is None: + access_key_id = (_utilities.get_env('AWS_ACCESS_KEY_ID') or '') + if access_key_id is not None: + pulumi.set(__self__, "access_key_id", access_key_id) + if blobs_prefix is not None: + pulumi.set(__self__, "blobs_prefix", blobs_prefix) + if endpoint_url is not None: + pulumi.set(__self__, "endpoint_url", endpoint_url) + if ignore_error is None: + ignore_error = False + if ignore_error is not None: + pulumi.set(__self__, "ignore_error", ignore_error) + if manifests_prefix is not None: + pulumi.set(__self__, "manifests_prefix", manifests_prefix) + if mode is None: + mode = 'min' + if mode is not None: + pulumi.set(__self__, "mode", mode) + if name is not None: + pulumi.set(__self__, "name", name) + if secret_access_key is None: + secret_access_key = (_utilities.get_env('AWS_SECRET_ACCESS_KEY') or '') + if secret_access_key is not None: + pulumi.set(__self__, "secret_access_key", secret_access_key) + if session_token is None: + session_token = (_utilities.get_env('AWS_SESSION_TOKEN') or '') + if session_token is not None: + pulumi.set(__self__, "session_token", session_token) + if use_path_style is not None: + pulumi.set(__self__, "use_path_style", use_path_style) + + @property + @pulumi.getter + def bucket(self) -> pulumi.Input[str]: + """ + Name of the S3 bucket. + """ + return pulumi.get(self, "bucket") + + @bucket.setter + def bucket(self, value: pulumi.Input[str]): + pulumi.set(self, "bucket", value) + + @property + @pulumi.getter + def region(self) -> pulumi.Input[str]: + """ + The geographic location of the bucket. Defaults to `$AWS_REGION`. + """ + return pulumi.get(self, "region") + + @region.setter + def region(self, value: pulumi.Input[str]): + pulumi.set(self, "region", value) + + @property + @pulumi.getter(name="accessKeyId") + def access_key_id(self) -> Optional[pulumi.Input[str]]: + """ + Defaults to `$AWS_ACCESS_KEY_ID`. + """ + return pulumi.get(self, "access_key_id") + + @access_key_id.setter + def access_key_id(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "access_key_id", value) + + @property + @pulumi.getter(name="blobsPrefix") + def blobs_prefix(self) -> Optional[pulumi.Input[str]]: + """ + Prefix to prepend to blob filenames. + """ + return pulumi.get(self, "blobs_prefix") + + @blobs_prefix.setter + def blobs_prefix(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "blobs_prefix", value) + + @property + @pulumi.getter(name="endpointUrl") + def endpoint_url(self) -> Optional[pulumi.Input[str]]: + """ + Endpoint of the S3 bucket. + """ + return pulumi.get(self, "endpoint_url") + + @endpoint_url.setter + def endpoint_url(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "endpoint_url", value) + + @property + @pulumi.getter(name="ignoreError") + def ignore_error(self) -> Optional[pulumi.Input[bool]]: + """ + Ignore errors caused by failed cache exports. + """ + return pulumi.get(self, "ignore_error") + + @ignore_error.setter + def ignore_error(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "ignore_error", value) + + @property + @pulumi.getter(name="manifestsPrefix") + def manifests_prefix(self) -> Optional[pulumi.Input[str]]: + """ + Prefix to prepend on manifest filenames. + """ + return pulumi.get(self, "manifests_prefix") + + @manifests_prefix.setter + def manifests_prefix(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "manifests_prefix", value) + + @property + @pulumi.getter + def mode(self) -> Optional[pulumi.Input['CacheMode']]: + """ + The cache mode to use. Defaults to `min`. + """ + return pulumi.get(self, "mode") + + @mode.setter + def mode(self, value: Optional[pulumi.Input['CacheMode']]): + pulumi.set(self, "mode", value) + + @property + @pulumi.getter + def name(self) -> Optional[pulumi.Input[str]]: + """ + Name of the cache image. + """ + return pulumi.get(self, "name") + + @name.setter + def name(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "name", value) + + @property + @pulumi.getter(name="secretAccessKey") + def secret_access_key(self) -> Optional[pulumi.Input[str]]: + """ + Defaults to `$AWS_SECRET_ACCESS_KEY`. + """ + return pulumi.get(self, "secret_access_key") + + @secret_access_key.setter + def secret_access_key(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "secret_access_key", value) + + @property + @pulumi.getter(name="sessionToken") + def session_token(self) -> Optional[pulumi.Input[str]]: + """ + Defaults to `$AWS_SESSION_TOKEN`. + """ + return pulumi.get(self, "session_token") + + @session_token.setter + def session_token(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "session_token", value) + + @property + @pulumi.getter(name="usePathStyle") + def use_path_style(self) -> Optional[pulumi.Input[bool]]: + """ + Uses `bucket` in the URL instead of hostname when `true`. + """ + return pulumi.get(self, "use_path_style") + + @use_path_style.setter + def use_path_style(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "use_path_style", value) + + +@pulumi.input_type +class CacheToArgs: + def __init__(__self__, *, + azblob: Optional[pulumi.Input['CacheToAzureBlobArgs']] = None, + disabled: Optional[pulumi.Input[bool]] = None, + gha: Optional[pulumi.Input['CacheToGitHubActionsArgs']] = None, + inline: Optional[pulumi.Input['CacheToInlineArgs']] = None, + local: Optional[pulumi.Input['CacheToLocalArgs']] = None, + raw: Optional[pulumi.Input[str]] = None, + registry: Optional[pulumi.Input['CacheToRegistryArgs']] = None, + s3: Optional[pulumi.Input['CacheToS3Args']] = None): + """ + :param pulumi.Input['CacheToAzureBlobArgs'] azblob: Push cache to Azure's blob storage service. + :param pulumi.Input[bool] disabled: When `true` this entry will be excluded. Defaults to `false`. + :param pulumi.Input['CacheToGitHubActionsArgs'] gha: Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to + expose appropriate credentials to your GitHub workflow. + :param pulumi.Input['CacheToInlineArgs'] inline: The inline cache storage backend is the simplest implementation to get + started with, but it does not handle multi-stage builds. Consider the + `registry` cache backend instead. + :param pulumi.Input['CacheToLocalArgs'] local: A simple backend which caches imagines on your local filesystem. + :param pulumi.Input[str] raw: A raw string as you would provide it to the Docker CLI (e.g., + `type=inline`) + :param pulumi.Input['CacheToRegistryArgs'] registry: Push caches to remote registries. Incompatible with the `docker` build + driver. + :param pulumi.Input['CacheToS3Args'] s3: Push cache to AWS S3 or S3-compatible services such as MinIO. + """ + if azblob is not None: + pulumi.set(__self__, "azblob", azblob) + if disabled is not None: + pulumi.set(__self__, "disabled", disabled) + if gha is not None: + pulumi.set(__self__, "gha", gha) + if inline is not None: + pulumi.set(__self__, "inline", inline) + if local is not None: + pulumi.set(__self__, "local", local) + if raw is not None: + pulumi.set(__self__, "raw", raw) + if registry is not None: + pulumi.set(__self__, "registry", registry) + if s3 is not None: + pulumi.set(__self__, "s3", s3) + + @property + @pulumi.getter + def azblob(self) -> Optional[pulumi.Input['CacheToAzureBlobArgs']]: + """ + Push cache to Azure's blob storage service. + """ + return pulumi.get(self, "azblob") + + @azblob.setter + def azblob(self, value: Optional[pulumi.Input['CacheToAzureBlobArgs']]): + pulumi.set(self, "azblob", value) + + @property + @pulumi.getter + def disabled(self) -> Optional[pulumi.Input[bool]]: + """ + When `true` this entry will be excluded. Defaults to `false`. + """ + return pulumi.get(self, "disabled") + + @disabled.setter + def disabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "disabled", value) + + @property + @pulumi.getter + def gha(self) -> Optional[pulumi.Input['CacheToGitHubActionsArgs']]: + """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to + expose appropriate credentials to your GitHub workflow. + """ + return pulumi.get(self, "gha") + + @gha.setter + def gha(self, value: Optional[pulumi.Input['CacheToGitHubActionsArgs']]): + pulumi.set(self, "gha", value) + + @property + @pulumi.getter + def inline(self) -> Optional[pulumi.Input['CacheToInlineArgs']]: + """ + The inline cache storage backend is the simplest implementation to get + started with, but it does not handle multi-stage builds. Consider the + `registry` cache backend instead. + """ + return pulumi.get(self, "inline") + + @inline.setter + def inline(self, value: Optional[pulumi.Input['CacheToInlineArgs']]): + pulumi.set(self, "inline", value) + + @property + @pulumi.getter + def local(self) -> Optional[pulumi.Input['CacheToLocalArgs']]: + """ + A simple backend which caches imagines on your local filesystem. + """ + return pulumi.get(self, "local") + + @local.setter + def local(self, value: Optional[pulumi.Input['CacheToLocalArgs']]): + pulumi.set(self, "local", value) + + @property + @pulumi.getter + def raw(self) -> Optional[pulumi.Input[str]]: + """ + A raw string as you would provide it to the Docker CLI (e.g., + `type=inline`) + """ + return pulumi.get(self, "raw") + + @raw.setter + def raw(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "raw", value) + + @property + @pulumi.getter + def registry(self) -> Optional[pulumi.Input['CacheToRegistryArgs']]: + """ + Push caches to remote registries. Incompatible with the `docker` build + driver. + """ + return pulumi.get(self, "registry") + + @registry.setter + def registry(self, value: Optional[pulumi.Input['CacheToRegistryArgs']]): + pulumi.set(self, "registry", value) + + @property + @pulumi.getter + def s3(self) -> Optional[pulumi.Input['CacheToS3Args']]: + """ + Push cache to AWS S3 or S3-compatible services such as MinIO. + """ + return pulumi.get(self, "s3") + + @s3.setter + def s3(self, value: Optional[pulumi.Input['CacheToS3Args']]): + pulumi.set(self, "s3", value) + + +@pulumi.input_type +class ContextArgs: + def __init__(__self__, *, + location: pulumi.Input[str]): + """ + :param pulumi.Input[str] location: Resources to use for build context. + + The location can be: + * A relative or absolute path to a local directory (`.`, `./app`, + `/app`, etc.). + * A remote URL of a Git repository, tarball, or plain text file + (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + etc.). + """ + pulumi.set(__self__, "location", location) + + @property + @pulumi.getter + def location(self) -> pulumi.Input[str]: + """ + Resources to use for build context. + + The location can be: + * A relative or absolute path to a local directory (`.`, `./app`, + `/app`, etc.). + * A remote URL of a Git repository, tarball, or plain text file + (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + etc.). + """ + return pulumi.get(self, "location") + + @location.setter + def location(self, value: pulumi.Input[str]): + pulumi.set(self, "location", value) + + +@pulumi.input_type +class DockerfileArgs: + def __init__(__self__, *, + inline: Optional[pulumi.Input[str]] = None, + location: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] inline: Raw Dockerfile contents. + + Conflicts with `location`. + + Equivalent to invoking Docker with `-f -`. + :param pulumi.Input[str] location: Location of the Dockerfile to use. + + Can be a relative or absolute path to a local file, or a remote URL. + + Defaults to `${context.location}/Dockerfile` if context is on-disk. + + Conflicts with `inline`. + """ + if inline is not None: + pulumi.set(__self__, "inline", inline) + if location is not None: + pulumi.set(__self__, "location", location) + + @property + @pulumi.getter + def inline(self) -> Optional[pulumi.Input[str]]: + """ + Raw Dockerfile contents. + + Conflicts with `location`. + + Equivalent to invoking Docker with `-f -`. + """ + return pulumi.get(self, "inline") + + @inline.setter + def inline(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "inline", value) + + @property + @pulumi.getter + def location(self) -> Optional[pulumi.Input[str]]: + """ + Location of the Dockerfile to use. + + Can be a relative or absolute path to a local file, or a remote URL. + + Defaults to `${context.location}/Dockerfile` if context is on-disk. + + Conflicts with `inline`. + """ + return pulumi.get(self, "location") + + @location.setter + def location(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "location", value) + + +@pulumi.input_type +class ExportCacheOnlyArgs: + def __init__(__self__): + pass + + +@pulumi.input_type +class ExportDockerArgs: + def __init__(__self__, *, + annotations: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + compression: Optional[pulumi.Input['CompressionType']] = None, + compression_level: Optional[pulumi.Input[int]] = None, + dest: Optional[pulumi.Input[str]] = None, + force_compression: Optional[pulumi.Input[bool]] = None, + names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + oci_media_types: Optional[pulumi.Input[bool]] = None, + tar: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] annotations: Attach an arbitrary key/value annotation to the image. + :param pulumi.Input['CompressionType'] compression: The compression type to use. + :param pulumi.Input[int] compression_level: Compression level from 0 to 22. + :param pulumi.Input[str] dest: The local export path. + :param pulumi.Input[bool] force_compression: Forcefully apply compression. + :param pulumi.Input[Sequence[pulumi.Input[str]]] names: Specify images names to export. This is overridden if tags are already specified. + :param pulumi.Input[bool] oci_media_types: Use OCI media types in exporter manifests. + :param pulumi.Input[bool] tar: Bundle the output into a tarball layout. + """ + if annotations is not None: + pulumi.set(__self__, "annotations", annotations) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if dest is not None: + pulumi.set(__self__, "dest", dest) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if names is not None: + pulumi.set(__self__, "names", names) + if oci_media_types is None: + oci_media_types = False + if oci_media_types is not None: + pulumi.set(__self__, "oci_media_types", oci_media_types) + if tar is None: + tar = True + if tar is not None: + pulumi.set(__self__, "tar", tar) + + @property + @pulumi.getter + def annotations(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + Attach an arbitrary key/value annotation to the image. + """ + return pulumi.get(self, "annotations") + + @annotations.setter + def annotations(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "annotations", value) + + @property + @pulumi.getter + def compression(self) -> Optional[pulumi.Input['CompressionType']]: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @compression.setter + def compression(self, value: Optional[pulumi.Input['CompressionType']]): + pulumi.set(self, "compression", value) + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[pulumi.Input[int]]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @compression_level.setter + def compression_level(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "compression_level", value) + + @property + @pulumi.getter + def dest(self) -> Optional[pulumi.Input[str]]: + """ + The local export path. + """ + return pulumi.get(self, "dest") + + @dest.setter + def dest(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "dest", value) + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[pulumi.Input[bool]]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @force_compression.setter + def force_compression(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "force_compression", value) + + @property + @pulumi.getter + def names(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + Specify images names to export. This is overridden if tags are already specified. + """ + return pulumi.get(self, "names") + + @names.setter + def names(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "names", value) + + @property + @pulumi.getter(name="ociMediaTypes") + def oci_media_types(self) -> Optional[pulumi.Input[bool]]: + """ + Use OCI media types in exporter manifests. + """ + return pulumi.get(self, "oci_media_types") + + @oci_media_types.setter + def oci_media_types(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "oci_media_types", value) + + @property + @pulumi.getter + def tar(self) -> Optional[pulumi.Input[bool]]: + """ + Bundle the output into a tarball layout. + """ + return pulumi.get(self, "tar") + + @tar.setter + def tar(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "tar", value) + + +@pulumi.input_type +class ExportImageArgs: + def __init__(__self__, *, + annotations: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + compression: Optional[pulumi.Input['CompressionType']] = None, + compression_level: Optional[pulumi.Input[int]] = None, + dangling_name_prefix: Optional[pulumi.Input[str]] = None, + force_compression: Optional[pulumi.Input[bool]] = None, + insecure: Optional[pulumi.Input[bool]] = None, + name_canonical: Optional[pulumi.Input[bool]] = None, + names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + oci_media_types: Optional[pulumi.Input[bool]] = None, + push: Optional[pulumi.Input[bool]] = None, + push_by_digest: Optional[pulumi.Input[bool]] = None, + store: Optional[pulumi.Input[bool]] = None, + unpack: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] annotations: Attach an arbitrary key/value annotation to the image. + :param pulumi.Input['CompressionType'] compression: The compression type to use. + :param pulumi.Input[int] compression_level: Compression level from 0 to 22. + :param pulumi.Input[str] dangling_name_prefix: Name image with `prefix@`, used for anonymous images. + :param pulumi.Input[bool] force_compression: Forcefully apply compression. + :param pulumi.Input[bool] insecure: Allow pushing to an insecure registry. + :param pulumi.Input[bool] name_canonical: Add additional canonical name (`name@`). + :param pulumi.Input[Sequence[pulumi.Input[str]]] names: Specify images names to export. This is overridden if tags are already specified. + :param pulumi.Input[bool] oci_media_types: Use OCI media types in exporter manifests. + :param pulumi.Input[bool] push: Push after creating the image. Defaults to `false`. + :param pulumi.Input[bool] push_by_digest: Push image without name. + :param pulumi.Input[bool] store: Store resulting images to the worker's image store and ensure all of + its blobs are in the content store. + + Defaults to `true`. + + Ignored if the worker doesn't have image store (when using OCI workers, + for example). + :param pulumi.Input[bool] unpack: Unpack image after creation (for use with containerd). Defaults to + `false`. + """ + if annotations is not None: + pulumi.set(__self__, "annotations", annotations) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if dangling_name_prefix is not None: + pulumi.set(__self__, "dangling_name_prefix", dangling_name_prefix) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if insecure is not None: + pulumi.set(__self__, "insecure", insecure) + if name_canonical is not None: + pulumi.set(__self__, "name_canonical", name_canonical) + if names is not None: + pulumi.set(__self__, "names", names) + if oci_media_types is None: + oci_media_types = False + if oci_media_types is not None: + pulumi.set(__self__, "oci_media_types", oci_media_types) + if push is not None: + pulumi.set(__self__, "push", push) + if push_by_digest is not None: + pulumi.set(__self__, "push_by_digest", push_by_digest) + if store is None: + store = True + if store is not None: + pulumi.set(__self__, "store", store) + if unpack is not None: + pulumi.set(__self__, "unpack", unpack) + + @property + @pulumi.getter + def annotations(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + Attach an arbitrary key/value annotation to the image. + """ + return pulumi.get(self, "annotations") + + @annotations.setter + def annotations(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "annotations", value) + + @property + @pulumi.getter + def compression(self) -> Optional[pulumi.Input['CompressionType']]: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @compression.setter + def compression(self, value: Optional[pulumi.Input['CompressionType']]): + pulumi.set(self, "compression", value) + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[pulumi.Input[int]]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @compression_level.setter + def compression_level(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "compression_level", value) + + @property + @pulumi.getter(name="danglingNamePrefix") + def dangling_name_prefix(self) -> Optional[pulumi.Input[str]]: + """ + Name image with `prefix@`, used for anonymous images. + """ + return pulumi.get(self, "dangling_name_prefix") + + @dangling_name_prefix.setter + def dangling_name_prefix(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "dangling_name_prefix", value) + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[pulumi.Input[bool]]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @force_compression.setter + def force_compression(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "force_compression", value) + + @property + @pulumi.getter + def insecure(self) -> Optional[pulumi.Input[bool]]: + """ + Allow pushing to an insecure registry. + """ + return pulumi.get(self, "insecure") + + @insecure.setter + def insecure(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "insecure", value) + + @property + @pulumi.getter(name="nameCanonical") + def name_canonical(self) -> Optional[pulumi.Input[bool]]: + """ + Add additional canonical name (`name@`). + """ + return pulumi.get(self, "name_canonical") + + @name_canonical.setter + def name_canonical(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "name_canonical", value) + + @property + @pulumi.getter + def names(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + Specify images names to export. This is overridden if tags are already specified. + """ + return pulumi.get(self, "names") + + @names.setter + def names(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "names", value) + + @property + @pulumi.getter(name="ociMediaTypes") + def oci_media_types(self) -> Optional[pulumi.Input[bool]]: + """ + Use OCI media types in exporter manifests. + """ + return pulumi.get(self, "oci_media_types") + + @oci_media_types.setter + def oci_media_types(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "oci_media_types", value) + + @property + @pulumi.getter + def push(self) -> Optional[pulumi.Input[bool]]: + """ + Push after creating the image. Defaults to `false`. + """ + return pulumi.get(self, "push") + + @push.setter + def push(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "push", value) + + @property + @pulumi.getter(name="pushByDigest") + def push_by_digest(self) -> Optional[pulumi.Input[bool]]: + """ + Push image without name. + """ + return pulumi.get(self, "push_by_digest") + + @push_by_digest.setter + def push_by_digest(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "push_by_digest", value) + + @property + @pulumi.getter + def store(self) -> Optional[pulumi.Input[bool]]: + """ + Store resulting images to the worker's image store and ensure all of + its blobs are in the content store. + + Defaults to `true`. + + Ignored if the worker doesn't have image store (when using OCI workers, + for example). + """ + return pulumi.get(self, "store") + + @store.setter + def store(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "store", value) + + @property + @pulumi.getter + def unpack(self) -> Optional[pulumi.Input[bool]]: + """ + Unpack image after creation (for use with containerd). Defaults to + `false`. + """ + return pulumi.get(self, "unpack") + + @unpack.setter + def unpack(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "unpack", value) + + +@pulumi.input_type +class ExportLocalArgs: + def __init__(__self__, *, + dest: pulumi.Input[str]): + """ + :param pulumi.Input[str] dest: Output path. + """ + pulumi.set(__self__, "dest", dest) + + @property + @pulumi.getter + def dest(self) -> pulumi.Input[str]: + """ + Output path. + """ + return pulumi.get(self, "dest") + + @dest.setter + def dest(self, value: pulumi.Input[str]): + pulumi.set(self, "dest", value) + + +@pulumi.input_type +class ExportOCIArgs: + def __init__(__self__, *, + annotations: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + compression: Optional[pulumi.Input['CompressionType']] = None, + compression_level: Optional[pulumi.Input[int]] = None, + dest: Optional[pulumi.Input[str]] = None, + force_compression: Optional[pulumi.Input[bool]] = None, + names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + oci_media_types: Optional[pulumi.Input[bool]] = None, + tar: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] annotations: Attach an arbitrary key/value annotation to the image. + :param pulumi.Input['CompressionType'] compression: The compression type to use. + :param pulumi.Input[int] compression_level: Compression level from 0 to 22. + :param pulumi.Input[str] dest: The local export path. + :param pulumi.Input[bool] force_compression: Forcefully apply compression. + :param pulumi.Input[Sequence[pulumi.Input[str]]] names: Specify images names to export. This is overridden if tags are already specified. + :param pulumi.Input[bool] oci_media_types: Use OCI media types in exporter manifests. + :param pulumi.Input[bool] tar: Bundle the output into a tarball layout. + """ + if annotations is not None: + pulumi.set(__self__, "annotations", annotations) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if dest is not None: + pulumi.set(__self__, "dest", dest) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if names is not None: + pulumi.set(__self__, "names", names) + if oci_media_types is None: + oci_media_types = True + if oci_media_types is not None: + pulumi.set(__self__, "oci_media_types", oci_media_types) + if tar is None: + tar = True + if tar is not None: + pulumi.set(__self__, "tar", tar) + + @property + @pulumi.getter + def annotations(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + Attach an arbitrary key/value annotation to the image. + """ + return pulumi.get(self, "annotations") + + @annotations.setter + def annotations(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "annotations", value) + + @property + @pulumi.getter + def compression(self) -> Optional[pulumi.Input['CompressionType']]: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @compression.setter + def compression(self, value: Optional[pulumi.Input['CompressionType']]): + pulumi.set(self, "compression", value) + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[pulumi.Input[int]]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @compression_level.setter + def compression_level(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "compression_level", value) + + @property + @pulumi.getter + def dest(self) -> Optional[pulumi.Input[str]]: + """ + The local export path. + """ + return pulumi.get(self, "dest") + + @dest.setter + def dest(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "dest", value) + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[pulumi.Input[bool]]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @force_compression.setter + def force_compression(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "force_compression", value) + + @property + @pulumi.getter + def names(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + Specify images names to export. This is overridden if tags are already specified. + """ + return pulumi.get(self, "names") + + @names.setter + def names(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "names", value) + + @property + @pulumi.getter(name="ociMediaTypes") + def oci_media_types(self) -> Optional[pulumi.Input[bool]]: + """ + Use OCI media types in exporter manifests. + """ + return pulumi.get(self, "oci_media_types") + + @oci_media_types.setter + def oci_media_types(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "oci_media_types", value) + + @property + @pulumi.getter + def tar(self) -> Optional[pulumi.Input[bool]]: + """ + Bundle the output into a tarball layout. + """ + return pulumi.get(self, "tar") + + @tar.setter + def tar(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "tar", value) + + +@pulumi.input_type +class ExportRegistryArgs: + def __init__(__self__, *, + annotations: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + compression: Optional[pulumi.Input['CompressionType']] = None, + compression_level: Optional[pulumi.Input[int]] = None, + dangling_name_prefix: Optional[pulumi.Input[str]] = None, + force_compression: Optional[pulumi.Input[bool]] = None, + insecure: Optional[pulumi.Input[bool]] = None, + name_canonical: Optional[pulumi.Input[bool]] = None, + names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + oci_media_types: Optional[pulumi.Input[bool]] = None, + push: Optional[pulumi.Input[bool]] = None, + push_by_digest: Optional[pulumi.Input[bool]] = None, + store: Optional[pulumi.Input[bool]] = None, + unpack: Optional[pulumi.Input[bool]] = None): + """ + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] annotations: Attach an arbitrary key/value annotation to the image. + :param pulumi.Input['CompressionType'] compression: The compression type to use. + :param pulumi.Input[int] compression_level: Compression level from 0 to 22. + :param pulumi.Input[str] dangling_name_prefix: Name image with `prefix@`, used for anonymous images. + :param pulumi.Input[bool] force_compression: Forcefully apply compression. + :param pulumi.Input[bool] insecure: Allow pushing to an insecure registry. + :param pulumi.Input[bool] name_canonical: Add additional canonical name (`name@`). + :param pulumi.Input[Sequence[pulumi.Input[str]]] names: Specify images names to export. This is overridden if tags are already specified. + :param pulumi.Input[bool] oci_media_types: Use OCI media types in exporter manifests. + :param pulumi.Input[bool] push: Push after creating the image. Defaults to `true`. + :param pulumi.Input[bool] push_by_digest: Push image without name. + :param pulumi.Input[bool] store: Store resulting images to the worker's image store and ensure all of + its blobs are in the content store. + + Defaults to `true`. + + Ignored if the worker doesn't have image store (when using OCI workers, + for example). + :param pulumi.Input[bool] unpack: Unpack image after creation (for use with containerd). Defaults to + `false`. + """ + if annotations is not None: + pulumi.set(__self__, "annotations", annotations) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if dangling_name_prefix is not None: + pulumi.set(__self__, "dangling_name_prefix", dangling_name_prefix) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if insecure is not None: + pulumi.set(__self__, "insecure", insecure) + if name_canonical is not None: + pulumi.set(__self__, "name_canonical", name_canonical) + if names is not None: + pulumi.set(__self__, "names", names) + if oci_media_types is None: + oci_media_types = False + if oci_media_types is not None: + pulumi.set(__self__, "oci_media_types", oci_media_types) + if push is None: + push = True + if push is not None: + pulumi.set(__self__, "push", push) + if push_by_digest is not None: + pulumi.set(__self__, "push_by_digest", push_by_digest) + if store is None: + store = True + if store is not None: + pulumi.set(__self__, "store", store) + if unpack is not None: + pulumi.set(__self__, "unpack", unpack) + + @property + @pulumi.getter + def annotations(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + Attach an arbitrary key/value annotation to the image. + """ + return pulumi.get(self, "annotations") + + @annotations.setter + def annotations(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "annotations", value) + + @property + @pulumi.getter + def compression(self) -> Optional[pulumi.Input['CompressionType']]: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @compression.setter + def compression(self, value: Optional[pulumi.Input['CompressionType']]): + pulumi.set(self, "compression", value) + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[pulumi.Input[int]]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @compression_level.setter + def compression_level(self, value: Optional[pulumi.Input[int]]): + pulumi.set(self, "compression_level", value) + + @property + @pulumi.getter(name="danglingNamePrefix") + def dangling_name_prefix(self) -> Optional[pulumi.Input[str]]: + """ + Name image with `prefix@`, used for anonymous images. + """ + return pulumi.get(self, "dangling_name_prefix") + + @dangling_name_prefix.setter + def dangling_name_prefix(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "dangling_name_prefix", value) + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[pulumi.Input[bool]]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @force_compression.setter + def force_compression(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "force_compression", value) + + @property + @pulumi.getter + def insecure(self) -> Optional[pulumi.Input[bool]]: + """ + Allow pushing to an insecure registry. + """ + return pulumi.get(self, "insecure") + + @insecure.setter + def insecure(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "insecure", value) + + @property + @pulumi.getter(name="nameCanonical") + def name_canonical(self) -> Optional[pulumi.Input[bool]]: + """ + Add additional canonical name (`name@`). + """ + return pulumi.get(self, "name_canonical") + + @name_canonical.setter + def name_canonical(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "name_canonical", value) + + @property + @pulumi.getter + def names(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + Specify images names to export. This is overridden if tags are already specified. + """ + return pulumi.get(self, "names") + + @names.setter + def names(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "names", value) + + @property + @pulumi.getter(name="ociMediaTypes") + def oci_media_types(self) -> Optional[pulumi.Input[bool]]: + """ + Use OCI media types in exporter manifests. + """ + return pulumi.get(self, "oci_media_types") + + @oci_media_types.setter + def oci_media_types(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "oci_media_types", value) + + @property + @pulumi.getter + def push(self) -> Optional[pulumi.Input[bool]]: + """ + Push after creating the image. Defaults to `true`. + """ + return pulumi.get(self, "push") + + @push.setter + def push(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "push", value) + + @property + @pulumi.getter(name="pushByDigest") + def push_by_digest(self) -> Optional[pulumi.Input[bool]]: + """ + Push image without name. + """ + return pulumi.get(self, "push_by_digest") + + @push_by_digest.setter + def push_by_digest(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "push_by_digest", value) + + @property + @pulumi.getter + def store(self) -> Optional[pulumi.Input[bool]]: + """ + Store resulting images to the worker's image store and ensure all of + its blobs are in the content store. + + Defaults to `true`. + + Ignored if the worker doesn't have image store (when using OCI workers, + for example). + """ + return pulumi.get(self, "store") + + @store.setter + def store(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "store", value) + + @property + @pulumi.getter + def unpack(self) -> Optional[pulumi.Input[bool]]: + """ + Unpack image after creation (for use with containerd). Defaults to + `false`. + """ + return pulumi.get(self, "unpack") + + @unpack.setter + def unpack(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "unpack", value) + + +@pulumi.input_type +class ExportTarArgs: + def __init__(__self__, *, + dest: pulumi.Input[str]): + """ + :param pulumi.Input[str] dest: Output path. + """ + pulumi.set(__self__, "dest", dest) + + @property + @pulumi.getter + def dest(self) -> pulumi.Input[str]: + """ + Output path. + """ + return pulumi.get(self, "dest") + + @dest.setter + def dest(self, value: pulumi.Input[str]): + pulumi.set(self, "dest", value) + + +@pulumi.input_type +class ExportArgs: + def __init__(__self__, *, + cacheonly: Optional[pulumi.Input['ExportCacheOnlyArgs']] = None, + disabled: Optional[pulumi.Input[bool]] = None, + docker: Optional[pulumi.Input['ExportDockerArgs']] = None, + image: Optional[pulumi.Input['ExportImageArgs']] = None, + local: Optional[pulumi.Input['ExportLocalArgs']] = None, + oci: Optional[pulumi.Input['ExportOCIArgs']] = None, + raw: Optional[pulumi.Input[str]] = None, + registry: Optional[pulumi.Input['ExportRegistryArgs']] = None, + tar: Optional[pulumi.Input['ExportTarArgs']] = None): + """ + :param pulumi.Input['ExportCacheOnlyArgs'] cacheonly: A no-op export. Helpful for silencing the 'no exports' warning if you + just want to populate caches. + :param pulumi.Input[bool] disabled: When `true` this entry will be excluded. Defaults to `false`. + :param pulumi.Input['ExportDockerArgs'] docker: Export as a Docker image layout. + :param pulumi.Input['ExportImageArgs'] image: Outputs the build result into a container image format. + :param pulumi.Input['ExportLocalArgs'] local: Export to a local directory as files and directories. + :param pulumi.Input['ExportOCIArgs'] oci: Identical to the Docker exporter but uses OCI media types by default. + :param pulumi.Input[str] raw: A raw string as you would provide it to the Docker CLI (e.g., + `type=docker`) + :param pulumi.Input['ExportRegistryArgs'] registry: Identical to the Image exporter, but pushes by default. + :param pulumi.Input['ExportTarArgs'] tar: Export to a local directory as a tarball. + """ + if cacheonly is not None: + pulumi.set(__self__, "cacheonly", cacheonly) + if disabled is not None: + pulumi.set(__self__, "disabled", disabled) + if docker is not None: + pulumi.set(__self__, "docker", docker) + if image is not None: + pulumi.set(__self__, "image", image) + if local is not None: + pulumi.set(__self__, "local", local) + if oci is not None: + pulumi.set(__self__, "oci", oci) + if raw is not None: + pulumi.set(__self__, "raw", raw) + if registry is not None: + pulumi.set(__self__, "registry", registry) + if tar is not None: + pulumi.set(__self__, "tar", tar) + + @property + @pulumi.getter + def cacheonly(self) -> Optional[pulumi.Input['ExportCacheOnlyArgs']]: + """ + A no-op export. Helpful for silencing the 'no exports' warning if you + just want to populate caches. + """ + return pulumi.get(self, "cacheonly") + + @cacheonly.setter + def cacheonly(self, value: Optional[pulumi.Input['ExportCacheOnlyArgs']]): + pulumi.set(self, "cacheonly", value) + + @property + @pulumi.getter + def disabled(self) -> Optional[pulumi.Input[bool]]: + """ + When `true` this entry will be excluded. Defaults to `false`. + """ + return pulumi.get(self, "disabled") + + @disabled.setter + def disabled(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "disabled", value) + + @property + @pulumi.getter + def docker(self) -> Optional[pulumi.Input['ExportDockerArgs']]: + """ + Export as a Docker image layout. + """ + return pulumi.get(self, "docker") + + @docker.setter + def docker(self, value: Optional[pulumi.Input['ExportDockerArgs']]): + pulumi.set(self, "docker", value) + + @property + @pulumi.getter + def image(self) -> Optional[pulumi.Input['ExportImageArgs']]: + """ + Outputs the build result into a container image format. + """ + return pulumi.get(self, "image") + + @image.setter + def image(self, value: Optional[pulumi.Input['ExportImageArgs']]): + pulumi.set(self, "image", value) + + @property + @pulumi.getter + def local(self) -> Optional[pulumi.Input['ExportLocalArgs']]: + """ + Export to a local directory as files and directories. + """ + return pulumi.get(self, "local") + + @local.setter + def local(self, value: Optional[pulumi.Input['ExportLocalArgs']]): + pulumi.set(self, "local", value) + + @property + @pulumi.getter + def oci(self) -> Optional[pulumi.Input['ExportOCIArgs']]: + """ + Identical to the Docker exporter but uses OCI media types by default. + """ + return pulumi.get(self, "oci") + + @oci.setter + def oci(self, value: Optional[pulumi.Input['ExportOCIArgs']]): + pulumi.set(self, "oci", value) + + @property + @pulumi.getter + def raw(self) -> Optional[pulumi.Input[str]]: + """ + A raw string as you would provide it to the Docker CLI (e.g., + `type=docker`) + """ + return pulumi.get(self, "raw") + + @raw.setter + def raw(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "raw", value) + + @property + @pulumi.getter + def registry(self) -> Optional[pulumi.Input['ExportRegistryArgs']]: + """ + Identical to the Image exporter, but pushes by default. + """ + return pulumi.get(self, "registry") + + @registry.setter + def registry(self, value: Optional[pulumi.Input['ExportRegistryArgs']]): + pulumi.set(self, "registry", value) + + @property + @pulumi.getter + def tar(self) -> Optional[pulumi.Input['ExportTarArgs']]: + """ + Export to a local directory as a tarball. + """ + return pulumi.get(self, "tar") + + @tar.setter + def tar(self, value: Optional[pulumi.Input['ExportTarArgs']]): + pulumi.set(self, "tar", value) + + +@pulumi.input_type +class RegistryArgs: + def __init__(__self__, *, + address: pulumi.Input[str], + password: Optional[pulumi.Input[str]] = None, + username: Optional[pulumi.Input[str]] = None): + """ + :param pulumi.Input[str] address: The registry's address (e.g. "docker.io"). + :param pulumi.Input[str] password: Password or token for the registry. + :param pulumi.Input[str] username: Username for the registry. + """ + pulumi.set(__self__, "address", address) + if password is not None: + pulumi.set(__self__, "password", password) + if username is not None: + pulumi.set(__self__, "username", username) + + @property + @pulumi.getter + def address(self) -> pulumi.Input[str]: + """ + The registry's address (e.g. "docker.io"). + """ + return pulumi.get(self, "address") + + @address.setter + def address(self, value: pulumi.Input[str]): + pulumi.set(self, "address", value) + + @property + @pulumi.getter + def password(self) -> Optional[pulumi.Input[str]]: + """ + Password or token for the registry. + """ + return pulumi.get(self, "password") + + @password.setter + def password(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "password", value) + + @property + @pulumi.getter + def username(self) -> Optional[pulumi.Input[str]]: + """ + Username for the registry. + """ + return pulumi.get(self, "username") + + @username.setter + def username(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "username", value) + + +@pulumi.input_type +class SSHArgs: + def __init__(__self__, *, + id: pulumi.Input[str], + paths: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None): + """ + :param pulumi.Input[str] id: Useful for distinguishing different servers that are part of the same + build. + + A value of `default` is appropriate if only dealing with a single host. + :param pulumi.Input[Sequence[pulumi.Input[str]]] paths: SSH agent socket or private keys to expose to the build under the given + identifier. + + Defaults to `[$SSH_AUTH_SOCK]`. + + Note that your keys are **not** automatically added when using an + agent. Run `ssh-add -l` locally to confirm which public keys are + visible to the agent; these will be exposed to your build. + """ + pulumi.set(__self__, "id", id) + if paths is not None: + pulumi.set(__self__, "paths", paths) + + @property + @pulumi.getter + def id(self) -> pulumi.Input[str]: + """ + Useful for distinguishing different servers that are part of the same + build. + + A value of `default` is appropriate if only dealing with a single host. + """ + return pulumi.get(self, "id") + + @id.setter + def id(self, value: pulumi.Input[str]): + pulumi.set(self, "id", value) + + @property + @pulumi.getter + def paths(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + SSH agent socket or private keys to expose to the build under the given + identifier. + + Defaults to `[$SSH_AUTH_SOCK]`. + + Note that your keys are **not** automatically added when using an + agent. Run `ssh-add -l` locally to confirm which public keys are + visible to the agent; these will be exposed to your build. + """ + return pulumi.get(self, "paths") + + @paths.setter + def paths(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "paths", value) + + diff --git a/sdk/python/pulumi_dockerbuild/_utilities.py b/sdk/python/pulumi_docker_build/_utilities.py similarity index 99% rename from sdk/python/pulumi_dockerbuild/_utilities.py rename to sdk/python/pulumi_docker_build/_utilities.py index 0de933e..0eb0046 100644 --- a/sdk/python/pulumi_dockerbuild/_utilities.py +++ b/sdk/python/pulumi_docker_build/_utilities.py @@ -288,4 +288,4 @@ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bo ) def get_plugin_download_url(): - return "github.com/pulumi/pulumi-dockerbuild" + return None diff --git a/sdk/python/pulumi_docker_build/config/__init__.py b/sdk/python/pulumi_docker_build/config/__init__.py new file mode 100644 index 0000000..b8c2b21 --- /dev/null +++ b/sdk/python/pulumi_docker_build/config/__init__.py @@ -0,0 +1,8 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import sys +from .vars import _ExportableConfig + +sys.modules[__name__].__class__ = _ExportableConfig diff --git a/sdk/python/pulumi_docker_build/config/__init__.pyi b/sdk/python/pulumi_docker_build/config/__init__.pyi new file mode 100644 index 0000000..56b3600 --- /dev/null +++ b/sdk/python/pulumi_docker_build/config/__init__.pyi @@ -0,0 +1,19 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from .. import _utilities +from .. import outputs as _root_outputs + +host: str +""" +The build daemon's address. +""" + +registries: Optional[str] + diff --git a/sdk/python/pulumi_docker_build/config/vars.py b/sdk/python/pulumi_docker_build/config/vars.py new file mode 100644 index 0000000..340ed0e --- /dev/null +++ b/sdk/python/pulumi_docker_build/config/vars.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from .. import _utilities +from .. import outputs as _root_outputs + +import types + +__config__ = pulumi.Config('docker-build') + + +class _ExportableConfig(types.ModuleType): + @property + def host(self) -> str: + """ + The build daemon's address. + """ + return __config__.get('host') or (_utilities.get_env('DOCKER_HOST') or '') + + @property + def registries(self) -> Optional[str]: + return __config__.get('registries') + diff --git a/sdk/python/pulumi_docker_build/image.py b/sdk/python/pulumi_docker_build/image.py new file mode 100644 index 0000000..e68a4e9 --- /dev/null +++ b/sdk/python/pulumi_docker_build/image.py @@ -0,0 +1,1799 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities +from . import outputs +from ._enums import * +from ._inputs import * + +__all__ = ['ImageArgs', 'Image'] + +@pulumi.input_type +class ImageArgs: + def __init__(__self__, *, + push: pulumi.Input[bool], + add_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + build_args: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + build_on_preview: Optional[pulumi.Input[bool]] = None, + builder: Optional[pulumi.Input['BuilderConfigArgs']] = None, + cache_from: Optional[pulumi.Input[Sequence[pulumi.Input['CacheFromArgs']]]] = None, + cache_to: Optional[pulumi.Input[Sequence[pulumi.Input['CacheToArgs']]]] = None, + context: Optional[pulumi.Input['BuildContextArgs']] = None, + dockerfile: Optional[pulumi.Input['DockerfileArgs']] = None, + exec_: Optional[pulumi.Input[bool]] = None, + exports: Optional[pulumi.Input[Sequence[pulumi.Input['ExportArgs']]]] = None, + labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + load: Optional[pulumi.Input[bool]] = None, + network: Optional[pulumi.Input['NetworkMode']] = None, + no_cache: Optional[pulumi.Input[bool]] = None, + platforms: Optional[pulumi.Input[Sequence[pulumi.Input['Platform']]]] = None, + pull: Optional[pulumi.Input[bool]] = None, + registries: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryArgs']]]] = None, + secrets: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ssh: Optional[pulumi.Input[Sequence[pulumi.Input['SSHArgs']]]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target: Optional[pulumi.Input[str]] = None): + """ + The set of arguments for constructing a Image resource. + :param pulumi.Input[bool] push: When `true` the build will automatically include a `registry` export. + + Defaults to `false`. + + Equivalent to Docker's `--push` flag. + :param pulumi.Input[Sequence[pulumi.Input[str]]] add_hosts: Custom `host:ip` mappings to use during the build. + + Equivalent to Docker's `--add-host` flag. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] build_args: `ARG` names and values to set during the build. + + These variables are accessed like environment variables inside `RUN` + instructions. + + Build arguments are persisted in the image, so you should use `secrets` + if these arguments are sensitive. + + Equivalent to Docker's `--build-arg` flag. + :param pulumi.Input[bool] build_on_preview: Setting this to `false` will always skip image builds during previews, + and setting it to `true` will always build images during previews. + + Images built during previews are never exported to registries, however + cache manifests are still exported. + + On-disk Dockerfiles are always validated for syntactic correctness + regardless of this setting. + + Defaults to `true` as a safeguard against broken images merging as part + of CI pipelines. + :param pulumi.Input['BuilderConfigArgs'] builder: Builder configuration. + :param pulumi.Input[Sequence[pulumi.Input['CacheFromArgs']]] cache_from: Cache export configuration. + + Equivalent to Docker's `--cache-from` flag. + :param pulumi.Input[Sequence[pulumi.Input['CacheToArgs']]] cache_to: Cache import configuration. + + Equivalent to Docker's `--cache-to` flag. + :param pulumi.Input['BuildContextArgs'] context: Build context settings. + + Equivalent to Docker's `PATH | URL | -` positional argument. + :param pulumi.Input['DockerfileArgs'] dockerfile: Dockerfile settings. + + Equivalent to Docker's `--file` flag. + :param pulumi.Input[bool] exec_: Use `exec` mode to build this image. + + By default the provider embeds a v25 Docker client with v0.12 buildx + support. This helps ensure consistent behavior across environments and + is compatible with alternative build backends (e.g. `buildkitd`), but + it may not be desirable if you require a specific version of buildx. + For example you may want to run a custom `docker-buildx` binary with + support for [Docker Build + Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + + When this is set to `true` the provider will instead execute the + `docker-buildx` binary directly to perform its operations. The user is + responsible for ensuring this binary exists, with correct permissions + and pre-configured builders, at a path Docker expects (e.g. + `~/.docker/cli-plugins`). + + Debugging `exec` mode may be more difficult as Pulumi will not be able + to surface fine-grained errors and warnings. Additionally credentials + are temporarily written to disk in order to provide them to the + `docker-buildx` binary. + :param pulumi.Input[Sequence[pulumi.Input['ExportArgs']]] exports: Controls where images are persisted after building. + + Images are only stored in the local cache unless `exports` are + explicitly configured. + + Exporting to multiple destinations requires a daemon running BuildKit + 0.13 or later. + + Equivalent to Docker's `--output` flag. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Attach arbitrary key/value metadata to the image. + + Equivalent to Docker's `--label` flag. + :param pulumi.Input[bool] load: When `true` the build will automatically include a `docker` export. + + Defaults to `false`. + + Equivalent to Docker's `--load` flag. + :param pulumi.Input['NetworkMode'] network: Set the network mode for `RUN` instructions. Defaults to `default`. + + For custom networks, configure your builder with `--driver-opt network=...`. + + Equivalent to Docker's `--network` flag. + :param pulumi.Input[bool] no_cache: Do not import cache manifests when building the image. + + Equivalent to Docker's `--no-cache` flag. + :param pulumi.Input[Sequence[pulumi.Input['Platform']]] platforms: Set target platform(s) for the build. Defaults to the host's platform. + + Equivalent to Docker's `--platform` flag. + :param pulumi.Input[bool] pull: Always pull referenced images. + + Equivalent to Docker's `--pull` flag. + :param pulumi.Input[Sequence[pulumi.Input['RegistryArgs']]] registries: Registry credentials. Required if reading or exporting to private + repositories. + + Credentials are kept in-memory and do not pollute pre-existing + credentials on the host. + + Similar to `docker login`. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] secrets: A mapping of secret names to their corresponding values. + + Unlike the Docker CLI, these can be passed by value and do not need to + exist on-disk or in environment variables. + + Build arguments and environment variables are persistent in the final + image, so you should use this for sensitive values. + + Similar to Docker's `--secret` flag. + :param pulumi.Input[Sequence[pulumi.Input['SSHArgs']]] ssh: SSH agent socket or keys to expose to the build. + + Equivalent to Docker's `--ssh` flag. + :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: Name and optionally a tag (format: `name:tag`). + + If exporting to a registry, the name should include the fully qualified + registry address (e.g. `docker.io/pulumi/pulumi:latest`). + + Equivalent to Docker's `--tag` flag. + :param pulumi.Input[str] target: Set the target build stage(s) to build. + + If not specified all targets will be built by default. + + Equivalent to Docker's `--target` flag. + """ + pulumi.set(__self__, "push", push) + if add_hosts is not None: + pulumi.set(__self__, "add_hosts", add_hosts) + if build_args is not None: + pulumi.set(__self__, "build_args", build_args) + if build_on_preview is None: + build_on_preview = True + if build_on_preview is not None: + pulumi.set(__self__, "build_on_preview", build_on_preview) + if builder is not None: + pulumi.set(__self__, "builder", builder) + if cache_from is not None: + pulumi.set(__self__, "cache_from", cache_from) + if cache_to is not None: + pulumi.set(__self__, "cache_to", cache_to) + if context is not None: + pulumi.set(__self__, "context", context) + if dockerfile is not None: + pulumi.set(__self__, "dockerfile", dockerfile) + if exec_ is not None: + pulumi.set(__self__, "exec_", exec_) + if exports is not None: + pulumi.set(__self__, "exports", exports) + if labels is not None: + pulumi.set(__self__, "labels", labels) + if load is not None: + pulumi.set(__self__, "load", load) + if network is None: + network = 'default' + if network is not None: + pulumi.set(__self__, "network", network) + if no_cache is not None: + pulumi.set(__self__, "no_cache", no_cache) + if platforms is not None: + pulumi.set(__self__, "platforms", platforms) + if pull is not None: + pulumi.set(__self__, "pull", pull) + if registries is not None: + pulumi.set(__self__, "registries", registries) + if secrets is not None: + pulumi.set(__self__, "secrets", secrets) + if ssh is not None: + pulumi.set(__self__, "ssh", ssh) + if tags is not None: + pulumi.set(__self__, "tags", tags) + if target is not None: + pulumi.set(__self__, "target", target) + + @property + @pulumi.getter + def push(self) -> pulumi.Input[bool]: + """ + When `true` the build will automatically include a `registry` export. + + Defaults to `false`. + + Equivalent to Docker's `--push` flag. + """ + return pulumi.get(self, "push") + + @push.setter + def push(self, value: pulumi.Input[bool]): + pulumi.set(self, "push", value) + + @property + @pulumi.getter(name="addHosts") + def add_hosts(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + Custom `host:ip` mappings to use during the build. + + Equivalent to Docker's `--add-host` flag. + """ + return pulumi.get(self, "add_hosts") + + @add_hosts.setter + def add_hosts(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "add_hosts", value) + + @property + @pulumi.getter(name="buildArgs") + def build_args(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + `ARG` names and values to set during the build. + + These variables are accessed like environment variables inside `RUN` + instructions. + + Build arguments are persisted in the image, so you should use `secrets` + if these arguments are sensitive. + + Equivalent to Docker's `--build-arg` flag. + """ + return pulumi.get(self, "build_args") + + @build_args.setter + def build_args(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "build_args", value) + + @property + @pulumi.getter(name="buildOnPreview") + def build_on_preview(self) -> Optional[pulumi.Input[bool]]: + """ + Setting this to `false` will always skip image builds during previews, + and setting it to `true` will always build images during previews. + + Images built during previews are never exported to registries, however + cache manifests are still exported. + + On-disk Dockerfiles are always validated for syntactic correctness + regardless of this setting. + + Defaults to `true` as a safeguard against broken images merging as part + of CI pipelines. + """ + return pulumi.get(self, "build_on_preview") + + @build_on_preview.setter + def build_on_preview(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "build_on_preview", value) + + @property + @pulumi.getter + def builder(self) -> Optional[pulumi.Input['BuilderConfigArgs']]: + """ + Builder configuration. + """ + return pulumi.get(self, "builder") + + @builder.setter + def builder(self, value: Optional[pulumi.Input['BuilderConfigArgs']]): + pulumi.set(self, "builder", value) + + @property + @pulumi.getter(name="cacheFrom") + def cache_from(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['CacheFromArgs']]]]: + """ + Cache export configuration. + + Equivalent to Docker's `--cache-from` flag. + """ + return pulumi.get(self, "cache_from") + + @cache_from.setter + def cache_from(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['CacheFromArgs']]]]): + pulumi.set(self, "cache_from", value) + + @property + @pulumi.getter(name="cacheTo") + def cache_to(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['CacheToArgs']]]]: + """ + Cache import configuration. + + Equivalent to Docker's `--cache-to` flag. + """ + return pulumi.get(self, "cache_to") + + @cache_to.setter + def cache_to(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['CacheToArgs']]]]): + pulumi.set(self, "cache_to", value) + + @property + @pulumi.getter + def context(self) -> Optional[pulumi.Input['BuildContextArgs']]: + """ + Build context settings. + + Equivalent to Docker's `PATH | URL | -` positional argument. + """ + return pulumi.get(self, "context") + + @context.setter + def context(self, value: Optional[pulumi.Input['BuildContextArgs']]): + pulumi.set(self, "context", value) + + @property + @pulumi.getter + def dockerfile(self) -> Optional[pulumi.Input['DockerfileArgs']]: + """ + Dockerfile settings. + + Equivalent to Docker's `--file` flag. + """ + return pulumi.get(self, "dockerfile") + + @dockerfile.setter + def dockerfile(self, value: Optional[pulumi.Input['DockerfileArgs']]): + pulumi.set(self, "dockerfile", value) + + @property + @pulumi.getter(name="exec") + def exec_(self) -> Optional[pulumi.Input[bool]]: + """ + Use `exec` mode to build this image. + + By default the provider embeds a v25 Docker client with v0.12 buildx + support. This helps ensure consistent behavior across environments and + is compatible with alternative build backends (e.g. `buildkitd`), but + it may not be desirable if you require a specific version of buildx. + For example you may want to run a custom `docker-buildx` binary with + support for [Docker Build + Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + + When this is set to `true` the provider will instead execute the + `docker-buildx` binary directly to perform its operations. The user is + responsible for ensuring this binary exists, with correct permissions + and pre-configured builders, at a path Docker expects (e.g. + `~/.docker/cli-plugins`). + + Debugging `exec` mode may be more difficult as Pulumi will not be able + to surface fine-grained errors and warnings. Additionally credentials + are temporarily written to disk in order to provide them to the + `docker-buildx` binary. + """ + return pulumi.get(self, "exec_") + + @exec_.setter + def exec_(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "exec_", value) + + @property + @pulumi.getter + def exports(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ExportArgs']]]]: + """ + Controls where images are persisted after building. + + Images are only stored in the local cache unless `exports` are + explicitly configured. + + Exporting to multiple destinations requires a daemon running BuildKit + 0.13 or later. + + Equivalent to Docker's `--output` flag. + """ + return pulumi.get(self, "exports") + + @exports.setter + def exports(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['ExportArgs']]]]): + pulumi.set(self, "exports", value) + + @property + @pulumi.getter + def labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + Attach arbitrary key/value metadata to the image. + + Equivalent to Docker's `--label` flag. + """ + return pulumi.get(self, "labels") + + @labels.setter + def labels(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "labels", value) + + @property + @pulumi.getter + def load(self) -> Optional[pulumi.Input[bool]]: + """ + When `true` the build will automatically include a `docker` export. + + Defaults to `false`. + + Equivalent to Docker's `--load` flag. + """ + return pulumi.get(self, "load") + + @load.setter + def load(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "load", value) + + @property + @pulumi.getter + def network(self) -> Optional[pulumi.Input['NetworkMode']]: + """ + Set the network mode for `RUN` instructions. Defaults to `default`. + + For custom networks, configure your builder with `--driver-opt network=...`. + + Equivalent to Docker's `--network` flag. + """ + return pulumi.get(self, "network") + + @network.setter + def network(self, value: Optional[pulumi.Input['NetworkMode']]): + pulumi.set(self, "network", value) + + @property + @pulumi.getter(name="noCache") + def no_cache(self) -> Optional[pulumi.Input[bool]]: + """ + Do not import cache manifests when building the image. + + Equivalent to Docker's `--no-cache` flag. + """ + return pulumi.get(self, "no_cache") + + @no_cache.setter + def no_cache(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "no_cache", value) + + @property + @pulumi.getter + def platforms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['Platform']]]]: + """ + Set target platform(s) for the build. Defaults to the host's platform. + + Equivalent to Docker's `--platform` flag. + """ + return pulumi.get(self, "platforms") + + @platforms.setter + def platforms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['Platform']]]]): + pulumi.set(self, "platforms", value) + + @property + @pulumi.getter + def pull(self) -> Optional[pulumi.Input[bool]]: + """ + Always pull referenced images. + + Equivalent to Docker's `--pull` flag. + """ + return pulumi.get(self, "pull") + + @pull.setter + def pull(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "pull", value) + + @property + @pulumi.getter + def registries(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RegistryArgs']]]]: + """ + Registry credentials. Required if reading or exporting to private + repositories. + + Credentials are kept in-memory and do not pollute pre-existing + credentials on the host. + + Similar to `docker login`. + """ + return pulumi.get(self, "registries") + + @registries.setter + def registries(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryArgs']]]]): + pulumi.set(self, "registries", value) + + @property + @pulumi.getter + def secrets(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: + """ + A mapping of secret names to their corresponding values. + + Unlike the Docker CLI, these can be passed by value and do not need to + exist on-disk or in environment variables. + + Build arguments and environment variables are persistent in the final + image, so you should use this for sensitive values. + + Similar to Docker's `--secret` flag. + """ + return pulumi.get(self, "secrets") + + @secrets.setter + def secrets(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): + pulumi.set(self, "secrets", value) + + @property + @pulumi.getter + def ssh(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['SSHArgs']]]]: + """ + SSH agent socket or keys to expose to the build. + + Equivalent to Docker's `--ssh` flag. + """ + return pulumi.get(self, "ssh") + + @ssh.setter + def ssh(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['SSHArgs']]]]): + pulumi.set(self, "ssh", value) + + @property + @pulumi.getter + def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]: + """ + Name and optionally a tag (format: `name:tag`). + + If exporting to a registry, the name should include the fully qualified + registry address (e.g. `docker.io/pulumi/pulumi:latest`). + + Equivalent to Docker's `--tag` flag. + """ + return pulumi.get(self, "tags") + + @tags.setter + def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): + pulumi.set(self, "tags", value) + + @property + @pulumi.getter + def target(self) -> Optional[pulumi.Input[str]]: + """ + Set the target build stage(s) to build. + + If not specified all targets will be built by default. + + Equivalent to Docker's `--target` flag. + """ + return pulumi.get(self, "target") + + @target.setter + def target(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "target", value) + + +class Image(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + add_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + build_args: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + build_on_preview: Optional[pulumi.Input[bool]] = None, + builder: Optional[pulumi.Input[pulumi.InputType['BuilderConfigArgs']]] = None, + cache_from: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CacheFromArgs']]]]] = None, + cache_to: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CacheToArgs']]]]] = None, + context: Optional[pulumi.Input[pulumi.InputType['BuildContextArgs']]] = None, + dockerfile: Optional[pulumi.Input[pulumi.InputType['DockerfileArgs']]] = None, + exec_: Optional[pulumi.Input[bool]] = None, + exports: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ExportArgs']]]]] = None, + labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + load: Optional[pulumi.Input[bool]] = None, + network: Optional[pulumi.Input['NetworkMode']] = None, + no_cache: Optional[pulumi.Input[bool]] = None, + platforms: Optional[pulumi.Input[Sequence[pulumi.Input['Platform']]]] = None, + pull: Optional[pulumi.Input[bool]] = None, + push: Optional[pulumi.Input[bool]] = None, + registries: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RegistryArgs']]]]] = None, + secrets: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ssh: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['SSHArgs']]]]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + A Docker image built using buildx -- Docker's interface to the improved + BuildKit backend. + + ## Stability + + **This resource is pre-1.0 and in public preview.** + + We will strive to keep APIs and behavior as stable as possible, but we + cannot guarantee stability until version 1.0. + + ## Migrating Pulumi Docker v3 and v4 Image resources + + This provider's `Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider. + Existing `Image` resources can be converted to the docker-build `Image` resources with minor modifications. + + ### Behavioral differences + + There are several key behavioral differences to keep in mind when transitioning images to the new `Image` resource. + + #### Previews + + Version `3.x` of the Pulumi Docker provider always builds images during preview operations. + This is helpful as a safeguard to prevent "broken" images from merging, but users found the behavior unnecessarily redundant when running previews and updates locally. + + 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. + Several users reported outages due to the default behavior allowing bad images to accidentally sneak through CI. + + The default behavior of this provider's `Image` resource is similar to `3.x` and will build images during previews. + This behavior can be changed by specifying `buildOnPreview`. + + #### Push behavior + + 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. + + This provider's `Image` resource matches the Docker CLI's behavior and does not push images anywhere by default. + + To push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`). + Like Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally. + + #### Secrets + + Version `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field. + + Version `4.x` of the Pulumi Docker provider does not support secrets. + + The `Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables. + Instead, they should be passed directly as values. + (Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).) + Pulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments. + + #### Caching + + Version `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`. + It builds targets individually and pushes them to separate images for caching. + + Version `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches. + + Both versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior. + This can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc. + + The `Image` resource delegates all caching behavior to Docker. + `cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc. + + #### Outputs + + Versions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest. + In `4.x` this could also be a single sha256 hash if the image wasn't pushed. + + Unlike earlier providers the `Image` resource can push multiple tags. + As a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed. + If multiple tags were pushed this uses one at random. + + If you need more control over tag references you can use the `digest` output, which is always a single sha256 hash as long as the image was exported somewhere. + + #### Tag deletion and refreshes + + Versions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` resource is deleted, nor do they confirm expected tags exist during `refresh` operations. + + The `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist. + If any are missing a subsequent `update` will push them. + + When a `Image` is deleted, it will _attempt_ to also delete any pushed tags. + Deletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular). + Manifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace. + + Use the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted. + + ### Example migration + + Examples of "fully-featured" `v3` and `v4` `Image` resources are shown below, along with an example `Image` resource showing how they would look after migration. + + The `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`. + After migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`. + In almost all cases, properties of `Image` are named after the Docker CLI flag they correspond to. + + The `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`. + It it is shown with parameters similar to the `v3` example for completeness. + + ## Example Usage + + ## Example Usage + ### Push to AWS ECR with caching + ```python + import pulumi + import pulumi_aws as aws + import pulumi_docker_build as docker_build + + ecr_repository = aws.ecr.Repository("ecr-repository") + auth_token = aws.ecr.get_authorization_token_output(registry_id=ecr_repository.registry_id) + my_image = docker_build.Image("my-image", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( + ref=ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"), + ), + )], + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + image_manifest=True, + oci_media_types=True, + ref=ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"), + ), + )], + context=docker_build.BuildContextArgs( + location="./app", + ), + push=True, + registries=[docker_build.RegistryArgs( + address=ecr_repository.repository_url, + password=auth_token.password, + username=auth_token.user_name, + )], + tags=[ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:latest")]) + pulumi.export("ref", my_image.ref) + ``` + ### Multi-platform image + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + platforms=[ + docker_build.Platform.PLAN9_AMD64, + docker_build.Platform.PLAN9_386, + ], + push=False) + ``` + ### Registry export + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + push=True, + registries=[docker_build.RegistryArgs( + address="docker.io", + password=docker_hub_password, + username="pulumibot", + )], + tags=["docker.io/pulumi/pulumi:3.107.0"]) + pulumi.export("ref", my_image["ref"]) + ``` + ### Caching + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + cache_from=[docker_build.CacheFromArgs( + local=docker_build.CacheFromLocalArgs( + src="tmp/cache", + ), + )], + cache_to=[docker_build.CacheToArgs( + local=docker_build.CacheToLocalArgs( + dest="tmp/cache", + mode=docker_build.CacheMode.MAX, + ), + )], + context=docker_build.BuildContextArgs( + location="app", + ), + push=False) + ``` + ### Docker Build Cloud + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + builder=docker_build.BuilderConfigArgs( + name="cloud-builder-name", + ), + context=docker_build.BuildContextArgs( + location="app", + ), + exec_=True, + push=False) + ``` + ### Build arguments + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + build_args={ + "SET_ME_TO_TRUE": "true", + }, + context=docker_build.BuildContextArgs( + location="app", + ), + push=False) + ``` + ### Build target + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + push=False, + target="build-me") + ``` + ### Named contexts + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + named={ + "golang:latest": docker_build.ContextArgs( + location="docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", + ), + }, + ), + push=False) + ``` + ### Remote context + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + ), + push=False) + ``` + ### Inline Dockerfile + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + dockerfile=docker_build.DockerfileArgs( + inline=\"\"\"FROM busybox + COPY hello.c ./ + \"\"\", + ), + push=False) + ``` + ### Remote context + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="https://github.com/docker-library/hello-world.git", + ), + dockerfile=docker_build.DockerfileArgs( + location="app/Dockerfile", + ), + push=False) + ``` + ### Local export + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + exports=[docker_build.ExportArgs( + docker=docker_build.ExportDockerArgs( + tar=True, + ), + )], + push=False) + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[Sequence[pulumi.Input[str]]] add_hosts: Custom `host:ip` mappings to use during the build. + + Equivalent to Docker's `--add-host` flag. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] build_args: `ARG` names and values to set during the build. + + These variables are accessed like environment variables inside `RUN` + instructions. + + Build arguments are persisted in the image, so you should use `secrets` + if these arguments are sensitive. + + Equivalent to Docker's `--build-arg` flag. + :param pulumi.Input[bool] build_on_preview: Setting this to `false` will always skip image builds during previews, + and setting it to `true` will always build images during previews. + + Images built during previews are never exported to registries, however + cache manifests are still exported. + + On-disk Dockerfiles are always validated for syntactic correctness + regardless of this setting. + + Defaults to `true` as a safeguard against broken images merging as part + of CI pipelines. + :param pulumi.Input[pulumi.InputType['BuilderConfigArgs']] builder: Builder configuration. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CacheFromArgs']]]] cache_from: Cache export configuration. + + Equivalent to Docker's `--cache-from` flag. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CacheToArgs']]]] cache_to: Cache import configuration. + + Equivalent to Docker's `--cache-to` flag. + :param pulumi.Input[pulumi.InputType['BuildContextArgs']] context: Build context settings. + + Equivalent to Docker's `PATH | URL | -` positional argument. + :param pulumi.Input[pulumi.InputType['DockerfileArgs']] dockerfile: Dockerfile settings. + + Equivalent to Docker's `--file` flag. + :param pulumi.Input[bool] exec_: Use `exec` mode to build this image. + + By default the provider embeds a v25 Docker client with v0.12 buildx + support. This helps ensure consistent behavior across environments and + is compatible with alternative build backends (e.g. `buildkitd`), but + it may not be desirable if you require a specific version of buildx. + For example you may want to run a custom `docker-buildx` binary with + support for [Docker Build + Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + + When this is set to `true` the provider will instead execute the + `docker-buildx` binary directly to perform its operations. The user is + responsible for ensuring this binary exists, with correct permissions + and pre-configured builders, at a path Docker expects (e.g. + `~/.docker/cli-plugins`). + + Debugging `exec` mode may be more difficult as Pulumi will not be able + to surface fine-grained errors and warnings. Additionally credentials + are temporarily written to disk in order to provide them to the + `docker-buildx` binary. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ExportArgs']]]] exports: Controls where images are persisted after building. + + Images are only stored in the local cache unless `exports` are + explicitly configured. + + Exporting to multiple destinations requires a daemon running BuildKit + 0.13 or later. + + Equivalent to Docker's `--output` flag. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] labels: Attach arbitrary key/value metadata to the image. + + Equivalent to Docker's `--label` flag. + :param pulumi.Input[bool] load: When `true` the build will automatically include a `docker` export. + + Defaults to `false`. + + Equivalent to Docker's `--load` flag. + :param pulumi.Input['NetworkMode'] network: Set the network mode for `RUN` instructions. Defaults to `default`. + + For custom networks, configure your builder with `--driver-opt network=...`. + + Equivalent to Docker's `--network` flag. + :param pulumi.Input[bool] no_cache: Do not import cache manifests when building the image. + + Equivalent to Docker's `--no-cache` flag. + :param pulumi.Input[Sequence[pulumi.Input['Platform']]] platforms: Set target platform(s) for the build. Defaults to the host's platform. + + Equivalent to Docker's `--platform` flag. + :param pulumi.Input[bool] pull: Always pull referenced images. + + Equivalent to Docker's `--pull` flag. + :param pulumi.Input[bool] push: When `true` the build will automatically include a `registry` export. + + Defaults to `false`. + + Equivalent to Docker's `--push` flag. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RegistryArgs']]]] registries: Registry credentials. Required if reading or exporting to private + repositories. + + Credentials are kept in-memory and do not pollute pre-existing + credentials on the host. + + Similar to `docker login`. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] secrets: A mapping of secret names to their corresponding values. + + Unlike the Docker CLI, these can be passed by value and do not need to + exist on-disk or in environment variables. + + Build arguments and environment variables are persistent in the final + image, so you should use this for sensitive values. + + Similar to Docker's `--secret` flag. + :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['SSHArgs']]]] ssh: SSH agent socket or keys to expose to the build. + + Equivalent to Docker's `--ssh` flag. + :param pulumi.Input[Sequence[pulumi.Input[str]]] tags: Name and optionally a tag (format: `name:tag`). + + If exporting to a registry, the name should include the fully qualified + registry address (e.g. `docker.io/pulumi/pulumi:latest`). + + Equivalent to Docker's `--tag` flag. + :param pulumi.Input[str] target: Set the target build stage(s) to build. + + If not specified all targets will be built by default. + + Equivalent to Docker's `--target` flag. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: ImageArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + A Docker image built using buildx -- Docker's interface to the improved + BuildKit backend. + + ## Stability + + **This resource is pre-1.0 and in public preview.** + + We will strive to keep APIs and behavior as stable as possible, but we + cannot guarantee stability until version 1.0. + + ## Migrating Pulumi Docker v3 and v4 Image resources + + This provider's `Image` resource provides a superset of functionality over the `Image` resources available in versions 3 and 4 of the Pulumi Docker provider. + Existing `Image` resources can be converted to the docker-build `Image` resources with minor modifications. + + ### Behavioral differences + + There are several key behavioral differences to keep in mind when transitioning images to the new `Image` resource. + + #### Previews + + Version `3.x` of the Pulumi Docker provider always builds images during preview operations. + This is helpful as a safeguard to prevent "broken" images from merging, but users found the behavior unnecessarily redundant when running previews and updates locally. + + 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. + Several users reported outages due to the default behavior allowing bad images to accidentally sneak through CI. + + The default behavior of this provider's `Image` resource is similar to `3.x` and will build images during previews. + This behavior can be changed by specifying `buildOnPreview`. + + #### Push behavior + + 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. + + This provider's `Image` resource matches the Docker CLI's behavior and does not push images anywhere by default. + + To push images to a registry you can include `push: true` (equivalent to Docker's `--push` flag) or configure an `export` of type `registry` (equivalent to Docker's `--output type=registry`). + Like Docker, if an image is configured without exports you will see a warning with instructions for how to enable pushing, but the build will still proceed normally. + + #### Secrets + + Version `3.x` of the Pulumi Docker provider supports secrets by way of the `extraOptions` field. + + Version `4.x` of the Pulumi Docker provider does not support secrets. + + The `Image` resource supports secrets but does not require those secrets to exist on-disk or in environment variables. + Instead, they should be passed directly as values. + (Please be sure to familiarize yourself with Pulumi's [native secret handling](https://www.pulumi.com/docs/concepts/secrets/).) + Pulumi also provides [ESC](https://www.pulumi.com/product/esc/) to make it easier to share secrets across stacks and environments. + + #### Caching + + Version `3.x` of the Pulumi Docker provider exposes `cacheFrom: bool | { stages: [...] }`. + It builds targets individually and pushes them to separate images for caching. + + Version `4.x` exposes a similar parameter `cacheFrom: { images: [...] }` which pushes and pulls inline caches. + + Both versions 3 and 4 require specific environment variables to be set and deviate from Docker's native caching behavior. + This can result in inefficient builds due to unnecessary image pulls, repeated file transfers, etc. + + The `Image` resource delegates all caching behavior to Docker. + `cacheFrom` and `cacheTo` options (equivalent to Docker's `--cache-to` and `--cache-from`) are exposed and provide additional cache targets, such as local disk, S3 storage, etc. + + #### Outputs + + Versions `3.x` and `4.x` of the provider exposed a `repoDigest` output which was a fully qualified tag with digest. + In `4.x` this could also be a single sha256 hash if the image wasn't pushed. + + Unlike earlier providers the `Image` resource can push multiple tags. + As a convenience, it exposes a `ref` output consisting of a tag with digest as long as the image was pushed. + If multiple tags were pushed this uses one at random. + + If you need more control over tag references you can use the `digest` output, which is always a single sha256 hash as long as the image was exported somewhere. + + #### Tag deletion and refreshes + + Versions 3 and 4 of Pulumi Docker provider do not delete tags when the `Image` resource is deleted, nor do they confirm expected tags exist during `refresh` operations. + + The `buidx.Image` will query your registries during `refresh` to ensure the expected tags exist. + If any are missing a subsequent `update` will push them. + + When a `Image` is deleted, it will _attempt_ to also delete any pushed tags. + Deletion of remote tags is not guaranteed because not all registries support the manifest `DELETE` API (`docker.io` in particular). + Manifests are _not_ deleted in the same way during updates -- to do so safely would require a full build to determine whether a Pulumi operation should be an update or update-replace. + + Use the [`retainOnDelete: true`](https://www.pulumi.com/docs/concepts/options/retainondelete/) option if you do not want tags deleted. + + ### Example migration + + Examples of "fully-featured" `v3` and `v4` `Image` resources are shown below, along with an example `Image` resource showing how they would look after migration. + + The `v3` resource leverages `buildx` via a `DOCKER_BUILDKIT` environment variable and CLI flags passed in with `extraOption`. + After migration, the environment variable is no longer needed and CLI flags are now properties on the `Image`. + In almost all cases, properties of `Image` are named after the Docker CLI flag they correspond to. + + The `v4` resource is less functional than its `v3` counterpart because it lacks the flexibility of `extraOptions`. + It it is shown with parameters similar to the `v3` example for completeness. + + ## Example Usage + + ## Example Usage + ### Push to AWS ECR with caching + ```python + import pulumi + import pulumi_aws as aws + import pulumi_docker_build as docker_build + + ecr_repository = aws.ecr.Repository("ecr-repository") + auth_token = aws.ecr.get_authorization_token_output(registry_id=ecr_repository.registry_id) + my_image = docker_build.Image("my-image", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( + ref=ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"), + ), + )], + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + image_manifest=True, + oci_media_types=True, + ref=ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:cache"), + ), + )], + context=docker_build.BuildContextArgs( + location="./app", + ), + push=True, + registries=[docker_build.RegistryArgs( + address=ecr_repository.repository_url, + password=auth_token.password, + username=auth_token.user_name, + )], + tags=[ecr_repository.repository_url.apply(lambda repository_url: f"{repository_url}:latest")]) + pulumi.export("ref", my_image.ref) + ``` + ### Multi-platform image + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + platforms=[ + docker_build.Platform.PLAN9_AMD64, + docker_build.Platform.PLAN9_386, + ], + push=False) + ``` + ### Registry export + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + push=True, + registries=[docker_build.RegistryArgs( + address="docker.io", + password=docker_hub_password, + username="pulumibot", + )], + tags=["docker.io/pulumi/pulumi:3.107.0"]) + pulumi.export("ref", my_image["ref"]) + ``` + ### Caching + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + cache_from=[docker_build.CacheFromArgs( + local=docker_build.CacheFromLocalArgs( + src="tmp/cache", + ), + )], + cache_to=[docker_build.CacheToArgs( + local=docker_build.CacheToLocalArgs( + dest="tmp/cache", + mode=docker_build.CacheMode.MAX, + ), + )], + context=docker_build.BuildContextArgs( + location="app", + ), + push=False) + ``` + ### Docker Build Cloud + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + builder=docker_build.BuilderConfigArgs( + name="cloud-builder-name", + ), + context=docker_build.BuildContextArgs( + location="app", + ), + exec_=True, + push=False) + ``` + ### Build arguments + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + build_args={ + "SET_ME_TO_TRUE": "true", + }, + context=docker_build.BuildContextArgs( + location="app", + ), + push=False) + ``` + ### Build target + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + push=False, + target="build-me") + ``` + ### Named contexts + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + named={ + "golang:latest": docker_build.ContextArgs( + location="docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984", + ), + }, + ), + push=False) + ``` + ### Remote context + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="https://raw.githubusercontent.com/pulumi/pulumi-docker/api-types/provider/testdata/Dockerfile", + ), + push=False) + ``` + ### Inline Dockerfile + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + dockerfile=docker_build.DockerfileArgs( + inline=\"\"\"FROM busybox + COPY hello.c ./ + \"\"\", + ), + push=False) + ``` + ### Remote context + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="https://github.com/docker-library/hello-world.git", + ), + dockerfile=docker_build.DockerfileArgs( + location="app/Dockerfile", + ), + push=False) + ``` + ### Local export + ```python + import pulumi + import pulumi_docker_build as docker_build + + image = docker_build.Image("image", + context=docker_build.BuildContextArgs( + location="app", + ), + exports=[docker_build.ExportArgs( + docker=docker_build.ExportDockerArgs( + tar=True, + ), + )], + push=False) + ``` + + :param str resource_name: The name of the resource. + :param ImageArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(ImageArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + add_hosts: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + build_args: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + build_on_preview: Optional[pulumi.Input[bool]] = None, + builder: Optional[pulumi.Input[pulumi.InputType['BuilderConfigArgs']]] = None, + cache_from: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CacheFromArgs']]]]] = None, + cache_to: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['CacheToArgs']]]]] = None, + context: Optional[pulumi.Input[pulumi.InputType['BuildContextArgs']]] = None, + dockerfile: Optional[pulumi.Input[pulumi.InputType['DockerfileArgs']]] = None, + exec_: Optional[pulumi.Input[bool]] = None, + exports: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['ExportArgs']]]]] = None, + labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + load: Optional[pulumi.Input[bool]] = None, + network: Optional[pulumi.Input['NetworkMode']] = None, + no_cache: Optional[pulumi.Input[bool]] = None, + platforms: Optional[pulumi.Input[Sequence[pulumi.Input['Platform']]]] = None, + pull: Optional[pulumi.Input[bool]] = None, + push: Optional[pulumi.Input[bool]] = None, + registries: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RegistryArgs']]]]] = None, + secrets: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, + ssh: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['SSHArgs']]]]] = None, + tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + target: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = ImageArgs.__new__(ImageArgs) + + __props__.__dict__["add_hosts"] = add_hosts + __props__.__dict__["build_args"] = build_args + if build_on_preview is None: + build_on_preview = True + __props__.__dict__["build_on_preview"] = build_on_preview + __props__.__dict__["builder"] = builder + __props__.__dict__["cache_from"] = cache_from + __props__.__dict__["cache_to"] = cache_to + __props__.__dict__["context"] = context + __props__.__dict__["dockerfile"] = dockerfile + __props__.__dict__["exec_"] = exec_ + __props__.__dict__["exports"] = exports + __props__.__dict__["labels"] = labels + __props__.__dict__["load"] = load + if network is None: + network = 'default' + __props__.__dict__["network"] = network + __props__.__dict__["no_cache"] = no_cache + __props__.__dict__["platforms"] = platforms + __props__.__dict__["pull"] = pull + if push is None and not opts.urn: + raise TypeError("Missing required property 'push'") + __props__.__dict__["push"] = push + __props__.__dict__["registries"] = registries + __props__.__dict__["secrets"] = secrets + __props__.__dict__["ssh"] = ssh + __props__.__dict__["tags"] = tags + __props__.__dict__["target"] = target + __props__.__dict__["context_hash"] = None + __props__.__dict__["digest"] = None + __props__.__dict__["ref"] = None + super(Image, __self__).__init__( + 'docker-build:index:Image', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'Image': + """ + Get an existing Image resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = ImageArgs.__new__(ImageArgs) + + __props__.__dict__["add_hosts"] = None + __props__.__dict__["build_args"] = None + __props__.__dict__["build_on_preview"] = None + __props__.__dict__["builder"] = None + __props__.__dict__["cache_from"] = None + __props__.__dict__["cache_to"] = None + __props__.__dict__["context"] = None + __props__.__dict__["context_hash"] = None + __props__.__dict__["digest"] = None + __props__.__dict__["dockerfile"] = None + __props__.__dict__["exec_"] = None + __props__.__dict__["exports"] = None + __props__.__dict__["labels"] = None + __props__.__dict__["load"] = None + __props__.__dict__["network"] = None + __props__.__dict__["no_cache"] = None + __props__.__dict__["platforms"] = None + __props__.__dict__["pull"] = None + __props__.__dict__["push"] = None + __props__.__dict__["ref"] = None + __props__.__dict__["registries"] = None + __props__.__dict__["secrets"] = None + __props__.__dict__["ssh"] = None + __props__.__dict__["tags"] = None + __props__.__dict__["target"] = None + return Image(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter(name="addHosts") + def add_hosts(self) -> pulumi.Output[Optional[Sequence[str]]]: + """ + Custom `host:ip` mappings to use during the build. + + Equivalent to Docker's `--add-host` flag. + """ + return pulumi.get(self, "add_hosts") + + @property + @pulumi.getter(name="buildArgs") + def build_args(self) -> pulumi.Output[Optional[Mapping[str, str]]]: + """ + `ARG` names and values to set during the build. + + These variables are accessed like environment variables inside `RUN` + instructions. + + Build arguments are persisted in the image, so you should use `secrets` + if these arguments are sensitive. + + Equivalent to Docker's `--build-arg` flag. + """ + return pulumi.get(self, "build_args") + + @property + @pulumi.getter(name="buildOnPreview") + def build_on_preview(self) -> pulumi.Output[Optional[bool]]: + """ + Setting this to `false` will always skip image builds during previews, + and setting it to `true` will always build images during previews. + + Images built during previews are never exported to registries, however + cache manifests are still exported. + + On-disk Dockerfiles are always validated for syntactic correctness + regardless of this setting. + + Defaults to `true` as a safeguard against broken images merging as part + of CI pipelines. + """ + return pulumi.get(self, "build_on_preview") + + @property + @pulumi.getter + def builder(self) -> pulumi.Output[Optional['outputs.BuilderConfig']]: + """ + Builder configuration. + """ + return pulumi.get(self, "builder") + + @property + @pulumi.getter(name="cacheFrom") + def cache_from(self) -> pulumi.Output[Optional[Sequence['outputs.CacheFrom']]]: + """ + Cache export configuration. + + Equivalent to Docker's `--cache-from` flag. + """ + return pulumi.get(self, "cache_from") + + @property + @pulumi.getter(name="cacheTo") + def cache_to(self) -> pulumi.Output[Optional[Sequence['outputs.CacheTo']]]: + """ + Cache import configuration. + + Equivalent to Docker's `--cache-to` flag. + """ + return pulumi.get(self, "cache_to") + + @property + @pulumi.getter + def context(self) -> pulumi.Output[Optional['outputs.BuildContext']]: + """ + Build context settings. + + Equivalent to Docker's `PATH | URL | -` positional argument. + """ + return pulumi.get(self, "context") + + @property + @pulumi.getter(name="contextHash") + def context_hash(self) -> pulumi.Output[str]: + """ + A preliminary hash of the image's build context. + + Pulumi uses this to determine if an image _may_ need to be re-built. + """ + return pulumi.get(self, "context_hash") + + @property + @pulumi.getter + def digest(self) -> pulumi.Output[str]: + """ + A SHA256 digest of the image if it was exported to a registry or + elsewhere. + + Empty if the image was not exported. + + Registry images can be referenced precisely as `@`. The + `ref` output provides one such reference as a convenience. + """ + return pulumi.get(self, "digest") + + @property + @pulumi.getter + def dockerfile(self) -> pulumi.Output[Optional['outputs.Dockerfile']]: + """ + Dockerfile settings. + + Equivalent to Docker's `--file` flag. + """ + return pulumi.get(self, "dockerfile") + + @property + @pulumi.getter(name="exec") + def exec_(self) -> pulumi.Output[Optional[bool]]: + """ + Use `exec` mode to build this image. + + By default the provider embeds a v25 Docker client with v0.12 buildx + support. This helps ensure consistent behavior across environments and + is compatible with alternative build backends (e.g. `buildkitd`), but + it may not be desirable if you require a specific version of buildx. + For example you may want to run a custom `docker-buildx` binary with + support for [Docker Build + Cloud](https://docs.docker.com/build/cloud/setup/) (DBC). + + When this is set to `true` the provider will instead execute the + `docker-buildx` binary directly to perform its operations. The user is + responsible for ensuring this binary exists, with correct permissions + and pre-configured builders, at a path Docker expects (e.g. + `~/.docker/cli-plugins`). + + Debugging `exec` mode may be more difficult as Pulumi will not be able + to surface fine-grained errors and warnings. Additionally credentials + are temporarily written to disk in order to provide them to the + `docker-buildx` binary. + """ + return pulumi.get(self, "exec_") + + @property + @pulumi.getter + def exports(self) -> pulumi.Output[Optional[Sequence['outputs.Export']]]: + """ + Controls where images are persisted after building. + + Images are only stored in the local cache unless `exports` are + explicitly configured. + + Exporting to multiple destinations requires a daemon running BuildKit + 0.13 or later. + + Equivalent to Docker's `--output` flag. + """ + return pulumi.get(self, "exports") + + @property + @pulumi.getter + def labels(self) -> pulumi.Output[Optional[Mapping[str, str]]]: + """ + Attach arbitrary key/value metadata to the image. + + Equivalent to Docker's `--label` flag. + """ + return pulumi.get(self, "labels") + + @property + @pulumi.getter + def load(self) -> pulumi.Output[Optional[bool]]: + """ + When `true` the build will automatically include a `docker` export. + + Defaults to `false`. + + Equivalent to Docker's `--load` flag. + """ + return pulumi.get(self, "load") + + @property + @pulumi.getter + def network(self) -> pulumi.Output[Optional['NetworkMode']]: + """ + Set the network mode for `RUN` instructions. Defaults to `default`. + + For custom networks, configure your builder with `--driver-opt network=...`. + + Equivalent to Docker's `--network` flag. + """ + return pulumi.get(self, "network") + + @property + @pulumi.getter(name="noCache") + def no_cache(self) -> pulumi.Output[Optional[bool]]: + """ + Do not import cache manifests when building the image. + + Equivalent to Docker's `--no-cache` flag. + """ + return pulumi.get(self, "no_cache") + + @property + @pulumi.getter + def platforms(self) -> pulumi.Output[Optional[Sequence['Platform']]]: + """ + Set target platform(s) for the build. Defaults to the host's platform. + + Equivalent to Docker's `--platform` flag. + """ + return pulumi.get(self, "platforms") + + @property + @pulumi.getter + def pull(self) -> pulumi.Output[Optional[bool]]: + """ + Always pull referenced images. + + Equivalent to Docker's `--pull` flag. + """ + return pulumi.get(self, "pull") + + @property + @pulumi.getter + def push(self) -> pulumi.Output[bool]: + """ + When `true` the build will automatically include a `registry` export. + + Defaults to `false`. + + Equivalent to Docker's `--push` flag. + """ + return pulumi.get(self, "push") + + @property + @pulumi.getter + def ref(self) -> pulumi.Output[str]: + """ + If the image was pushed to any registries then this will contain a + single fully-qualified tag including the build's digest. + + If the image had tags but was not exported, this will take on a value + of one of those tags. + + This will be empty if the image had no exports and no tags. + + This is only for convenience and may not be appropriate for situations + where multiple tags or registries are involved. In those cases this + output is not guaranteed to be stable. + + For more control over tags consumed by downstream resources you should + use the `digest` output. + """ + return pulumi.get(self, "ref") + + @property + @pulumi.getter + def registries(self) -> pulumi.Output[Optional[Sequence['outputs.Registry']]]: + """ + Registry credentials. Required if reading or exporting to private + repositories. + + Credentials are kept in-memory and do not pollute pre-existing + credentials on the host. + + Similar to `docker login`. + """ + return pulumi.get(self, "registries") + + @property + @pulumi.getter + def secrets(self) -> pulumi.Output[Optional[Mapping[str, str]]]: + """ + A mapping of secret names to their corresponding values. + + Unlike the Docker CLI, these can be passed by value and do not need to + exist on-disk or in environment variables. + + Build arguments and environment variables are persistent in the final + image, so you should use this for sensitive values. + + Similar to Docker's `--secret` flag. + """ + return pulumi.get(self, "secrets") + + @property + @pulumi.getter + def ssh(self) -> pulumi.Output[Optional[Sequence['outputs.SSH']]]: + """ + SSH agent socket or keys to expose to the build. + + Equivalent to Docker's `--ssh` flag. + """ + return pulumi.get(self, "ssh") + + @property + @pulumi.getter + def tags(self) -> pulumi.Output[Optional[Sequence[str]]]: + """ + Name and optionally a tag (format: `name:tag`). + + If exporting to a registry, the name should include the fully qualified + registry address (e.g. `docker.io/pulumi/pulumi:latest`). + + Equivalent to Docker's `--tag` flag. + """ + return pulumi.get(self, "tags") + + @property + @pulumi.getter + def target(self) -> pulumi.Output[Optional[str]]: + """ + Set the target build stage(s) to build. + + If not specified all targets will be built by default. + + Equivalent to Docker's `--target` flag. + """ + return pulumi.get(self, "target") + diff --git a/sdk/python/pulumi_docker_build/index.py b/sdk/python/pulumi_docker_build/index.py new file mode 100644 index 0000000..62ffaf2 --- /dev/null +++ b/sdk/python/pulumi_docker_build/index.py @@ -0,0 +1,376 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities +from . import outputs +from ._inputs import * + +__all__ = ['IndexArgs', 'Index'] + +@pulumi.input_type +class IndexArgs: + def __init__(__self__, *, + sources: pulumi.Input[Sequence[pulumi.Input[str]]], + tag: pulumi.Input[str], + push: Optional[pulumi.Input[bool]] = None, + registry: Optional[pulumi.Input['RegistryArgs']] = None): + """ + The set of arguments for constructing a Index resource. + :param pulumi.Input[Sequence[pulumi.Input[str]]] sources: Existing images to include in the index. + :param pulumi.Input[str] tag: The tag to apply to the index. + :param pulumi.Input[bool] push: If true, push the index to the target registry. + + Defaults to `true`. + :param pulumi.Input['RegistryArgs'] registry: Authentication for the registry where the tagged index will be pushed. + + Credentials can also be included with the provider's configuration. + """ + pulumi.set(__self__, "sources", sources) + pulumi.set(__self__, "tag", tag) + if push is None: + push = True + if push is not None: + pulumi.set(__self__, "push", push) + if registry is not None: + pulumi.set(__self__, "registry", registry) + + @property + @pulumi.getter + def sources(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]: + """ + Existing images to include in the index. + """ + return pulumi.get(self, "sources") + + @sources.setter + def sources(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): + pulumi.set(self, "sources", value) + + @property + @pulumi.getter + def tag(self) -> pulumi.Input[str]: + """ + The tag to apply to the index. + """ + return pulumi.get(self, "tag") + + @tag.setter + def tag(self, value: pulumi.Input[str]): + pulumi.set(self, "tag", value) + + @property + @pulumi.getter + def push(self) -> Optional[pulumi.Input[bool]]: + """ + If true, push the index to the target registry. + + Defaults to `true`. + """ + return pulumi.get(self, "push") + + @push.setter + def push(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "push", value) + + @property + @pulumi.getter + def registry(self) -> Optional[pulumi.Input['RegistryArgs']]: + """ + Authentication for the registry where the tagged index will be pushed. + + Credentials can also be included with the provider's configuration. + """ + return pulumi.get(self, "registry") + + @registry.setter + def registry(self, value: Optional[pulumi.Input['RegistryArgs']]): + pulumi.set(self, "registry", value) + + +class Index(pulumi.CustomResource): + @overload + def __init__(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + push: Optional[pulumi.Input[bool]] = None, + registry: Optional[pulumi.Input[pulumi.InputType['RegistryArgs']]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tag: Optional[pulumi.Input[str]] = None, + __props__=None): + """ + A wrapper around `docker buildx imagetools create` to create an index + (or manifest list) referencing one or more existing images. + + In most cases you do not need an `Index` to build a multi-platform + image -- specifying multiple platforms on the `Image` will handle this + for you automatically. + + However, as of April 2024, building multi-platform images _with + caching_ will only export a cache for one platform at a time (see [this + discussion](https://github.com/docker/buildx/discussions/1382) for more + details). + + Therefore this resource can be helpful if you are building + multi-platform images with caching: each platform can be built and + cached separately, and an `Index` can join them all together. An + example of this is shown below. + + This resource creates an OCI image index or a Docker manifest list + depending on the media types of the source images. + + ## Example Usage + ### Multi-platform registry caching + ```python + import pulumi + import pulumi_docker_build as docker_build + + amd64 = docker_build.Image("amd64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( + ref="docker.io/pulumi/pulumi:cache-amd64", + ), + )], + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, + ref="docker.io/pulumi/pulumi:cache-amd64", + ), + )], + context=docker_build.BuildContextArgs( + location="app", + ), + platforms=[docker_build.Platform.LINUX_AMD64], + tags=["docker.io/pulumi/pulumi:3.107.0-amd64"]) + arm64 = docker_build.Image("arm64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( + ref="docker.io/pulumi/pulumi:cache-arm64", + ), + )], + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, + ref="docker.io/pulumi/pulumi:cache-arm64", + ), + )], + context=docker_build.BuildContextArgs( + location="app", + ), + platforms=[docker_build.Platform.LINUX_ARM64], + tags=["docker.io/pulumi/pulumi:3.107.0-arm64"]) + index = docker_build.Index("index", + sources=[ + amd64.ref, + arm64.ref, + ], + tag="docker.io/pulumi/pulumi:3.107.0") + pulumi.export("ref", index.ref) + ``` + + :param str resource_name: The name of the resource. + :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[bool] push: If true, push the index to the target registry. + + Defaults to `true`. + :param pulumi.Input[pulumi.InputType['RegistryArgs']] registry: Authentication for the registry where the tagged index will be pushed. + + Credentials can also be included with the provider's configuration. + :param pulumi.Input[Sequence[pulumi.Input[str]]] sources: Existing images to include in the index. + :param pulumi.Input[str] tag: The tag to apply to the index. + """ + ... + @overload + def __init__(__self__, + resource_name: str, + args: IndexArgs, + opts: Optional[pulumi.ResourceOptions] = None): + """ + A wrapper around `docker buildx imagetools create` to create an index + (or manifest list) referencing one or more existing images. + + In most cases you do not need an `Index` to build a multi-platform + image -- specifying multiple platforms on the `Image` will handle this + for you automatically. + + However, as of April 2024, building multi-platform images _with + caching_ will only export a cache for one platform at a time (see [this + discussion](https://github.com/docker/buildx/discussions/1382) for more + details). + + Therefore this resource can be helpful if you are building + multi-platform images with caching: each platform can be built and + cached separately, and an `Index` can join them all together. An + example of this is shown below. + + This resource creates an OCI image index or a Docker manifest list + depending on the media types of the source images. + + ## Example Usage + ### Multi-platform registry caching + ```python + import pulumi + import pulumi_docker_build as docker_build + + amd64 = docker_build.Image("amd64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( + ref="docker.io/pulumi/pulumi:cache-amd64", + ), + )], + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, + ref="docker.io/pulumi/pulumi:cache-amd64", + ), + )], + context=docker_build.BuildContextArgs( + location="app", + ), + platforms=[docker_build.Platform.LINUX_AMD64], + tags=["docker.io/pulumi/pulumi:3.107.0-amd64"]) + arm64 = docker_build.Image("arm64", + cache_from=[docker_build.CacheFromArgs( + registry=docker_build.CacheFromRegistryArgs( + ref="docker.io/pulumi/pulumi:cache-arm64", + ), + )], + cache_to=[docker_build.CacheToArgs( + registry=docker_build.CacheToRegistryArgs( + mode=docker_build.CacheMode.MAX, + ref="docker.io/pulumi/pulumi:cache-arm64", + ), + )], + context=docker_build.BuildContextArgs( + location="app", + ), + platforms=[docker_build.Platform.LINUX_ARM64], + tags=["docker.io/pulumi/pulumi:3.107.0-arm64"]) + index = docker_build.Index("index", + sources=[ + amd64.ref, + arm64.ref, + ], + tag="docker.io/pulumi/pulumi:3.107.0") + pulumi.export("ref", index.ref) + ``` + + :param str resource_name: The name of the resource. + :param IndexArgs args: The arguments to use to populate this resource's properties. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + ... + def __init__(__self__, resource_name: str, *args, **kwargs): + resource_args, opts = _utilities.get_resource_args_opts(IndexArgs, pulumi.ResourceOptions, *args, **kwargs) + if resource_args is not None: + __self__._internal_init(resource_name, opts, **resource_args.__dict__) + else: + __self__._internal_init(resource_name, *args, **kwargs) + + def _internal_init(__self__, + resource_name: str, + opts: Optional[pulumi.ResourceOptions] = None, + push: Optional[pulumi.Input[bool]] = None, + registry: Optional[pulumi.Input[pulumi.InputType['RegistryArgs']]] = None, + sources: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, + tag: Optional[pulumi.Input[str]] = None, + __props__=None): + opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) + if not isinstance(opts, pulumi.ResourceOptions): + raise TypeError('Expected resource options to be a ResourceOptions instance') + if opts.id is None: + if __props__ is not None: + raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') + __props__ = IndexArgs.__new__(IndexArgs) + + if push is None: + push = True + __props__.__dict__["push"] = push + __props__.__dict__["registry"] = registry + if sources is None and not opts.urn: + raise TypeError("Missing required property 'sources'") + __props__.__dict__["sources"] = sources + if tag is None and not opts.urn: + raise TypeError("Missing required property 'tag'") + __props__.__dict__["tag"] = tag + __props__.__dict__["ref"] = None + super(Index, __self__).__init__( + 'docker-build:index:Index', + resource_name, + __props__, + opts) + + @staticmethod + def get(resource_name: str, + id: pulumi.Input[str], + opts: Optional[pulumi.ResourceOptions] = None) -> 'Index': + """ + Get an existing Index resource's state with the given name, id, and optional extra + properties used to qualify the lookup. + + :param str resource_name: The unique name of the resulting resource. + :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. + :param pulumi.ResourceOptions opts: Options for the resource. + """ + opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) + + __props__ = IndexArgs.__new__(IndexArgs) + + __props__.__dict__["push"] = None + __props__.__dict__["ref"] = None + __props__.__dict__["registry"] = None + __props__.__dict__["sources"] = None + __props__.__dict__["tag"] = None + return Index(resource_name, opts=opts, __props__=__props__) + + @property + @pulumi.getter + def push(self) -> pulumi.Output[Optional[bool]]: + """ + If true, push the index to the target registry. + + Defaults to `true`. + """ + return pulumi.get(self, "push") + + @property + @pulumi.getter + def ref(self) -> pulumi.Output[str]: + """ + The pushed tag with digest. + + Identical to the tag if the index was not pushed. + """ + return pulumi.get(self, "ref") + + @property + @pulumi.getter + def registry(self) -> pulumi.Output[Optional['outputs.Registry']]: + """ + Authentication for the registry where the tagged index will be pushed. + + Credentials can also be included with the provider's configuration. + """ + return pulumi.get(self, "registry") + + @property + @pulumi.getter + def sources(self) -> pulumi.Output[Sequence[str]]: + """ + Existing images to include in the index. + """ + return pulumi.get(self, "sources") + + @property + @pulumi.getter + def tag(self) -> pulumi.Output[str]: + """ + The tag to apply to the index. + """ + return pulumi.get(self, "tag") + diff --git a/sdk/python/pulumi_docker_build/outputs.py b/sdk/python/pulumi_docker_build/outputs.py new file mode 100644 index 0000000..a2c0747 --- /dev/null +++ b/sdk/python/pulumi_docker_build/outputs.py @@ -0,0 +1,2399 @@ +# coding=utf-8 +# *** WARNING: this file was generated by pulumi-language-python. *** +# *** Do not edit by hand unless you're certain you know what you are doing! *** + +import copy +import warnings +import pulumi +import pulumi.runtime +from typing import Any, Mapping, Optional, Sequence, Union, overload +from . import _utilities +from . import outputs +from ._enums import * + +__all__ = [ + 'BuildContext', + 'BuilderConfig', + 'CacheFrom', + 'CacheFromAzureBlob', + 'CacheFromGitHubActions', + 'CacheFromLocal', + 'CacheFromRegistry', + 'CacheFromS3', + 'CacheTo', + 'CacheToAzureBlob', + 'CacheToGitHubActions', + 'CacheToInline', + 'CacheToLocal', + 'CacheToRegistry', + 'CacheToS3', + 'Context', + 'Dockerfile', + 'Export', + 'ExportCacheOnly', + 'ExportDocker', + 'ExportImage', + 'ExportLocal', + 'ExportOCI', + 'ExportRegistry', + 'ExportTar', + 'Registry', + 'SSH', +] + +@pulumi.output_type +class BuildContext(dict): + def __init__(__self__, *, + location: str, + named: Optional[Mapping[str, 'outputs.Context']] = None): + """ + :param str location: Resources to use for build context. + + The location can be: + * A relative or absolute path to a local directory (`.`, `./app`, + `/app`, etc.). + * A remote URL of a Git repository, tarball, or plain text file + (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + etc.). + :param Mapping[str, 'Context'] named: Additional build contexts to use. + + These contexts are accessed with `FROM name` or `--from=name` + statements when using Dockerfile 1.4+ syntax. + + Values can be local paths, HTTP URLs, or `docker-image://` images. + """ + pulumi.set(__self__, "location", location) + if named is not None: + pulumi.set(__self__, "named", named) + + @property + @pulumi.getter + def location(self) -> str: + """ + Resources to use for build context. + + The location can be: + * A relative or absolute path to a local directory (`.`, `./app`, + `/app`, etc.). + * A remote URL of a Git repository, tarball, or plain text file + (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + etc.). + """ + return pulumi.get(self, "location") + + @property + @pulumi.getter + def named(self) -> Optional[Mapping[str, 'outputs.Context']]: + """ + Additional build contexts to use. + + These contexts are accessed with `FROM name` or `--from=name` + statements when using Dockerfile 1.4+ syntax. + + Values can be local paths, HTTP URLs, or `docker-image://` images. + """ + return pulumi.get(self, "named") + + +@pulumi.output_type +class BuilderConfig(dict): + def __init__(__self__, *, + name: Optional[str] = None): + """ + :param str name: Name of an existing buildx builder to use. + + Only `docker-container`, `kubernetes`, or `remote` drivers are + supported. The legacy `docker` driver is not supported. + + Equivalent to Docker's `--builder` flag. + """ + if name is not None: + pulumi.set(__self__, "name", name) + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + Name of an existing buildx builder to use. + + Only `docker-container`, `kubernetes`, or `remote` drivers are + supported. The legacy `docker` driver is not supported. + + Equivalent to Docker's `--builder` flag. + """ + return pulumi.get(self, "name") + + +@pulumi.output_type +class CacheFrom(dict): + def __init__(__self__, *, + azblob: Optional['outputs.CacheFromAzureBlob'] = None, + disabled: Optional[bool] = None, + gha: Optional['outputs.CacheFromGitHubActions'] = None, + local: Optional['outputs.CacheFromLocal'] = None, + raw: Optional[str] = None, + registry: Optional['outputs.CacheFromRegistry'] = None, + s3: Optional['outputs.CacheFromS3'] = None): + """ + :param 'CacheFromAzureBlob' azblob: Upload build caches to Azure's blob storage service. + :param bool disabled: When `true` this entry will be excluded. Defaults to `false`. + :param 'CacheFromGitHubActions' gha: Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to + expose appropriate credentials to your GitHub workflow. + :param 'CacheFromLocal' local: A simple backend which caches images on your local filesystem. + :param str raw: A raw string as you would provide it to the Docker CLI (e.g., + `type=inline`). + :param 'CacheFromRegistry' registry: Upload build caches to remote registries. + :param 'CacheFromS3' s3: Upload build caches to AWS S3 or an S3-compatible services such as + MinIO. + """ + if azblob is not None: + pulumi.set(__self__, "azblob", azblob) + if disabled is not None: + pulumi.set(__self__, "disabled", disabled) + if gha is not None: + pulumi.set(__self__, "gha", gha) + if local is not None: + pulumi.set(__self__, "local", local) + if raw is not None: + pulumi.set(__self__, "raw", raw) + if registry is not None: + pulumi.set(__self__, "registry", registry) + if s3 is not None: + pulumi.set(__self__, "s3", s3) + + @property + @pulumi.getter + def azblob(self) -> Optional['outputs.CacheFromAzureBlob']: + """ + Upload build caches to Azure's blob storage service. + """ + return pulumi.get(self, "azblob") + + @property + @pulumi.getter + def disabled(self) -> Optional[bool]: + """ + When `true` this entry will be excluded. Defaults to `false`. + """ + return pulumi.get(self, "disabled") + + @property + @pulumi.getter + def gha(self) -> Optional['outputs.CacheFromGitHubActions']: + """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to + expose appropriate credentials to your GitHub workflow. + """ + return pulumi.get(self, "gha") + + @property + @pulumi.getter + def local(self) -> Optional['outputs.CacheFromLocal']: + """ + A simple backend which caches images on your local filesystem. + """ + return pulumi.get(self, "local") + + @property + @pulumi.getter + def raw(self) -> Optional[str]: + """ + A raw string as you would provide it to the Docker CLI (e.g., + `type=inline`). + """ + return pulumi.get(self, "raw") + + @property + @pulumi.getter + def registry(self) -> Optional['outputs.CacheFromRegistry']: + """ + Upload build caches to remote registries. + """ + return pulumi.get(self, "registry") + + @property + @pulumi.getter + def s3(self) -> Optional['outputs.CacheFromS3']: + """ + Upload build caches to AWS S3 or an S3-compatible services such as + MinIO. + """ + return pulumi.get(self, "s3") + + +@pulumi.output_type +class CacheFromAzureBlob(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "accountUrl": + suggest = "account_url" + elif key == "secretAccessKey": + suggest = "secret_access_key" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in CacheFromAzureBlob. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + CacheFromAzureBlob.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + CacheFromAzureBlob.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + name: str, + account_url: Optional[str] = None, + secret_access_key: Optional[str] = None): + """ + :param str name: The name of the cache image. + :param str account_url: Base URL of the storage account. + :param str secret_access_key: Blob storage account key. + """ + pulumi.set(__self__, "name", name) + if account_url is not None: + pulumi.set(__self__, "account_url", account_url) + if secret_access_key is not None: + pulumi.set(__self__, "secret_access_key", secret_access_key) + + @property + @pulumi.getter + def name(self) -> str: + """ + The name of the cache image. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="accountUrl") + def account_url(self) -> Optional[str]: + """ + Base URL of the storage account. + """ + return pulumi.get(self, "account_url") + + @property + @pulumi.getter(name="secretAccessKey") + def secret_access_key(self) -> Optional[str]: + """ + Blob storage account key. + """ + return pulumi.get(self, "secret_access_key") + + +@pulumi.output_type +class CacheFromGitHubActions(dict): + def __init__(__self__, *, + scope: Optional[str] = None, + token: Optional[str] = None, + url: Optional[str] = None): + """ + :param str scope: The scope to use for cache keys. Defaults to `buildkit`. + + This should be set if building and caching multiple images in one + workflow, otherwise caches will overwrite each other. + :param str token: The GitHub Actions token to use. This is not a personal access tokens + and is typically generated automatically as part of each job. + + Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + :param str url: The cache server URL to use for artifacts. + + Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + if scope is None: + scope = (_utilities.get_env('buildkit') or '') + if scope is not None: + pulumi.set(__self__, "scope", scope) + if token is None: + token = (_utilities.get_env('ACTIONS_RUNTIME_TOKEN') or '') + if token is not None: + pulumi.set(__self__, "token", token) + if url is None: + url = (_utilities.get_env('ACTIONS_RUNTIME_URL') or '') + if url is not None: + pulumi.set(__self__, "url", url) + + @property + @pulumi.getter + def scope(self) -> Optional[str]: + """ + The scope to use for cache keys. Defaults to `buildkit`. + + This should be set if building and caching multiple images in one + workflow, otherwise caches will overwrite each other. + """ + return pulumi.get(self, "scope") + + @property + @pulumi.getter + def token(self) -> Optional[str]: + """ + The GitHub Actions token to use. This is not a personal access tokens + and is typically generated automatically as part of each job. + + Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + return pulumi.get(self, "token") + + @property + @pulumi.getter + def url(self) -> Optional[str]: + """ + The cache server URL to use for artifacts. + + Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + return pulumi.get(self, "url") + + +@pulumi.output_type +class CacheFromLocal(dict): + def __init__(__self__, *, + src: str, + digest: Optional[str] = None): + """ + :param str src: Path of the local directory where cache gets imported from. + :param str digest: Digest of manifest to import. + """ + pulumi.set(__self__, "src", src) + if digest is not None: + pulumi.set(__self__, "digest", digest) + + @property + @pulumi.getter + def src(self) -> str: + """ + Path of the local directory where cache gets imported from. + """ + return pulumi.get(self, "src") + + @property + @pulumi.getter + def digest(self) -> Optional[str]: + """ + Digest of manifest to import. + """ + return pulumi.get(self, "digest") + + +@pulumi.output_type +class CacheFromRegistry(dict): + def __init__(__self__, *, + ref: str): + """ + :param str ref: Fully qualified name of the cache image to import. + """ + pulumi.set(__self__, "ref", ref) + + @property + @pulumi.getter + def ref(self) -> str: + """ + Fully qualified name of the cache image to import. + """ + return pulumi.get(self, "ref") + + +@pulumi.output_type +class CacheFromS3(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "accessKeyId": + suggest = "access_key_id" + elif key == "blobsPrefix": + suggest = "blobs_prefix" + elif key == "endpointUrl": + suggest = "endpoint_url" + elif key == "manifestsPrefix": + suggest = "manifests_prefix" + elif key == "secretAccessKey": + suggest = "secret_access_key" + elif key == "sessionToken": + suggest = "session_token" + elif key == "usePathStyle": + suggest = "use_path_style" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in CacheFromS3. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + CacheFromS3.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + CacheFromS3.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + bucket: str, + region: Optional[str] = None, + access_key_id: Optional[str] = None, + blobs_prefix: Optional[str] = None, + endpoint_url: Optional[str] = None, + manifests_prefix: Optional[str] = None, + name: Optional[str] = None, + secret_access_key: Optional[str] = None, + session_token: Optional[str] = None, + use_path_style: Optional[bool] = None): + """ + :param str bucket: Name of the S3 bucket. + :param str region: The geographic location of the bucket. Defaults to `$AWS_REGION`. + :param str access_key_id: Defaults to `$AWS_ACCESS_KEY_ID`. + :param str blobs_prefix: Prefix to prepend to blob filenames. + :param str endpoint_url: Endpoint of the S3 bucket. + :param str manifests_prefix: Prefix to prepend on manifest filenames. + :param str name: Name of the cache image. + :param str secret_access_key: Defaults to `$AWS_SECRET_ACCESS_KEY`. + :param str session_token: Defaults to `$AWS_SESSION_TOKEN`. + :param bool use_path_style: Uses `bucket` in the URL instead of hostname when `true`. + """ + pulumi.set(__self__, "bucket", bucket) + if region is None: + region = (_utilities.get_env('AWS_REGION') or '') + pulumi.set(__self__, "region", region) + if access_key_id is None: + access_key_id = (_utilities.get_env('AWS_ACCESS_KEY_ID') or '') + if access_key_id is not None: + pulumi.set(__self__, "access_key_id", access_key_id) + if blobs_prefix is not None: + pulumi.set(__self__, "blobs_prefix", blobs_prefix) + if endpoint_url is not None: + pulumi.set(__self__, "endpoint_url", endpoint_url) + if manifests_prefix is not None: + pulumi.set(__self__, "manifests_prefix", manifests_prefix) + if name is not None: + pulumi.set(__self__, "name", name) + if secret_access_key is None: + secret_access_key = (_utilities.get_env('AWS_SECRET_ACCESS_KEY') or '') + if secret_access_key is not None: + pulumi.set(__self__, "secret_access_key", secret_access_key) + if session_token is None: + session_token = (_utilities.get_env('AWS_SESSION_TOKEN') or '') + if session_token is not None: + pulumi.set(__self__, "session_token", session_token) + if use_path_style is not None: + pulumi.set(__self__, "use_path_style", use_path_style) + + @property + @pulumi.getter + def bucket(self) -> str: + """ + Name of the S3 bucket. + """ + return pulumi.get(self, "bucket") + + @property + @pulumi.getter + def region(self) -> str: + """ + The geographic location of the bucket. Defaults to `$AWS_REGION`. + """ + return pulumi.get(self, "region") + + @property + @pulumi.getter(name="accessKeyId") + def access_key_id(self) -> Optional[str]: + """ + Defaults to `$AWS_ACCESS_KEY_ID`. + """ + return pulumi.get(self, "access_key_id") + + @property + @pulumi.getter(name="blobsPrefix") + def blobs_prefix(self) -> Optional[str]: + """ + Prefix to prepend to blob filenames. + """ + return pulumi.get(self, "blobs_prefix") + + @property + @pulumi.getter(name="endpointUrl") + def endpoint_url(self) -> Optional[str]: + """ + Endpoint of the S3 bucket. + """ + return pulumi.get(self, "endpoint_url") + + @property + @pulumi.getter(name="manifestsPrefix") + def manifests_prefix(self) -> Optional[str]: + """ + Prefix to prepend on manifest filenames. + """ + return pulumi.get(self, "manifests_prefix") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + Name of the cache image. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="secretAccessKey") + def secret_access_key(self) -> Optional[str]: + """ + Defaults to `$AWS_SECRET_ACCESS_KEY`. + """ + return pulumi.get(self, "secret_access_key") + + @property + @pulumi.getter(name="sessionToken") + def session_token(self) -> Optional[str]: + """ + Defaults to `$AWS_SESSION_TOKEN`. + """ + return pulumi.get(self, "session_token") + + @property + @pulumi.getter(name="usePathStyle") + def use_path_style(self) -> Optional[bool]: + """ + Uses `bucket` in the URL instead of hostname when `true`. + """ + return pulumi.get(self, "use_path_style") + + +@pulumi.output_type +class CacheTo(dict): + def __init__(__self__, *, + azblob: Optional['outputs.CacheToAzureBlob'] = None, + disabled: Optional[bool] = None, + gha: Optional['outputs.CacheToGitHubActions'] = None, + inline: Optional['outputs.CacheToInline'] = None, + local: Optional['outputs.CacheToLocal'] = None, + raw: Optional[str] = None, + registry: Optional['outputs.CacheToRegistry'] = None, + s3: Optional['outputs.CacheToS3'] = None): + """ + :param 'CacheToAzureBlob' azblob: Push cache to Azure's blob storage service. + :param bool disabled: When `true` this entry will be excluded. Defaults to `false`. + :param 'CacheToGitHubActions' gha: Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to + expose appropriate credentials to your GitHub workflow. + :param 'CacheToInline' inline: The inline cache storage backend is the simplest implementation to get + started with, but it does not handle multi-stage builds. Consider the + `registry` cache backend instead. + :param 'CacheToLocal' local: A simple backend which caches imagines on your local filesystem. + :param str raw: A raw string as you would provide it to the Docker CLI (e.g., + `type=inline`) + :param 'CacheToRegistry' registry: Push caches to remote registries. Incompatible with the `docker` build + driver. + :param 'CacheToS3' s3: Push cache to AWS S3 or S3-compatible services such as MinIO. + """ + if azblob is not None: + pulumi.set(__self__, "azblob", azblob) + if disabled is not None: + pulumi.set(__self__, "disabled", disabled) + if gha is not None: + pulumi.set(__self__, "gha", gha) + if inline is not None: + pulumi.set(__self__, "inline", inline) + if local is not None: + pulumi.set(__self__, "local", local) + if raw is not None: + pulumi.set(__self__, "raw", raw) + if registry is not None: + pulumi.set(__self__, "registry", registry) + if s3 is not None: + pulumi.set(__self__, "s3", s3) + + @property + @pulumi.getter + def azblob(self) -> Optional['outputs.CacheToAzureBlob']: + """ + Push cache to Azure's blob storage service. + """ + return pulumi.get(self, "azblob") + + @property + @pulumi.getter + def disabled(self) -> Optional[bool]: + """ + When `true` this entry will be excluded. Defaults to `false`. + """ + return pulumi.get(self, "disabled") + + @property + @pulumi.getter + def gha(self) -> Optional['outputs.CacheToGitHubActions']: + """ + Recommended for use with GitHub Actions workflows. + + An action like `crazy-max/ghaction-github-runtime` is recommended to + expose appropriate credentials to your GitHub workflow. + """ + return pulumi.get(self, "gha") + + @property + @pulumi.getter + def inline(self) -> Optional['outputs.CacheToInline']: + """ + The inline cache storage backend is the simplest implementation to get + started with, but it does not handle multi-stage builds. Consider the + `registry` cache backend instead. + """ + return pulumi.get(self, "inline") + + @property + @pulumi.getter + def local(self) -> Optional['outputs.CacheToLocal']: + """ + A simple backend which caches imagines on your local filesystem. + """ + return pulumi.get(self, "local") + + @property + @pulumi.getter + def raw(self) -> Optional[str]: + """ + A raw string as you would provide it to the Docker CLI (e.g., + `type=inline`) + """ + return pulumi.get(self, "raw") + + @property + @pulumi.getter + def registry(self) -> Optional['outputs.CacheToRegistry']: + """ + Push caches to remote registries. Incompatible with the `docker` build + driver. + """ + return pulumi.get(self, "registry") + + @property + @pulumi.getter + def s3(self) -> Optional['outputs.CacheToS3']: + """ + Push cache to AWS S3 or S3-compatible services such as MinIO. + """ + return pulumi.get(self, "s3") + + +@pulumi.output_type +class CacheToAzureBlob(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "accountUrl": + suggest = "account_url" + elif key == "ignoreError": + suggest = "ignore_error" + elif key == "secretAccessKey": + suggest = "secret_access_key" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in CacheToAzureBlob. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + CacheToAzureBlob.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + CacheToAzureBlob.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + name: str, + account_url: Optional[str] = None, + ignore_error: Optional[bool] = None, + mode: Optional['CacheMode'] = None, + secret_access_key: Optional[str] = None): + """ + :param str name: The name of the cache image. + :param str account_url: Base URL of the storage account. + :param bool ignore_error: Ignore errors caused by failed cache exports. + :param 'CacheMode' mode: The cache mode to use. Defaults to `min`. + :param str secret_access_key: Blob storage account key. + """ + pulumi.set(__self__, "name", name) + if account_url is not None: + pulumi.set(__self__, "account_url", account_url) + if ignore_error is None: + ignore_error = False + if ignore_error is not None: + pulumi.set(__self__, "ignore_error", ignore_error) + if mode is None: + mode = 'min' + if mode is not None: + pulumi.set(__self__, "mode", mode) + if secret_access_key is not None: + pulumi.set(__self__, "secret_access_key", secret_access_key) + + @property + @pulumi.getter + def name(self) -> str: + """ + The name of the cache image. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="accountUrl") + def account_url(self) -> Optional[str]: + """ + Base URL of the storage account. + """ + return pulumi.get(self, "account_url") + + @property + @pulumi.getter(name="ignoreError") + def ignore_error(self) -> Optional[bool]: + """ + Ignore errors caused by failed cache exports. + """ + return pulumi.get(self, "ignore_error") + + @property + @pulumi.getter + def mode(self) -> Optional['CacheMode']: + """ + The cache mode to use. Defaults to `min`. + """ + return pulumi.get(self, "mode") + + @property + @pulumi.getter(name="secretAccessKey") + def secret_access_key(self) -> Optional[str]: + """ + Blob storage account key. + """ + return pulumi.get(self, "secret_access_key") + + +@pulumi.output_type +class CacheToGitHubActions(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "ignoreError": + suggest = "ignore_error" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in CacheToGitHubActions. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + CacheToGitHubActions.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + CacheToGitHubActions.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + ignore_error: Optional[bool] = None, + mode: Optional['CacheMode'] = None, + scope: Optional[str] = None, + token: Optional[str] = None, + url: Optional[str] = None): + """ + :param bool ignore_error: Ignore errors caused by failed cache exports. + :param 'CacheMode' mode: The cache mode to use. Defaults to `min`. + :param str scope: The scope to use for cache keys. Defaults to `buildkit`. + + This should be set if building and caching multiple images in one + workflow, otherwise caches will overwrite each other. + :param str token: The GitHub Actions token to use. This is not a personal access tokens + and is typically generated automatically as part of each job. + + Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + :param str url: The cache server URL to use for artifacts. + + Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + if ignore_error is None: + ignore_error = False + if ignore_error is not None: + pulumi.set(__self__, "ignore_error", ignore_error) + if mode is None: + mode = 'min' + if mode is not None: + pulumi.set(__self__, "mode", mode) + if scope is None: + scope = (_utilities.get_env('buildkit') or '') + if scope is not None: + pulumi.set(__self__, "scope", scope) + if token is None: + token = (_utilities.get_env('ACTIONS_RUNTIME_TOKEN') or '') + if token is not None: + pulumi.set(__self__, "token", token) + if url is None: + url = (_utilities.get_env('ACTIONS_RUNTIME_URL') or '') + if url is not None: + pulumi.set(__self__, "url", url) + + @property + @pulumi.getter(name="ignoreError") + def ignore_error(self) -> Optional[bool]: + """ + Ignore errors caused by failed cache exports. + """ + return pulumi.get(self, "ignore_error") + + @property + @pulumi.getter + def mode(self) -> Optional['CacheMode']: + """ + The cache mode to use. Defaults to `min`. + """ + return pulumi.get(self, "mode") + + @property + @pulumi.getter + def scope(self) -> Optional[str]: + """ + The scope to use for cache keys. Defaults to `buildkit`. + + This should be set if building and caching multiple images in one + workflow, otherwise caches will overwrite each other. + """ + return pulumi.get(self, "scope") + + @property + @pulumi.getter + def token(self) -> Optional[str]: + """ + The GitHub Actions token to use. This is not a personal access tokens + and is typically generated automatically as part of each job. + + Defaults to `$ACTIONS_RUNTIME_TOKEN`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + return pulumi.get(self, "token") + + @property + @pulumi.getter + def url(self) -> Optional[str]: + """ + The cache server URL to use for artifacts. + + Defaults to `$ACTIONS_RUNTIME_URL`, although a separate action like + `crazy-max/ghaction-github-runtime` is recommended to expose this + environment variable to your jobs. + """ + return pulumi.get(self, "url") + + +@pulumi.output_type +class CacheToInline(dict): + """ + Include an inline cache with the exported image. + """ + def __init__(__self__): + """ + Include an inline cache with the exported image. + """ + pass + + +@pulumi.output_type +class CacheToLocal(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "compressionLevel": + suggest = "compression_level" + elif key == "forceCompression": + suggest = "force_compression" + elif key == "ignoreError": + suggest = "ignore_error" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in CacheToLocal. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + CacheToLocal.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + CacheToLocal.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + dest: str, + compression: Optional['CompressionType'] = None, + compression_level: Optional[int] = None, + force_compression: Optional[bool] = None, + ignore_error: Optional[bool] = None, + mode: Optional['CacheMode'] = None): + """ + :param str dest: Path of the local directory to export the cache. + :param 'CompressionType' compression: The compression type to use. + :param int compression_level: Compression level from 0 to 22. + :param bool force_compression: Forcefully apply compression. + :param bool ignore_error: Ignore errors caused by failed cache exports. + :param 'CacheMode' mode: The cache mode to use. Defaults to `min`. + """ + pulumi.set(__self__, "dest", dest) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if ignore_error is None: + ignore_error = False + if ignore_error is not None: + pulumi.set(__self__, "ignore_error", ignore_error) + if mode is None: + mode = 'min' + if mode is not None: + pulumi.set(__self__, "mode", mode) + + @property + @pulumi.getter + def dest(self) -> str: + """ + Path of the local directory to export the cache. + """ + return pulumi.get(self, "dest") + + @property + @pulumi.getter + def compression(self) -> Optional['CompressionType']: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[int]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[bool]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @property + @pulumi.getter(name="ignoreError") + def ignore_error(self) -> Optional[bool]: + """ + Ignore errors caused by failed cache exports. + """ + return pulumi.get(self, "ignore_error") + + @property + @pulumi.getter + def mode(self) -> Optional['CacheMode']: + """ + The cache mode to use. Defaults to `min`. + """ + return pulumi.get(self, "mode") + + +@pulumi.output_type +class CacheToRegistry(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "compressionLevel": + suggest = "compression_level" + elif key == "forceCompression": + suggest = "force_compression" + elif key == "ignoreError": + suggest = "ignore_error" + elif key == "imageManifest": + suggest = "image_manifest" + elif key == "ociMediaTypes": + suggest = "oci_media_types" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in CacheToRegistry. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + CacheToRegistry.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + CacheToRegistry.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + ref: str, + compression: Optional['CompressionType'] = None, + compression_level: Optional[int] = None, + force_compression: Optional[bool] = None, + ignore_error: Optional[bool] = None, + image_manifest: Optional[bool] = None, + mode: Optional['CacheMode'] = None, + oci_media_types: Optional[bool] = None): + """ + :param str ref: Fully qualified name of the cache image to import. + :param 'CompressionType' compression: The compression type to use. + :param int compression_level: Compression level from 0 to 22. + :param bool force_compression: Forcefully apply compression. + :param bool ignore_error: Ignore errors caused by failed cache exports. + :param bool image_manifest: Export cache manifest as an OCI-compatible image manifest instead of a + manifest list. Requires `ociMediaTypes` to also be `true`. + + Some registries like AWS ECR will not work with caching if this is + `false`. + + Defaults to `false` to match Docker's default behavior. + :param 'CacheMode' mode: The cache mode to use. Defaults to `min`. + :param bool oci_media_types: Whether to use OCI media types in exported manifests. Defaults to + `true`. + """ + pulumi.set(__self__, "ref", ref) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if ignore_error is None: + ignore_error = False + if ignore_error is not None: + pulumi.set(__self__, "ignore_error", ignore_error) + if image_manifest is None: + image_manifest = False + if image_manifest is not None: + pulumi.set(__self__, "image_manifest", image_manifest) + if mode is None: + mode = 'min' + if mode is not None: + pulumi.set(__self__, "mode", mode) + if oci_media_types is None: + oci_media_types = True + if oci_media_types is not None: + pulumi.set(__self__, "oci_media_types", oci_media_types) + + @property + @pulumi.getter + def ref(self) -> str: + """ + Fully qualified name of the cache image to import. + """ + return pulumi.get(self, "ref") + + @property + @pulumi.getter + def compression(self) -> Optional['CompressionType']: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[int]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[bool]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @property + @pulumi.getter(name="ignoreError") + def ignore_error(self) -> Optional[bool]: + """ + Ignore errors caused by failed cache exports. + """ + return pulumi.get(self, "ignore_error") + + @property + @pulumi.getter(name="imageManifest") + def image_manifest(self) -> Optional[bool]: + """ + Export cache manifest as an OCI-compatible image manifest instead of a + manifest list. Requires `ociMediaTypes` to also be `true`. + + Some registries like AWS ECR will not work with caching if this is + `false`. + + Defaults to `false` to match Docker's default behavior. + """ + return pulumi.get(self, "image_manifest") + + @property + @pulumi.getter + def mode(self) -> Optional['CacheMode']: + """ + The cache mode to use. Defaults to `min`. + """ + return pulumi.get(self, "mode") + + @property + @pulumi.getter(name="ociMediaTypes") + def oci_media_types(self) -> Optional[bool]: + """ + Whether to use OCI media types in exported manifests. Defaults to + `true`. + """ + return pulumi.get(self, "oci_media_types") + + +@pulumi.output_type +class CacheToS3(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "accessKeyId": + suggest = "access_key_id" + elif key == "blobsPrefix": + suggest = "blobs_prefix" + elif key == "endpointUrl": + suggest = "endpoint_url" + elif key == "ignoreError": + suggest = "ignore_error" + elif key == "manifestsPrefix": + suggest = "manifests_prefix" + elif key == "secretAccessKey": + suggest = "secret_access_key" + elif key == "sessionToken": + suggest = "session_token" + elif key == "usePathStyle": + suggest = "use_path_style" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in CacheToS3. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + CacheToS3.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + CacheToS3.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + bucket: str, + region: Optional[str] = None, + access_key_id: Optional[str] = None, + blobs_prefix: Optional[str] = None, + endpoint_url: Optional[str] = None, + ignore_error: Optional[bool] = None, + manifests_prefix: Optional[str] = None, + mode: Optional['CacheMode'] = None, + name: Optional[str] = None, + secret_access_key: Optional[str] = None, + session_token: Optional[str] = None, + use_path_style: Optional[bool] = None): + """ + :param str bucket: Name of the S3 bucket. + :param str region: The geographic location of the bucket. Defaults to `$AWS_REGION`. + :param str access_key_id: Defaults to `$AWS_ACCESS_KEY_ID`. + :param str blobs_prefix: Prefix to prepend to blob filenames. + :param str endpoint_url: Endpoint of the S3 bucket. + :param bool ignore_error: Ignore errors caused by failed cache exports. + :param str manifests_prefix: Prefix to prepend on manifest filenames. + :param 'CacheMode' mode: The cache mode to use. Defaults to `min`. + :param str name: Name of the cache image. + :param str secret_access_key: Defaults to `$AWS_SECRET_ACCESS_KEY`. + :param str session_token: Defaults to `$AWS_SESSION_TOKEN`. + :param bool use_path_style: Uses `bucket` in the URL instead of hostname when `true`. + """ + pulumi.set(__self__, "bucket", bucket) + if region is None: + region = (_utilities.get_env('AWS_REGION') or '') + pulumi.set(__self__, "region", region) + if access_key_id is None: + access_key_id = (_utilities.get_env('AWS_ACCESS_KEY_ID') or '') + if access_key_id is not None: + pulumi.set(__self__, "access_key_id", access_key_id) + if blobs_prefix is not None: + pulumi.set(__self__, "blobs_prefix", blobs_prefix) + if endpoint_url is not None: + pulumi.set(__self__, "endpoint_url", endpoint_url) + if ignore_error is None: + ignore_error = False + if ignore_error is not None: + pulumi.set(__self__, "ignore_error", ignore_error) + if manifests_prefix is not None: + pulumi.set(__self__, "manifests_prefix", manifests_prefix) + if mode is None: + mode = 'min' + if mode is not None: + pulumi.set(__self__, "mode", mode) + if name is not None: + pulumi.set(__self__, "name", name) + if secret_access_key is None: + secret_access_key = (_utilities.get_env('AWS_SECRET_ACCESS_KEY') or '') + if secret_access_key is not None: + pulumi.set(__self__, "secret_access_key", secret_access_key) + if session_token is None: + session_token = (_utilities.get_env('AWS_SESSION_TOKEN') or '') + if session_token is not None: + pulumi.set(__self__, "session_token", session_token) + if use_path_style is not None: + pulumi.set(__self__, "use_path_style", use_path_style) + + @property + @pulumi.getter + def bucket(self) -> str: + """ + Name of the S3 bucket. + """ + return pulumi.get(self, "bucket") + + @property + @pulumi.getter + def region(self) -> str: + """ + The geographic location of the bucket. Defaults to `$AWS_REGION`. + """ + return pulumi.get(self, "region") + + @property + @pulumi.getter(name="accessKeyId") + def access_key_id(self) -> Optional[str]: + """ + Defaults to `$AWS_ACCESS_KEY_ID`. + """ + return pulumi.get(self, "access_key_id") + + @property + @pulumi.getter(name="blobsPrefix") + def blobs_prefix(self) -> Optional[str]: + """ + Prefix to prepend to blob filenames. + """ + return pulumi.get(self, "blobs_prefix") + + @property + @pulumi.getter(name="endpointUrl") + def endpoint_url(self) -> Optional[str]: + """ + Endpoint of the S3 bucket. + """ + return pulumi.get(self, "endpoint_url") + + @property + @pulumi.getter(name="ignoreError") + def ignore_error(self) -> Optional[bool]: + """ + Ignore errors caused by failed cache exports. + """ + return pulumi.get(self, "ignore_error") + + @property + @pulumi.getter(name="manifestsPrefix") + def manifests_prefix(self) -> Optional[str]: + """ + Prefix to prepend on manifest filenames. + """ + return pulumi.get(self, "manifests_prefix") + + @property + @pulumi.getter + def mode(self) -> Optional['CacheMode']: + """ + The cache mode to use. Defaults to `min`. + """ + return pulumi.get(self, "mode") + + @property + @pulumi.getter + def name(self) -> Optional[str]: + """ + Name of the cache image. + """ + return pulumi.get(self, "name") + + @property + @pulumi.getter(name="secretAccessKey") + def secret_access_key(self) -> Optional[str]: + """ + Defaults to `$AWS_SECRET_ACCESS_KEY`. + """ + return pulumi.get(self, "secret_access_key") + + @property + @pulumi.getter(name="sessionToken") + def session_token(self) -> Optional[str]: + """ + Defaults to `$AWS_SESSION_TOKEN`. + """ + return pulumi.get(self, "session_token") + + @property + @pulumi.getter(name="usePathStyle") + def use_path_style(self) -> Optional[bool]: + """ + Uses `bucket` in the URL instead of hostname when `true`. + """ + return pulumi.get(self, "use_path_style") + + +@pulumi.output_type +class Context(dict): + def __init__(__self__, *, + location: str): + """ + :param str location: Resources to use for build context. + + The location can be: + * A relative or absolute path to a local directory (`.`, `./app`, + `/app`, etc.). + * A remote URL of a Git repository, tarball, or plain text file + (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + etc.). + """ + pulumi.set(__self__, "location", location) + + @property + @pulumi.getter + def location(self) -> str: + """ + Resources to use for build context. + + The location can be: + * A relative or absolute path to a local directory (`.`, `./app`, + `/app`, etc.). + * A remote URL of a Git repository, tarball, or plain text file + (`https://github.com/user/myrepo.git`, `http://server/context.tar.gz`, + etc.). + """ + return pulumi.get(self, "location") + + +@pulumi.output_type +class Dockerfile(dict): + def __init__(__self__, *, + inline: Optional[str] = None, + location: Optional[str] = None): + """ + :param str inline: Raw Dockerfile contents. + + Conflicts with `location`. + + Equivalent to invoking Docker with `-f -`. + :param str location: Location of the Dockerfile to use. + + Can be a relative or absolute path to a local file, or a remote URL. + + Defaults to `${context.location}/Dockerfile` if context is on-disk. + + Conflicts with `inline`. + """ + if inline is not None: + pulumi.set(__self__, "inline", inline) + if location is not None: + pulumi.set(__self__, "location", location) + + @property + @pulumi.getter + def inline(self) -> Optional[str]: + """ + Raw Dockerfile contents. + + Conflicts with `location`. + + Equivalent to invoking Docker with `-f -`. + """ + return pulumi.get(self, "inline") + + @property + @pulumi.getter + def location(self) -> Optional[str]: + """ + Location of the Dockerfile to use. + + Can be a relative or absolute path to a local file, or a remote URL. + + Defaults to `${context.location}/Dockerfile` if context is on-disk. + + Conflicts with `inline`. + """ + return pulumi.get(self, "location") + + +@pulumi.output_type +class Export(dict): + def __init__(__self__, *, + cacheonly: Optional['outputs.ExportCacheOnly'] = None, + disabled: Optional[bool] = None, + docker: Optional['outputs.ExportDocker'] = None, + image: Optional['outputs.ExportImage'] = None, + local: Optional['outputs.ExportLocal'] = None, + oci: Optional['outputs.ExportOCI'] = None, + raw: Optional[str] = None, + registry: Optional['outputs.ExportRegistry'] = None, + tar: Optional['outputs.ExportTar'] = None): + """ + :param 'ExportCacheOnly' cacheonly: A no-op export. Helpful for silencing the 'no exports' warning if you + just want to populate caches. + :param bool disabled: When `true` this entry will be excluded. Defaults to `false`. + :param 'ExportDocker' docker: Export as a Docker image layout. + :param 'ExportImage' image: Outputs the build result into a container image format. + :param 'ExportLocal' local: Export to a local directory as files and directories. + :param 'ExportOCI' oci: Identical to the Docker exporter but uses OCI media types by default. + :param str raw: A raw string as you would provide it to the Docker CLI (e.g., + `type=docker`) + :param 'ExportRegistry' registry: Identical to the Image exporter, but pushes by default. + :param 'ExportTar' tar: Export to a local directory as a tarball. + """ + if cacheonly is not None: + pulumi.set(__self__, "cacheonly", cacheonly) + if disabled is not None: + pulumi.set(__self__, "disabled", disabled) + if docker is not None: + pulumi.set(__self__, "docker", docker) + if image is not None: + pulumi.set(__self__, "image", image) + if local is not None: + pulumi.set(__self__, "local", local) + if oci is not None: + pulumi.set(__self__, "oci", oci) + if raw is not None: + pulumi.set(__self__, "raw", raw) + if registry is not None: + pulumi.set(__self__, "registry", registry) + if tar is not None: + pulumi.set(__self__, "tar", tar) + + @property + @pulumi.getter + def cacheonly(self) -> Optional['outputs.ExportCacheOnly']: + """ + A no-op export. Helpful for silencing the 'no exports' warning if you + just want to populate caches. + """ + return pulumi.get(self, "cacheonly") + + @property + @pulumi.getter + def disabled(self) -> Optional[bool]: + """ + When `true` this entry will be excluded. Defaults to `false`. + """ + return pulumi.get(self, "disabled") + + @property + @pulumi.getter + def docker(self) -> Optional['outputs.ExportDocker']: + """ + Export as a Docker image layout. + """ + return pulumi.get(self, "docker") + + @property + @pulumi.getter + def image(self) -> Optional['outputs.ExportImage']: + """ + Outputs the build result into a container image format. + """ + return pulumi.get(self, "image") + + @property + @pulumi.getter + def local(self) -> Optional['outputs.ExportLocal']: + """ + Export to a local directory as files and directories. + """ + return pulumi.get(self, "local") + + @property + @pulumi.getter + def oci(self) -> Optional['outputs.ExportOCI']: + """ + Identical to the Docker exporter but uses OCI media types by default. + """ + return pulumi.get(self, "oci") + + @property + @pulumi.getter + def raw(self) -> Optional[str]: + """ + A raw string as you would provide it to the Docker CLI (e.g., + `type=docker`) + """ + return pulumi.get(self, "raw") + + @property + @pulumi.getter + def registry(self) -> Optional['outputs.ExportRegistry']: + """ + Identical to the Image exporter, but pushes by default. + """ + return pulumi.get(self, "registry") + + @property + @pulumi.getter + def tar(self) -> Optional['outputs.ExportTar']: + """ + Export to a local directory as a tarball. + """ + return pulumi.get(self, "tar") + + +@pulumi.output_type +class ExportCacheOnly(dict): + def __init__(__self__): + pass + + +@pulumi.output_type +class ExportDocker(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "compressionLevel": + suggest = "compression_level" + elif key == "forceCompression": + suggest = "force_compression" + elif key == "ociMediaTypes": + suggest = "oci_media_types" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in ExportDocker. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + ExportDocker.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + ExportDocker.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + annotations: Optional[Mapping[str, str]] = None, + compression: Optional['CompressionType'] = None, + compression_level: Optional[int] = None, + dest: Optional[str] = None, + force_compression: Optional[bool] = None, + names: Optional[Sequence[str]] = None, + oci_media_types: Optional[bool] = None, + tar: Optional[bool] = None): + """ + :param Mapping[str, str] annotations: Attach an arbitrary key/value annotation to the image. + :param 'CompressionType' compression: The compression type to use. + :param int compression_level: Compression level from 0 to 22. + :param str dest: The local export path. + :param bool force_compression: Forcefully apply compression. + :param Sequence[str] names: Specify images names to export. This is overridden if tags are already specified. + :param bool oci_media_types: Use OCI media types in exporter manifests. + :param bool tar: Bundle the output into a tarball layout. + """ + if annotations is not None: + pulumi.set(__self__, "annotations", annotations) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if dest is not None: + pulumi.set(__self__, "dest", dest) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if names is not None: + pulumi.set(__self__, "names", names) + if oci_media_types is None: + oci_media_types = False + if oci_media_types is not None: + pulumi.set(__self__, "oci_media_types", oci_media_types) + if tar is None: + tar = True + if tar is not None: + pulumi.set(__self__, "tar", tar) + + @property + @pulumi.getter + def annotations(self) -> Optional[Mapping[str, str]]: + """ + Attach an arbitrary key/value annotation to the image. + """ + return pulumi.get(self, "annotations") + + @property + @pulumi.getter + def compression(self) -> Optional['CompressionType']: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[int]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @property + @pulumi.getter + def dest(self) -> Optional[str]: + """ + The local export path. + """ + return pulumi.get(self, "dest") + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[bool]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @property + @pulumi.getter + def names(self) -> Optional[Sequence[str]]: + """ + Specify images names to export. This is overridden if tags are already specified. + """ + return pulumi.get(self, "names") + + @property + @pulumi.getter(name="ociMediaTypes") + def oci_media_types(self) -> Optional[bool]: + """ + Use OCI media types in exporter manifests. + """ + return pulumi.get(self, "oci_media_types") + + @property + @pulumi.getter + def tar(self) -> Optional[bool]: + """ + Bundle the output into a tarball layout. + """ + return pulumi.get(self, "tar") + + +@pulumi.output_type +class ExportImage(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "compressionLevel": + suggest = "compression_level" + elif key == "danglingNamePrefix": + suggest = "dangling_name_prefix" + elif key == "forceCompression": + suggest = "force_compression" + elif key == "nameCanonical": + suggest = "name_canonical" + elif key == "ociMediaTypes": + suggest = "oci_media_types" + elif key == "pushByDigest": + suggest = "push_by_digest" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in ExportImage. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + ExportImage.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + ExportImage.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + annotations: Optional[Mapping[str, str]] = None, + compression: Optional['CompressionType'] = None, + compression_level: Optional[int] = None, + dangling_name_prefix: Optional[str] = None, + force_compression: Optional[bool] = None, + insecure: Optional[bool] = None, + name_canonical: Optional[bool] = None, + names: Optional[Sequence[str]] = None, + oci_media_types: Optional[bool] = None, + push: Optional[bool] = None, + push_by_digest: Optional[bool] = None, + store: Optional[bool] = None, + unpack: Optional[bool] = None): + """ + :param Mapping[str, str] annotations: Attach an arbitrary key/value annotation to the image. + :param 'CompressionType' compression: The compression type to use. + :param int compression_level: Compression level from 0 to 22. + :param str dangling_name_prefix: Name image with `prefix@`, used for anonymous images. + :param bool force_compression: Forcefully apply compression. + :param bool insecure: Allow pushing to an insecure registry. + :param bool name_canonical: Add additional canonical name (`name@`). + :param Sequence[str] names: Specify images names to export. This is overridden if tags are already specified. + :param bool oci_media_types: Use OCI media types in exporter manifests. + :param bool push: Push after creating the image. Defaults to `false`. + :param bool push_by_digest: Push image without name. + :param bool store: Store resulting images to the worker's image store and ensure all of + its blobs are in the content store. + + Defaults to `true`. + + Ignored if the worker doesn't have image store (when using OCI workers, + for example). + :param bool unpack: Unpack image after creation (for use with containerd). Defaults to + `false`. + """ + if annotations is not None: + pulumi.set(__self__, "annotations", annotations) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if dangling_name_prefix is not None: + pulumi.set(__self__, "dangling_name_prefix", dangling_name_prefix) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if insecure is not None: + pulumi.set(__self__, "insecure", insecure) + if name_canonical is not None: + pulumi.set(__self__, "name_canonical", name_canonical) + if names is not None: + pulumi.set(__self__, "names", names) + if oci_media_types is None: + oci_media_types = False + if oci_media_types is not None: + pulumi.set(__self__, "oci_media_types", oci_media_types) + if push is not None: + pulumi.set(__self__, "push", push) + if push_by_digest is not None: + pulumi.set(__self__, "push_by_digest", push_by_digest) + if store is None: + store = True + if store is not None: + pulumi.set(__self__, "store", store) + if unpack is not None: + pulumi.set(__self__, "unpack", unpack) + + @property + @pulumi.getter + def annotations(self) -> Optional[Mapping[str, str]]: + """ + Attach an arbitrary key/value annotation to the image. + """ + return pulumi.get(self, "annotations") + + @property + @pulumi.getter + def compression(self) -> Optional['CompressionType']: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[int]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @property + @pulumi.getter(name="danglingNamePrefix") + def dangling_name_prefix(self) -> Optional[str]: + """ + Name image with `prefix@`, used for anonymous images. + """ + return pulumi.get(self, "dangling_name_prefix") + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[bool]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @property + @pulumi.getter + def insecure(self) -> Optional[bool]: + """ + Allow pushing to an insecure registry. + """ + return pulumi.get(self, "insecure") + + @property + @pulumi.getter(name="nameCanonical") + def name_canonical(self) -> Optional[bool]: + """ + Add additional canonical name (`name@`). + """ + return pulumi.get(self, "name_canonical") + + @property + @pulumi.getter + def names(self) -> Optional[Sequence[str]]: + """ + Specify images names to export. This is overridden if tags are already specified. + """ + return pulumi.get(self, "names") + + @property + @pulumi.getter(name="ociMediaTypes") + def oci_media_types(self) -> Optional[bool]: + """ + Use OCI media types in exporter manifests. + """ + return pulumi.get(self, "oci_media_types") + + @property + @pulumi.getter + def push(self) -> Optional[bool]: + """ + Push after creating the image. Defaults to `false`. + """ + return pulumi.get(self, "push") + + @property + @pulumi.getter(name="pushByDigest") + def push_by_digest(self) -> Optional[bool]: + """ + Push image without name. + """ + return pulumi.get(self, "push_by_digest") + + @property + @pulumi.getter + def store(self) -> Optional[bool]: + """ + Store resulting images to the worker's image store and ensure all of + its blobs are in the content store. + + Defaults to `true`. + + Ignored if the worker doesn't have image store (when using OCI workers, + for example). + """ + return pulumi.get(self, "store") + + @property + @pulumi.getter + def unpack(self) -> Optional[bool]: + """ + Unpack image after creation (for use with containerd). Defaults to + `false`. + """ + return pulumi.get(self, "unpack") + + +@pulumi.output_type +class ExportLocal(dict): + def __init__(__self__, *, + dest: str): + """ + :param str dest: Output path. + """ + pulumi.set(__self__, "dest", dest) + + @property + @pulumi.getter + def dest(self) -> str: + """ + Output path. + """ + return pulumi.get(self, "dest") + + +@pulumi.output_type +class ExportOCI(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "compressionLevel": + suggest = "compression_level" + elif key == "forceCompression": + suggest = "force_compression" + elif key == "ociMediaTypes": + suggest = "oci_media_types" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in ExportOCI. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + ExportOCI.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + ExportOCI.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + annotations: Optional[Mapping[str, str]] = None, + compression: Optional['CompressionType'] = None, + compression_level: Optional[int] = None, + dest: Optional[str] = None, + force_compression: Optional[bool] = None, + names: Optional[Sequence[str]] = None, + oci_media_types: Optional[bool] = None, + tar: Optional[bool] = None): + """ + :param Mapping[str, str] annotations: Attach an arbitrary key/value annotation to the image. + :param 'CompressionType' compression: The compression type to use. + :param int compression_level: Compression level from 0 to 22. + :param str dest: The local export path. + :param bool force_compression: Forcefully apply compression. + :param Sequence[str] names: Specify images names to export. This is overridden if tags are already specified. + :param bool oci_media_types: Use OCI media types in exporter manifests. + :param bool tar: Bundle the output into a tarball layout. + """ + if annotations is not None: + pulumi.set(__self__, "annotations", annotations) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if dest is not None: + pulumi.set(__self__, "dest", dest) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if names is not None: + pulumi.set(__self__, "names", names) + if oci_media_types is None: + oci_media_types = True + if oci_media_types is not None: + pulumi.set(__self__, "oci_media_types", oci_media_types) + if tar is None: + tar = True + if tar is not None: + pulumi.set(__self__, "tar", tar) + + @property + @pulumi.getter + def annotations(self) -> Optional[Mapping[str, str]]: + """ + Attach an arbitrary key/value annotation to the image. + """ + return pulumi.get(self, "annotations") + + @property + @pulumi.getter + def compression(self) -> Optional['CompressionType']: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[int]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @property + @pulumi.getter + def dest(self) -> Optional[str]: + """ + The local export path. + """ + return pulumi.get(self, "dest") + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[bool]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @property + @pulumi.getter + def names(self) -> Optional[Sequence[str]]: + """ + Specify images names to export. This is overridden if tags are already specified. + """ + return pulumi.get(self, "names") + + @property + @pulumi.getter(name="ociMediaTypes") + def oci_media_types(self) -> Optional[bool]: + """ + Use OCI media types in exporter manifests. + """ + return pulumi.get(self, "oci_media_types") + + @property + @pulumi.getter + def tar(self) -> Optional[bool]: + """ + Bundle the output into a tarball layout. + """ + return pulumi.get(self, "tar") + + +@pulumi.output_type +class ExportRegistry(dict): + @staticmethod + def __key_warning(key: str): + suggest = None + if key == "compressionLevel": + suggest = "compression_level" + elif key == "danglingNamePrefix": + suggest = "dangling_name_prefix" + elif key == "forceCompression": + suggest = "force_compression" + elif key == "nameCanonical": + suggest = "name_canonical" + elif key == "ociMediaTypes": + suggest = "oci_media_types" + elif key == "pushByDigest": + suggest = "push_by_digest" + + if suggest: + pulumi.log.warn(f"Key '{key}' not found in ExportRegistry. Access the value via the '{suggest}' property getter instead.") + + def __getitem__(self, key: str) -> Any: + ExportRegistry.__key_warning(key) + return super().__getitem__(key) + + def get(self, key: str, default = None) -> Any: + ExportRegistry.__key_warning(key) + return super().get(key, default) + + def __init__(__self__, *, + annotations: Optional[Mapping[str, str]] = None, + compression: Optional['CompressionType'] = None, + compression_level: Optional[int] = None, + dangling_name_prefix: Optional[str] = None, + force_compression: Optional[bool] = None, + insecure: Optional[bool] = None, + name_canonical: Optional[bool] = None, + names: Optional[Sequence[str]] = None, + oci_media_types: Optional[bool] = None, + push: Optional[bool] = None, + push_by_digest: Optional[bool] = None, + store: Optional[bool] = None, + unpack: Optional[bool] = None): + """ + :param Mapping[str, str] annotations: Attach an arbitrary key/value annotation to the image. + :param 'CompressionType' compression: The compression type to use. + :param int compression_level: Compression level from 0 to 22. + :param str dangling_name_prefix: Name image with `prefix@`, used for anonymous images. + :param bool force_compression: Forcefully apply compression. + :param bool insecure: Allow pushing to an insecure registry. + :param bool name_canonical: Add additional canonical name (`name@`). + :param Sequence[str] names: Specify images names to export. This is overridden if tags are already specified. + :param bool oci_media_types: Use OCI media types in exporter manifests. + :param bool push: Push after creating the image. Defaults to `true`. + :param bool push_by_digest: Push image without name. + :param bool store: Store resulting images to the worker's image store and ensure all of + its blobs are in the content store. + + Defaults to `true`. + + Ignored if the worker doesn't have image store (when using OCI workers, + for example). + :param bool unpack: Unpack image after creation (for use with containerd). Defaults to + `false`. + """ + if annotations is not None: + pulumi.set(__self__, "annotations", annotations) + if compression is None: + compression = 'gzip' + if compression is not None: + pulumi.set(__self__, "compression", compression) + if compression_level is None: + compression_level = 0 + if compression_level is not None: + pulumi.set(__self__, "compression_level", compression_level) + if dangling_name_prefix is not None: + pulumi.set(__self__, "dangling_name_prefix", dangling_name_prefix) + if force_compression is None: + force_compression = False + if force_compression is not None: + pulumi.set(__self__, "force_compression", force_compression) + if insecure is not None: + pulumi.set(__self__, "insecure", insecure) + if name_canonical is not None: + pulumi.set(__self__, "name_canonical", name_canonical) + if names is not None: + pulumi.set(__self__, "names", names) + if oci_media_types is None: + oci_media_types = False + if oci_media_types is not None: + pulumi.set(__self__, "oci_media_types", oci_media_types) + if push is None: + push = True + if push is not None: + pulumi.set(__self__, "push", push) + if push_by_digest is not None: + pulumi.set(__self__, "push_by_digest", push_by_digest) + if store is None: + store = True + if store is not None: + pulumi.set(__self__, "store", store) + if unpack is not None: + pulumi.set(__self__, "unpack", unpack) + + @property + @pulumi.getter + def annotations(self) -> Optional[Mapping[str, str]]: + """ + Attach an arbitrary key/value annotation to the image. + """ + return pulumi.get(self, "annotations") + + @property + @pulumi.getter + def compression(self) -> Optional['CompressionType']: + """ + The compression type to use. + """ + return pulumi.get(self, "compression") + + @property + @pulumi.getter(name="compressionLevel") + def compression_level(self) -> Optional[int]: + """ + Compression level from 0 to 22. + """ + return pulumi.get(self, "compression_level") + + @property + @pulumi.getter(name="danglingNamePrefix") + def dangling_name_prefix(self) -> Optional[str]: + """ + Name image with `prefix@`, used for anonymous images. + """ + return pulumi.get(self, "dangling_name_prefix") + + @property + @pulumi.getter(name="forceCompression") + def force_compression(self) -> Optional[bool]: + """ + Forcefully apply compression. + """ + return pulumi.get(self, "force_compression") + + @property + @pulumi.getter + def insecure(self) -> Optional[bool]: + """ + Allow pushing to an insecure registry. + """ + return pulumi.get(self, "insecure") + + @property + @pulumi.getter(name="nameCanonical") + def name_canonical(self) -> Optional[bool]: + """ + Add additional canonical name (`name@`). + """ + return pulumi.get(self, "name_canonical") + + @property + @pulumi.getter + def names(self) -> Optional[Sequence[str]]: + """ + Specify images names to export. This is overridden if tags are already specified. + """ + return pulumi.get(self, "names") + + @property + @pulumi.getter(name="ociMediaTypes") + def oci_media_types(self) -> Optional[bool]: + """ + Use OCI media types in exporter manifests. + """ + return pulumi.get(self, "oci_media_types") + + @property + @pulumi.getter + def push(self) -> Optional[bool]: + """ + Push after creating the image. Defaults to `true`. + """ + return pulumi.get(self, "push") + + @property + @pulumi.getter(name="pushByDigest") + def push_by_digest(self) -> Optional[bool]: + """ + Push image without name. + """ + return pulumi.get(self, "push_by_digest") + + @property + @pulumi.getter + def store(self) -> Optional[bool]: + """ + Store resulting images to the worker's image store and ensure all of + its blobs are in the content store. + + Defaults to `true`. + + Ignored if the worker doesn't have image store (when using OCI workers, + for example). + """ + return pulumi.get(self, "store") + + @property + @pulumi.getter + def unpack(self) -> Optional[bool]: + """ + Unpack image after creation (for use with containerd). Defaults to + `false`. + """ + return pulumi.get(self, "unpack") + + +@pulumi.output_type +class ExportTar(dict): + def __init__(__self__, *, + dest: str): + """ + :param str dest: Output path. + """ + pulumi.set(__self__, "dest", dest) + + @property + @pulumi.getter + def dest(self) -> str: + """ + Output path. + """ + return pulumi.get(self, "dest") + + +@pulumi.output_type +class Registry(dict): + def __init__(__self__, *, + address: str, + password: Optional[str] = None, + username: Optional[str] = None): + """ + :param str address: The registry's address (e.g. "docker.io"). + :param str password: Password or token for the registry. + :param str username: Username for the registry. + """ + pulumi.set(__self__, "address", address) + if password is not None: + pulumi.set(__self__, "password", password) + if username is not None: + pulumi.set(__self__, "username", username) + + @property + @pulumi.getter + def address(self) -> str: + """ + The registry's address (e.g. "docker.io"). + """ + return pulumi.get(self, "address") + + @property + @pulumi.getter + def password(self) -> Optional[str]: + """ + Password or token for the registry. + """ + return pulumi.get(self, "password") + + @property + @pulumi.getter + def username(self) -> Optional[str]: + """ + Username for the registry. + """ + return pulumi.get(self, "username") + + +@pulumi.output_type +class SSH(dict): + def __init__(__self__, *, + id: str, + paths: Optional[Sequence[str]] = None): + """ + :param str id: Useful for distinguishing different servers that are part of the same + build. + + A value of `default` is appropriate if only dealing with a single host. + :param Sequence[str] paths: SSH agent socket or private keys to expose to the build under the given + identifier. + + Defaults to `[$SSH_AUTH_SOCK]`. + + Note that your keys are **not** automatically added when using an + agent. Run `ssh-add -l` locally to confirm which public keys are + visible to the agent; these will be exposed to your build. + """ + pulumi.set(__self__, "id", id) + if paths is not None: + pulumi.set(__self__, "paths", paths) + + @property + @pulumi.getter + def id(self) -> str: + """ + Useful for distinguishing different servers that are part of the same + build. + + A value of `default` is appropriate if only dealing with a single host. + """ + return pulumi.get(self, "id") + + @property + @pulumi.getter + def paths(self) -> Optional[Sequence[str]]: + """ + SSH agent socket or private keys to expose to the build under the given + identifier. + + Defaults to `[$SSH_AUTH_SOCK]`. + + Note that your keys are **not** automatically added when using an + agent. Run `ssh-add -l` locally to confirm which public keys are + visible to the agent; these will be exposed to your build. + """ + return pulumi.get(self, "paths") + + diff --git a/sdk/python/pulumi_dockerbuild/provider.py b/sdk/python/pulumi_docker_build/provider.py similarity index 52% rename from sdk/python/pulumi_dockerbuild/provider.py rename to sdk/python/pulumi_docker_build/provider.py index 9d8f4b2..9c62765 100644 --- a/sdk/python/pulumi_dockerbuild/provider.py +++ b/sdk/python/pulumi_docker_build/provider.py @@ -8,16 +8,46 @@ import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities +from ._inputs import * __all__ = ['ProviderArgs', 'Provider'] @pulumi.input_type class ProviderArgs: - def __init__(__self__): + def __init__(__self__, *, + host: Optional[pulumi.Input[str]] = None, + registries: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryArgs']]]] = None): """ The set of arguments for constructing a Provider resource. + :param pulumi.Input[str] host: The build daemon's address. """ - pass + if host is None: + host = (_utilities.get_env('DOCKER_HOST') or '') + if host is not None: + pulumi.set(__self__, "host", host) + if registries is not None: + pulumi.set(__self__, "registries", registries) + + @property + @pulumi.getter + def host(self) -> Optional[pulumi.Input[str]]: + """ + The build daemon's address. + """ + return pulumi.get(self, "host") + + @host.setter + def host(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "host", value) + + @property + @pulumi.getter + def registries(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['RegistryArgs']]]]: + return pulumi.get(self, "registries") + + @registries.setter + def registries(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['RegistryArgs']]]]): + pulumi.set(self, "registries", value) class Provider(pulumi.ProviderResource): @@ -25,11 +55,14 @@ class Provider(pulumi.ProviderResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + host: Optional[pulumi.Input[str]] = None, + registries: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RegistryArgs']]]]] = None, __props__=None): """ - Create a Dockerbuild resource with the given unique name, props, and options. + Create a Docker-build resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. + :param pulumi.Input[str] host: The build daemon's address. """ ... @overload @@ -38,7 +71,7 @@ class Provider(pulumi.ProviderResource): args: Optional[ProviderArgs] = None, opts: Optional[pulumi.ResourceOptions] = None): """ - Create a Dockerbuild resource with the given unique name, props, and options. + Create a Docker-build resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param ProviderArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. @@ -54,6 +87,8 @@ class Provider(pulumi.ProviderResource): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, + host: Optional[pulumi.Input[str]] = None, + registries: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['RegistryArgs']]]]] = None, __props__=None): opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) if not isinstance(opts, pulumi.ResourceOptions): @@ -63,9 +98,21 @@ class Provider(pulumi.ProviderResource): raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') __props__ = ProviderArgs.__new__(ProviderArgs) + if host is None: + host = (_utilities.get_env('DOCKER_HOST') or '') + __props__.__dict__["host"] = host + __props__.__dict__["registries"] = pulumi.Output.from_input(registries).apply(pulumi.runtime.to_json) if registries is not None else None super(Provider, __self__).__init__( - 'dockerbuild', + 'docker-build', resource_name, __props__, opts) + @property + @pulumi.getter + def host(self) -> pulumi.Output[Optional[str]]: + """ + The build daemon's address. + """ + return pulumi.get(self, "host") + diff --git a/sdk/python/pulumi_docker_build/pulumi-plugin.json b/sdk/python/pulumi_docker_build/pulumi-plugin.json new file mode 100644 index 0000000..4580097 --- /dev/null +++ b/sdk/python/pulumi_docker_build/pulumi-plugin.json @@ -0,0 +1,4 @@ +{ + "resource": true, + "name": "docker-build" +} diff --git a/sdk/python/pulumi_docker_build/py.typed b/sdk/python/pulumi_docker_build/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/sdk/python/pulumi_dockerbuild/README.md b/sdk/python/pulumi_dockerbuild/README.md deleted file mode 100644 index 6e37fcc..0000000 --- a/sdk/python/pulumi_dockerbuild/README.md +++ /dev/null @@ -1 +0,0 @@ -Description diff --git a/sdk/python/pulumi_dockerbuild/__init__.py b/sdk/python/pulumi_dockerbuild/__init__.py deleted file mode 100644 index 995f4eb..0000000 --- a/sdk/python/pulumi_dockerbuild/__init__.py +++ /dev/null @@ -1,33 +0,0 @@ -# coding=utf-8 -# *** WARNING: this file was generated by pulumi-language-python. *** -# *** Do not edit by hand unless you're certain you know what you are doing! *** - -from . import _utilities -import typing -# Export this package's modules as members: -from .provider import * -from .random import * -_utilities.register( - resource_modules=""" -[ - { - "pkg": "dockerbuild", - "mod": "index", - "fqn": "pulumi_dockerbuild", - "classes": { - "dockerbuild:index:Random": "Random" - } - } -] -""", - resource_packages=""" -[ - { - "pkg": "dockerbuild", - "token": "pulumi:providers:dockerbuild", - "fqn": "pulumi_dockerbuild", - "class": "Provider" - } -] -""" -) diff --git a/sdk/python/pulumi_dockerbuild/pulumi-plugin.json b/sdk/python/pulumi_dockerbuild/pulumi-plugin.json deleted file mode 100644 index e716637..0000000 --- a/sdk/python/pulumi_dockerbuild/pulumi-plugin.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "resource": true, - "name": "dockerbuild", - "server": "github.com/pulumi/pulumi-dockerbuild" -} diff --git a/sdk/python/pulumi_dockerbuild/random.py b/sdk/python/pulumi_dockerbuild/random.py deleted file mode 100644 index 68bd9e6..0000000 --- a/sdk/python/pulumi_dockerbuild/random.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# *** WARNING: this file was generated by pulumi-language-python. *** -# *** Do not edit by hand unless you're certain you know what you are doing! *** - -import copy -import warnings -import pulumi -import pulumi.runtime -from typing import Any, Mapping, Optional, Sequence, Union, overload -from . import _utilities - -__all__ = ['RandomArgs', 'Random'] - -@pulumi.input_type -class RandomArgs: - def __init__(__self__, *, - length: pulumi.Input[int]): - """ - The set of arguments for constructing a Random resource. - """ - pulumi.set(__self__, "length", length) - - @property - @pulumi.getter - def length(self) -> pulumi.Input[int]: - return pulumi.get(self, "length") - - @length.setter - def length(self, value: pulumi.Input[int]): - pulumi.set(self, "length", value) - - -class Random(pulumi.CustomResource): - @overload - def __init__(__self__, - resource_name: str, - opts: Optional[pulumi.ResourceOptions] = None, - length: Optional[pulumi.Input[int]] = None, - __props__=None): - """ - Create a Random resource with the given unique name, props, and options. - :param str resource_name: The name of the resource. - :param pulumi.ResourceOptions opts: Options for the resource. - """ - ... - @overload - def __init__(__self__, - resource_name: str, - args: RandomArgs, - opts: Optional[pulumi.ResourceOptions] = None): - """ - Create a Random resource with the given unique name, props, and options. - :param str resource_name: The name of the resource. - :param RandomArgs args: The arguments to use to populate this resource's properties. - :param pulumi.ResourceOptions opts: Options for the resource. - """ - ... - def __init__(__self__, resource_name: str, *args, **kwargs): - resource_args, opts = _utilities.get_resource_args_opts(RandomArgs, pulumi.ResourceOptions, *args, **kwargs) - if resource_args is not None: - __self__._internal_init(resource_name, opts, **resource_args.__dict__) - else: - __self__._internal_init(resource_name, *args, **kwargs) - - def _internal_init(__self__, - resource_name: str, - opts: Optional[pulumi.ResourceOptions] = None, - length: Optional[pulumi.Input[int]] = None, - __props__=None): - opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) - if not isinstance(opts, pulumi.ResourceOptions): - raise TypeError('Expected resource options to be a ResourceOptions instance') - if opts.id is None: - if __props__ is not None: - raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource') - __props__ = RandomArgs.__new__(RandomArgs) - - if length is None and not opts.urn: - raise TypeError("Missing required property 'length'") - __props__.__dict__["length"] = length - __props__.__dict__["result"] = None - super(Random, __self__).__init__( - 'dockerbuild:index:Random', - resource_name, - __props__, - opts) - - @staticmethod - def get(resource_name: str, - id: pulumi.Input[str], - opts: Optional[pulumi.ResourceOptions] = None) -> 'Random': - """ - Get an existing Random resource's state with the given name, id, and optional extra - properties used to qualify the lookup. - - :param str resource_name: The unique name of the resulting resource. - :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. - :param pulumi.ResourceOptions opts: Options for the resource. - """ - opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) - - __props__ = RandomArgs.__new__(RandomArgs) - - __props__.__dict__["length"] = None - __props__.__dict__["result"] = None - return Random(resource_name, opts=opts, __props__=__props__) - - @property - @pulumi.getter - def length(self) -> pulumi.Output[int]: - return pulumi.get(self, "length") - - @property - @pulumi.getter - def result(self) -> pulumi.Output[str]: - return pulumi.get(self, "result") - diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index 9b46c89..94b6071 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -1,14 +1,16 @@ [project] - name = "pulumi_dockerbuild" - description = "Description" + name = "pulumi_docker_build" + description = "A Pulumi provider for building modern Docker images with buildx and BuildKit." dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "semver>=2.8.1"] - keywords = ["keywords"] + keywords = ["docker", "buildkit", "buildx", "kind/native"] readme = "README.md" requires-python = ">=3.8" version = "0.0.0" + [project.license] + text = "Apache-2.0" [project.urls] - Homepage = "pulumi.com" - Repository = "https://github.com/pulumi/pulumi-dockerbuild" + Homepage = "https://pulumi.com" + Repository = "https://github.com/pulumi/pulumi-docker-build" [build-system] requires = ["setuptools>=61.0"] @@ -17,4 +19,4 @@ [tool] [tool.setuptools] [tool.setuptools.package-data] - pulumi_dockerbuild = ["py.typed", "pulumi-plugin.json"] + pulumi_docker_build = ["py.typed", "pulumi-plugin.json"] diff --git a/tools/tools.go b/tools/tools.go index 0f75397..3785b59 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -5,5 +5,7 @@ package tools import ( + _ "github.com/golangci/golangci-lint/cmd/golangci-lint" _ "github.com/pulumi/pulumi/pkg/v3/cmd/pulumi" + _ "github.com/pulumi/pulumi/sdk/go/pulumi-language-go/v3" )