PatchDeploymentArgs

data class PatchDeploymentArgs(val description: Output<String>? = null, val duration: Output<String>? = null, val instanceFilter: Output<PatchDeploymentInstanceFilterArgs>? = null, val oneTimeSchedule: Output<PatchDeploymentOneTimeScheduleArgs>? = null, val patchConfig: Output<PatchDeploymentPatchConfigArgs>? = null, val patchDeploymentId: Output<String>? = null, val project: Output<String>? = null, val recurringSchedule: Output<PatchDeploymentRecurringScheduleArgs>? = null, val rollout: Output<PatchDeploymentRolloutArgs>? = null) : ConvertibleToJava<PatchDeploymentArgs>

Patch deployments are configurations that individual patch jobs use to complete a patch. These configurations include instance filter, package repository settings, and a schedule. To get more information about PatchDeployment, see:

Example Usage

Os Config Patch Deployment Basic

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.osconfig.PatchDeployment;
import com.pulumi.gcp.osconfig.PatchDeploymentArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentInstanceFilterArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentOneTimeScheduleArgs;
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 patch = new PatchDeployment("patch", PatchDeploymentArgs.builder()
.instanceFilter(PatchDeploymentInstanceFilterArgs.builder()
.all(true)
.build())
.oneTimeSchedule(PatchDeploymentOneTimeScheduleArgs.builder()
.executeTime("2999-10-10T10:10:10.045123456Z")
.build())
.patchDeploymentId("patch-deploy")
.build());
}
}

Os Config Patch Deployment Daily

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.osconfig.PatchDeployment;
import com.pulumi.gcp.osconfig.PatchDeploymentArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentInstanceFilterArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentRecurringScheduleArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentRecurringScheduleTimeOfDayArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentRecurringScheduleTimeZoneArgs;
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 patch = new PatchDeployment("patch", PatchDeploymentArgs.builder()
.instanceFilter(PatchDeploymentInstanceFilterArgs.builder()
.all(true)
.build())
.patchDeploymentId("patch-deploy")
.recurringSchedule(PatchDeploymentRecurringScheduleArgs.builder()
.timeOfDay(PatchDeploymentRecurringScheduleTimeOfDayArgs.builder()
.hours(0)
.minutes(30)
.nanos(20)
.seconds(30)
.build())
.timeZone(PatchDeploymentRecurringScheduleTimeZoneArgs.builder()
.id("America/New_York")
.build())
.build())
.build());
}
}

Os Config Patch Deployment Daily Midnight

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.osconfig.PatchDeployment;
import com.pulumi.gcp.osconfig.PatchDeploymentArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentInstanceFilterArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentRecurringScheduleArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentRecurringScheduleTimeOfDayArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentRecurringScheduleTimeZoneArgs;
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 patch = new PatchDeployment("patch", PatchDeploymentArgs.builder()
.instanceFilter(PatchDeploymentInstanceFilterArgs.builder()
.all(true)
.build())
.patchDeploymentId("patch-deploy")
.recurringSchedule(PatchDeploymentRecurringScheduleArgs.builder()
.timeOfDay(PatchDeploymentRecurringScheduleTimeOfDayArgs.builder()
.hours(0)
.minutes(0)
.nanos(0)
.seconds(0)
.build())
.timeZone(PatchDeploymentRecurringScheduleTimeZoneArgs.builder()
.id("America/New_York")
.build())
.build())
.build());
}
}

Os Config Patch Deployment Instance

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetImageArgs;
import com.pulumi.gcp.compute.Instance;
import com.pulumi.gcp.compute.InstanceArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskInitializeParamsArgs;
import com.pulumi.gcp.compute.inputs.InstanceNetworkInterfaceArgs;
import com.pulumi.gcp.osconfig.PatchDeployment;
import com.pulumi.gcp.osconfig.PatchDeploymentArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentInstanceFilterArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentPatchConfigArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentPatchConfigYumArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentRecurringScheduleArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentRecurringScheduleTimeZoneArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentRecurringScheduleTimeOfDayArgs;
import com.pulumi.gcp.osconfig.inputs.PatchDeploymentRecurringScheduleMonthlyArgs;
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) {
final var myImage = ComputeFunctions.getImage(GetImageArgs.builder()
.family("debian-11")
.project("debian-cloud")
.build());
var foobar = new Instance("foobar", InstanceArgs.builder()
.machineType("e2-medium")
.zone("us-central1-a")
.canIpForward(false)
.tags(
"foo",
"bar")
.bootDisk(InstanceBootDiskArgs.builder()
.initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
.image(myImage.applyValue(getImageResult -> getImageResult.selfLink()))
.build())
.build())
.networkInterfaces(InstanceNetworkInterfaceArgs.builder()
.network("default")
.build())
.metadata(Map.of("foo", "bar"))
.build());
var patch = new PatchDeployment("patch", PatchDeploymentArgs.builder()
.patchDeploymentId("patch-deploy")
.instanceFilter(PatchDeploymentInstanceFilterArgs.builder()
.instances(foobar.id())
.build())
.patchConfig(PatchDeploymentPatchConfigArgs.builder()
.yum(PatchDeploymentPatchConfigYumArgs.builder()
.security(true)
.minimal(true)
.excludes("bash")
.build())
.build())
.recurringSchedule(PatchDeploymentRecurringScheduleArgs.builder()
.timeZone(PatchDeploymentRecurringScheduleTimeZoneArgs.builder()
.id("America/New_York")
.build())
.timeOfDay(PatchDeploymentRecurringScheduleTimeOfDayArgs.builder()
.hours(0)
.minutes(30)
.seconds(30)
.nanos(20)
.build())
.monthly(PatchDeploymentRecurringScheduleMonthlyArgs.builder()
.monthDay(1)
.build())
.build())
.build());
}
}

Os Config Patch Deployment Full

No Java example available.

Import

PatchDeployment can be imported using any of these accepted formats

$ pulumi import gcp:osconfig/patchDeployment:PatchDeployment default projects/{{project}}/patchDeployments/{{name}}
$ pulumi import gcp:osconfig/patchDeployment:PatchDeployment default {{project}}/{{name}}
$ pulumi import gcp:osconfig/patchDeployment:PatchDeployment default {{name}}

Constructors

Link copied to clipboard
constructor(description: Output<String>? = null, duration: Output<String>? = null, instanceFilter: Output<PatchDeploymentInstanceFilterArgs>? = null, oneTimeSchedule: Output<PatchDeploymentOneTimeScheduleArgs>? = null, patchConfig: Output<PatchDeploymentPatchConfigArgs>? = null, patchDeploymentId: Output<String>? = null, project: Output<String>? = null, recurringSchedule: Output<PatchDeploymentRecurringScheduleArgs>? = null, rollout: Output<PatchDeploymentRolloutArgs>? = null)

Properties

Link copied to clipboard
val description: Output<String>? = null

Description of the patch deployment. Length of the description is limited to 1024 characters.

Link copied to clipboard
val duration: Output<String>? = null

Duration of the patch. After the duration ends, the patch times out. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s"

Link copied to clipboard

VM instances to patch. Structure is documented below.

Link copied to clipboard

Schedule a one-time execution. Structure is documented below.

Link copied to clipboard

Patch configuration that is applied. Structure is documented below.

Link copied to clipboard
val patchDeploymentId: Output<String>? = null

A name for the patch deployment in the project. When creating a name the following rules apply:

Link copied to clipboard
val project: Output<String>? = null

The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

Link copied to clipboard

Schedule recurring executions. Structure is documented below.

Link copied to clipboard
val rollout: Output<PatchDeploymentRolloutArgs>? = null

Rollout strategy of the patch job. Structure is documented below.

Functions

Link copied to clipboard
open override fun toJava(): PatchDeploymentArgs