From 4071f456fc956a106dd3f0e21e1ae6903f006d2d Mon Sep 17 00:00:00 2001
From: Pulumi Bot <30351955+pulumi-bot@users.noreply.github.com>
Date: Tue, 24 Oct 2023 19:56:44 -0700
Subject: [PATCH] Upgrade pulumi-terraform-bridge to v3.63.1 (#810)
This PR was generated via `$ upgrade-provider pulumi/pulumi-docker
--kind=bridge --target-bridge-version=v3.63.1 --pr-reviewers=t0yv0
--pr-description=`.
---
- Upgrading pulumi-terraform-bridge from v3.63.0 to v3.63.1.
---
provider/go.mod | 2 +-
provider/go.sum | 4 +-
sdk/dotnet/Container.cs | 25 +++++++
sdk/dotnet/GetNetwork.cs | 44 +++++++++++
sdk/dotnet/GetRegistryImage.cs | 62 ++++++++++++++++
sdk/dotnet/GetRemoteImage.cs | 74 +++++++++++++++++++
sdk/dotnet/Network.cs | 15 ++++
sdk/dotnet/Plugin.cs | 27 +++++++
sdk/dotnet/RegistryImage.cs | 29 ++++++++
sdk/dotnet/RemoteImage.cs | 49 ++++++++++++
sdk/dotnet/Volume.cs | 15 ++++
sdk/go/docker/container.go | 32 ++++++++
sdk/go/docker/getNetwork.go | 26 +++++++
sdk/go/docker/getRegistryImage.go | 35 +++++++++
sdk/go/docker/getRemoteImage.go | 44 +++++++++++
sdk/go/docker/network.go | 24 ++++++
sdk/go/docker/plugin.go | 34 +++++++++
sdk/go/docker/registryImage.go | 39 ++++++++++
sdk/go/docker/remoteImage.go | 65 ++++++++++++++++
sdk/go/docker/volume.go | 24 ++++++
sdk/nodejs/container.ts | 12 +++
sdk/nodejs/getNetwork.ts | 22 ++++++
sdk/nodejs/getRegistryImage.ts | 30 ++++++++
sdk/nodejs/getRemoteImage.ts | 40 ++++++++++
sdk/nodejs/network.ts | 9 +++
sdk/nodejs/plugin.ts | 17 +++++
sdk/nodejs/registryImage.ts | 17 +++++
sdk/nodejs/remoteImage.ts | 28 +++++++
sdk/nodejs/volume.ts | 9 +++
sdk/python/pulumi_docker/container.py | 24 ++++++
sdk/python/pulumi_docker/get_network.py | 18 +++++
.../pulumi_docker/get_registry_image.py | 24 ++++++
sdk/python/pulumi_docker/get_remote_image.py | 24 ++++++
sdk/python/pulumi_docker/network.py | 18 +++++
sdk/python/pulumi_docker/plugin.py | 32 ++++++++
sdk/python/pulumi_docker/registry_image.py | 32 ++++++++
sdk/python/pulumi_docker/remote_image.py | 50 +++++++++++++
sdk/python/pulumi_docker/volume.py | 18 +++++
38 files changed, 1090 insertions(+), 3 deletions(-)
diff --git a/provider/go.mod b/provider/go.mod
index 353e74fe..60ec8740 100644
--- a/provider/go.mod
+++ b/provider/go.mod
@@ -10,7 +10,7 @@ require (
github.com/moby/buildkit v0.11.4
github.com/moby/moby v23.0.3+incompatible
github.com/pkg/errors v0.9.1
- github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.0
+ github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.1
github.com/pulumi/pulumi/pkg/v3 v3.90.1
github.com/pulumi/pulumi/sdk/v3 v3.90.1
github.com/stretchr/testify v1.8.4
diff --git a/provider/go.sum b/provider/go.sum
index 8ed50f61..40553c3f 100644
--- a/provider/go.sum
+++ b/provider/go.sum
@@ -2247,8 +2247,8 @@ github.com/pulumi/pulumi-java/pkg v0.9.8 h1:c8mYsalnRXA2Ibgvv6scefOn6mW1Vb0UT0mc
github.com/pulumi/pulumi-java/pkg v0.9.8/go.mod h1:c6rSw/+q4O0IImgJ9axxoC6QesbPYWBaG5gimbHouUQ=
github.com/pulumi/pulumi-terraform-bridge/testing v0.0.1 h1:SCg1gjfY9N4yn8U8peIUYATifjoDABkyR7H9lmefsfc=
github.com/pulumi/pulumi-terraform-bridge/testing v0.0.1/go.mod h1:7OeUPH8rpt5ipyj9EFcnXpuzQ8SHL0dyqdfa8nOacdk=
-github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.0 h1:otdmkNsMGyZ+proUZClznZo+cEchkSSkmaGcq+Gf+6s=
-github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.0/go.mod h1:6YVbDo019OeHkQWo9MnUbBy6cCgCQeoXZDjmR9SYmUA=
+github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.1 h1:hBgediyT2LdS5yfD5AMiCmBJ/TYP94Xxv6a4TcAfV0g=
+github.com/pulumi/pulumi-terraform-bridge/v3 v3.63.1/go.mod h1:6YVbDo019OeHkQWo9MnUbBy6cCgCQeoXZDjmR9SYmUA=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4 h1:rIzMmtcVpPX8ynaz6/nW5AHNY63DiNfCohqmxWvMpM4=
github.com/pulumi/pulumi-terraform-bridge/x/muxer v0.0.4/go.mod h1:Kt8RIZWa/N8rW3+0g6NrqCBmF3o+HuIhFaZpssEkG6w=
github.com/pulumi/pulumi-yaml v1.2.2 h1:W6BeUBLhDrJ2GSU0em1AUVelG9PBI4ABY61DdhJOO3E=
diff --git a/sdk/dotnet/Container.cs b/sdk/dotnet/Container.cs
index 9a03ceb2..b6a5fe38 100644
--- a/sdk/dotnet/Container.cs
+++ b/sdk/dotnet/Container.cs
@@ -13,6 +13,31 @@ namespace Pulumi.Docker
/// <!-- Bug: Type and Name are switched -->
/// Manages the lifecycle of a Docker container.
///
+ /// ## Example Usage
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// // Find the latest Ubuntu precise image.
+ /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntuRemoteImage", new()
+ /// {
+ /// Name = "ubuntu:precise",
+ /// });
+ ///
+ /// // Start a container
+ /// var ubuntuContainer = new Docker.Container("ubuntuContainer", new()
+ /// {
+ /// Image = ubuntuRemoteImage.ImageId,
+ /// });
+ ///
+ /// });
+ /// ```
+ ///
/// ## Import
///
/// ### Example Assuming you created a `container` as follows #!/bin/bash docker run --name foo -p8080:80 -d nginx
diff --git a/sdk/dotnet/GetNetwork.cs b/sdk/dotnet/GetNetwork.cs
index 6e0f97e5..7d63ad7a 100644
--- a/sdk/dotnet/GetNetwork.cs
+++ b/sdk/dotnet/GetNetwork.cs
@@ -13,12 +13,56 @@ public static class GetNetwork
{
///
/// `docker.Network` provides details about a specific Docker Network.
+ ///
+ /// {{% examples %}}
+ /// ## Example Usage
+ /// {{% example %}}
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var main = Docker.GetNetwork.Invoke(new()
+ /// {
+ /// Name = "main",
+ /// });
+ ///
+ /// });
+ /// ```
+ /// {{% /example %}}
+ /// {{% /examples %}}
///
public static Task InvokeAsync(GetNetworkArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.InvokeAsync("docker:index/getNetwork:getNetwork", args ?? new GetNetworkArgs(), options.WithDefaults());
///
/// `docker.Network` provides details about a specific Docker Network.
+ ///
+ /// {{% examples %}}
+ /// ## Example Usage
+ /// {{% example %}}
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var main = Docker.GetNetwork.Invoke(new()
+ /// {
+ /// Name = "main",
+ /// });
+ ///
+ /// });
+ /// ```
+ /// {{% /example %}}
+ /// {{% /examples %}}
///
public static Output Invoke(GetNetworkInvokeArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.Invoke("docker:index/getNetwork:getNetwork", args ?? new GetNetworkInvokeArgs(), options.WithDefaults());
diff --git a/sdk/dotnet/GetRegistryImage.cs b/sdk/dotnet/GetRegistryImage.cs
index 7a59f94e..082bd63f 100644
--- a/sdk/dotnet/GetRegistryImage.cs
+++ b/sdk/dotnet/GetRegistryImage.cs
@@ -13,12 +13,74 @@ public static class GetRegistryImage
{
///
/// Reads the image metadata from a Docker Registry. Used in conjunction with the docker.RemoteImage resource to keep an image up to date on the latest available version of the tag.
+ ///
+ /// {{% examples %}}
+ /// ## Example Usage
+ /// {{% example %}}
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var ubuntuRegistryImage = Docker.GetRegistryImage.Invoke(new()
+ /// {
+ /// Name = "ubuntu:precise",
+ /// });
+ ///
+ /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntuRemoteImage", new()
+ /// {
+ /// Name = ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Name),
+ /// PullTriggers = new[]
+ /// {
+ /// ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Sha256Digest),
+ /// },
+ /// });
+ ///
+ /// });
+ /// ```
+ /// {{% /example %}}
+ /// {{% /examples %}}
///
public static Task InvokeAsync(GetRegistryImageArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.InvokeAsync("docker:index/getRegistryImage:getRegistryImage", args ?? new GetRegistryImageArgs(), options.WithDefaults());
///
/// Reads the image metadata from a Docker Registry. Used in conjunction with the docker.RemoteImage resource to keep an image up to date on the latest available version of the tag.
+ ///
+ /// {{% examples %}}
+ /// ## Example Usage
+ /// {{% example %}}
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var ubuntuRegistryImage = Docker.GetRegistryImage.Invoke(new()
+ /// {
+ /// Name = "ubuntu:precise",
+ /// });
+ ///
+ /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntuRemoteImage", new()
+ /// {
+ /// Name = ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Name),
+ /// PullTriggers = new[]
+ /// {
+ /// ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Sha256Digest),
+ /// },
+ /// });
+ ///
+ /// });
+ /// ```
+ /// {{% /example %}}
+ /// {{% /examples %}}
///
public static Output Invoke(GetRegistryImageInvokeArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.Invoke("docker:index/getRegistryImage:getRegistryImage", args ?? new GetRegistryImageInvokeArgs(), options.WithDefaults());
diff --git a/sdk/dotnet/GetRemoteImage.cs b/sdk/dotnet/GetRemoteImage.cs
index 6ee99be0..530d3bae 100644
--- a/sdk/dotnet/GetRemoteImage.cs
+++ b/sdk/dotnet/GetRemoteImage.cs
@@ -13,12 +13,86 @@ public static class GetRemoteImage
{
///
/// `docker.RemoteImage` provides details about a specific Docker Image which need to be presend on the Docker Host
+ ///
+ /// {{% examples %}}
+ /// ## Example Usage
+ /// {{% example %}}
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var latest = Docker.GetRemoteImage.Invoke(new()
+ /// {
+ /// Name = "nginx",
+ /// });
+ ///
+ /// var specific = Docker.GetRemoteImage.Invoke(new()
+ /// {
+ /// Name = "nginx:1.17.6",
+ /// });
+ ///
+ /// var digest = Docker.GetRemoteImage.Invoke(new()
+ /// {
+ /// Name = "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
+ /// });
+ ///
+ /// var tagAndDigest = Docker.GetRemoteImage.Invoke(new()
+ /// {
+ /// Name = "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
+ /// });
+ ///
+ /// });
+ /// ```
+ /// {{% /example %}}
+ /// {{% /examples %}}
///
public static Task InvokeAsync(GetRemoteImageArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.InvokeAsync("docker:index/getRemoteImage:getRemoteImage", args ?? new GetRemoteImageArgs(), options.WithDefaults());
///
/// `docker.RemoteImage` provides details about a specific Docker Image which need to be presend on the Docker Host
+ ///
+ /// {{% examples %}}
+ /// ## Example Usage
+ /// {{% example %}}
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var latest = Docker.GetRemoteImage.Invoke(new()
+ /// {
+ /// Name = "nginx",
+ /// });
+ ///
+ /// var specific = Docker.GetRemoteImage.Invoke(new()
+ /// {
+ /// Name = "nginx:1.17.6",
+ /// });
+ ///
+ /// var digest = Docker.GetRemoteImage.Invoke(new()
+ /// {
+ /// Name = "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
+ /// });
+ ///
+ /// var tagAndDigest = Docker.GetRemoteImage.Invoke(new()
+ /// {
+ /// Name = "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
+ /// });
+ ///
+ /// });
+ /// ```
+ /// {{% /example %}}
+ /// {{% /examples %}}
///
public static Output Invoke(GetRemoteImageInvokeArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.Invoke("docker:index/getRemoteImage:getRemoteImage", args ?? new GetRemoteImageInvokeArgs(), options.WithDefaults());
diff --git a/sdk/dotnet/Network.cs b/sdk/dotnet/Network.cs
index fabb7731..de25406b 100644
--- a/sdk/dotnet/Network.cs
+++ b/sdk/dotnet/Network.cs
@@ -13,6 +13,21 @@ namespace Pulumi.Docker
/// <!-- Bug: Type and Name are switched -->
/// `docker.Network` provides a docker network resource.
///
+ /// ## Example Usage
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var privateNetwork = new Docker.Network("privateNetwork");
+ ///
+ /// });
+ /// ```
+ ///
/// ## Import
///
/// ### Example Assuming you created a `network` as follows #!/bin/bash docker network create foo prints the long ID 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73 you provide the definition for the resource as follows terraform resource "docker_network" "foo" {
diff --git a/sdk/dotnet/Plugin.cs b/sdk/dotnet/Plugin.cs
index 9b985abc..dcacd2ba 100644
--- a/sdk/dotnet/Plugin.cs
+++ b/sdk/dotnet/Plugin.cs
@@ -13,6 +13,33 @@ namespace Pulumi.Docker
/// <!-- Bug: Type and Name are switched -->
/// Manages the lifecycle of a Docker plugin.
///
+ /// ## Example Usage
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var sample_volume_plugin = new Docker.Plugin("sample-volume-plugin", new()
+ /// {
+ /// Alias = "sample-volume-plugin",
+ /// EnableTimeout = 60,
+ /// Enabled = false,
+ /// Envs = new[]
+ /// {
+ /// "DEBUG=1",
+ /// },
+ /// ForceDestroy = true,
+ /// ForceDisable = true,
+ /// GrantAllPermissions = true,
+ /// });
+ ///
+ /// });
+ /// ```
+ ///
/// ## Import
///
/// #!/bin/bash
diff --git a/sdk/dotnet/RegistryImage.cs b/sdk/dotnet/RegistryImage.cs
index 974f61f8..3ef370dc 100644
--- a/sdk/dotnet/RegistryImage.cs
+++ b/sdk/dotnet/RegistryImage.cs
@@ -12,6 +12,35 @@ namespace Pulumi.Docker
///
/// <!-- Bug: Type and Name are switched -->
/// Manages the lifecycle of docker image in a registry. You can upload images to a registry (= `docker push`) and also delete them again
+ ///
+ /// ## Example Usage
+ ///
+ /// Build an image with the `docker.RemoteImage` resource and then push it to a registry:
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var helloworld = new Docker.RegistryImage("helloworld", new()
+ /// {
+ /// KeepRemotely = true,
+ /// });
+ ///
+ /// var image = new Docker.RemoteImage("image", new()
+ /// {
+ /// Name = "registry.com/somename:1.0",
+ /// Build = new Docker.Inputs.RemoteImageBuildArgs
+ /// {
+ /// Context = $"{path.Cwd}/absolutePathToContextFolder",
+ /// },
+ /// });
+ ///
+ /// });
+ /// ```
///
[DockerResourceType("docker:index/registryImage:RegistryImage")]
public partial class RegistryImage : global::Pulumi.CustomResource
diff --git a/sdk/dotnet/RemoteImage.cs b/sdk/dotnet/RemoteImage.cs
index 359a253b..cef39394 100644
--- a/sdk/dotnet/RemoteImage.cs
+++ b/sdk/dotnet/RemoteImage.cs
@@ -15,6 +15,55 @@ namespace Pulumi.Docker
/// This resource will *not* pull new layers of the image automatically unless used in conjunction with docker.RegistryImage data source to update the `pull_triggers` field.
///
/// ## Example Usage
+ /// ### Basic
+ ///
+ /// Finds and downloads the latest `ubuntu:precise` image but does not check
+ /// for further updates of the image
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var ubuntu = new Docker.RemoteImage("ubuntu", new()
+ /// {
+ /// Name = "ubuntu:precise",
+ /// });
+ ///
+ /// });
+ /// ```
+ /// ### Dynamic updates
+ ///
+ /// To be able to update an image dynamically when the `sha256` sum changes,
+ /// you need to use it in combination with `docker.RegistryImage` as follows:
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var ubuntuRegistryImage = Docker.GetRegistryImage.Invoke(new()
+ /// {
+ /// Name = "ubuntu:precise",
+ /// });
+ ///
+ /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntuRemoteImage", new()
+ /// {
+ /// Name = ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Name),
+ /// PullTriggers = new[]
+ /// {
+ /// ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Sha256Digest),
+ /// },
+ /// });
+ ///
+ /// });
+ /// ```
///
[DockerResourceType("docker:index/remoteImage:RemoteImage")]
public partial class RemoteImage : global::Pulumi.CustomResource
diff --git a/sdk/dotnet/Volume.cs b/sdk/dotnet/Volume.cs
index dc68f057..3b9caf24 100644
--- a/sdk/dotnet/Volume.cs
+++ b/sdk/dotnet/Volume.cs
@@ -13,6 +13,21 @@ namespace Pulumi.Docker
/// <!-- Bug: Type and Name are switched -->
/// Creates and destroys a volume in Docker. This can be used alongside docker.Container to prepare volumes that can be shared across containers.
///
+ /// ## Example Usage
+ ///
+ /// ```csharp
+ /// using System.Collections.Generic;
+ /// using System.Linq;
+ /// using Pulumi;
+ /// using Docker = Pulumi.Docker;
+ ///
+ /// return await Deployment.RunAsync(() =>
+ /// {
+ /// var sharedVolume = new Docker.Volume("sharedVolume");
+ ///
+ /// });
+ /// ```
+ ///
/// ## Import
///
/// ### Example Assuming you created a `volume` as follows #!/bin/bash docker volume create prints the long ID 524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d you provide the definition for the resource as follows terraform resource "docker_volume" "foo" {
diff --git a/sdk/go/docker/container.go b/sdk/go/docker/container.go
index 78047517..36a769d2 100644
--- a/sdk/go/docker/container.go
+++ b/sdk/go/docker/container.go
@@ -16,6 +16,38 @@ import (
//
// Manages the lifecycle of a Docker container.
//
+// ## Example Usage
+//
+// ```go
+// package main
+//
+// import (
+//
+// "github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
+// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
+//
+// )
+//
+// func main() {
+// pulumi.Run(func(ctx *pulumi.Context) error {
+// ubuntuRemoteImage, err := docker.NewRemoteImage(ctx, "ubuntuRemoteImage", &docker.RemoteImageArgs{
+// Name: pulumi.String("ubuntu:precise"),
+// })
+// if err != nil {
+// return err
+// }
+// _, err = docker.NewContainer(ctx, "ubuntuContainer", &docker.ContainerArgs{
+// Image: ubuntuRemoteImage.ImageId,
+// })
+// if err != nil {
+// return err
+// }
+// return nil
+// })
+// }
+//
+// ```
+//
// ## Import
//
// ### Example Assuming you created a `container` as follows #!/bin/bash docker run --name foo -p8080:80 -d nginx
diff --git a/sdk/go/docker/getNetwork.go b/sdk/go/docker/getNetwork.go
index 6f08e943..3dc09174 100644
--- a/sdk/go/docker/getNetwork.go
+++ b/sdk/go/docker/getNetwork.go
@@ -13,6 +13,32 @@ import (
)
// `Network` provides details about a specific Docker Network.
+//
+// ## Example Usage
+//
+// ```go
+// package main
+//
+// import (
+//
+// "github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
+// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
+//
+// )
+//
+// func main() {
+// pulumi.Run(func(ctx *pulumi.Context) error {
+// _, err := docker.LookupNetwork(ctx, &docker.LookupNetworkArgs{
+// Name: "main",
+// }, nil)
+// if err != nil {
+// return err
+// }
+// return nil
+// })
+// }
+//
+// ```
func LookupNetwork(ctx *pulumi.Context, args *LookupNetworkArgs, opts ...pulumi.InvokeOption) (*LookupNetworkResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupNetworkResult
diff --git a/sdk/go/docker/getRegistryImage.go b/sdk/go/docker/getRegistryImage.go
index be3cce50..c20670b9 100644
--- a/sdk/go/docker/getRegistryImage.go
+++ b/sdk/go/docker/getRegistryImage.go
@@ -13,6 +13,41 @@ import (
)
// Reads the image metadata from a Docker Registry. Used in conjunction with the RemoteImage resource to keep an image up to date on the latest available version of the tag.
+//
+// ## Example Usage
+//
+// ```go
+// package main
+//
+// import (
+//
+// "github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
+// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
+//
+// )
+//
+// func main() {
+// pulumi.Run(func(ctx *pulumi.Context) error {
+// ubuntuRegistryImage, err := docker.LookupRegistryImage(ctx, &docker.LookupRegistryImageArgs{
+// Name: "ubuntu:precise",
+// }, nil)
+// if err != nil {
+// return err
+// }
+// _, err = docker.NewRemoteImage(ctx, "ubuntuRemoteImage", &docker.RemoteImageArgs{
+// Name: *pulumi.String(ubuntuRegistryImage.Name),
+// PullTriggers: pulumi.StringArray{
+// *pulumi.String(ubuntuRegistryImage.Sha256Digest),
+// },
+// })
+// if err != nil {
+// return err
+// }
+// return nil
+// })
+// }
+//
+// ```
func LookupRegistryImage(ctx *pulumi.Context, args *LookupRegistryImageArgs, opts ...pulumi.InvokeOption) (*LookupRegistryImageResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupRegistryImageResult
diff --git a/sdk/go/docker/getRemoteImage.go b/sdk/go/docker/getRemoteImage.go
index d001115a..58607d36 100644
--- a/sdk/go/docker/getRemoteImage.go
+++ b/sdk/go/docker/getRemoteImage.go
@@ -13,6 +13,50 @@ import (
)
// `RemoteImage` provides details about a specific Docker Image which need to be presend on the Docker Host
+//
+// ## Example Usage
+//
+// ```go
+// package main
+//
+// import (
+//
+// "github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
+// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
+//
+// )
+//
+// func main() {
+// pulumi.Run(func(ctx *pulumi.Context) error {
+// _, err := docker.LookupRemoteImage(ctx, &docker.LookupRemoteImageArgs{
+// Name: "nginx",
+// }, nil)
+// if err != nil {
+// return err
+// }
+// _, err = docker.LookupRemoteImage(ctx, &docker.LookupRemoteImageArgs{
+// Name: "nginx:1.17.6",
+// }, nil)
+// if err != nil {
+// return err
+// }
+// _, err = docker.LookupRemoteImage(ctx, &docker.LookupRemoteImageArgs{
+// Name: "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
+// }, nil)
+// if err != nil {
+// return err
+// }
+// _, err = docker.LookupRemoteImage(ctx, &docker.LookupRemoteImageArgs{
+// Name: "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
+// }, nil)
+// if err != nil {
+// return err
+// }
+// return nil
+// })
+// }
+//
+// ```
func LookupRemoteImage(ctx *pulumi.Context, args *LookupRemoteImageArgs, opts ...pulumi.InvokeOption) (*LookupRemoteImageResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupRemoteImageResult
diff --git a/sdk/go/docker/network.go b/sdk/go/docker/network.go
index 92968903..e2519e64 100644
--- a/sdk/go/docker/network.go
+++ b/sdk/go/docker/network.go
@@ -15,6 +15,30 @@ import (
//
// `Network` provides a docker network resource.
//
+// ## Example Usage
+//
+// ```go
+// package main
+//
+// import (
+//
+// "github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
+// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
+//
+// )
+//
+// func main() {
+// pulumi.Run(func(ctx *pulumi.Context) error {
+// _, err := docker.NewNetwork(ctx, "privateNetwork", nil)
+// if err != nil {
+// return err
+// }
+// return nil
+// })
+// }
+//
+// ```
+//
// ## Import
//
// ### Example Assuming you created a `network` as follows #!/bin/bash docker network create foo prints the long ID 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73 you provide the definition for the resource as follows terraform resource "docker_network" "foo" {
diff --git a/sdk/go/docker/plugin.go b/sdk/go/docker/plugin.go
index 5e9e4eea..8fe9cb84 100644
--- a/sdk/go/docker/plugin.go
+++ b/sdk/go/docker/plugin.go
@@ -15,6 +15,40 @@ import (
//
// Manages the lifecycle of a Docker plugin.
//
+// ## Example Usage
+//
+// ```go
+// package main
+//
+// import (
+//
+// "github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
+// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
+//
+// )
+//
+// func main() {
+// pulumi.Run(func(ctx *pulumi.Context) error {
+// _, err := docker.NewPlugin(ctx, "sample-volume-plugin", &docker.PluginArgs{
+// Alias: pulumi.String("sample-volume-plugin"),
+// EnableTimeout: pulumi.Int(60),
+// Enabled: pulumi.Bool(false),
+// Envs: pulumi.StringArray{
+// pulumi.String("DEBUG=1"),
+// },
+// ForceDestroy: pulumi.Bool(true),
+// ForceDisable: pulumi.Bool(true),
+// GrantAllPermissions: pulumi.Bool(true),
+// })
+// if err != nil {
+// return err
+// }
+// return nil
+// })
+// }
+//
+// ```
+//
// ## Import
//
// #!/bin/bash
diff --git a/sdk/go/docker/registryImage.go b/sdk/go/docker/registryImage.go
index e3cfff98..2da579f4 100644
--- a/sdk/go/docker/registryImage.go
+++ b/sdk/go/docker/registryImage.go
@@ -14,6 +14,45 @@ import (
//
// Manages the lifecycle of docker image in a registry. You can upload images to a registry (= `docker push`) and also delete them again
+//
+// ## Example Usage
+//
+// Build an image with the `RemoteImage` resource and then push it to a registry:
+//
+// ```go
+// package main
+//
+// import (
+//
+// "fmt"
+//
+// "github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
+// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
+//
+// )
+//
+// func main() {
+// pulumi.Run(func(ctx *pulumi.Context) error {
+// _, err := docker.NewRegistryImage(ctx, "helloworld", &docker.RegistryImageArgs{
+// KeepRemotely: pulumi.Bool(true),
+// })
+// if err != nil {
+// return err
+// }
+// _, err = docker.NewRemoteImage(ctx, "image", &docker.RemoteImageArgs{
+// Name: pulumi.String("registry.com/somename:1.0"),
+// Build: &docker.RemoteImageBuildArgs{
+// Context: pulumi.String(fmt.Sprintf("%v/absolutePathToContextFolder", path.Cwd)),
+// },
+// })
+// if err != nil {
+// return err
+// }
+// return nil
+// })
+// }
+//
+// ```
type RegistryImage struct {
pulumi.CustomResourceState
diff --git a/sdk/go/docker/remoteImage.go b/sdk/go/docker/remoteImage.go
index b87733cc..ac63dde0 100644
--- a/sdk/go/docker/remoteImage.go
+++ b/sdk/go/docker/remoteImage.go
@@ -19,6 +19,71 @@ import (
// This resource will *not* pull new layers of the image automatically unless used in conjunction with RegistryImage data source to update the `pullTriggers` field.
//
// ## Example Usage
+// ### Basic
+//
+// Finds and downloads the latest `ubuntu:precise` image but does not check
+// for further updates of the image
+//
+// ```go
+// package main
+//
+// import (
+//
+// "github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
+// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
+//
+// )
+//
+// func main() {
+// pulumi.Run(func(ctx *pulumi.Context) error {
+// _, err := docker.NewRemoteImage(ctx, "ubuntu", &docker.RemoteImageArgs{
+// Name: pulumi.String("ubuntu:precise"),
+// })
+// if err != nil {
+// return err
+// }
+// return nil
+// })
+// }
+//
+// ```
+// ### Dynamic updates
+//
+// To be able to update an image dynamically when the `sha256` sum changes,
+// you need to use it in combination with `RegistryImage` as follows:
+//
+// ```go
+// package main
+//
+// import (
+//
+// "github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
+// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
+//
+// )
+//
+// func main() {
+// pulumi.Run(func(ctx *pulumi.Context) error {
+// ubuntuRegistryImage, err := docker.LookupRegistryImage(ctx, &docker.LookupRegistryImageArgs{
+// Name: "ubuntu:precise",
+// }, nil)
+// if err != nil {
+// return err
+// }
+// _, err = docker.NewRemoteImage(ctx, "ubuntuRemoteImage", &docker.RemoteImageArgs{
+// Name: *pulumi.String(ubuntuRegistryImage.Name),
+// PullTriggers: pulumi.StringArray{
+// *pulumi.String(ubuntuRegistryImage.Sha256Digest),
+// },
+// })
+// if err != nil {
+// return err
+// }
+// return nil
+// })
+// }
+//
+// ```
type RemoteImage struct {
pulumi.CustomResourceState
diff --git a/sdk/go/docker/volume.go b/sdk/go/docker/volume.go
index 2682dc37..6e5cbc72 100644
--- a/sdk/go/docker/volume.go
+++ b/sdk/go/docker/volume.go
@@ -15,6 +15,30 @@ import (
//
// Creates and destroys a volume in Docker. This can be used alongside Container to prepare volumes that can be shared across containers.
//
+// ## Example Usage
+//
+// ```go
+// package main
+//
+// import (
+//
+// "github.com/pulumi/pulumi-docker/sdk/v4/go/docker"
+// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
+//
+// )
+//
+// func main() {
+// pulumi.Run(func(ctx *pulumi.Context) error {
+// _, err := docker.NewVolume(ctx, "sharedVolume", nil)
+// if err != nil {
+// return err
+// }
+// return nil
+// })
+// }
+//
+// ```
+//
// ## Import
//
// ### Example Assuming you created a `volume` as follows #!/bin/bash docker volume create prints the long ID 524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d you provide the definition for the resource as follows terraform resource "docker_volume" "foo" {
diff --git a/sdk/nodejs/container.ts b/sdk/nodejs/container.ts
index cace1125..fdee1dd7 100644
--- a/sdk/nodejs/container.ts
+++ b/sdk/nodejs/container.ts
@@ -11,6 +11,18 @@ import * as utilities from "./utilities";
*
* Manages the lifecycle of a Docker container.
*
+ * ## Example Usage
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * // Find the latest Ubuntu precise image.
+ * const ubuntuRemoteImage = new docker.RemoteImage("ubuntuRemoteImage", {name: "ubuntu:precise"});
+ * // Start a container
+ * const ubuntuContainer = new docker.Container("ubuntuContainer", {image: ubuntuRemoteImage.imageId});
+ * ```
+ *
* ## Import
*
* ### Example Assuming you created a `container` as follows #!/bin/bash docker run --name foo -p8080:80 -d nginx
diff --git a/sdk/nodejs/getNetwork.ts b/sdk/nodejs/getNetwork.ts
index 711087c4..29663ee7 100644
--- a/sdk/nodejs/getNetwork.ts
+++ b/sdk/nodejs/getNetwork.ts
@@ -9,6 +9,17 @@ import * as utilities from "./utilities";
/**
* `docker.Network` provides details about a specific Docker Network.
+ *
+ * ## Example Usage
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const main = docker.getNetwork({
+ * name: "main",
+ * });
+ * ```
*/
export function getNetwork(args: GetNetworkArgs, opts?: pulumi.InvokeOptions): Promise {
@@ -63,6 +74,17 @@ export interface GetNetworkResult {
}
/**
* `docker.Network` provides details about a specific Docker Network.
+ *
+ * ## Example Usage
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const main = docker.getNetwork({
+ * name: "main",
+ * });
+ * ```
*/
export function getNetworkOutput(args: GetNetworkOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output {
return pulumi.output(args).apply((a: any) => getNetwork(a, opts))
diff --git a/sdk/nodejs/getRegistryImage.ts b/sdk/nodejs/getRegistryImage.ts
index 175bb8b6..4179837f 100644
--- a/sdk/nodejs/getRegistryImage.ts
+++ b/sdk/nodejs/getRegistryImage.ts
@@ -6,6 +6,21 @@ import * as utilities from "./utilities";
/**
* Reads the image metadata from a Docker Registry. Used in conjunction with the docker.RemoteImage resource to keep an image up to date on the latest available version of the tag.
+ *
+ * ## Example Usage
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const ubuntuRegistryImage = docker.getRegistryImage({
+ * name: "ubuntu:precise",
+ * });
+ * const ubuntuRemoteImage = new docker.RemoteImage("ubuntuRemoteImage", {
+ * name: ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.name),
+ * pullTriggers: [ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.sha256Digest)],
+ * });
+ * ```
*/
export function getRegistryImage(args: GetRegistryImageArgs, opts?: pulumi.InvokeOptions): Promise {
@@ -53,6 +68,21 @@ export interface GetRegistryImageResult {
}
/**
* Reads the image metadata from a Docker Registry. Used in conjunction with the docker.RemoteImage resource to keep an image up to date on the latest available version of the tag.
+ *
+ * ## Example Usage
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const ubuntuRegistryImage = docker.getRegistryImage({
+ * name: "ubuntu:precise",
+ * });
+ * const ubuntuRemoteImage = new docker.RemoteImage("ubuntuRemoteImage", {
+ * name: ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.name),
+ * pullTriggers: [ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.sha256Digest)],
+ * });
+ * ```
*/
export function getRegistryImageOutput(args: GetRegistryImageOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output {
return pulumi.output(args).apply((a: any) => getRegistryImage(a, opts))
diff --git a/sdk/nodejs/getRemoteImage.ts b/sdk/nodejs/getRemoteImage.ts
index 40ed61e5..cec0c6ac 100644
--- a/sdk/nodejs/getRemoteImage.ts
+++ b/sdk/nodejs/getRemoteImage.ts
@@ -6,6 +6,26 @@ import * as utilities from "./utilities";
/**
* `docker.RemoteImage` provides details about a specific Docker Image which need to be presend on the Docker Host
+ *
+ * ## Example Usage
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const latest = docker.getRemoteImage({
+ * name: "nginx",
+ * });
+ * const specific = docker.getRemoteImage({
+ * name: "nginx:1.17.6",
+ * });
+ * const digest = docker.getRemoteImage({
+ * name: "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
+ * });
+ * const tagAndDigest = docker.getRemoteImage({
+ * name: "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
+ * });
+ * ```
*/
export function getRemoteImage(args: GetRemoteImageArgs, opts?: pulumi.InvokeOptions): Promise {
@@ -44,6 +64,26 @@ export interface GetRemoteImageResult {
}
/**
* `docker.RemoteImage` provides details about a specific Docker Image which need to be presend on the Docker Host
+ *
+ * ## Example Usage
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const latest = docker.getRemoteImage({
+ * name: "nginx",
+ * });
+ * const specific = docker.getRemoteImage({
+ * name: "nginx:1.17.6",
+ * });
+ * const digest = docker.getRemoteImage({
+ * name: "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
+ * });
+ * const tagAndDigest = docker.getRemoteImage({
+ * name: "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2",
+ * });
+ * ```
*/
export function getRemoteImageOutput(args: GetRemoteImageOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output {
return pulumi.output(args).apply((a: any) => getRemoteImage(a, opts))
diff --git a/sdk/nodejs/network.ts b/sdk/nodejs/network.ts
index a585cdd1..8944fe7a 100644
--- a/sdk/nodejs/network.ts
+++ b/sdk/nodejs/network.ts
@@ -11,6 +11,15 @@ import * as utilities from "./utilities";
*
* `docker.Network` provides a docker network resource.
*
+ * ## Example Usage
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const privateNetwork = new docker.Network("privateNetwork", {});
+ * ```
+ *
* ## Import
*
* ### Example Assuming you created a `network` as follows #!/bin/bash docker network create foo prints the long ID 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73 you provide the definition for the resource as follows terraform resource "docker_network" "foo" {
diff --git a/sdk/nodejs/plugin.ts b/sdk/nodejs/plugin.ts
index 77952fa1..76ac13fd 100644
--- a/sdk/nodejs/plugin.ts
+++ b/sdk/nodejs/plugin.ts
@@ -11,6 +11,23 @@ import * as utilities from "./utilities";
*
* Manages the lifecycle of a Docker plugin.
*
+ * ## Example Usage
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const sample_volume_plugin = new docker.Plugin("sample-volume-plugin", {
+ * alias: "sample-volume-plugin",
+ * enableTimeout: 60,
+ * enabled: false,
+ * envs: ["DEBUG=1"],
+ * forceDestroy: true,
+ * forceDisable: true,
+ * grantAllPermissions: true,
+ * });
+ * ```
+ *
* ## Import
*
* #!/bin/bash
diff --git a/sdk/nodejs/registryImage.ts b/sdk/nodejs/registryImage.ts
index 14dc5470..96cf580a 100644
--- a/sdk/nodejs/registryImage.ts
+++ b/sdk/nodejs/registryImage.ts
@@ -7,6 +7,23 @@ import * as utilities from "./utilities";
/**
*
* Manages the lifecycle of docker image in a registry. You can upload images to a registry (= `docker push`) and also delete them again
+ *
+ * ## Example Usage
+ *
+ * Build an image with the `docker.RemoteImage` resource and then push it to a registry:
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const helloworld = new docker.RegistryImage("helloworld", {keepRemotely: true});
+ * const image = new docker.RemoteImage("image", {
+ * name: "registry.com/somename:1.0",
+ * build: {
+ * context: `${path.cwd}/absolutePathToContextFolder`,
+ * },
+ * });
+ * ```
*/
export class RegistryImage extends pulumi.CustomResource {
/**
diff --git a/sdk/nodejs/remoteImage.ts b/sdk/nodejs/remoteImage.ts
index 2872091e..798b0137 100644
--- a/sdk/nodejs/remoteImage.ts
+++ b/sdk/nodejs/remoteImage.ts
@@ -13,6 +13,34 @@ import * as utilities from "./utilities";
* This resource will *not* pull new layers of the image automatically unless used in conjunction with docker.RegistryImage data source to update the `pullTriggers` field.
*
* ## Example Usage
+ * ### Basic
+ *
+ * Finds and downloads the latest `ubuntu:precise` image but does not check
+ * for further updates of the image
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const ubuntu = new docker.RemoteImage("ubuntu", {name: "ubuntu:precise"});
+ * ```
+ * ### Dynamic updates
+ *
+ * To be able to update an image dynamically when the `sha256` sum changes,
+ * you need to use it in combination with `docker.RegistryImage` as follows:
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const ubuntuRegistryImage = docker.getRegistryImage({
+ * name: "ubuntu:precise",
+ * });
+ * const ubuntuRemoteImage = new docker.RemoteImage("ubuntuRemoteImage", {
+ * name: ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.name),
+ * pullTriggers: [ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.sha256Digest)],
+ * });
+ * ```
*/
export class RemoteImage extends pulumi.CustomResource {
/**
diff --git a/sdk/nodejs/volume.ts b/sdk/nodejs/volume.ts
index 8512d78f..33076e31 100644
--- a/sdk/nodejs/volume.ts
+++ b/sdk/nodejs/volume.ts
@@ -11,6 +11,15 @@ import * as utilities from "./utilities";
*
* Creates and destroys a volume in Docker. This can be used alongside docker.Container to prepare volumes that can be shared across containers.
*
+ * ## Example Usage
+ *
+ * ```typescript
+ * import * as pulumi from "@pulumi/pulumi";
+ * import * as docker from "@pulumi/docker";
+ *
+ * const sharedVolume = new docker.Volume("sharedVolume", {});
+ * ```
+ *
* ## Import
*
* ### Example Assuming you created a `volume` as follows #!/bin/bash docker volume create prints the long ID 524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d you provide the definition for the resource as follows terraform resource "docker_volume" "foo" {
diff --git a/sdk/python/pulumi_docker/container.py b/sdk/python/pulumi_docker/container.py
index 278e2895..f3d48868 100644
--- a/sdk/python/pulumi_docker/container.py
+++ b/sdk/python/pulumi_docker/container.py
@@ -2550,6 +2550,18 @@ def __init__(__self__,
Manages the lifecycle of a Docker container.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ # Find the latest Ubuntu precise image.
+ ubuntu_remote_image = docker.RemoteImage("ubuntuRemoteImage", name="ubuntu:precise")
+ # Start a container
+ ubuntu_container = docker.Container("ubuntuContainer", image=ubuntu_remote_image.image_id)
+ ```
+
## Import
### Example Assuming you created a `container` as follows #!/bin/bash docker run --name foo -p8080:80 -d nginx
@@ -2652,6 +2664,18 @@ def __init__(__self__,
Manages the lifecycle of a Docker container.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ # Find the latest Ubuntu precise image.
+ ubuntu_remote_image = docker.RemoteImage("ubuntuRemoteImage", name="ubuntu:precise")
+ # Start a container
+ ubuntu_container = docker.Container("ubuntuContainer", image=ubuntu_remote_image.image_id)
+ ```
+
## Import
### Example Assuming you created a `container` as follows #!/bin/bash docker run --name foo -p8080:80 -d nginx
diff --git a/sdk/python/pulumi_docker/get_network.py b/sdk/python/pulumi_docker/get_network.py
index 418bc720..214c5aed 100644
--- a/sdk/python/pulumi_docker/get_network.py
+++ b/sdk/python/pulumi_docker/get_network.py
@@ -122,6 +122,15 @@ def get_network(name: Optional[str] = None,
"""
`Network` provides details about a specific Docker Network.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ main = docker.get_network(name="main")
+ ```
+
:param str name: The name of the Docker network.
"""
@@ -146,6 +155,15 @@ def get_network_output(name: Optional[pulumi.Input[str]] = None,
"""
`Network` provides details about a specific Docker Network.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ main = docker.get_network(name="main")
+ ```
+
:param str name: The name of the Docker network.
"""
diff --git a/sdk/python/pulumi_docker/get_registry_image.py b/sdk/python/pulumi_docker/get_registry_image.py
index b8ee853d..867448bd 100644
--- a/sdk/python/pulumi_docker/get_registry_image.py
+++ b/sdk/python/pulumi_docker/get_registry_image.py
@@ -86,6 +86,18 @@ def get_registry_image(insecure_skip_verify: Optional[bool] = None,
"""
Reads the image metadata from a Docker Registry. Used in conjunction with the RemoteImage resource to keep an image up to date on the latest available version of the tag.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ ubuntu_registry_image = docker.get_registry_image(name="ubuntu:precise")
+ ubuntu_remote_image = docker.RemoteImage("ubuntuRemoteImage",
+ name=ubuntu_registry_image.name,
+ pull_triggers=[ubuntu_registry_image.sha256_digest])
+ ```
+
:param bool insecure_skip_verify: If `true`, the verification of TLS certificates of the server/registry is disabled. Defaults to `false`
:param str name: The name of the Docker image, including any tags. e.g. `alpine:latest`
@@ -110,6 +122,18 @@ def get_registry_image_output(insecure_skip_verify: Optional[pulumi.Input[Option
"""
Reads the image metadata from a Docker Registry. Used in conjunction with the RemoteImage resource to keep an image up to date on the latest available version of the tag.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ ubuntu_registry_image = docker.get_registry_image(name="ubuntu:precise")
+ ubuntu_remote_image = docker.RemoteImage("ubuntuRemoteImage",
+ name=ubuntu_registry_image.name,
+ pull_triggers=[ubuntu_registry_image.sha256_digest])
+ ```
+
:param bool insecure_skip_verify: If `true`, the verification of TLS certificates of the server/registry is disabled. Defaults to `false`
:param str name: The name of the Docker image, including any tags. e.g. `alpine:latest`
diff --git a/sdk/python/pulumi_docker/get_remote_image.py b/sdk/python/pulumi_docker/get_remote_image.py
index 47d10c00..d8373165 100644
--- a/sdk/python/pulumi_docker/get_remote_image.py
+++ b/sdk/python/pulumi_docker/get_remote_image.py
@@ -73,6 +73,18 @@ def get_remote_image(name: Optional[str] = None,
"""
`RemoteImage` provides details about a specific Docker Image which need to be presend on the Docker Host
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ latest = docker.get_remote_image(name="nginx")
+ specific = docker.get_remote_image(name="nginx:1.17.6")
+ digest = docker.get_remote_image(name="nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2")
+ tag_and_digest = docker.get_remote_image(name="nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2")
+ ```
+
:param str name: The name of the Docker image, including any tags or SHA256 repo digests.
"""
@@ -93,6 +105,18 @@ def get_remote_image_output(name: Optional[pulumi.Input[str]] = None,
"""
`RemoteImage` provides details about a specific Docker Image which need to be presend on the Docker Host
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ latest = docker.get_remote_image(name="nginx")
+ specific = docker.get_remote_image(name="nginx:1.17.6")
+ digest = docker.get_remote_image(name="nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2")
+ tag_and_digest = docker.get_remote_image(name="nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2")
+ ```
+
:param str name: The name of the Docker image, including any tags or SHA256 repo digests.
"""
diff --git a/sdk/python/pulumi_docker/network.py b/sdk/python/pulumi_docker/network.py
index 2250fe83..097ef64f 100644
--- a/sdk/python/pulumi_docker/network.py
+++ b/sdk/python/pulumi_docker/network.py
@@ -535,6 +535,15 @@ def __init__(__self__,
`Network` provides a docker network resource.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ private_network = docker.Network("privateNetwork")
+ ```
+
## Import
### Example Assuming you created a `network` as follows #!/bin/bash docker network create foo prints the long ID 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73 you provide the definition for the resource as follows terraform resource "docker_network" "foo" {
@@ -570,6 +579,15 @@ def __init__(__self__,
`Network` provides a docker network resource.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ private_network = docker.Network("privateNetwork")
+ ```
+
## Import
### Example Assuming you created a `network` as follows #!/bin/bash docker network create foo prints the long ID 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73 you provide the definition for the resource as follows terraform resource "docker_network" "foo" {
diff --git a/sdk/python/pulumi_docker/plugin.py b/sdk/python/pulumi_docker/plugin.py
index 91669122..6d010bec 100644
--- a/sdk/python/pulumi_docker/plugin.py
+++ b/sdk/python/pulumi_docker/plugin.py
@@ -430,6 +430,22 @@ def __init__(__self__,
Manages the lifecycle of a Docker plugin.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ sample_volume_plugin = docker.Plugin("sample-volume-plugin",
+ alias="sample-volume-plugin",
+ enable_timeout=60,
+ enabled=False,
+ envs=["DEBUG=1"],
+ force_destroy=True,
+ force_disable=True,
+ grant_all_permissions=True)
+ ```
+
## Import
#!/bin/bash
@@ -460,6 +476,22 @@ def __init__(__self__,
Manages the lifecycle of a Docker plugin.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ sample_volume_plugin = docker.Plugin("sample-volume-plugin",
+ alias="sample-volume-plugin",
+ enable_timeout=60,
+ enabled=False,
+ envs=["DEBUG=1"],
+ force_destroy=True,
+ force_disable=True,
+ grant_all_permissions=True)
+ ```
+
## Import
#!/bin/bash
diff --git a/sdk/python/pulumi_docker/registry_image.py b/sdk/python/pulumi_docker/registry_image.py
index 318057cc..a45be1a3 100644
--- a/sdk/python/pulumi_docker/registry_image.py
+++ b/sdk/python/pulumi_docker/registry_image.py
@@ -231,6 +231,22 @@ def __init__(__self__,
Manages the lifecycle of docker image in a registry. You can upload images to a registry (= `docker push`) and also delete them again
+ ## Example Usage
+
+ Build an image with the `RemoteImage` resource and then push it to a registry:
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ helloworld = docker.RegistryImage("helloworld", keep_remotely=True)
+ image = docker.RemoteImage("image",
+ name="registry.com/somename:1.0",
+ build=docker.RemoteImageBuildArgs(
+ context=f"{path['cwd']}/absolutePathToContextFolder",
+ ))
+ ```
+
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
:param pulumi.Input[bool] insecure_skip_verify: If `true`, the verification of TLS certificates of the server/registry is disabled. Defaults to `false`
@@ -248,6 +264,22 @@ def __init__(__self__,
Manages the lifecycle of docker image in a registry. You can upload images to a registry (= `docker push`) and also delete them again
+ ## Example Usage
+
+ Build an image with the `RemoteImage` resource and then push it to a registry:
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ helloworld = docker.RegistryImage("helloworld", keep_remotely=True)
+ image = docker.RemoteImage("image",
+ name="registry.com/somename:1.0",
+ build=docker.RemoteImageBuildArgs(
+ context=f"{path['cwd']}/absolutePathToContextFolder",
+ ))
+ ```
+
:param str resource_name: The name of the resource.
:param RegistryImageArgs args: The arguments to use to populate this resource's properties.
:param pulumi.ResourceOptions opts: Options for the resource.
diff --git a/sdk/python/pulumi_docker/remote_image.py b/sdk/python/pulumi_docker/remote_image.py
index df63b178..10f1e95a 100644
--- a/sdk/python/pulumi_docker/remote_image.py
+++ b/sdk/python/pulumi_docker/remote_image.py
@@ -371,6 +371,31 @@ def __init__(__self__,
This resource will *not* pull new layers of the image automatically unless used in conjunction with RegistryImage data source to update the `pull_triggers` field.
## Example Usage
+ ### Basic
+
+ Finds and downloads the latest `ubuntu:precise` image but does not check
+ for further updates of the image
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ ubuntu = docker.RemoteImage("ubuntu", name="ubuntu:precise")
+ ```
+ ### Dynamic updates
+
+ To be able to update an image dynamically when the `sha256` sum changes,
+ you need to use it in combination with `RegistryImage` as follows:
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ ubuntu_registry_image = docker.get_registry_image(name="ubuntu:precise")
+ ubuntu_remote_image = docker.RemoteImage("ubuntuRemoteImage",
+ name=ubuntu_registry_image.name,
+ pull_triggers=[ubuntu_registry_image.sha256_digest])
+ ```
:param str resource_name: The name of the resource.
:param pulumi.ResourceOptions opts: Options for the resource.
@@ -394,6 +419,31 @@ def __init__(__self__,
This resource will *not* pull new layers of the image automatically unless used in conjunction with RegistryImage data source to update the `pull_triggers` field.
## Example Usage
+ ### Basic
+
+ Finds and downloads the latest `ubuntu:precise` image but does not check
+ for further updates of the image
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ ubuntu = docker.RemoteImage("ubuntu", name="ubuntu:precise")
+ ```
+ ### Dynamic updates
+
+ To be able to update an image dynamically when the `sha256` sum changes,
+ you need to use it in combination with `RegistryImage` as follows:
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ ubuntu_registry_image = docker.get_registry_image(name="ubuntu:precise")
+ ubuntu_remote_image = docker.RemoteImage("ubuntuRemoteImage",
+ name=ubuntu_registry_image.name,
+ pull_triggers=[ubuntu_registry_image.sha256_digest])
+ ```
:param str resource_name: The name of the resource.
:param RemoteImageArgs args: The arguments to use to populate this resource's properties.
diff --git a/sdk/python/pulumi_docker/volume.py b/sdk/python/pulumi_docker/volume.py
index a6b46202..2ec17b5c 100644
--- a/sdk/python/pulumi_docker/volume.py
+++ b/sdk/python/pulumi_docker/volume.py
@@ -227,6 +227,15 @@ def __init__(__self__,
Creates and destroys a volume in Docker. This can be used alongside Container to prepare volumes that can be shared across containers.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ shared_volume = docker.Volume("sharedVolume")
+ ```
+
## Import
### Example Assuming you created a `volume` as follows #!/bin/bash docker volume create prints the long ID 524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d you provide the definition for the resource as follows terraform resource "docker_volume" "foo" {
@@ -254,6 +263,15 @@ def __init__(__self__,
Creates and destroys a volume in Docker. This can be used alongside Container to prepare volumes that can be shared across containers.
+ ## Example Usage
+
+ ```python
+ import pulumi
+ import pulumi_docker as docker
+
+ shared_volume = docker.Volume("sharedVolume")
+ ```
+
## Import
### Example Assuming you created a `volume` as follows #!/bin/bash docker volume create prints the long ID 524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d you provide the definition for the resource as follows terraform resource "docker_volume" "foo" {