diff --git a/.ci-mgmt.yaml b/.ci-mgmt.yaml index 86545a87..7dc408b3 100644 --- a/.ci-mgmt.yaml +++ b/.ci-mgmt.yaml @@ -25,6 +25,10 @@ makeTemplate: bridged docsCmd: "cd provider/pkg/docs-gen/examples/ && go run generate.go ./yaml ./" hybrid: true plugins: + - name: terraform + version: "1.0.16" + kind: converter + - name: aws version: "6.8.0" team: ecosystem @@ -34,3 +38,4 @@ actions: uses: webfactory/ssh-agent@v0.7.0 with: ssh-private-key: ${{ secrets.PRIVATE_SSH_KEY_FOR_DIGITALOCEAN }} +pulumiConvert: 1 diff --git a/Makefile b/Makefile index 71c0c561..1f247792 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ VERSION := $(shell pulumictl get version) JAVA_GEN := pulumi-java-gen TESTPARALLELISM := 10 WORKING_DIR := $(shell pwd) -PULUMI_CONVERT := 0 +PULUMI_CONVERT := 1 development: install_plugins provider build_sdks install_sdks @@ -114,6 +114,7 @@ install_nodejs_sdk: install_plugins: export PULUMI_HOME := $(WORKING_DIR)/.pulumi install_plugins: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH) install_plugins: .pulumi/bin/pulumi + .pulumi/bin/pulumi plugin install converter terraform 1.0.16 .pulumi/bin/pulumi plugin install resource aws 6.8.0 lint_provider: provider diff --git a/provider/cmd/pulumi-resource-docker/schema.json b/provider/cmd/pulumi-resource-docker/schema.json index 2d13e222..ced93d89 100644 --- a/provider/cmd/pulumi-resource-docker/schema.json +++ b/provider/cmd/pulumi-resource-docker/schema.json @@ -2070,7 +2070,7 @@ }, "resources": { "docker:index/container:Container": { - "description": "\u003c!-- Bug: Type and Name are switched --\u003e\nManages the lifecycle of a Docker container.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\n// Find the latest Ubuntu precise image.\nconst ubuntuRemoteImage = new docker.RemoteImage(\"ubuntuRemoteImage\", {name: \"ubuntu:precise\"});\n// Start a container\nconst ubuntuContainer = new docker.Container(\"ubuntuContainer\", {image: ubuntuRemoteImage.imageId});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\n# Find the latest Ubuntu precise image.\nubuntu_remote_image = docker.RemoteImage(\"ubuntuRemoteImage\", name=\"ubuntu:precise\")\n# Start a container\nubuntu_container = docker.Container(\"ubuntuContainer\", image=ubuntu_remote_image.image_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Find the latest Ubuntu precise image.\n var ubuntuRemoteImage = new Docker.RemoteImage(\"ubuntuRemoteImage\", new()\n {\n Name = \"ubuntu:precise\",\n });\n\n // Start a container\n var ubuntuContainer = new Docker.Container(\"ubuntuContainer\", new()\n {\n Image = ubuntuRemoteImage.ImageId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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// Find the latest Ubuntu precise image.\n\t\tubuntuRemoteImage, err := docker.NewRemoteImage(ctx, \"ubuntuRemoteImage\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(\"ubuntu:precise\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Start a container\n\t\t_, err = docker.NewContainer(ctx, \"ubuntuContainer\", \u0026docker.ContainerArgs{\n\t\t\tImage: ubuntuRemoteImage.ImageId,\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```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\nimport com.pulumi.docker.Container;\nimport com.pulumi.docker.ContainerArgs;\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 // Find the latest Ubuntu precise image.\n var ubuntuRemoteImage = new RemoteImage(\"ubuntuRemoteImage\", RemoteImageArgs.builder() \n .name(\"ubuntu:precise\")\n .build());\n\n // Start a container\n var ubuntuContainer = new Container(\"ubuntuContainer\", ContainerArgs.builder() \n .image(ubuntuRemoteImage.imageId())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Start a container\n ubuntuContainer:\n type: docker:Container\n properties:\n image: ${ubuntuRemoteImage.imageId}\n # Find the latest Ubuntu precise image.\n ubuntuRemoteImage:\n type: docker:RemoteImage\n properties:\n name: ubuntu:precise\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n### Example\n\nAssuming you created a `container` as follows\n\n#!/bin/bash\n\ndocker run --name foo -p8080:80 -d nginx \n\nprints the container ID \n\n9a550c0f0163d39d77222d3efd58701b625d47676c25c686c95b5b92d1cba6fd\n\nyou provide the definition for the resource as follows\n\nterraform\n\nresource \"docker_container\" \"foo\" {\n\n name = \"foo\"\n\n image = \"nginx\"\n\n ports {\n\n internal = \"80\"\n\n external = \"8080\"\n\n }\n\n}\n\nthen the import command is as follows\n\n#!/bin/bash\n\n```sh\n$ pulumi import docker:index/container:Container foo 9a550c0f0163d39d77222d3efd58701b625d47676c25c686c95b5b92d1cba6fd\n```\n\n", + "description": "\u003c!-- Bug: Type and Name are switched --\u003e\nManages the lifecycle of a Docker container.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\n// Find the latest Ubuntu precise image.\nconst ubuntuRemoteImage = new docker.RemoteImage(\"ubuntu\", {name: \"ubuntu:precise\"});\n// Start a container\nconst ubuntu = new docker.Container(\"ubuntu\", {\n name: \"foo\",\n image: ubuntuRemoteImage.imageId,\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\n# Find the latest Ubuntu precise image.\nubuntu_remote_image = docker.RemoteImage(\"ubuntu\", name=\"ubuntu:precise\")\n# Start a container\nubuntu = docker.Container(\"ubuntu\",\n name=\"foo\",\n image=ubuntu_remote_image.image_id)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // Find the latest Ubuntu precise image.\n var ubuntuRemoteImage = new Docker.RemoteImage(\"ubuntu\", new()\n {\n Name = \"ubuntu:precise\",\n });\n\n // Start a container\n var ubuntu = new Docker.Container(\"ubuntu\", new()\n {\n Name = \"foo\",\n Image = ubuntuRemoteImage.ImageId,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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// Find the latest Ubuntu precise image.\n\t\tubuntuRemoteImage, err := docker.NewRemoteImage(ctx, \"ubuntu\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(\"ubuntu:precise\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Start a container\n\t\t_, err = docker.NewContainer(ctx, \"ubuntu\", \u0026docker.ContainerArgs{\n\t\t\tName: pulumi.String(\"foo\"),\n\t\t\tImage: ubuntuRemoteImage.ImageId,\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```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\nimport com.pulumi.docker.Container;\nimport com.pulumi.docker.ContainerArgs;\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 // Find the latest Ubuntu precise image.\n var ubuntuRemoteImage = new RemoteImage(\"ubuntuRemoteImage\", RemoteImageArgs.builder() \n .name(\"ubuntu:precise\")\n .build());\n\n // Start a container\n var ubuntu = new Container(\"ubuntu\", ContainerArgs.builder() \n .name(\"foo\")\n .image(ubuntuRemoteImage.imageId())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # Start a container\n ubuntu:\n type: docker:Container\n properties:\n name: foo\n image: ${ubuntuRemoteImage.imageId}\n # Find the latest Ubuntu precise image.\n ubuntuRemoteImage:\n type: docker:RemoteImage\n name: ubuntu\n properties:\n name: ubuntu:precise\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n### Example\n\nAssuming you created a `container` as follows\n\n#!/bin/bash\n\ndocker run --name foo -p8080:80 -d nginx \n\nprints the container ID \n\n9a550c0f0163d39d77222d3efd58701b625d47676c25c686c95b5b92d1cba6fd\n\nyou provide the definition for the resource as follows\n\nterraform\n\nresource \"docker_container\" \"foo\" {\n\n name = \"foo\"\n\n image = \"nginx\"\n\n ports {\n\n internal = \"80\"\n\n external = \"8080\"\n\n }\n\n}\n\nthen the import command is as follows\n\n#!/bin/bash\n\n```sh\n$ pulumi import docker:index/container:Container foo 9a550c0f0163d39d77222d3efd58701b625d47676c25c686c95b5b92d1cba6fd\n```\n\n", "properties": { "attach": { "type": "boolean", @@ -3239,7 +3239,7 @@ ] }, "docker:index/network:Network": { - "description": "\u003c!-- Bug: Type and Name are switched --\u003e\n`docker.Network` provides a docker network resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst privateNetwork = new docker.Network(\"privateNetwork\", {});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nprivate_network = docker.Network(\"privateNetwork\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var privateNetwork = new Docker.Network(\"privateNetwork\");\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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 := docker.NewNetwork(ctx, \"privateNetwork\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.Network;\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 privateNetwork = new Network(\"privateNetwork\");\n\n }\n}\n```\n```yaml\nresources:\n privateNetwork:\n type: docker:Network\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n### Example\n\nAssuming you created a `network` as follows\n\n#!/bin/bash\n\ndocker network create foo\n\nprints the long ID\n\n87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73\n\nyou provide the definition for the resource as follows\n\nterraform\n\nresource \"docker_network\" \"foo\" {\n\n name = \"foo\"\n\n}\n\nthen the import command is as follows\n\n#!/bin/bash\n\n```sh\n$ pulumi import docker:index/network:Network foo 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73\n```\n\n", + "description": "\u003c!-- Bug: Type and Name are switched --\u003e\n`docker.Network` provides a docker network resource.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst privateNetwork = new docker.Network(\"private_network\", {name: \"my_network\"});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nprivate_network = docker.Network(\"private_network\", name=\"my_network\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var privateNetwork = new Docker.Network(\"private_network\", new()\n {\n Name = \"my_network\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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 := docker.NewNetwork(ctx, \"private_network\", \u0026docker.NetworkArgs{\n\t\t\tName: pulumi.String(\"my_network\"),\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```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.Network;\nimport com.pulumi.docker.NetworkArgs;\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 privateNetwork = new Network(\"privateNetwork\", NetworkArgs.builder() \n .name(\"my_network\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n privateNetwork:\n type: docker:Network\n name: private_network\n properties:\n name: my_network\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n### Example\n\nAssuming you created a `network` as follows\n\n#!/bin/bash\n\ndocker network create foo\n\nprints the long ID\n\n87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73\n\nyou provide the definition for the resource as follows\n\nterraform\n\nresource \"docker_network\" \"foo\" {\n\n name = \"foo\"\n\n}\n\nthen the import command is as follows\n\n#!/bin/bash\n\n```sh\n$ pulumi import docker:index/network:Network foo 87b57a9b91ecab2db2a6dbf38df74c67d7c7108cbe479d6576574ec2cd8c2d73\n```\n\n", "properties": { "attachable": { "type": "boolean", @@ -3472,7 +3472,7 @@ } }, "docker:index/plugin:Plugin": { - "description": "\u003c!-- Bug: Type and Name are switched --\u003e\nManages the lifecycle of a Docker plugin.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst sample_volume_plugin = new docker.Plugin(\"sample-volume-plugin\", {\n alias: \"sample-volume-plugin\",\n enableTimeout: 60,\n enabled: false,\n envs: [\"DEBUG=1\"],\n forceDestroy: true,\n forceDisable: true,\n grantAllPermissions: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nsample_volume_plugin = docker.Plugin(\"sample-volume-plugin\",\n alias=\"sample-volume-plugin\",\n enable_timeout=60,\n enabled=False,\n envs=[\"DEBUG=1\"],\n force_destroy=True,\n force_disable=True,\n grant_all_permissions=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var sample_volume_plugin = new Docker.Plugin(\"sample-volume-plugin\", new()\n {\n Alias = \"sample-volume-plugin\",\n EnableTimeout = 60,\n Enabled = false,\n Envs = new[]\n {\n \"DEBUG=1\",\n },\n ForceDestroy = true,\n ForceDisable = true,\n GrantAllPermissions = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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 := docker.NewPlugin(ctx, \"sample-volume-plugin\", \u0026docker.PluginArgs{\n\t\t\tAlias: pulumi.String(\"sample-volume-plugin\"),\n\t\t\tEnableTimeout: pulumi.Int(60),\n\t\t\tEnabled: pulumi.Bool(false),\n\t\t\tEnvs: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"DEBUG=1\"),\n\t\t\t},\n\t\t\tForceDestroy: pulumi.Bool(true),\n\t\t\tForceDisable: pulumi.Bool(true),\n\t\t\tGrantAllPermissions: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.Plugin;\nimport com.pulumi.docker.PluginArgs;\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 sample_volume_plugin = new Plugin(\"sample-volume-plugin\", PluginArgs.builder() \n .alias(\"sample-volume-plugin\")\n .enableTimeout(60)\n .enabled(false)\n .envs(\"DEBUG=1\")\n .forceDestroy(true)\n .forceDisable(true)\n .grantAllPermissions(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n sample-volume-plugin:\n type: docker:Plugin\n properties:\n alias: sample-volume-plugin\n enableTimeout: 60\n enabled: false\n envs:\n - DEBUG=1\n forceDestroy: true\n forceDisable: true\n grantAllPermissions: true\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n#!/bin/bash\n\n```sh\n$ pulumi import docker:index/plugin:Plugin sample-volume-plugin \"$(docker plugin inspect -f {{.ID}} tiborvass/sample-volume-plugin:latest)\"\n```\n\n", + "description": "\u003c!-- Bug: Type and Name are switched --\u003e\nManages the lifecycle of a Docker plugin.\n\n## Import\n\n#!/bin/bash\n\n```sh\n$ pulumi import docker:index/plugin:Plugin sample-volume-plugin \"$(docker plugin inspect -f {{.ID}} tiborvass/sample-volume-plugin:latest)\"\n```\n\n", "properties": { "alias": { "type": "string", @@ -3629,7 +3629,7 @@ } }, "docker:index/registryImage:RegistryImage": { - "description": "\u003c!-- Bug: Type and Name are switched --\u003e\nManages the lifecycle of docker image in a registry. You can upload images to a registry (= `docker push`) and also delete them again\n\n## Example Usage\n\nBuild an image with the `docker.RemoteImage` resource and then push it to a registry:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst helloworld = new docker.RegistryImage(\"helloworld\", {keepRemotely: true});\nconst image = new docker.RemoteImage(\"image\", {\n name: \"registry.com/somename:1.0\",\n build: {\n context: `${path.cwd}/absolutePathToContextFolder`,\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nhelloworld = docker.RegistryImage(\"helloworld\", keep_remotely=True)\nimage = docker.RemoteImage(\"image\",\n name=\"registry.com/somename:1.0\",\n build=docker.RemoteImageBuildArgs(\n context=f\"{path['cwd']}/absolutePathToContextFolder\",\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var helloworld = new Docker.RegistryImage(\"helloworld\", new()\n {\n KeepRemotely = true,\n });\n\n var image = new Docker.RemoteImage(\"image\", new()\n {\n Name = \"registry.com/somename:1.0\",\n Build = new Docker.Inputs.RemoteImageBuildArgs\n {\n Context = $\"{path.Cwd}/absolutePathToContextFolder\",\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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 := docker.NewRegistryImage(ctx, \"helloworld\", \u0026docker.RegistryImageArgs{\n\t\t\tKeepRemotely: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = docker.NewRemoteImage(ctx, \"image\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(\"registry.com/somename:1.0\"),\n\t\t\tBuild: \u0026docker.RemoteImageBuildArgs{\n\t\t\t\tContext: pulumi.String(fmt.Sprintf(\"%v/absolutePathToContextFolder\", path.Cwd)),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.RegistryImage;\nimport com.pulumi.docker.RegistryImageArgs;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\nimport com.pulumi.docker.inputs.RemoteImageBuildArgs;\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 helloworld = new RegistryImage(\"helloworld\", RegistryImageArgs.builder() \n .keepRemotely(true)\n .build());\n\n var image = new RemoteImage(\"image\", RemoteImageArgs.builder() \n .name(\"registry.com/somename:1.0\")\n .build(RemoteImageBuildArgs.builder()\n .context(String.format(\"%s/absolutePathToContextFolder\", path.cwd()))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n helloworld:\n type: docker:RegistryImage\n properties:\n keepRemotely: true\n image:\n type: docker:RemoteImage\n properties:\n name: registry.com/somename:1.0\n build:\n context: ${path.cwd}/absolutePathToContextFolder\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "\u003c!-- Bug: Type and Name are switched --\u003e\nManages the lifecycle of docker image in a registry. You can upload images to a registry (= `docker push`) and also delete them again\n\n", "properties": { "insecureSkipVerify": { "type": "boolean", @@ -3715,7 +3715,7 @@ } }, "docker:index/remoteImage:RemoteImage": { - "description": "\u003c!-- Bug: Type and Name are switched --\u003e\nPulls a Docker image to a given Docker host from a Docker Registry.\n 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.\n\n## Example Usage\n\n### Basic\n\nFinds and downloads the latest `ubuntu:precise` image but does not check\nfor further updates of the image\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst ubuntu = new docker.RemoteImage(\"ubuntu\", {name: \"ubuntu:precise\"});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nubuntu = docker.RemoteImage(\"ubuntu\", name=\"ubuntu:precise\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ubuntu = new Docker.RemoteImage(\"ubuntu\", new()\n {\n Name = \"ubuntu:precise\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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 := docker.NewRemoteImage(ctx, \"ubuntu\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(\"ubuntu:precise\"),\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```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\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 ubuntu = new RemoteImage(\"ubuntu\", RemoteImageArgs.builder() \n .name(\"ubuntu:precise\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ubuntu:\n type: docker:RemoteImage\n properties:\n name: ubuntu:precise\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Dynamic updates\n\nTo be able to update an image dynamically when the `sha256` sum changes,\nyou need to use it in combination with `docker.RegistryImage` as follows:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst ubuntuRegistryImage = docker.getRegistryImage({\n name: \"ubuntu:precise\",\n});\nconst ubuntuRemoteImage = new docker.RemoteImage(\"ubuntuRemoteImage\", {\n name: ubuntuRegistryImage.then(ubuntuRegistryImage =\u003e ubuntuRegistryImage.name),\n pullTriggers: [ubuntuRegistryImage.then(ubuntuRegistryImage =\u003e ubuntuRegistryImage.sha256Digest)],\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nubuntu_registry_image = docker.get_registry_image(name=\"ubuntu:precise\")\nubuntu_remote_image = docker.RemoteImage(\"ubuntuRemoteImage\",\n name=ubuntu_registry_image.name,\n pull_triggers=[ubuntu_registry_image.sha256_digest])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ubuntuRegistryImage = Docker.GetRegistryImage.Invoke(new()\n {\n Name = \"ubuntu:precise\",\n });\n\n var ubuntuRemoteImage = new Docker.RemoteImage(\"ubuntuRemoteImage\", new()\n {\n Name = ubuntuRegistryImage.Apply(getRegistryImageResult =\u003e getRegistryImageResult.Name),\n PullTriggers = new[]\n {\n ubuntuRegistryImage.Apply(getRegistryImageResult =\u003e getRegistryImageResult.Sha256Digest),\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tubuntuRegistryImage, err := docker.LookupRegistryImage(ctx, \u0026docker.LookupRegistryImageArgs{\n\t\t\tName: \"ubuntu:precise\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = docker.NewRemoteImage(ctx, \"ubuntuRemoteImage\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(ubuntuRegistryImage.Name),\n\t\t\tPullTriggers: pulumi.StringArray{\n\t\t\t\tpulumi.String(ubuntuRegistryImage.Sha256Digest),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.DockerFunctions;\nimport com.pulumi.docker.inputs.GetRegistryImageArgs;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\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 final var ubuntuRegistryImage = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder()\n .name(\"ubuntu:precise\")\n .build());\n\n var ubuntuRemoteImage = new RemoteImage(\"ubuntuRemoteImage\", RemoteImageArgs.builder() \n .name(ubuntuRegistryImage.applyValue(getRegistryImageResult -\u003e getRegistryImageResult.name()))\n .pullTriggers(ubuntuRegistryImage.applyValue(getRegistryImageResult -\u003e getRegistryImageResult.sha256Digest()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ubuntuRemoteImage:\n type: docker:RemoteImage\n properties:\n name: ${ubuntuRegistryImage.name}\n pullTriggers:\n - ${ubuntuRegistryImage.sha256Digest}\nvariables:\n ubuntuRegistryImage:\n fn::invoke:\n Function: docker:getRegistryImage\n Arguments:\n name: ubuntu:precise\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Build\n\nYou can also use the resource to build an image.\nIn this case the image \"zoo\" and \"zoo:develop\" are built.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst zoo = new docker.RemoteImage(\"zoo\", {\n name: \"zoo\",\n build: {\n context: \".\",\n tags: [\"zoo:develop\"],\n buildArg: {\n foo: \"zoo\",\n },\n label: {\n author: \"zoo\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nzoo = docker.RemoteImage(\"zoo\",\n name=\"zoo\",\n build=docker.RemoteImageBuildArgs(\n context=\".\",\n tags=[\"zoo:develop\"],\n build_arg={\n \"foo\": \"zoo\",\n },\n label={\n \"author\": \"zoo\",\n },\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var zoo = new Docker.RemoteImage(\"zoo\", new()\n {\n Name = \"zoo\",\n Build = new Docker.Inputs.RemoteImageBuildArgs\n {\n Context = \".\",\n Tags = new[]\n {\n \"zoo:develop\",\n },\n BuildArg = \n {\n { \"foo\", \"zoo\" },\n },\n Label = \n {\n { \"author\", \"zoo\" },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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 := docker.NewRemoteImage(ctx, \"zoo\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(\"zoo\"),\n\t\t\tBuild: \u0026docker.RemoteImageBuildArgs{\n\t\t\t\tContext: pulumi.String(\".\"),\n\t\t\t\tTags: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"zoo:develop\"),\n\t\t\t\t},\n\t\t\t\tBuildArg: pulumi.StringMap{\n\t\t\t\t\t\"foo\": pulumi.String(\"zoo\"),\n\t\t\t\t},\n\t\t\t\tLabel: pulumi.StringMap{\n\t\t\t\t\t\"author\": pulumi.String(\"zoo\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\nimport com.pulumi.docker.inputs.RemoteImageBuildArgs;\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 zoo = new RemoteImage(\"zoo\", RemoteImageArgs.builder() \n .name(\"zoo\")\n .build(RemoteImageBuildArgs.builder()\n .context(\".\")\n .tags(\"zoo:develop\")\n .buildArg(Map.of(\"foo\", \"zoo\"))\n .label(Map.of(\"author\", \"zoo\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n zoo:\n type: docker:RemoteImage\n properties:\n name: zoo\n build:\n context: .\n tags:\n - zoo:develop\n buildArg:\n foo: zoo\n label:\n author: zoo\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nYou can use the `triggers` argument to specify when the image should be rebuild. This is for example helpful when you want to rebuild the docker image whenever the source code changes.\n\n", + "description": "\u003c!-- Bug: Type and Name are switched --\u003e\nPulls a Docker image to a given Docker host from a Docker Registry.\n 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.\n\n## Example Usage\n\n### Basic\n\nFinds and downloads the latest `ubuntu:precise` image but does not check\nfor further updates of the image\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst ubuntu = new docker.RemoteImage(\"ubuntu\", {name: \"ubuntu:precise\"});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nubuntu = docker.RemoteImage(\"ubuntu\", name=\"ubuntu:precise\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ubuntu = new Docker.RemoteImage(\"ubuntu\", new()\n {\n Name = \"ubuntu:precise\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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 := docker.NewRemoteImage(ctx, \"ubuntu\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(\"ubuntu:precise\"),\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```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\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 ubuntu = new RemoteImage(\"ubuntu\", RemoteImageArgs.builder() \n .name(\"ubuntu:precise\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ubuntu:\n type: docker:RemoteImage\n properties:\n name: ubuntu:precise\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Dynamic updates\n\nTo be able to update an image dynamically when the `sha256` sum changes,\nyou need to use it in combination with `docker.RegistryImage` as follows:\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst ubuntu = docker.getRegistryImage({\n name: \"ubuntu:precise\",\n});\nconst ubuntuRemoteImage = new docker.RemoteImage(\"ubuntu\", {\n name: ubuntu.then(ubuntu =\u003e ubuntu.name),\n pullTriggers: [ubuntu.then(ubuntu =\u003e ubuntu.sha256Digest)],\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nubuntu = docker.get_registry_image(name=\"ubuntu:precise\")\nubuntu_remote_image = docker.RemoteImage(\"ubuntu\",\n name=ubuntu.name,\n pull_triggers=[ubuntu.sha256_digest])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ubuntu = Docker.GetRegistryImage.Invoke(new()\n {\n Name = \"ubuntu:precise\",\n });\n\n var ubuntuRemoteImage = new Docker.RemoteImage(\"ubuntu\", new()\n {\n Name = ubuntu.Apply(getRegistryImageResult =\u003e getRegistryImageResult.Name),\n PullTriggers = new[]\n {\n ubuntu.Apply(getRegistryImageResult =\u003e getRegistryImageResult.Sha256Digest),\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tubuntu, err := docker.LookupRegistryImage(ctx, \u0026docker.LookupRegistryImageArgs{\n\t\t\tName: \"ubuntu:precise\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = docker.NewRemoteImage(ctx, \"ubuntu\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(ubuntu.Name),\n\t\t\tPullTriggers: pulumi.StringArray{\n\t\t\t\tpulumi.String(ubuntu.Sha256Digest),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.DockerFunctions;\nimport com.pulumi.docker.inputs.GetRegistryImageArgs;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\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 final var ubuntu = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder()\n .name(\"ubuntu:precise\")\n .build());\n\n var ubuntuRemoteImage = new RemoteImage(\"ubuntuRemoteImage\", RemoteImageArgs.builder() \n .name(ubuntu.applyValue(getRegistryImageResult -\u003e getRegistryImageResult.name()))\n .pullTriggers(ubuntu.applyValue(getRegistryImageResult -\u003e getRegistryImageResult.sha256Digest()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ubuntuRemoteImage:\n type: docker:RemoteImage\n name: ubuntu\n properties:\n name: ${ubuntu.name}\n pullTriggers:\n - ${ubuntu.sha256Digest}\nvariables:\n ubuntu:\n fn::invoke:\n Function: docker:getRegistryImage\n Arguments:\n name: ubuntu:precise\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n### Build\n\nYou can also use the resource to build an image.\nIn this case the image \"zoo\" and \"zoo:develop\" are built.\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst zoo = new docker.RemoteImage(\"zoo\", {\n name: \"zoo\",\n build: {\n context: \".\",\n tags: [\"zoo:develop\"],\n buildArg: {\n foo: \"zoo\",\n },\n label: {\n author: \"zoo\",\n },\n },\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nzoo = docker.RemoteImage(\"zoo\",\n name=\"zoo\",\n build=docker.RemoteImageBuildArgs(\n context=\".\",\n tags=[\"zoo:develop\"],\n build_arg={\n \"foo\": \"zoo\",\n },\n label={\n \"author\": \"zoo\",\n },\n ))\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var zoo = new Docker.RemoteImage(\"zoo\", new()\n {\n Name = \"zoo\",\n Build = new Docker.Inputs.RemoteImageBuildArgs\n {\n Context = \".\",\n Tags = new[]\n {\n \"zoo:develop\",\n },\n BuildArg = \n {\n { \"foo\", \"zoo\" },\n },\n Label = \n {\n { \"author\", \"zoo\" },\n },\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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 := docker.NewRemoteImage(ctx, \"zoo\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(\"zoo\"),\n\t\t\tBuild: \u0026docker.RemoteImageBuildArgs{\n\t\t\t\tContext: pulumi.String(\".\"),\n\t\t\t\tTags: pulumi.StringArray{\n\t\t\t\t\tpulumi.String(\"zoo:develop\"),\n\t\t\t\t},\n\t\t\t\tBuildArg: pulumi.StringMap{\n\t\t\t\t\t\"foo\": pulumi.String(\"zoo\"),\n\t\t\t\t},\n\t\t\t\tLabel: pulumi.StringMap{\n\t\t\t\t\t\"author\": pulumi.String(\"zoo\"),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\nimport com.pulumi.docker.inputs.RemoteImageBuildArgs;\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 zoo = new RemoteImage(\"zoo\", RemoteImageArgs.builder() \n .name(\"zoo\")\n .build(RemoteImageBuildArgs.builder()\n .context(\".\")\n .tags(\"zoo:develop\")\n .buildArg(Map.of(\"foo\", \"zoo\"))\n .label(Map.of(\"author\", \"zoo\"))\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n zoo:\n type: docker:RemoteImage\n properties:\n name: zoo\n build:\n context: .\n tags:\n - zoo:develop\n buildArg:\n foo: zoo\n label:\n author: zoo\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\nYou can use the `triggers` argument to specify when the image should be rebuild. This is for example helpful when you want to rebuild the docker image whenever the source code changes.\n\n", "properties": { "build": { "$ref": "#/types/docker:index/RemoteImageBuild:RemoteImageBuild", @@ -4188,7 +4188,7 @@ } }, "docker:index/volume:Volume": { - "description": "\u003c!-- Bug: Type and Name are switched --\u003e\nCreates and destroys a volume in Docker. This can be used alongside docker.Container to prepare volumes that can be shared across containers.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst sharedVolume = new docker.Volume(\"sharedVolume\", {});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nshared_volume = docker.Volume(\"sharedVolume\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var sharedVolume = new Docker.Volume(\"sharedVolume\");\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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 := docker.NewVolume(ctx, \"sharedVolume\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.Volume;\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 sharedVolume = new Volume(\"sharedVolume\");\n\n }\n}\n```\n```yaml\nresources:\n sharedVolume:\n type: docker:Volume\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n### Example\n\nAssuming you created a `volume` as follows\n\n#!/bin/bash\n\ndocker volume create\n\nprints the long ID\n\n524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d\n\nyou provide the definition for the resource as follows\n\nterraform\n\nresource \"docker_volume\" \"foo\" {\n\n name = \"524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d\"\n\n}\n\nthen the import command is as follows\n\n#!/bin/bash\n\n```sh\n$ pulumi import docker:index/volume:Volume foo 524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d\n```\n\n", + "description": "\u003c!-- Bug: Type and Name are switched --\u003e\nCreates and destroys a volume in Docker. This can be used alongside docker.Container to prepare volumes that can be shared across containers.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst sharedVolume = new docker.Volume(\"shared_volume\", {name: \"shared_volume\"});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nshared_volume = docker.Volume(\"shared_volume\", name=\"shared_volume\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var sharedVolume = new Docker.Volume(\"shared_volume\", new()\n {\n Name = \"shared_volume\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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 := docker.NewVolume(ctx, \"shared_volume\", \u0026docker.VolumeArgs{\n\t\t\tName: pulumi.String(\"shared_volume\"),\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```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.Volume;\nimport com.pulumi.docker.VolumeArgs;\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 sharedVolume = new Volume(\"sharedVolume\", VolumeArgs.builder() \n .name(\"shared_volume\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n sharedVolume:\n type: docker:Volume\n name: shared_volume\n properties:\n name: shared_volume\n```\n\u003c!--End PulumiCodeChooser --\u003e\n\n## Import\n\n### Example\n\nAssuming you created a `volume` as follows\n\n#!/bin/bash\n\ndocker volume create\n\nprints the long ID\n\n524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d\n\nyou provide the definition for the resource as follows\n\nterraform\n\nresource \"docker_volume\" \"foo\" {\n\n name = \"524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d\"\n\n}\n\nthen the import command is as follows\n\n#!/bin/bash\n\n```sh\n$ pulumi import docker:index/volume:Volume foo 524b0457aa2a87dd2b75c74c3e4e53f406974249e63ab3ed9bf21e5644f9dc7d\n```\n\n", "properties": { "driver": { "type": "string", @@ -4343,30 +4343,30 @@ "type": "boolean" }, "discardHeaders": { - "type": "boolean", - "description": "Discard headers that docker appends to each log entry\n" + "description": "Discard headers that docker appends to each log entry\n", + "type": "boolean" }, "follow": { "type": "boolean" }, "id": { - "type": "string", - "description": "The provider-assigned unique ID for this managed resource.\n" + "description": "The provider-assigned unique ID for this managed resource.\n", + "type": "string" }, "logsListStringEnabled": { - "type": "boolean", - "description": "If true populate computed value `logs_list_string`\n" + "description": "If true populate computed value `logs_list_string`\n", + "type": "boolean" }, "logsListStrings": { - "type": "array", + "description": "List of container logs, each element is a line.\n", "items": { "type": "string" }, - "description": "List of container logs, each element is a line.\n" + "type": "array" }, "name": { - "type": "string", - "description": "The name of the Docker Container\n" + "description": "The name of the Docker Container\n", + "type": "string" }, "showStderr": { "type": "boolean" @@ -4387,12 +4387,12 @@ "type": "string" } }, - "type": "object", "required": [ "logsListStrings", "name", "id" - ] + ], + "type": "object" } }, "docker:index/getNetwork:getNetwork": { @@ -4414,41 +4414,40 @@ "description": "A collection of values returned by getNetwork.\n", "properties": { "driver": { - "type": "string", - "description": "The driver of the Docker network. Possible values are `bridge`, `host`, `overlay`, `macvlan`. See [network docs](https://docs.docker.com/network/#network-drivers) for more details.\n" + "description": "The driver of the Docker network. Possible values are `bridge`, `host`, `overlay`, `macvlan`. See [network docs](https://docs.docker.com/network/#network-drivers) for more details.\n", + "type": "string" }, "id": { - "type": "string", - "description": "The ID of this resource.\n" + "description": "The ID of this resource.\n", + "type": "string" }, "internal": { - "type": "boolean", - "description": "If `true`, the network is internal.\n" + "description": "If `true`, the network is internal.\n", + "type": "boolean" }, "ipamConfigs": { - "type": "array", + "description": "The IPAM configuration options\n", "items": { "$ref": "#/types/docker:index/getNetworkIpamConfig:getNetworkIpamConfig" }, - "description": "The IPAM configuration options\n" + "type": "array" }, "name": { - "type": "string", - "description": "The name of the Docker network.\n" + "description": "The name of the Docker network.\n", + "type": "string" }, "options": { - "type": "object", "additionalProperties": { "$ref": "pulumi.json#/Any" }, - "description": "Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.\n" + "description": "Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.\n", + "type": "object" }, "scope": { - "type": "string", - "description": "Scope of the network. One of `swarm`, `global`, or `local`.\n" + "description": "Scope of the network. One of `swarm`, `global`, or `local`.\n", + "type": "string" } }, - "type": "object", "required": [ "driver", "id", @@ -4457,7 +4456,8 @@ "name", "options", "scope" - ] + ], + "type": "object" } }, "docker:index/getPlugin:getPlugin": { @@ -4480,49 +4480,49 @@ "description": "A collection of values returned by getPlugin.\n", "properties": { "alias": { - "type": "string", - "description": "The alias of the Docker plugin. If the tag is omitted, `:latest` is complemented to the attribute value.\n" + "description": "The alias of the Docker plugin. If the tag is omitted, `:latest` is complemented to the attribute value.\n", + "type": "string" }, "enabled": { - "type": "boolean", - "description": "If `true` the plugin is enabled\n" + "description": "If `true` the plugin is enabled\n", + "type": "boolean" }, "envs": { - "type": "array", + "description": "The environment variables in the form of `KEY=VALUE`, e.g. `DEBUG=0`\n", "items": { "type": "string" }, - "description": "The environment variables in the form of `KEY=VALUE`, e.g. `DEBUG=0`\n" + "type": "array" }, "grantAllPermissions": { - "type": "boolean", - "description": "If true, grant all permissions necessary to run the plugin\n" + "description": "If true, grant all permissions necessary to run the plugin\n", + "type": "boolean" }, "id": { - "type": "string", - "description": "The ID of the plugin, which has precedence over the `alias` of both are given\n" + "description": "The ID of the plugin, which has precedence over the `alias` of both are given\n", + "type": "string" }, "name": { - "type": "string", - "description": "The plugin name. If the tag is omitted, `:latest` is complemented to the attribute value.\n" + "description": "The plugin name. If the tag is omitted, `:latest` is complemented to the attribute value.\n", + "type": "string" }, "pluginReference": { - "type": "string", - "description": "The Docker Plugin Reference\n" + "description": "The Docker Plugin Reference\n", + "type": "string" } }, - "type": "object", "required": [ "enabled", "envs", "grantAllPermissions", "name", "pluginReference" - ] + ], + "type": "object" } }, "docker:index/getRegistryImage:getRegistryImage": { - "description": "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.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst ubuntuRegistryImage = docker.getRegistryImage({\n name: \"ubuntu:precise\",\n});\nconst ubuntuRemoteImage = new docker.RemoteImage(\"ubuntuRemoteImage\", {\n name: ubuntuRegistryImage.then(ubuntuRegistryImage =\u003e ubuntuRegistryImage.name),\n pullTriggers: [ubuntuRegistryImage.then(ubuntuRegistryImage =\u003e ubuntuRegistryImage.sha256Digest)],\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nubuntu_registry_image = docker.get_registry_image(name=\"ubuntu:precise\")\nubuntu_remote_image = docker.RemoteImage(\"ubuntuRemoteImage\",\n name=ubuntu_registry_image.name,\n pull_triggers=[ubuntu_registry_image.sha256_digest])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ubuntuRegistryImage = Docker.GetRegistryImage.Invoke(new()\n {\n Name = \"ubuntu:precise\",\n });\n\n var ubuntuRemoteImage = new Docker.RemoteImage(\"ubuntuRemoteImage\", new()\n {\n Name = ubuntuRegistryImage.Apply(getRegistryImageResult =\u003e getRegistryImageResult.Name),\n PullTriggers = new[]\n {\n ubuntuRegistryImage.Apply(getRegistryImageResult =\u003e getRegistryImageResult.Sha256Digest),\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tubuntuRegistryImage, err := docker.LookupRegistryImage(ctx, \u0026docker.LookupRegistryImageArgs{\n\t\t\tName: \"ubuntu:precise\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = docker.NewRemoteImage(ctx, \"ubuntuRemoteImage\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(ubuntuRegistryImage.Name),\n\t\t\tPullTriggers: pulumi.StringArray{\n\t\t\t\tpulumi.String(ubuntuRegistryImage.Sha256Digest),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.DockerFunctions;\nimport com.pulumi.docker.inputs.GetRegistryImageArgs;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\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 final var ubuntuRegistryImage = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder()\n .name(\"ubuntu:precise\")\n .build());\n\n var ubuntuRemoteImage = new RemoteImage(\"ubuntuRemoteImage\", RemoteImageArgs.builder() \n .name(ubuntuRegistryImage.applyValue(getRegistryImageResult -\u003e getRegistryImageResult.name()))\n .pullTriggers(ubuntuRegistryImage.applyValue(getRegistryImageResult -\u003e getRegistryImageResult.sha256Digest()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ubuntuRemoteImage:\n type: docker:RemoteImage\n properties:\n name: ${ubuntuRegistryImage.name}\n pullTriggers:\n - ${ubuntuRegistryImage.sha256Digest}\nvariables:\n ubuntuRegistryImage:\n fn::invoke:\n Function: docker:getRegistryImage\n Arguments:\n name: ubuntu:precise\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "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.\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst ubuntu = docker.getRegistryImage({\n name: \"ubuntu:precise\",\n});\nconst ubuntuRemoteImage = new docker.RemoteImage(\"ubuntu\", {\n name: ubuntu.then(ubuntu =\u003e ubuntu.name),\n pullTriggers: [ubuntu.then(ubuntu =\u003e ubuntu.sha256Digest)],\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nubuntu = docker.get_registry_image(name=\"ubuntu:precise\")\nubuntu_remote_image = docker.RemoteImage(\"ubuntu\",\n name=ubuntu.name,\n pull_triggers=[ubuntu.sha256_digest])\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var ubuntu = Docker.GetRegistryImage.Invoke(new()\n {\n Name = \"ubuntu:precise\",\n });\n\n var ubuntuRemoteImage = new Docker.RemoteImage(\"ubuntu\", new()\n {\n Name = ubuntu.Apply(getRegistryImageResult =\u003e getRegistryImageResult.Name),\n PullTriggers = new[]\n {\n ubuntu.Apply(getRegistryImageResult =\u003e getRegistryImageResult.Sha256Digest),\n },\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tubuntu, err := docker.LookupRegistryImage(ctx, \u0026docker.LookupRegistryImageArgs{\n\t\t\tName: \"ubuntu:precise\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = docker.NewRemoteImage(ctx, \"ubuntu\", \u0026docker.RemoteImageArgs{\n\t\t\tName: pulumi.String(ubuntu.Name),\n\t\t\tPullTriggers: pulumi.StringArray{\n\t\t\t\tpulumi.String(ubuntu.Sha256Digest),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.DockerFunctions;\nimport com.pulumi.docker.inputs.GetRegistryImageArgs;\nimport com.pulumi.docker.RemoteImage;\nimport com.pulumi.docker.RemoteImageArgs;\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 final var ubuntu = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder()\n .name(\"ubuntu:precise\")\n .build());\n\n var ubuntuRemoteImage = new RemoteImage(\"ubuntuRemoteImage\", RemoteImageArgs.builder() \n .name(ubuntu.applyValue(getRegistryImageResult -\u003e getRegistryImageResult.name()))\n .pullTriggers(ubuntu.applyValue(getRegistryImageResult -\u003e getRegistryImageResult.sha256Digest()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n ubuntuRemoteImage:\n type: docker:RemoteImage\n name: ubuntu\n properties:\n name: ${ubuntu.name}\n pullTriggers:\n - ${ubuntu.sha256Digest}\nvariables:\n ubuntu:\n fn::invoke:\n Function: docker:getRegistryImage\n Arguments:\n name: ubuntu:precise\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getRegistryImage.\n", "properties": { @@ -4544,32 +4544,32 @@ "description": "A collection of values returned by getRegistryImage.\n", "properties": { "id": { - "type": "string", - "description": "The provider-assigned unique ID for this managed resource.\n" + "description": "The provider-assigned unique ID for this managed resource.\n", + "type": "string" }, "insecureSkipVerify": { - "type": "boolean", - "description": "If `true`, the verification of TLS certificates of the server/registry is disabled. Defaults to `false`\n" + "description": "If `true`, the verification of TLS certificates of the server/registry is disabled. Defaults to `false`\n", + "type": "boolean" }, "name": { - "type": "string", - "description": "The name of the Docker image, including any tags. e.g. `alpine:latest`\n" + "description": "The name of the Docker image, including any tags. e.g. `alpine:latest`\n", + "type": "string" }, "sha256Digest": { - "type": "string", - "description": "The content digest of the image, as stored in the registry.\n" + "description": "The content digest of the image, as stored in the registry.\n", + "type": "string" } }, - "type": "object", "required": [ "name", "sha256Digest", "id" - ] + ], + "type": "object" } }, "docker:index/getRemoteImage:getRemoteImage": { - "description": "`docker.RemoteImage` provides details about a specific Docker Image which needs to be present on the Docker Host\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\nconst latest = docker.getRemoteImage({\n name: \"nginx\",\n});\nconst specific = docker.getRemoteImage({\n name: \"nginx:1.17.6\",\n});\nconst digest = docker.getRemoteImage({\n name: \"nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n});\nconst tagAndDigest = docker.getRemoteImage({\n name: \"nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\nlatest = docker.get_remote_image(name=\"nginx\")\nspecific = docker.get_remote_image(name=\"nginx:1.17.6\")\ndigest = docker.get_remote_image(name=\"nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\")\ntag_and_digest = docker.get_remote_image(name=\"nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var latest = Docker.GetRemoteImage.Invoke(new()\n {\n Name = \"nginx\",\n });\n\n var specific = Docker.GetRemoteImage.Invoke(new()\n {\n Name = \"nginx:1.17.6\",\n });\n\n var digest = Docker.GetRemoteImage.Invoke(new()\n {\n Name = \"nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n });\n\n var tagAndDigest = Docker.GetRemoteImage.Invoke(new()\n {\n Name = \"nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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 := docker.LookupRemoteImage(ctx, \u0026docker.LookupRemoteImageArgs{\n\t\t\tName: \"nginx\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = docker.LookupRemoteImage(ctx, \u0026docker.LookupRemoteImageArgs{\n\t\t\tName: \"nginx:1.17.6\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = docker.LookupRemoteImage(ctx, \u0026docker.LookupRemoteImageArgs{\n\t\t\tName: \"nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = docker.LookupRemoteImage(ctx, \u0026docker.LookupRemoteImageArgs{\n\t\t\tName: \"nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.DockerFunctions;\nimport com.pulumi.docker.inputs.GetRemoteImageArgs;\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 final var latest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()\n .name(\"nginx\")\n .build());\n\n final var specific = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()\n .name(\"nginx:1.17.6\")\n .build());\n\n final var digest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()\n .name(\"nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\")\n .build());\n\n final var tagAndDigest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()\n .name(\"nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n latest:\n fn::invoke:\n Function: docker:getRemoteImage\n Arguments:\n name: nginx\n specific:\n fn::invoke:\n Function: docker:getRemoteImage\n Arguments:\n name: nginx:1.17.6\n digest:\n fn::invoke:\n Function: docker:getRemoteImage\n Arguments:\n name: nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\n tagAndDigest:\n fn::invoke:\n Function: docker:getRemoteImage\n Arguments:\n name: nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", + "description": "`docker.RemoteImage` provides details about a specific Docker Image which needs to be present on the Docker Host\n\n## Example Usage\n\n\u003c!--Start PulumiCodeChooser --\u003e\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as docker from \"@pulumi/docker\";\n\n// uses the 'latest' tag\nconst latest = docker.getRemoteImage({\n name: \"nginx\",\n});\n// uses a specific tag\nconst specific = docker.getRemoteImage({\n name: \"nginx:1.17.6\",\n});\n// use the image digest\nconst digest = docker.getRemoteImage({\n name: \"nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n});\n// uses the tag and the image digest\nconst tagAndDigest = docker.getRemoteImage({\n name: \"nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n});\n```\n```python\nimport pulumi\nimport pulumi_docker as docker\n\n# uses the 'latest' tag\nlatest = docker.get_remote_image(name=\"nginx\")\n# uses a specific tag\nspecific = docker.get_remote_image(name=\"nginx:1.17.6\")\n# use the image digest\ndigest = docker.get_remote_image(name=\"nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\")\n# uses the tag and the image digest\ntag_and_digest = docker.get_remote_image(name=\"nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\")\n```\n```csharp\nusing System.Collections.Generic;\nusing System.Linq;\nusing Pulumi;\nusing Docker = Pulumi.Docker;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // uses the 'latest' tag\n var latest = Docker.GetRemoteImage.Invoke(new()\n {\n Name = \"nginx\",\n });\n\n // uses a specific tag\n var specific = Docker.GetRemoteImage.Invoke(new()\n {\n Name = \"nginx:1.17.6\",\n });\n\n // use the image digest\n var digest = Docker.GetRemoteImage.Invoke(new()\n {\n Name = \"nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n });\n\n // uses the tag and the image digest\n var tagAndDigest = Docker.GetRemoteImage.Invoke(new()\n {\n Name = \"nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-docker/sdk/v4/go/docker\"\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// uses the 'latest' tag\n\t\t_, err := docker.LookupRemoteImage(ctx, \u0026docker.LookupRemoteImageArgs{\n\t\t\tName: \"nginx\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// uses a specific tag\n\t\t_, err = docker.LookupRemoteImage(ctx, \u0026docker.LookupRemoteImageArgs{\n\t\t\tName: \"nginx:1.17.6\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// use the image digest\n\t\t_, err = docker.LookupRemoteImage(ctx, \u0026docker.LookupRemoteImageArgs{\n\t\t\tName: \"nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// uses the tag and the image digest\n\t\t_, err = docker.LookupRemoteImage(ctx, \u0026docker.LookupRemoteImageArgs{\n\t\t\tName: \"nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\",\n\t\t}, nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.docker.DockerFunctions;\nimport com.pulumi.docker.inputs.GetRemoteImageArgs;\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 // uses the 'latest' tag\n final var latest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()\n .name(\"nginx\")\n .build());\n\n // uses a specific tag\n final var specific = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()\n .name(\"nginx:1.17.6\")\n .build());\n\n // use the image digest\n final var digest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()\n .name(\"nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\")\n .build());\n\n // uses the tag and the image digest\n final var tagAndDigest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder()\n .name(\"nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\")\n .build());\n\n }\n}\n```\n```yaml\nvariables:\n # uses the 'latest' tag\n latest:\n fn::invoke:\n Function: docker:getRemoteImage\n Arguments:\n name: nginx\n # uses a specific tag\n specific:\n fn::invoke:\n Function: docker:getRemoteImage\n Arguments:\n name: nginx:1.17.6\n # use the image digest\n digest:\n fn::invoke:\n Function: docker:getRemoteImage\n Arguments:\n name: nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\n # uses the tag and the image digest\n tagAndDigest:\n fn::invoke:\n Function: docker:getRemoteImage\n Arguments:\n name: nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2\n```\n\u003c!--End PulumiCodeChooser --\u003e\n", "inputs": { "description": "A collection of arguments for invoking getRemoteImage.\n", "properties": { @@ -4587,24 +4587,24 @@ "description": "A collection of values returned by getRemoteImage.\n", "properties": { "id": { - "type": "string", - "description": "The provider-assigned unique ID for this managed resource.\n" + "description": "The provider-assigned unique ID for this managed resource.\n", + "type": "string" }, "name": { - "type": "string", - "description": "The name of the Docker image, including any tags or SHA256 repo digests.\n" + "description": "The name of the Docker image, including any tags or SHA256 repo digests.\n", + "type": "string" }, "repoDigest": { - "type": "string", - "description": "The image sha256 digest in the form of `repo[:tag]@sha256:\u003chash\u003e`. It may be empty in the edge case where the local image was pulled from a repo, tagged locally, and then referred to in the data source by that local name/tag.\n" + "description": "The image sha256 digest in the form of `repo[:tag]@sha256:\u003chash\u003e`. It may be empty in the edge case where the local image was pulled from a repo, tagged locally, and then referred to in the data source by that local name/tag.\n", + "type": "string" } }, - "type": "object", "required": [ "name", "repoDigest", "id" - ] + ], + "type": "object" } } } diff --git a/scripts/upstream.sh b/scripts/upstream.sh index eddf7df1..7d35e3b6 100755 --- a/scripts/upstream.sh +++ b/scripts/upstream.sh @@ -176,7 +176,7 @@ end_rebase() { rm patches/*.patch cd upstream - git format-patch local -o ../patches --zero-commit --no-signature --no-stat + git format-patch local -o ../patches --zero-commit --no-signature --no-stat --no-numbered cd .. rm rebase-in-progress apply "$1" diff --git a/sdk/dotnet/Container.cs b/sdk/dotnet/Container.cs index b08f10e1..ae07a181 100644 --- a/sdk/dotnet/Container.cs +++ b/sdk/dotnet/Container.cs @@ -25,14 +25,15 @@ namespace Pulumi.Docker /// return await Deployment.RunAsync(() => /// { /// // Find the latest Ubuntu precise image. - /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntuRemoteImage", new() + /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntu", new() /// { /// Name = "ubuntu:precise", /// }); /// /// // Start a container - /// var ubuntuContainer = new Docker.Container("ubuntuContainer", new() + /// var ubuntu = new Docker.Container("ubuntu", new() /// { + /// Name = "foo", /// Image = ubuntuRemoteImage.ImageId, /// }); /// diff --git a/sdk/dotnet/GetRegistryImage.cs b/sdk/dotnet/GetRegistryImage.cs index df8f70cb..a619c614 100644 --- a/sdk/dotnet/GetRegistryImage.cs +++ b/sdk/dotnet/GetRegistryImage.cs @@ -25,17 +25,17 @@ public static class GetRegistryImage /// /// return await Deployment.RunAsync(() => /// { - /// var ubuntuRegistryImage = Docker.GetRegistryImage.Invoke(new() + /// var ubuntu = Docker.GetRegistryImage.Invoke(new() /// { /// Name = "ubuntu:precise", /// }); /// - /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntuRemoteImage", new() + /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntu", new() /// { - /// Name = ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Name), + /// Name = ubuntu.Apply(getRegistryImageResult => getRegistryImageResult.Name), /// PullTriggers = new[] /// { - /// ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Sha256Digest), + /// ubuntu.Apply(getRegistryImageResult => getRegistryImageResult.Sha256Digest), /// }, /// }); /// @@ -60,17 +60,17 @@ public static Task InvokeAsync(GetRegistryImageArgs args /// /// return await Deployment.RunAsync(() => /// { - /// var ubuntuRegistryImage = Docker.GetRegistryImage.Invoke(new() + /// var ubuntu = Docker.GetRegistryImage.Invoke(new() /// { /// Name = "ubuntu:precise", /// }); /// - /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntuRemoteImage", new() + /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntu", new() /// { - /// Name = ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Name), + /// Name = ubuntu.Apply(getRegistryImageResult => getRegistryImageResult.Name), /// PullTriggers = new[] /// { - /// ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Sha256Digest), + /// ubuntu.Apply(getRegistryImageResult => getRegistryImageResult.Sha256Digest), /// }, /// }); /// diff --git a/sdk/dotnet/GetRemoteImage.cs b/sdk/dotnet/GetRemoteImage.cs index 453fb0d3..6cd1c583 100644 --- a/sdk/dotnet/GetRemoteImage.cs +++ b/sdk/dotnet/GetRemoteImage.cs @@ -25,21 +25,25 @@ public static class GetRemoteImage /// /// return await Deployment.RunAsync(() => /// { + /// // uses the 'latest' tag /// var latest = Docker.GetRemoteImage.Invoke(new() /// { /// Name = "nginx", /// }); /// + /// // uses a specific tag /// var specific = Docker.GetRemoteImage.Invoke(new() /// { /// Name = "nginx:1.17.6", /// }); /// + /// // use the image digest /// var digest = Docker.GetRemoteImage.Invoke(new() /// { /// Name = "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2", /// }); /// + /// // uses the tag and the image digest /// var tagAndDigest = Docker.GetRemoteImage.Invoke(new() /// { /// Name = "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2", @@ -66,21 +70,25 @@ public static Task InvokeAsync(GetRemoteImageArgs args, In /// /// return await Deployment.RunAsync(() => /// { + /// // uses the 'latest' tag /// var latest = Docker.GetRemoteImage.Invoke(new() /// { /// Name = "nginx", /// }); /// + /// // uses a specific tag /// var specific = Docker.GetRemoteImage.Invoke(new() /// { /// Name = "nginx:1.17.6", /// }); /// + /// // use the image digest /// var digest = Docker.GetRemoteImage.Invoke(new() /// { /// Name = "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2", /// }); /// + /// // uses the tag and the image digest /// var tagAndDigest = Docker.GetRemoteImage.Invoke(new() /// { /// Name = "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2", diff --git a/sdk/dotnet/Network.cs b/sdk/dotnet/Network.cs index 2aa28d1d..69cf5433 100644 --- a/sdk/dotnet/Network.cs +++ b/sdk/dotnet/Network.cs @@ -24,7 +24,10 @@ namespace Pulumi.Docker /// /// return await Deployment.RunAsync(() => /// { - /// var privateNetwork = new Docker.Network("privateNetwork"); + /// var privateNetwork = new Docker.Network("private_network", new() + /// { + /// Name = "my_network", + /// }); /// /// }); /// ``` diff --git a/sdk/dotnet/Plugin.cs b/sdk/dotnet/Plugin.cs index 17b77d35..f03e79b1 100644 --- a/sdk/dotnet/Plugin.cs +++ b/sdk/dotnet/Plugin.cs @@ -13,35 +13,6 @@ namespace Pulumi.Docker /// <!-- Bug: Type and Name are switched --> /// Manages the lifecycle of a Docker plugin. /// - /// ## Example Usage - /// - /// <!--Start PulumiCodeChooser --> - /// ```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, - /// }); - /// - /// }); - /// ``` - /// <!--End PulumiCodeChooser --> - /// /// ## Import /// /// #!/bin/bash diff --git a/sdk/dotnet/RegistryImage.cs b/sdk/dotnet/RegistryImage.cs index 1ac8939c..974f61f8 100644 --- a/sdk/dotnet/RegistryImage.cs +++ b/sdk/dotnet/RegistryImage.cs @@ -12,37 +12,6 @@ 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: - /// - /// <!--Start PulumiCodeChooser --> - /// ```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", - /// }, - /// }); - /// - /// }); - /// ``` - /// <!--End PulumiCodeChooser --> /// [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 57ccee51..cf035902 100644 --- a/sdk/dotnet/RemoteImage.cs +++ b/sdk/dotnet/RemoteImage.cs @@ -53,17 +53,17 @@ namespace Pulumi.Docker /// /// return await Deployment.RunAsync(() => /// { - /// var ubuntuRegistryImage = Docker.GetRegistryImage.Invoke(new() + /// var ubuntu = Docker.GetRegistryImage.Invoke(new() /// { /// Name = "ubuntu:precise", /// }); /// - /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntuRemoteImage", new() + /// var ubuntuRemoteImage = new Docker.RemoteImage("ubuntu", new() /// { - /// Name = ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Name), + /// Name = ubuntu.Apply(getRegistryImageResult => getRegistryImageResult.Name), /// PullTriggers = new[] /// { - /// ubuntuRegistryImage.Apply(getRegistryImageResult => getRegistryImageResult.Sha256Digest), + /// ubuntu.Apply(getRegistryImageResult => getRegistryImageResult.Sha256Digest), /// }, /// }); /// diff --git a/sdk/dotnet/Volume.cs b/sdk/dotnet/Volume.cs index 0ae1c883..78964829 100644 --- a/sdk/dotnet/Volume.cs +++ b/sdk/dotnet/Volume.cs @@ -24,7 +24,10 @@ namespace Pulumi.Docker /// /// return await Deployment.RunAsync(() => /// { - /// var sharedVolume = new Docker.Volume("sharedVolume"); + /// var sharedVolume = new Docker.Volume("shared_volume", new() + /// { + /// Name = "shared_volume", + /// }); /// /// }); /// ``` diff --git a/sdk/go/docker/container.go b/sdk/go/docker/container.go index dacee73b..e02fd531 100644 --- a/sdk/go/docker/container.go +++ b/sdk/go/docker/container.go @@ -31,14 +31,15 @@ import ( // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // // Find the latest Ubuntu precise image. -// ubuntuRemoteImage, err := docker.NewRemoteImage(ctx, "ubuntuRemoteImage", &docker.RemoteImageArgs{ +// ubuntuRemoteImage, err := docker.NewRemoteImage(ctx, "ubuntu", &docker.RemoteImageArgs{ // Name: pulumi.String("ubuntu:precise"), // }) // if err != nil { // return err // } // // Start a container -// _, err = docker.NewContainer(ctx, "ubuntuContainer", &docker.ContainerArgs{ +// _, err = docker.NewContainer(ctx, "ubuntu", &docker.ContainerArgs{ +// Name: pulumi.String("foo"), // Image: ubuntuRemoteImage.ImageId, // }) // if err != nil { diff --git a/sdk/go/docker/getRegistryImage.go b/sdk/go/docker/getRegistryImage.go index 218dd1d6..327ef724 100644 --- a/sdk/go/docker/getRegistryImage.go +++ b/sdk/go/docker/getRegistryImage.go @@ -28,16 +28,16 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// ubuntuRegistryImage, err := docker.LookupRegistryImage(ctx, &docker.LookupRegistryImageArgs{ +// ubuntu, 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), +// _, err = docker.NewRemoteImage(ctx, "ubuntu", &docker.RemoteImageArgs{ +// Name: pulumi.String(ubuntu.Name), // PullTriggers: pulumi.StringArray{ -// pulumi.String(ubuntuRegistryImage.Sha256Digest), +// pulumi.String(ubuntu.Sha256Digest), // }, // }) // if err != nil { diff --git a/sdk/go/docker/getRemoteImage.go b/sdk/go/docker/getRemoteImage.go index 1728cb4c..e75fa830 100644 --- a/sdk/go/docker/getRemoteImage.go +++ b/sdk/go/docker/getRemoteImage.go @@ -28,24 +28,28 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { +// // uses the 'latest' tag // _, err := docker.LookupRemoteImage(ctx, &docker.LookupRemoteImageArgs{ // Name: "nginx", // }, nil) // if err != nil { // return err // } +// // uses a specific tag // _, err = docker.LookupRemoteImage(ctx, &docker.LookupRemoteImageArgs{ // Name: "nginx:1.17.6", // }, nil) // if err != nil { // return err // } +// // use the image digest // _, err = docker.LookupRemoteImage(ctx, &docker.LookupRemoteImageArgs{ // Name: "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2", // }, nil) // if err != nil { // return err // } +// // uses the tag and the image digest // _, err = docker.LookupRemoteImage(ctx, &docker.LookupRemoteImageArgs{ // Name: "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2", // }, nil) diff --git a/sdk/go/docker/network.go b/sdk/go/docker/network.go index 1b5cd8e1..9b224c82 100644 --- a/sdk/go/docker/network.go +++ b/sdk/go/docker/network.go @@ -29,7 +29,9 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := docker.NewNetwork(ctx, "privateNetwork", nil) +// _, err := docker.NewNetwork(ctx, "private_network", &docker.NetworkArgs{ +// Name: pulumi.String("my_network"), +// }) // if err != nil { // return err // } diff --git a/sdk/go/docker/plugin.go b/sdk/go/docker/plugin.go index c7c52cfc..c9b3cb8b 100644 --- a/sdk/go/docker/plugin.go +++ b/sdk/go/docker/plugin.go @@ -14,42 +14,6 @@ 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 17e63204..a59c1a62 100644 --- a/sdk/go/docker/registryImage.go +++ b/sdk/go/docker/registryImage.go @@ -13,47 +13,6 @@ 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 44950c1e..7105c8bd 100644 --- a/sdk/go/docker/remoteImage.go +++ b/sdk/go/docker/remoteImage.go @@ -68,16 +68,16 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// ubuntuRegistryImage, err := docker.LookupRegistryImage(ctx, &docker.LookupRegistryImageArgs{ +// ubuntu, 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), +// _, err = docker.NewRemoteImage(ctx, "ubuntu", &docker.RemoteImageArgs{ +// Name: pulumi.String(ubuntu.Name), // PullTriggers: pulumi.StringArray{ -// pulumi.String(ubuntuRegistryImage.Sha256Digest), +// pulumi.String(ubuntu.Sha256Digest), // }, // }) // if err != nil { diff --git a/sdk/go/docker/volume.go b/sdk/go/docker/volume.go index 5a4d6edc..a471585f 100644 --- a/sdk/go/docker/volume.go +++ b/sdk/go/docker/volume.go @@ -29,7 +29,9 @@ import ( // // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { -// _, err := docker.NewVolume(ctx, "sharedVolume", nil) +// _, err := docker.NewVolume(ctx, "shared_volume", &docker.VolumeArgs{ +// Name: pulumi.String("shared_volume"), +// }) // if err != nil { // return err // } diff --git a/sdk/java/src/main/java/com/pulumi/docker/Container.java b/sdk/java/src/main/java/com/pulumi/docker/Container.java index 4e3fb23d..0932d08b 100644 --- a/sdk/java/src/main/java/com/pulumi/docker/Container.java +++ b/sdk/java/src/main/java/com/pulumi/docker/Container.java @@ -67,7 +67,8 @@ * .build()); * * // Start a container - * var ubuntuContainer = new Container("ubuntuContainer", ContainerArgs.builder() + * var ubuntu = new Container("ubuntu", ContainerArgs.builder() + * .name("foo") * .image(ubuntuRemoteImage.imageId()) * .build()); * diff --git a/sdk/java/src/main/java/com/pulumi/docker/DockerFunctions.java b/sdk/java/src/main/java/com/pulumi/docker/DockerFunctions.java index c5204851..0cfa5fd5 100644 --- a/sdk/java/src/main/java/com/pulumi/docker/DockerFunctions.java +++ b/sdk/java/src/main/java/com/pulumi/docker/DockerFunctions.java @@ -357,13 +357,13 @@ public static CompletableFuture getPluginPlain(GetPluginPlainAr * } * * public static void stack(Context ctx) { - * final var ubuntuRegistryImage = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder() + * final var ubuntu = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder() * .name("ubuntu:precise") * .build()); * * var ubuntuRemoteImage = new RemoteImage("ubuntuRemoteImage", RemoteImageArgs.builder() - * .name(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.name())) - * .pullTriggers(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.sha256Digest())) + * .name(ubuntu.applyValue(getRegistryImageResult -> getRegistryImageResult.name())) + * .pullTriggers(ubuntu.applyValue(getRegistryImageResult -> getRegistryImageResult.sha256Digest())) * .build()); * * } @@ -404,13 +404,13 @@ public static Output getRegistryImage(GetRegistryImageAr * } * * public static void stack(Context ctx) { - * final var ubuntuRegistryImage = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder() + * final var ubuntu = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder() * .name("ubuntu:precise") * .build()); * * var ubuntuRemoteImage = new RemoteImage("ubuntuRemoteImage", RemoteImageArgs.builder() - * .name(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.name())) - * .pullTriggers(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.sha256Digest())) + * .name(ubuntu.applyValue(getRegistryImageResult -> getRegistryImageResult.name())) + * .pullTriggers(ubuntu.applyValue(getRegistryImageResult -> getRegistryImageResult.sha256Digest())) * .build()); * * } @@ -451,13 +451,13 @@ public static CompletableFuture getRegistryImagePlain(Ge * } * * public static void stack(Context ctx) { - * final var ubuntuRegistryImage = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder() + * final var ubuntu = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder() * .name("ubuntu:precise") * .build()); * * var ubuntuRemoteImage = new RemoteImage("ubuntuRemoteImage", RemoteImageArgs.builder() - * .name(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.name())) - * .pullTriggers(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.sha256Digest())) + * .name(ubuntu.applyValue(getRegistryImageResult -> getRegistryImageResult.name())) + * .pullTriggers(ubuntu.applyValue(getRegistryImageResult -> getRegistryImageResult.sha256Digest())) * .build()); * * } @@ -498,13 +498,13 @@ public static Output getRegistryImage(GetRegistryImageAr * } * * public static void stack(Context ctx) { - * final var ubuntuRegistryImage = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder() + * final var ubuntu = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder() * .name("ubuntu:precise") * .build()); * * var ubuntuRemoteImage = new RemoteImage("ubuntuRemoteImage", RemoteImageArgs.builder() - * .name(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.name())) - * .pullTriggers(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.sha256Digest())) + * .name(ubuntu.applyValue(getRegistryImageResult -> getRegistryImageResult.name())) + * .pullTriggers(ubuntu.applyValue(getRegistryImageResult -> getRegistryImageResult.sha256Digest())) * .build()); * * } @@ -543,18 +543,22 @@ public static CompletableFuture getRegistryImagePlain(Ge * } * * public static void stack(Context ctx) { + * // uses the 'latest' tag * final var latest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx") * .build()); * + * // uses a specific tag * final var specific = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx:1.17.6") * .build()); * + * // use the image digest * final var digest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") * .build()); * + * // uses the tag and the image digest * final var tagAndDigest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") * .build()); @@ -595,18 +599,22 @@ public static Output getRemoteImage(GetRemoteImageArgs arg * } * * public static void stack(Context ctx) { + * // uses the 'latest' tag * final var latest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx") * .build()); * + * // uses a specific tag * final var specific = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx:1.17.6") * .build()); * + * // use the image digest * final var digest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") * .build()); * + * // uses the tag and the image digest * final var tagAndDigest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") * .build()); @@ -647,18 +655,22 @@ public static CompletableFuture getRemoteImagePlain(GetRem * } * * public static void stack(Context ctx) { + * // uses the 'latest' tag * final var latest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx") * .build()); * + * // uses a specific tag * final var specific = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx:1.17.6") * .build()); * + * // use the image digest * final var digest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") * .build()); * + * // uses the tag and the image digest * final var tagAndDigest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") * .build()); @@ -699,18 +711,22 @@ public static Output getRemoteImage(GetRemoteImageArgs arg * } * * public static void stack(Context ctx) { + * // uses the 'latest' tag * final var latest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx") * .build()); * + * // uses a specific tag * final var specific = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx:1.17.6") * .build()); * + * // use the image digest * final var digest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") * .build()); * + * // uses the tag and the image digest * final var tagAndDigest = DockerFunctions.getRemoteImage(GetRemoteImageArgs.builder() * .name("nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") * .build()); diff --git a/sdk/java/src/main/java/com/pulumi/docker/Network.java b/sdk/java/src/main/java/com/pulumi/docker/Network.java index 70c46e82..56cd421d 100644 --- a/sdk/java/src/main/java/com/pulumi/docker/Network.java +++ b/sdk/java/src/main/java/com/pulumi/docker/Network.java @@ -34,6 +34,7 @@ * import com.pulumi.Pulumi; * import com.pulumi.core.Output; * import com.pulumi.docker.Network; + * import com.pulumi.docker.NetworkArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -47,7 +48,9 @@ * } * * public static void stack(Context ctx) { - * var privateNetwork = new Network("privateNetwork"); + * var privateNetwork = new Network("privateNetwork", NetworkArgs.builder() + * .name("my_network") + * .build()); * * } * } diff --git a/sdk/java/src/main/java/com/pulumi/docker/Plugin.java b/sdk/java/src/main/java/com/pulumi/docker/Plugin.java index 43cb363f..69efb3ef 100644 --- a/sdk/java/src/main/java/com/pulumi/docker/Plugin.java +++ b/sdk/java/src/main/java/com/pulumi/docker/Plugin.java @@ -22,45 +22,6 @@ * <!-- Bug: Type and Name are switched --> * Manages the lifecycle of a Docker plugin. * - * ## Example Usage - * - * <!--Start PulumiCodeChooser --> - * ```java - * package generated_program; - * - * import com.pulumi.Context; - * import com.pulumi.Pulumi; - * import com.pulumi.core.Output; - * import com.pulumi.docker.Plugin; - * import com.pulumi.docker.PluginArgs; - * 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 sample_volume_plugin = new Plugin("sample-volume-plugin", PluginArgs.builder() - * .alias("sample-volume-plugin") - * .enableTimeout(60) - * .enabled(false) - * .envs("DEBUG=1") - * .forceDestroy(true) - * .forceDisable(true) - * .grantAllPermissions(true) - * .build()); - * - * } - * } - * ``` - * <!--End PulumiCodeChooser --> - * * ## Import * * #!/bin/bash diff --git a/sdk/java/src/main/java/com/pulumi/docker/RegistryImage.java b/sdk/java/src/main/java/com/pulumi/docker/RegistryImage.java index 0b75c71f..0b507034 100644 --- a/sdk/java/src/main/java/com/pulumi/docker/RegistryImage.java +++ b/sdk/java/src/main/java/com/pulumi/docker/RegistryImage.java @@ -21,51 +21,6 @@ * <!-- 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: - * - * <!--Start PulumiCodeChooser --> - * ```java - * package generated_program; - * - * import com.pulumi.Context; - * import com.pulumi.Pulumi; - * import com.pulumi.core.Output; - * import com.pulumi.docker.RegistryImage; - * import com.pulumi.docker.RegistryImageArgs; - * import com.pulumi.docker.RemoteImage; - * import com.pulumi.docker.RemoteImageArgs; - * import com.pulumi.docker.inputs.RemoteImageBuildArgs; - * 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 helloworld = new RegistryImage("helloworld", RegistryImageArgs.builder() - * .keepRemotely(true) - * .build()); - * - * var image = new RemoteImage("image", RemoteImageArgs.builder() - * .name("registry.com/somename:1.0") - * .build(RemoteImageBuildArgs.builder() - * .context(String.format("%s/absolutePathToContextFolder", path.cwd())) - * .build()) - * .build()); - * - * } - * } - * ``` - * <!--End PulumiCodeChooser --> - * */ @ResourceType(type="docker:index/registryImage:RegistryImage") public class RegistryImage extends com.pulumi.resources.CustomResource { diff --git a/sdk/java/src/main/java/com/pulumi/docker/RemoteImage.java b/sdk/java/src/main/java/com/pulumi/docker/RemoteImage.java index 1b159a61..5ba2d1f7 100644 --- a/sdk/java/src/main/java/com/pulumi/docker/RemoteImage.java +++ b/sdk/java/src/main/java/com/pulumi/docker/RemoteImage.java @@ -91,13 +91,13 @@ * } * * public static void stack(Context ctx) { - * final var ubuntuRegistryImage = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder() + * final var ubuntu = DockerFunctions.getRegistryImage(GetRegistryImageArgs.builder() * .name("ubuntu:precise") * .build()); * * var ubuntuRemoteImage = new RemoteImage("ubuntuRemoteImage", RemoteImageArgs.builder() - * .name(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.name())) - * .pullTriggers(ubuntuRegistryImage.applyValue(getRegistryImageResult -> getRegistryImageResult.sha256Digest())) + * .name(ubuntu.applyValue(getRegistryImageResult -> getRegistryImageResult.name())) + * .pullTriggers(ubuntu.applyValue(getRegistryImageResult -> getRegistryImageResult.sha256Digest())) * .build()); * * } diff --git a/sdk/java/src/main/java/com/pulumi/docker/Volume.java b/sdk/java/src/main/java/com/pulumi/docker/Volume.java index 3b1f8e26..0a5c3d4b 100644 --- a/sdk/java/src/main/java/com/pulumi/docker/Volume.java +++ b/sdk/java/src/main/java/com/pulumi/docker/Volume.java @@ -32,6 +32,7 @@ * import com.pulumi.Pulumi; * import com.pulumi.core.Output; * import com.pulumi.docker.Volume; + * import com.pulumi.docker.VolumeArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -45,7 +46,9 @@ * } * * public static void stack(Context ctx) { - * var sharedVolume = new Volume("sharedVolume"); + * var sharedVolume = new Volume("sharedVolume", VolumeArgs.builder() + * .name("shared_volume") + * .build()); * * } * } diff --git a/sdk/nodejs/container.ts b/sdk/nodejs/container.ts index 0ae44218..acac024c 100644 --- a/sdk/nodejs/container.ts +++ b/sdk/nodejs/container.ts @@ -19,9 +19,12 @@ import * as utilities from "./utilities"; * import * as docker from "@pulumi/docker"; * * // Find the latest Ubuntu precise image. - * const ubuntuRemoteImage = new docker.RemoteImage("ubuntuRemoteImage", {name: "ubuntu:precise"}); + * const ubuntuRemoteImage = new docker.RemoteImage("ubuntu", {name: "ubuntu:precise"}); * // Start a container - * const ubuntuContainer = new docker.Container("ubuntuContainer", {image: ubuntuRemoteImage.imageId}); + * const ubuntu = new docker.Container("ubuntu", { + * name: "foo", + * image: ubuntuRemoteImage.imageId, + * }); * ``` * * diff --git a/sdk/nodejs/getRegistryImage.ts b/sdk/nodejs/getRegistryImage.ts index 68307d95..836706bd 100644 --- a/sdk/nodejs/getRegistryImage.ts +++ b/sdk/nodejs/getRegistryImage.ts @@ -14,12 +14,12 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as docker from "@pulumi/docker"; * - * const ubuntuRegistryImage = docker.getRegistryImage({ + * const ubuntu = docker.getRegistryImage({ * name: "ubuntu:precise", * }); - * const ubuntuRemoteImage = new docker.RemoteImage("ubuntuRemoteImage", { - * name: ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.name), - * pullTriggers: [ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.sha256Digest)], + * const ubuntuRemoteImage = new docker.RemoteImage("ubuntu", { + * name: ubuntu.then(ubuntu => ubuntu.name), + * pullTriggers: [ubuntu.then(ubuntu => ubuntu.sha256Digest)], * }); * ``` * @@ -78,12 +78,12 @@ export interface GetRegistryImageResult { * import * as pulumi from "@pulumi/pulumi"; * import * as docker from "@pulumi/docker"; * - * const ubuntuRegistryImage = docker.getRegistryImage({ + * const ubuntu = docker.getRegistryImage({ * name: "ubuntu:precise", * }); - * const ubuntuRemoteImage = new docker.RemoteImage("ubuntuRemoteImage", { - * name: ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.name), - * pullTriggers: [ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.sha256Digest)], + * const ubuntuRemoteImage = new docker.RemoteImage("ubuntu", { + * name: ubuntu.then(ubuntu => ubuntu.name), + * pullTriggers: [ubuntu.then(ubuntu => ubuntu.sha256Digest)], * }); * ``` * diff --git a/sdk/nodejs/getRemoteImage.ts b/sdk/nodejs/getRemoteImage.ts index 048bcadb..cf594c7e 100644 --- a/sdk/nodejs/getRemoteImage.ts +++ b/sdk/nodejs/getRemoteImage.ts @@ -14,15 +14,19 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as docker from "@pulumi/docker"; * + * // uses the 'latest' tag * const latest = docker.getRemoteImage({ * name: "nginx", * }); + * // uses a specific tag * const specific = docker.getRemoteImage({ * name: "nginx:1.17.6", * }); + * // use the image digest * const digest = docker.getRemoteImage({ * name: "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2", * }); + * // uses the tag and the image digest * const tagAndDigest = docker.getRemoteImage({ * name: "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2", * }); @@ -74,15 +78,19 @@ export interface GetRemoteImageResult { * import * as pulumi from "@pulumi/pulumi"; * import * as docker from "@pulumi/docker"; * + * // uses the 'latest' tag * const latest = docker.getRemoteImage({ * name: "nginx", * }); + * // uses a specific tag * const specific = docker.getRemoteImage({ * name: "nginx:1.17.6", * }); + * // use the image digest * const digest = docker.getRemoteImage({ * name: "nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2", * }); + * // uses the tag and the image digest * const tagAndDigest = docker.getRemoteImage({ * name: "nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2", * }); diff --git a/sdk/nodejs/network.ts b/sdk/nodejs/network.ts index d28cab9c..321e5d11 100644 --- a/sdk/nodejs/network.ts +++ b/sdk/nodejs/network.ts @@ -18,7 +18,7 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as docker from "@pulumi/docker"; * - * const privateNetwork = new docker.Network("privateNetwork", {}); + * const privateNetwork = new docker.Network("private_network", {name: "my_network"}); * ``` * * diff --git a/sdk/nodejs/plugin.ts b/sdk/nodejs/plugin.ts index 6aa9b0af..0b3c7305 100644 --- a/sdk/nodejs/plugin.ts +++ b/sdk/nodejs/plugin.ts @@ -11,25 +11,6 @@ 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 775ae4c1..14dc5470 100644 --- a/sdk/nodejs/registryImage.ts +++ b/sdk/nodejs/registryImage.ts @@ -7,25 +7,6 @@ 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 ad8595c1..1ff95585 100644 --- a/sdk/nodejs/remoteImage.ts +++ b/sdk/nodejs/remoteImage.ts @@ -38,12 +38,12 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as docker from "@pulumi/docker"; * - * const ubuntuRegistryImage = docker.getRegistryImage({ + * const ubuntu = docker.getRegistryImage({ * name: "ubuntu:precise", * }); - * const ubuntuRemoteImage = new docker.RemoteImage("ubuntuRemoteImage", { - * name: ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.name), - * pullTriggers: [ubuntuRegistryImage.then(ubuntuRegistryImage => ubuntuRegistryImage.sha256Digest)], + * const ubuntuRemoteImage = new docker.RemoteImage("ubuntu", { + * name: ubuntu.then(ubuntu => ubuntu.name), + * pullTriggers: [ubuntu.then(ubuntu => ubuntu.sha256Digest)], * }); * ``` * diff --git a/sdk/nodejs/volume.ts b/sdk/nodejs/volume.ts index ee4a339d..027bf244 100644 --- a/sdk/nodejs/volume.ts +++ b/sdk/nodejs/volume.ts @@ -18,7 +18,7 @@ import * as utilities from "./utilities"; * import * as pulumi from "@pulumi/pulumi"; * import * as docker from "@pulumi/docker"; * - * const sharedVolume = new docker.Volume("sharedVolume", {}); + * const sharedVolume = new docker.Volume("shared_volume", {name: "shared_volume"}); * ``` * * diff --git a/sdk/python/pulumi_docker/container.py b/sdk/python/pulumi_docker/container.py index f781d960..99dc1a8b 100644 --- a/sdk/python/pulumi_docker/container.py +++ b/sdk/python/pulumi_docker/container.py @@ -2160,9 +2160,11 @@ def __init__(__self__, import pulumi_docker as docker # Find the latest Ubuntu precise image. - ubuntu_remote_image = docker.RemoteImage("ubuntuRemoteImage", name="ubuntu:precise") + ubuntu_remote_image = docker.RemoteImage("ubuntu", name="ubuntu:precise") # Start a container - ubuntu_container = docker.Container("ubuntuContainer", image=ubuntu_remote_image.image_id) + ubuntu = docker.Container("ubuntu", + name="foo", + image=ubuntu_remote_image.image_id) ``` @@ -2292,9 +2294,11 @@ def __init__(__self__, import pulumi_docker as docker # Find the latest Ubuntu precise image. - ubuntu_remote_image = docker.RemoteImage("ubuntuRemoteImage", name="ubuntu:precise") + ubuntu_remote_image = docker.RemoteImage("ubuntu", name="ubuntu:precise") # Start a container - ubuntu_container = docker.Container("ubuntuContainer", image=ubuntu_remote_image.image_id) + ubuntu = docker.Container("ubuntu", + name="foo", + image=ubuntu_remote_image.image_id) ``` diff --git a/sdk/python/pulumi_docker/get_registry_image.py b/sdk/python/pulumi_docker/get_registry_image.py index 66a4dc14..d6cb5cd8 100644 --- a/sdk/python/pulumi_docker/get_registry_image.py +++ b/sdk/python/pulumi_docker/get_registry_image.py @@ -93,10 +93,10 @@ def get_registry_image(insecure_skip_verify: Optional[bool] = None, 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]) + ubuntu = docker.get_registry_image(name="ubuntu:precise") + ubuntu_remote_image = docker.RemoteImage("ubuntu", + name=ubuntu.name, + pull_triggers=[ubuntu.sha256_digest]) ``` @@ -131,10 +131,10 @@ def get_registry_image_output(insecure_skip_verify: Optional[pulumi.Input[Option 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]) + ubuntu = docker.get_registry_image(name="ubuntu:precise") + ubuntu_remote_image = docker.RemoteImage("ubuntu", + name=ubuntu.name, + pull_triggers=[ubuntu.sha256_digest]) ``` diff --git a/sdk/python/pulumi_docker/get_remote_image.py b/sdk/python/pulumi_docker/get_remote_image.py index 44cebdd5..6d2b437e 100644 --- a/sdk/python/pulumi_docker/get_remote_image.py +++ b/sdk/python/pulumi_docker/get_remote_image.py @@ -80,9 +80,13 @@ def get_remote_image(name: Optional[str] = None, import pulumi import pulumi_docker as docker + # uses the 'latest' tag latest = docker.get_remote_image(name="nginx") + # uses a specific tag specific = docker.get_remote_image(name="nginx:1.17.6") + # use the image digest digest = docker.get_remote_image(name="nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") + # uses the tag and the image digest tag_and_digest = docker.get_remote_image(name="nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") ``` @@ -114,9 +118,13 @@ def get_remote_image_output(name: Optional[pulumi.Input[str]] = None, import pulumi import pulumi_docker as docker + # uses the 'latest' tag latest = docker.get_remote_image(name="nginx") + # uses a specific tag specific = docker.get_remote_image(name="nginx:1.17.6") + # use the image digest digest = docker.get_remote_image(name="nginx@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") + # uses the tag and the image digest tag_and_digest = docker.get_remote_image(name="nginx:1.19.1@sha256:36b74457bccb56fbf8b05f79c85569501b721d4db813b684391d63e02287c0b2") ``` diff --git a/sdk/python/pulumi_docker/network.py b/sdk/python/pulumi_docker/network.py index 6a8e35f4..cd47294a 100644 --- a/sdk/python/pulumi_docker/network.py +++ b/sdk/python/pulumi_docker/network.py @@ -458,7 +458,7 @@ def __init__(__self__, import pulumi import pulumi_docker as docker - private_network = docker.Network("privateNetwork") + private_network = docker.Network("private_network", name="my_network") ``` @@ -526,7 +526,7 @@ def __init__(__self__, import pulumi import pulumi_docker as docker - private_network = docker.Network("privateNetwork") + private_network = docker.Network("private_network", name="my_network") ``` diff --git a/sdk/python/pulumi_docker/plugin.py b/sdk/python/pulumi_docker/plugin.py index 6cbe52e7..6c4469d6 100644 --- a/sdk/python/pulumi_docker/plugin.py +++ b/sdk/python/pulumi_docker/plugin.py @@ -352,24 +352,6 @@ 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 @@ -400,24 +382,6 @@ 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 1d87c20f..0aa29770 100644 --- a/sdk/python/pulumi_docker/registry_image.py +++ b/sdk/python/pulumi_docker/registry_image.py @@ -185,24 +185,6 @@ 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` @@ -220,24 +202,6 @@ 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 5cbee851..682d3936 100644 --- a/sdk/python/pulumi_docker/remote_image.py +++ b/sdk/python/pulumi_docker/remote_image.py @@ -328,10 +328,10 @@ def __init__(__self__, 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]) + ubuntu = docker.get_registry_image(name="ubuntu:precise") + ubuntu_remote_image = docker.RemoteImage("ubuntu", + name=ubuntu.name, + pull_triggers=[ubuntu.sha256_digest]) ``` @@ -409,10 +409,10 @@ def __init__(__self__, 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]) + ubuntu = docker.get_registry_image(name="ubuntu:precise") + ubuntu_remote_image = docker.RemoteImage("ubuntu", + name=ubuntu.name, + pull_triggers=[ubuntu.sha256_digest]) ``` diff --git a/sdk/python/pulumi_docker/volume.py b/sdk/python/pulumi_docker/volume.py index 08f67484..6fff889e 100644 --- a/sdk/python/pulumi_docker/volume.py +++ b/sdk/python/pulumi_docker/volume.py @@ -194,7 +194,7 @@ def __init__(__self__, import pulumi import pulumi_docker as docker - shared_volume = docker.Volume("sharedVolume") + shared_volume = docker.Volume("shared_volume", name="shared_volume") ``` @@ -254,7 +254,7 @@ def __init__(__self__, import pulumi import pulumi_docker as docker - shared_volume = docker.Volume("sharedVolume") + shared_volume = docker.Volume("shared_volume", name="shared_volume") ```