diff --git a/provider/cmd/pulumi-resource-docker/schema.json b/provider/cmd/pulumi-resource-docker/schema.json index 2d13e222..c878a639 100644 --- a/provider/cmd/pulumi-resource-docker/schema.json +++ b/provider/cmd/pulumi-resource-docker/schema.json @@ -2406,11 +2406,9 @@ "required": [ "bridge", "command", - "containerLogs", "entrypoints", "envs", "exitCode", - "healthcheck", "hostname", "image", "init", diff --git a/provider/resources.go b/provider/resources.go index 4802e5ab..62ab540a 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -105,6 +105,12 @@ func Provider() tfbridge.ProviderInfo { "networks_advanced": { Name: "networksAdvanced", }, + "container_logs": { + MarkAsOptional: tfbridge.True(), + }, + "healthcheck": { + MarkAsOptional: tfbridge.True(), + }, }, }, "docker_image": { diff --git a/sdk/dotnet/Container.cs b/sdk/dotnet/Container.cs index b08f10e1..f92a426b 100644 --- a/sdk/dotnet/Container.cs +++ b/sdk/dotnet/Container.cs @@ -119,7 +119,7 @@ public partial class Container : global::Pulumi.CustomResource /// The logs of the container if its execution is done (`attach` must be disabled). /// [Output("containerLogs")] - public Output ContainerLogs { get; private set; } = null!; + public Output ContainerLogs { get; private set; } = null!; /// /// The total number of milliseconds to wait for the container to reach status 'running' @@ -209,7 +209,7 @@ public partial class Container : global::Pulumi.CustomResource /// A test to perform to check that the container is healthy /// [Output("healthcheck")] - public Output Healthcheck { get; private set; } = null!; + public Output Healthcheck { get; private set; } = null!; /// /// Hostname of the container. diff --git a/sdk/go/docker/container.go b/sdk/go/docker/container.go index dacee73b..17a82652 100644 --- a/sdk/go/docker/container.go +++ b/sdk/go/docker/container.go @@ -106,7 +106,7 @@ type Container struct { // The command to use to start the container. For example, to run `/usr/bin/myprogram -f baz.conf` set the command to be `["/usr/bin/myprogram","-f","baz.con"]`. Command pulumi.StringArrayOutput `pulumi:"command"` // The logs of the container if its execution is done (`attach` must be disabled). - ContainerLogs pulumi.StringOutput `pulumi:"containerLogs"` + ContainerLogs pulumi.StringPtrOutput `pulumi:"containerLogs"` // The total number of milliseconds to wait for the container to reach status 'running' ContainerReadRefreshTimeoutMilliseconds pulumi.IntPtrOutput `pulumi:"containerReadRefreshTimeoutMilliseconds"` // A comma-separated list or hyphen-separated range of CPUs a container can use, e.g. `0-1`. @@ -136,7 +136,7 @@ type Container struct { // Additional groups for the container user GroupAdds pulumi.StringArrayOutput `pulumi:"groupAdds"` // A test to perform to check that the container is healthy - Healthcheck ContainerHealthcheckOutput `pulumi:"healthcheck"` + Healthcheck ContainerHealthcheckPtrOutput `pulumi:"healthcheck"` // Hostname of the container. Hostname pulumi.StringOutput `pulumi:"hostname"` // Hostname to add @@ -908,8 +908,8 @@ func (o ContainerOutput) Command() pulumi.StringArrayOutput { } // The logs of the container if its execution is done (`attach` must be disabled). -func (o ContainerOutput) ContainerLogs() pulumi.StringOutput { - return o.ApplyT(func(v *Container) pulumi.StringOutput { return v.ContainerLogs }).(pulumi.StringOutput) +func (o ContainerOutput) ContainerLogs() pulumi.StringPtrOutput { + return o.ApplyT(func(v *Container) pulumi.StringPtrOutput { return v.ContainerLogs }).(pulumi.StringPtrOutput) } // The total number of milliseconds to wait for the container to reach status 'running' @@ -983,8 +983,8 @@ func (o ContainerOutput) GroupAdds() pulumi.StringArrayOutput { } // A test to perform to check that the container is healthy -func (o ContainerOutput) Healthcheck() ContainerHealthcheckOutput { - return o.ApplyT(func(v *Container) ContainerHealthcheckOutput { return v.Healthcheck }).(ContainerHealthcheckOutput) +func (o ContainerOutput) Healthcheck() ContainerHealthcheckPtrOutput { + return o.ApplyT(func(v *Container) ContainerHealthcheckPtrOutput { return v.Healthcheck }).(ContainerHealthcheckPtrOutput) } // Hostname of the container. 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..c5613011 100644 --- a/sdk/java/src/main/java/com/pulumi/docker/Container.java +++ b/sdk/java/src/main/java/com/pulumi/docker/Container.java @@ -196,14 +196,14 @@ public Output> command() { * */ @Export(name="containerLogs", refs={String.class}, tree="[0]") - private Output containerLogs; + private Output containerLogs; /** * @return The logs of the container if its execution is done (`attach` must be disabled). * */ - public Output containerLogs() { - return this.containerLogs; + public Output> containerLogs() { + return Codegen.optional(this.containerLogs); } /** * The total number of milliseconds to wait for the container to reach status 'running' @@ -406,14 +406,14 @@ public Output>> groupAdds() { * */ @Export(name="healthcheck", refs={ContainerHealthcheck.class}, tree="[0]") - private Output healthcheck; + private Output healthcheck; /** * @return A test to perform to check that the container is healthy * */ - public Output healthcheck() { - return this.healthcheck; + public Output> healthcheck() { + return Codegen.optional(this.healthcheck); } /** * Hostname of the container. diff --git a/sdk/nodejs/container.ts b/sdk/nodejs/container.ts index 0ae44218..02d36fda 100644 --- a/sdk/nodejs/container.ts +++ b/sdk/nodejs/container.ts @@ -118,7 +118,7 @@ export class Container extends pulumi.CustomResource { /** * The logs of the container if its execution is done (`attach` must be disabled). */ - public /*out*/ readonly containerLogs!: pulumi.Output; + public /*out*/ readonly containerLogs!: pulumi.Output; /** * The total number of milliseconds to wait for the container to reach status 'running' */ @@ -178,7 +178,7 @@ export class Container extends pulumi.CustomResource { /** * A test to perform to check that the container is healthy */ - public readonly healthcheck!: pulumi.Output; + public readonly healthcheck!: pulumi.Output; /** * Hostname of the container. */ diff --git a/sdk/python/pulumi_docker/container.py b/sdk/python/pulumi_docker/container.py index f781d960..73fea4d0 100644 --- a/sdk/python/pulumi_docker/container.py +++ b/sdk/python/pulumi_docker/container.py @@ -2759,7 +2759,7 @@ def command(self) -> pulumi.Output[Sequence[str]]: @property @pulumi.getter(name="containerLogs") - def container_logs(self) -> pulumi.Output[str]: + def container_logs(self) -> pulumi.Output[Optional[str]]: """ The logs of the container if its execution is done (`attach` must be disabled). """ @@ -2879,7 +2879,7 @@ def group_adds(self) -> pulumi.Output[Optional[Sequence[str]]]: @property @pulumi.getter - def healthcheck(self) -> pulumi.Output['outputs.ContainerHealthcheck']: + def healthcheck(self) -> pulumi.Output[Optional['outputs.ContainerHealthcheck']]: """ A test to perform to check that the container is healthy """