OsPolicyAssignment class
OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information about the OS policy resource definitions and examples, see OS policy and OS policy assignment.
To get more information about OSPolicyAssignment, see:
- API documentation
- How-to Guides
- Official Documentation
Example Usage
Os Config Os Policy Assignment Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const primary = new gcp.osconfig.OsPolicyAssignment("primary", {
instanceFilter: {
all: false,
exclusionLabels: [{
labels: {
"label-two": "value-two",
},
}],
inclusionLabels: [{
labels: {
"label-one": "value-one",
},
}],
inventories: [{
osShortName: "centos",
osVersion: "8.*",
}],
},
location: "us-central1-a",
name: "policy-assignment",
osPolicies: [{
id: "policy",
mode: "VALIDATION",
resourceGroups: [{
resources: [
{
id: "apt-to-yum",
repository: {
apt: {
archiveType: "DEB",
components: ["doc"],
distribution: "debian",
uri: "https://atl.mirrors.clouvider.net/debian",
gpgKey: ".gnupg/pubring.kbx",
},
},
},
{
id: "exec1",
exec: {
validate: {
interpreter: "SHELL",
args: ["arg1"],
file: {
localPath: "$HOME/script.sh",
},
outputFilePath: "$HOME/out",
},
enforce: {
interpreter: "SHELL",
args: ["arg1"],
file: {
allowInsecure: true,
remote: {
uri: "https://www.example.com/script.sh",
sha256Checksum: "c7938fed83afdccbb0e86a2a2e4cad7d5035012ca3214b4a61268393635c3063",
},
},
outputFilePath: "$HOME/out",
},
},
},
],
inventoryFilters: [{
osShortName: "centos",
osVersion: "8.*",
}],
}],
allowNoResourceGroupMatch: false,
description: "A test os policy",
}],
rollout: {
disruptionBudget: {
percent: 100,
},
minWaitDuration: "3s",
},
description: "A test os policy assignment",
});
import pulumi
import pulumi_gcp as gcp
primary = gcp.osconfig.OsPolicyAssignment("primary",
instance_filter={
"all": False,
"exclusion_labels": [{
"labels": {
"label-two": "value-two",
},
}],
"inclusion_labels": [{
"labels": {
"label-one": "value-one",
},
}],
"inventories": [{
"os_short_name": "centos",
"os_version": "8.*",
}],
},
location="us-central1-a",
name="policy-assignment",
os_policies=[{
"id": "policy",
"mode": "VALIDATION",
"resource_groups": [{
"resources": [
{
"id": "apt-to-yum",
"repository": {
"apt": {
"archive_type": "DEB",
"components": ["doc"],
"distribution": "debian",
"uri": "https://atl.mirrors.clouvider.net/debian",
"gpg_key": ".gnupg/pubring.kbx",
},
},
},
{
"id": "exec1",
"exec_": {
"validate": {
"interpreter": "SHELL",
"args": ["arg1"],
"file": {
"local_path": "$HOME/script.sh",
},
"output_file_path": "$HOME/out",
},
"enforce": {
"interpreter": "SHELL",
"args": ["arg1"],
"file": {
"allow_insecure": True,
"remote": {
"uri": "https://www.example.com/script.sh",
"sha256_checksum": "c7938fed83afdccbb0e86a2a2e4cad7d5035012ca3214b4a61268393635c3063",
},
},
"output_file_path": "$HOME/out",
},
},
},
],
"inventory_filters": [{
"os_short_name": "centos",
"os_version": "8.*",
}],
}],
"allow_no_resource_group_match": False,
"description": "A test os policy",
}],
rollout={
"disruption_budget": {
"percent": 100,
},
"min_wait_duration": "3s",
},
description="A test os policy assignment")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var primary = new Gcp.OsConfig.OsPolicyAssignment("primary", new()
{
InstanceFilter = new Gcp.OsConfig.Inputs.OsPolicyAssignmentInstanceFilterArgs
{
All = false,
ExclusionLabels = new[]
{
new Gcp.OsConfig.Inputs.OsPolicyAssignmentInstanceFilterExclusionLabelArgs
{
Labels =
{
{ "label-two", "value-two" },
},
},
},
InclusionLabels = new[]
{
new Gcp.OsConfig.Inputs.OsPolicyAssignmentInstanceFilterInclusionLabelArgs
{
Labels =
{
{ "label-one", "value-one" },
},
},
},
Inventories = new[]
{
new Gcp.OsConfig.Inputs.OsPolicyAssignmentInstanceFilterInventoryArgs
{
OsShortName = "centos",
OsVersion = "8.*",
},
},
},
Location = "us-central1-a",
Name = "policy-assignment",
OsPolicies = new[]
{
new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyArgs
{
Id = "policy",
Mode = "VALIDATION",
ResourceGroups = new[]
{
new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupArgs
{
Resources = new[]
{
new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceArgs
{
Id = "apt-to-yum",
Repository = new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceRepositoryArgs
{
Apt = new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceRepositoryAptArgs
{
ArchiveType = "DEB",
Components = new[]
{
"doc",
},
Distribution = "debian",
Uri = "https://atl.mirrors.clouvider.net/debian",
GpgKey = ".gnupg/pubring.kbx",
},
},
},
new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceArgs
{
Id = "exec1",
Exec = new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecArgs
{
Validate = new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecValidateArgs
{
Interpreter = "SHELL",
Args = new[]
{
"arg1",
},
File = new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecValidateFileArgs
{
LocalPath = "$HOME/script.sh",
},
OutputFilePath = "$HOME/out",
},
Enforce = new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceArgs
{
Interpreter = "SHELL",
Args = new[]
{
"arg1",
},
File = new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceFileArgs
{
AllowInsecure = true,
Remote = new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceFileRemoteArgs
{
Uri = "https://www.example.com/script.sh",
Sha256Checksum = "c7938fed83afdccbb0e86a2a2e4cad7d5035012ca3214b4a61268393635c3063",
},
},
OutputFilePath = "$HOME/out",
},
},
},
},
InventoryFilters = new[]
{
new Gcp.OsConfig.Inputs.OsPolicyAssignmentOsPolicyResourceGroupInventoryFilterArgs
{
OsShortName = "centos",
OsVersion = "8.*",
},
},
},
},
AllowNoResourceGroupMatch = false,
Description = "A test os policy",
},
},
Rollout = new Gcp.OsConfig.Inputs.OsPolicyAssignmentRolloutArgs
{
DisruptionBudget = new Gcp.OsConfig.Inputs.OsPolicyAssignmentRolloutDisruptionBudgetArgs
{
Percent = 100,
},
MinWaitDuration = "3s",
},
Description = "A test os policy assignment",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/osconfig"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := osconfig.NewOsPolicyAssignment(ctx, "primary", &osconfig.OsPolicyAssignmentArgs{
InstanceFilter: &osconfig.OsPolicyAssignmentInstanceFilterArgs{
All: pulumi.Bool(false),
ExclusionLabels: osconfig.OsPolicyAssignmentInstanceFilterExclusionLabelArray{
&osconfig.OsPolicyAssignmentInstanceFilterExclusionLabelArgs{
Labels: pulumi.StringMap{
"label-two": pulumi.String("value-two"),
},
},
},
InclusionLabels: osconfig.OsPolicyAssignmentInstanceFilterInclusionLabelArray{
&osconfig.OsPolicyAssignmentInstanceFilterInclusionLabelArgs{
Labels: pulumi.StringMap{
"label-one": pulumi.String("value-one"),
},
},
},
Inventories: osconfig.OsPolicyAssignmentInstanceFilterInventoryArray{
&osconfig.OsPolicyAssignmentInstanceFilterInventoryArgs{
OsShortName: pulumi.String("centos"),
OsVersion: pulumi.String("8.*"),
},
},
},
Location: pulumi.String("us-central1-a"),
Name: pulumi.String("policy-assignment"),
OsPolicies: osconfig.OsPolicyAssignmentOsPolicyArray{
&osconfig.OsPolicyAssignmentOsPolicyArgs{
Id: pulumi.String("policy"),
Mode: pulumi.String("VALIDATION"),
ResourceGroups: osconfig.OsPolicyAssignmentOsPolicyResourceGroupArray{
&osconfig.OsPolicyAssignmentOsPolicyResourceGroupArgs{
Resources: osconfig.OsPolicyAssignmentOsPolicyResourceGroupResourceArray{
&osconfig.OsPolicyAssignmentOsPolicyResourceGroupResourceArgs{
Id: pulumi.String("apt-to-yum"),
Repository: &osconfig.OsPolicyAssignmentOsPolicyResourceGroupResourceRepositoryArgs{
Apt: &osconfig.OsPolicyAssignmentOsPolicyResourceGroupResourceRepositoryAptArgs{
ArchiveType: pulumi.String("DEB"),
Components: pulumi.StringArray{
pulumi.String("doc"),
},
Distribution: pulumi.String("debian"),
Uri: pulumi.String("https://atl.mirrors.clouvider.net/debian"),
GpgKey: pulumi.String(".gnupg/pubring.kbx"),
},
},
},
&osconfig.OsPolicyAssignmentOsPolicyResourceGroupResourceArgs{
Id: pulumi.String("exec1"),
Exec: &osconfig.OsPolicyAssignmentOsPolicyResourceGroupResourceExecArgs{
Validate: &osconfig.OsPolicyAssignmentOsPolicyResourceGroupResourceExecValidateArgs{
Interpreter: pulumi.String("SHELL"),
Args: pulumi.StringArray{
pulumi.String("arg1"),
},
File: &osconfig.OsPolicyAssignmentOsPolicyResourceGroupResourceExecValidateFileArgs{
LocalPath: pulumi.String("$HOME/script.sh"),
},
OutputFilePath: pulumi.String("$HOME/out"),
},
Enforce: &osconfig.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceArgs{
Interpreter: pulumi.String("SHELL"),
Args: pulumi.StringArray{
pulumi.String("arg1"),
},
File: &osconfig.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceFileArgs{
AllowInsecure: pulumi.Bool(true),
Remote: &osconfig.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceFileRemoteArgs{
Uri: pulumi.String("https://www.example.com/script.sh"),
Sha256Checksum: pulumi.String("c7938fed83afdccbb0e86a2a2e4cad7d5035012ca3214b4a61268393635c3063"),
},
},
OutputFilePath: pulumi.String("$HOME/out"),
},
},
},
},
InventoryFilters: osconfig.OsPolicyAssignmentOsPolicyResourceGroupInventoryFilterArray{
&osconfig.OsPolicyAssignmentOsPolicyResourceGroupInventoryFilterArgs{
OsShortName: pulumi.String("centos"),
OsVersion: pulumi.String("8.*"),
},
},
},
},
AllowNoResourceGroupMatch: pulumi.Bool(false),
Description: pulumi.String("A test os policy"),
},
},
Rollout: &osconfig.OsPolicyAssignmentRolloutArgs{
DisruptionBudget: &osconfig.OsPolicyAssignmentRolloutDisruptionBudgetArgs{
Percent: pulumi.Int(100),
},
MinWaitDuration: pulumi.String("3s"),
},
Description: pulumi.String("A test os policy assignment"),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_osconfig_ospolicyassignment" "primary" {
instance_filter = {
all = false
exclusion_labels = [{
"labels" = {
"label-two" = "value-two"
}
}]
inclusion_labels = [{
"labels" = {
"label-one" = "value-one"
}
}]
inventories = [{
"osShortName" = "centos"
"osVersion" = "8.*"
}]
}
location = "us-central1-a"
name = "policy-assignment"
os_policies {
id = "policy"
mode = "VALIDATION"
resource_groups {
resources {
id = "apt-to-yum"
repository = {
apt = {
archive_type = "DEB"
components = ["doc"]
distribution = "debian"
uri = "https://atl.mirrors.clouvider.net/debian"
gpg_key = ".gnupg/pubring.kbx"
}
}
}
resources {
id = "exec1"
exec = {
validate = {
interpreter = "SHELL"
args = ["arg1"]
file = {
local_path = "$HOME/script.sh"
}
output_file_path = "$HOME/out"
}
enforce = {
interpreter = "SHELL"
args = ["arg1"]
file = {
allow_insecure = true
remote = {
uri = "https://www.example.com/script.sh"
sha256_checksum = "c7938fed83afdccbb0e86a2a2e4cad7d5035012ca3214b4a61268393635c3063"
}
}
output_file_path = "$HOME/out"
}
}
}
inventory_filters {
os_short_name = "centos"
os_version = "8.*"
}
}
allow_no_resource_group_match = false
description = "A test os policy"
}
rollout = {
disruption_budget = {
percent = 100
}
min_wait_duration = "3s"
}
description = "A test os policy assignment"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.osconfig.OsPolicyAssignment;
import com.pulumi.gcp.osconfig.OsPolicyAssignmentArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentInstanceFilterArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentInstanceFilterExclusionLabelArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentInstanceFilterInclusionLabelArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentInstanceFilterInventoryArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceRepositoryArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceRepositoryAptArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecValidateArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecValidateFileArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceFileArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceFileRemoteArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentOsPolicyResourceGroupInventoryFilterArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentRolloutArgs;
import com.pulumi.gcp.osconfig.inputs.OsPolicyAssignmentRolloutDisruptionBudgetArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 primary = new OsPolicyAssignment("primary", OsPolicyAssignmentArgs.builder()
.instanceFilter(OsPolicyAssignmentInstanceFilterArgs.builder()
.all(false)
.exclusionLabels(OsPolicyAssignmentInstanceFilterExclusionLabelArgs.builder()
.labels(Map.of("label-two", "value-two"))
.build())
.inclusionLabels(OsPolicyAssignmentInstanceFilterInclusionLabelArgs.builder()
.labels(Map.of("label-one", "value-one"))
.build())
.inventories(OsPolicyAssignmentInstanceFilterInventoryArgs.builder()
.osShortName("centos")
.osVersion("8.*")
.build())
.build())
.location("us-central1-a")
.name("policy-assignment")
.osPolicies(OsPolicyAssignmentOsPolicyArgs.builder()
.id("policy")
.mode("VALIDATION")
.resourceGroups(OsPolicyAssignmentOsPolicyResourceGroupArgs.builder()
.resources(
OsPolicyAssignmentOsPolicyResourceGroupResourceArgs.builder()
.id("apt-to-yum")
.repository(OsPolicyAssignmentOsPolicyResourceGroupResourceRepositoryArgs.builder()
.apt(OsPolicyAssignmentOsPolicyResourceGroupResourceRepositoryAptArgs.builder()
.archiveType("DEB")
.components("doc")
.distribution("debian")
.uri("https://atl.mirrors.clouvider.net/debian")
.gpgKey(".gnupg/pubring.kbx")
.build())
.build())
.build(),
OsPolicyAssignmentOsPolicyResourceGroupResourceArgs.builder()
.id("exec1")
.exec(OsPolicyAssignmentOsPolicyResourceGroupResourceExecArgs.builder()
.validate(OsPolicyAssignmentOsPolicyResourceGroupResourceExecValidateArgs.builder()
.interpreter("SHELL")
.args("arg1")
.file(OsPolicyAssignmentOsPolicyResourceGroupResourceExecValidateFileArgs.builder()
.localPath("$HOME/script.sh")
.build())
.outputFilePath("$HOME/out")
.build())
.enforce(OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceArgs.builder()
.interpreter("SHELL")
.args("arg1")
.file(OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceFileArgs.builder()
.allowInsecure(true)
.remote(OsPolicyAssignmentOsPolicyResourceGroupResourceExecEnforceFileRemoteArgs.builder()
.uri("https://www.example.com/script.sh")
.sha256Checksum("c7938fed83afdccbb0e86a2a2e4cad7d5035012ca3214b4a61268393635c3063")
.build())
.build())
.outputFilePath("$HOME/out")
.build())
.build())
.build())
.inventoryFilters(OsPolicyAssignmentOsPolicyResourceGroupInventoryFilterArgs.builder()
.osShortName("centos")
.osVersion("8.*")
.build())
.build())
.allowNoResourceGroupMatch(false)
.description("A test os policy")
.build())
.rollout(OsPolicyAssignmentRolloutArgs.builder()
.disruptionBudget(OsPolicyAssignmentRolloutDisruptionBudgetArgs.builder()
.percent(100)
.build())
.minWaitDuration("3s")
.build())
.description("A test os policy assignment")
.build());
}
}
resources:
primary:
type: gcp:osconfig:OsPolicyAssignment
properties:
instanceFilter:
all: false
exclusionLabels:
- labels:
label-two: value-two
inclusionLabels:
- labels:
label-one: value-one
inventories:
- osShortName: centos
osVersion: 8.*
location: us-central1-a
name: policy-assignment
osPolicies:
- id: policy
mode: VALIDATION
resourceGroups:
- resources:
- id: apt-to-yum
repository:
apt:
archiveType: DEB
components:
- doc
distribution: debian
uri: https://atl.mirrors.clouvider.net/debian
gpgKey: .gnupg/pubring.kbx
- id: exec1
exec:
validate:
interpreter: SHELL
args:
- arg1
file:
localPath: $HOME/script.sh
outputFilePath: $HOME/out
enforce:
interpreter: SHELL
args:
- arg1
file:
allowInsecure: true
remote:
uri: https://www.example.com/script.sh
sha256Checksum: c7938fed83afdccbb0e86a2a2e4cad7d5035012ca3214b4a61268393635c3063
outputFilePath: $HOME/out
inventoryFilters:
- osShortName: centos
osVersion: 8.*
allowNoResourceGroupMatch: false
description: A test os policy
rollout:
disruptionBudget:
percent: 100
minWaitDuration: 3s
description: A test os policy assignment
Import
OSPolicyAssignment can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/osPolicyAssignments/{{name}}{{project}}/{{location}}/{{name}}{{location}}/{{name}}
When using the pulumi import command, OSPolicyAssignment can be imported using one of the formats above. For example:
$ pulumi import gcp:osconfig/osPolicyAssignment:OsPolicyAssignment default projects/{{project}}/locations/{{location}}/osPolicyAssignments/{{name}}
$ pulumi import gcp:osconfig/osPolicyAssignment:OsPolicyAssignment default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:osconfig/osPolicyAssignment:OsPolicyAssignment default {{location}}/{{name}}
Constructors
- OsPolicyAssignment(String name, {OsPolicyAssignmentArgs? args, CustomResourceOptions? options})
-
Creates a new OsPolicyAssignment.
nameThe Pulumi resource name.argsArguments used to configure this OsPolicyAssignment. The set of arguments for OsPolicyAssignment.optionsResource options controlling this resource's behavior. - OsPolicyAssignment.reference(String urn)
- Creates a typed reference to an existing OsPolicyAssignment resource.
Properties
-
baseline
↔ Output<
bool> -
Output only. Indicates that this revision has been successfully
rolled out in this zone and new VMs will be assigned OS policies from this
revision. For a given OS policy assignment, there is only one revision with
a value of
truefor this field.latefinal -
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
deleted
↔ Output<
bool> -
Output only. Indicates that this revision deletes the OS policy
assignment.
latefinal
-
deletionPolicy
↔ Output<
String> -
Whether Terraform will be prevented from destroying the resource. Defaults to "DELETE".
When a 'terraform destroy' or 'pulumi up' would delete the resource,
the command will fail if this field is set to "PREVENT" in Terraform state.
When set to "ABANDON", the command will remove the resource from Terraform
management without updating or deleting the resource in the API.
When set to "DELETE", deleting the resource is allowed.
latefinal
-
description
↔ Output<
String?> -
OS policy assignment description. Length of the description is limited to 1024 characters.
latefinal
-
etag
↔ Output<
String> -
The etag for this OS policy assignment. If this is provided on
update, it must match the server's etag.
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
-
instanceFilter
↔ Output<
OsPolicyAssignmentInstanceFilter> -
Filter to select VMs. Structure is
documented below.
latefinal
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
location
↔ Output<
String> -
The location for the resource
latefinal
-
name
↔ Output<
String> -
Resource name.
latefinal
-
osPolicies
↔ Output<
List< OsPolicyAssignmentOsPolicy> > -
List of OS policies to be applied to the VMs.
Structure is documented below.
latefinal
-
project
↔ Output<
String> -
The project for the resource
latefinal
-
reconciling
↔ Output<
bool> -
Output only. Indicates that reconciliation is in progress
for the revision. This value is
truewhen therolloutStateis one of:latefinal -
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
revisionCreateTime
↔ Output<
String> -
Output only. The timestamp that the revision was
created.
latefinal
-
revisionId
↔ Output<
String> -
Output only. The assignment revision ID A new revision is
committed whenever a rollout is triggered for a OS policy assignment
latefinal
-
rollout
↔ Output<
OsPolicyAssignmentRollout> -
Rollout to deploy the OS policy assignment. A rollout
is triggered in the following situations: 1) OSPolicyAssignment is created.
2) OSPolicyAssignment is updated and the update contains changes to one of
the following fields: - instanceFilter - osPolicies 3) OSPolicyAssignment
is deleted. Structure is documented below.
latefinal
-
rolloutState
↔ Output<
String> -
Output only. OS policy assignment rollout state
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
skipAwaitRollout
↔ Output<
bool?> -
Set to true to skip awaiting rollout during resource creation and update.
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
uid
↔ Output<
String> -
Output only. Server generated unique id for the OS policy assignment
resource.
latefinal
-
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {OsPolicyAssignmentState? state, CustomResourceOptions? options}) → OsPolicyAssignment -
Gets an existing OsPolicyAssignment resource's state with the given
nameandid.