published on Wednesday, Jul 29, 2026 by Pulumi
published on Wednesday, Jul 29, 2026 by Pulumi
A Zone VM Extension Policy.
Example Usage
Compute Zone Vm Extension Policy Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const opsAgentPolicy = new gcp.compute.ZoneVmExtensionPolicy("ops_agent_policy", {
name: "zonal-ops-agent-vme-policy-_80332",
zone: "us-central1-a",
extensionPolicies: [{
extensionName: "ops-agent",
pinnedVersion: "2.66.0",
}],
});
import pulumi
import pulumi_gcp as gcp
ops_agent_policy = gcp.compute.ZoneVmExtensionPolicy("ops_agent_policy",
name="zonal-ops-agent-vme-policy-_80332",
zone="us-central1-a",
extension_policies=[{
"extension_name": "ops-agent",
"pinned_version": "2.66.0",
}])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewZoneVmExtensionPolicy(ctx, "ops_agent_policy", &compute.ZoneVmExtensionPolicyArgs{
Name: pulumi.String("zonal-ops-agent-vme-policy-_80332"),
Zone: pulumi.String("us-central1-a"),
ExtensionPolicies: compute.ZoneVmExtensionPolicyExtensionPolicyArray{
&compute.ZoneVmExtensionPolicyExtensionPolicyArgs{
ExtensionName: pulumi.String("ops-agent"),
PinnedVersion: pulumi.String("2.66.0"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var opsAgentPolicy = new Gcp.Compute.ZoneVmExtensionPolicy("ops_agent_policy", new()
{
Name = "zonal-ops-agent-vme-policy-_80332",
Zone = "us-central1-a",
ExtensionPolicies = new[]
{
new Gcp.Compute.Inputs.ZoneVmExtensionPolicyExtensionPolicyArgs
{
ExtensionName = "ops-agent",
PinnedVersion = "2.66.0",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ZoneVmExtensionPolicy;
import com.pulumi.gcp.compute.ZoneVmExtensionPolicyArgs;
import com.pulumi.gcp.compute.inputs.ZoneVmExtensionPolicyExtensionPolicyArgs;
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 opsAgentPolicy = new ZoneVmExtensionPolicy("opsAgentPolicy", ZoneVmExtensionPolicyArgs.builder()
.name("zonal-ops-agent-vme-policy-_80332")
.zone("us-central1-a")
.extensionPolicies(ZoneVmExtensionPolicyExtensionPolicyArgs.builder()
.extensionName("ops-agent")
.pinnedVersion("2.66.0")
.build())
.build());
}
}
resources:
opsAgentPolicy:
type: gcp:compute:ZoneVmExtensionPolicy
name: ops_agent_policy
properties:
name: zonal-ops-agent-vme-policy-_80332
zone: us-central1-a
extensionPolicies:
- extensionName: ops-agent
pinnedVersion: 2.66.0
pulumi {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_compute_zonevmextensionpolicy" "ops_agent_policy" {
name = "zonal-ops-agent-vme-policy-_80332"
zone = "us-central1-a"
extension_policies {
extension_name = "ops-agent"
pinned_version = "2.66.0"
}
}
Create ZoneVmExtensionPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ZoneVmExtensionPolicy(name: string, args: ZoneVmExtensionPolicyArgs, opts?: CustomResourceOptions);@overload
def ZoneVmExtensionPolicy(resource_name: str,
args: ZoneVmExtensionPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ZoneVmExtensionPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
extension_policies: Optional[Sequence[ZoneVmExtensionPolicyExtensionPolicyArgs]] = None,
zone: Optional[str] = None,
deletion_policy: Optional[str] = None,
description: Optional[str] = None,
instance_selectors: Optional[Sequence[ZoneVmExtensionPolicyInstanceSelectorArgs]] = None,
name: Optional[str] = None,
priority: Optional[int] = None,
project: Optional[str] = None)func NewZoneVmExtensionPolicy(ctx *Context, name string, args ZoneVmExtensionPolicyArgs, opts ...ResourceOption) (*ZoneVmExtensionPolicy, error)public ZoneVmExtensionPolicy(string name, ZoneVmExtensionPolicyArgs args, CustomResourceOptions? opts = null)
public ZoneVmExtensionPolicy(String name, ZoneVmExtensionPolicyArgs args)
public ZoneVmExtensionPolicy(String name, ZoneVmExtensionPolicyArgs args, CustomResourceOptions options)
type: gcp:compute:ZoneVmExtensionPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_compute_zone_vm_extension_policy" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args ZoneVmExtensionPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ZoneVmExtensionPolicyArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ZoneVmExtensionPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ZoneVmExtensionPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ZoneVmExtensionPolicyArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var zoneVmExtensionPolicyResource = new Gcp.Compute.ZoneVmExtensionPolicy("zoneVmExtensionPolicyResource", new()
{
ExtensionPolicies = new[]
{
new Gcp.Compute.Inputs.ZoneVmExtensionPolicyExtensionPolicyArgs
{
ExtensionName = "string",
PinnedVersion = "string",
StringConfig = "string",
},
},
Zone = "string",
DeletionPolicy = "string",
Description = "string",
InstanceSelectors = new[]
{
new Gcp.Compute.Inputs.ZoneVmExtensionPolicyInstanceSelectorArgs
{
LabelSelector = new Gcp.Compute.Inputs.ZoneVmExtensionPolicyInstanceSelectorLabelSelectorArgs
{
InclusionLabels =
{
{ "string", "string" },
},
},
},
},
Name = "string",
Priority = 0,
Project = "string",
});
example, err := compute.NewZoneVmExtensionPolicy(ctx, "zoneVmExtensionPolicyResource", &compute.ZoneVmExtensionPolicyArgs{
ExtensionPolicies: compute.ZoneVmExtensionPolicyExtensionPolicyArray{
&compute.ZoneVmExtensionPolicyExtensionPolicyArgs{
ExtensionName: pulumi.String("string"),
PinnedVersion: pulumi.String("string"),
StringConfig: pulumi.String("string"),
},
},
Zone: pulumi.String("string"),
DeletionPolicy: pulumi.String("string"),
Description: pulumi.String("string"),
InstanceSelectors: compute.ZoneVmExtensionPolicyInstanceSelectorArray{
&compute.ZoneVmExtensionPolicyInstanceSelectorArgs{
LabelSelector: &compute.ZoneVmExtensionPolicyInstanceSelectorLabelSelectorArgs{
InclusionLabels: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
},
},
Name: pulumi.String("string"),
Priority: pulumi.Int(0),
Project: pulumi.String("string"),
})
resource "gcp_compute_zone_vm_extension_policy" "zoneVmExtensionPolicyResource" {
lifecycle {
create_before_destroy = true
}
extension_policies {
extension_name = "string"
pinned_version = "string"
string_config = "string"
}
zone = "string"
deletion_policy = "string"
description = "string"
instance_selectors {
label_selector = {
inclusion_labels = {
"string" = "string"
}
}
}
name = "string"
priority = 0
project = "string"
}
var zoneVmExtensionPolicyResource = new ZoneVmExtensionPolicy("zoneVmExtensionPolicyResource", ZoneVmExtensionPolicyArgs.builder()
.extensionPolicies(ZoneVmExtensionPolicyExtensionPolicyArgs.builder()
.extensionName("string")
.pinnedVersion("string")
.stringConfig("string")
.build())
.zone("string")
.deletionPolicy("string")
.description("string")
.instanceSelectors(ZoneVmExtensionPolicyInstanceSelectorArgs.builder()
.labelSelector(ZoneVmExtensionPolicyInstanceSelectorLabelSelectorArgs.builder()
.inclusionLabels(Map.of("string", "string"))
.build())
.build())
.name("string")
.priority(0)
.project("string")
.build());
zone_vm_extension_policy_resource = gcp.compute.ZoneVmExtensionPolicy("zoneVmExtensionPolicyResource",
extension_policies=[{
"extension_name": "string",
"pinned_version": "string",
"string_config": "string",
}],
zone="string",
deletion_policy="string",
description="string",
instance_selectors=[{
"label_selector": {
"inclusion_labels": {
"string": "string",
},
},
}],
name="string",
priority=0,
project="string")
const zoneVmExtensionPolicyResource = new gcp.compute.ZoneVmExtensionPolicy("zoneVmExtensionPolicyResource", {
extensionPolicies: [{
extensionName: "string",
pinnedVersion: "string",
stringConfig: "string",
}],
zone: "string",
deletionPolicy: "string",
description: "string",
instanceSelectors: [{
labelSelector: {
inclusionLabels: {
string: "string",
},
},
}],
name: "string",
priority: 0,
project: "string",
});
type: gcp:compute:ZoneVmExtensionPolicy
properties:
deletionPolicy: string
description: string
extensionPolicies:
- extensionName: string
pinnedVersion: string
stringConfig: string
instanceSelectors:
- labelSelector:
inclusionLabels:
string: string
name: string
priority: 0
project: string
zone: string
ZoneVmExtensionPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ZoneVmExtensionPolicy resource accepts the following input properties:
- Extension
Policies List<ZoneVm Extension Policy Extension Policy> - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- Zone string
- Name of the zone for this request.
- Deletion
Policy 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.
- Description string
- An optional description of this resource.
- Instance
Selectors List<ZoneVm Extension Policy Instance Selector> - Selectors to target VMs for this policy. Structure is documented below.
- Name string
- Name of the resource. Provided by the client when the resource is created.
- Priority int
- Priority of this policy.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Extension
Policies []ZoneVm Extension Policy Extension Policy Args - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- Zone string
- Name of the zone for this request.
- Deletion
Policy 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.
- Description string
- An optional description of this resource.
- Instance
Selectors []ZoneVm Extension Policy Instance Selector Args - Selectors to target VMs for this policy. Structure is documented below.
- Name string
- Name of the resource. Provided by the client when the resource is created.
- Priority int
- Priority of this policy.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- extension_
policies list(object) - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- zone string
- Name of the zone for this request.
- deletion_
policy 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.
- description string
- An optional description of this resource.
- instance_
selectors list(object) - Selectors to target VMs for this policy. Structure is documented below.
- name string
- Name of the resource. Provided by the client when the resource is created.
- priority number
- Priority of this policy.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- extension
Policies List<ZoneVm Extension Policy Extension Policy> - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- zone String
- Name of the zone for this request.
- deletion
Policy 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.
- description String
- An optional description of this resource.
- instance
Selectors List<ZoneVm Extension Policy Instance Selector> - Selectors to target VMs for this policy. Structure is documented below.
- name String
- Name of the resource. Provided by the client when the resource is created.
- priority Integer
- Priority of this policy.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- extension
Policies ZoneVm Extension Policy Extension Policy[] - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- zone string
- Name of the zone for this request.
- deletion
Policy 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.
- description string
- An optional description of this resource.
- instance
Selectors ZoneVm Extension Policy Instance Selector[] - Selectors to target VMs for this policy. Structure is documented below.
- name string
- Name of the resource. Provided by the client when the resource is created.
- priority number
- Priority of this policy.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- extension_
policies Sequence[ZoneVm Extension Policy Extension Policy Args] - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- zone str
- Name of the zone for this request.
- deletion_
policy str - 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.
- description str
- An optional description of this resource.
- instance_
selectors Sequence[ZoneVm Extension Policy Instance Selector Args] - Selectors to target VMs for this policy. Structure is documented below.
- name str
- Name of the resource. Provided by the client when the resource is created.
- priority int
- Priority of this policy.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- extension
Policies List<Property Map> - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- zone String
- Name of the zone for this request.
- deletion
Policy 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.
- description String
- An optional description of this resource.
- instance
Selectors List<Property Map> - Selectors to target VMs for this policy. Structure is documented below.
- name String
- Name of the resource. Provided by the client when the resource is created.
- priority Number
- Priority of this policy.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the ZoneVmExtensionPolicy resource produces the following output properties:
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kind string
- Type of the resource.
- Managed
By boolGlobal - Indicates if this policy is managed by a global policy.
- State string
- Current state of the policy.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Kind string
- Type of the resource.
- Managed
By boolGlobal - Indicates if this policy is managed by a global policy.
- State string
- Current state of the policy.
- creation_
timestamp string - Creation timestamp in RFC3339 text format.
- id string
- The provider-assigned unique ID for this managed resource.
- kind string
- Type of the resource.
- managed_
by_ boolglobal - Indicates if this policy is managed by a global policy.
- state string
- Current state of the policy.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- kind String
- Type of the resource.
- managed
By BooleanGlobal - Indicates if this policy is managed by a global policy.
- state String
- Current state of the policy.
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- id string
- The provider-assigned unique ID for this managed resource.
- kind string
- Type of the resource.
- managed
By booleanGlobal - Indicates if this policy is managed by a global policy.
- state string
- Current state of the policy.
- creation_
timestamp str - Creation timestamp in RFC3339 text format.
- id str
- The provider-assigned unique ID for this managed resource.
- kind str
- Type of the resource.
- managed_
by_ boolglobal - Indicates if this policy is managed by a global policy.
- state str
- Current state of the policy.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- id String
- The provider-assigned unique ID for this managed resource.
- kind String
- Type of the resource.
- managed
By BooleanGlobal - Indicates if this policy is managed by a global policy.
- state String
- Current state of the policy.
Look up Existing ZoneVmExtensionPolicy Resource
Get an existing ZoneVmExtensionPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ZoneVmExtensionPolicyState, opts?: CustomResourceOptions): ZoneVmExtensionPolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
creation_timestamp: Optional[str] = None,
deletion_policy: Optional[str] = None,
description: Optional[str] = None,
extension_policies: Optional[Sequence[ZoneVmExtensionPolicyExtensionPolicyArgs]] = None,
instance_selectors: Optional[Sequence[ZoneVmExtensionPolicyInstanceSelectorArgs]] = None,
kind: Optional[str] = None,
managed_by_global: Optional[bool] = None,
name: Optional[str] = None,
priority: Optional[int] = None,
project: Optional[str] = None,
state: Optional[str] = None,
zone: Optional[str] = None) -> ZoneVmExtensionPolicyfunc GetZoneVmExtensionPolicy(ctx *Context, name string, id IDInput, state *ZoneVmExtensionPolicyState, opts ...ResourceOption) (*ZoneVmExtensionPolicy, error)public static ZoneVmExtensionPolicy Get(string name, Input<string> id, ZoneVmExtensionPolicyState? state, CustomResourceOptions? opts = null)public static ZoneVmExtensionPolicy get(String name, Output<String> id, ZoneVmExtensionPolicyState state, CustomResourceOptions options)resources: _: type: gcp:compute:ZoneVmExtensionPolicy get: id: ${id}import {
to = gcp_compute_zone_vm_extension_policy.example
id = "${id}"
}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Deletion
Policy 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.
- Description string
- An optional description of this resource.
- Extension
Policies List<ZoneVm Extension Policy Extension Policy> - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- Instance
Selectors List<ZoneVm Extension Policy Instance Selector> - Selectors to target VMs for this policy. Structure is documented below.
- Kind string
- Type of the resource.
- Managed
By boolGlobal - Indicates if this policy is managed by a global policy.
- Name string
- Name of the resource. Provided by the client when the resource is created.
- Priority int
- Priority of this policy.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- State string
- Current state of the policy.
- Zone string
- Name of the zone for this request.
- Creation
Timestamp string - Creation timestamp in RFC3339 text format.
- Deletion
Policy 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.
- Description string
- An optional description of this resource.
- Extension
Policies []ZoneVm Extension Policy Extension Policy Args - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- Instance
Selectors []ZoneVm Extension Policy Instance Selector Args - Selectors to target VMs for this policy. Structure is documented below.
- Kind string
- Type of the resource.
- Managed
By boolGlobal - Indicates if this policy is managed by a global policy.
- Name string
- Name of the resource. Provided by the client when the resource is created.
- Priority int
- Priority of this policy.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- State string
- Current state of the policy.
- Zone string
- Name of the zone for this request.
- creation_
timestamp string - Creation timestamp in RFC3339 text format.
- deletion_
policy 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.
- description string
- An optional description of this resource.
- extension_
policies list(object) - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- instance_
selectors list(object) - Selectors to target VMs for this policy. Structure is documented below.
- kind string
- Type of the resource.
- managed_
by_ boolglobal - Indicates if this policy is managed by a global policy.
- name string
- Name of the resource. Provided by the client when the resource is created.
- priority number
- Priority of this policy.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state string
- Current state of the policy.
- zone string
- Name of the zone for this request.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- deletion
Policy 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.
- description String
- An optional description of this resource.
- extension
Policies List<ZoneVm Extension Policy Extension Policy> - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- instance
Selectors List<ZoneVm Extension Policy Instance Selector> - Selectors to target VMs for this policy. Structure is documented below.
- kind String
- Type of the resource.
- managed
By BooleanGlobal - Indicates if this policy is managed by a global policy.
- name String
- Name of the resource. Provided by the client when the resource is created.
- priority Integer
- Priority of this policy.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state String
- Current state of the policy.
- zone String
- Name of the zone for this request.
- creation
Timestamp string - Creation timestamp in RFC3339 text format.
- deletion
Policy 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.
- description string
- An optional description of this resource.
- extension
Policies ZoneVm Extension Policy Extension Policy[] - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- instance
Selectors ZoneVm Extension Policy Instance Selector[] - Selectors to target VMs for this policy. Structure is documented below.
- kind string
- Type of the resource.
- managed
By booleanGlobal - Indicates if this policy is managed by a global policy.
- name string
- Name of the resource. Provided by the client when the resource is created.
- priority number
- Priority of this policy.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state string
- Current state of the policy.
- zone string
- Name of the zone for this request.
- creation_
timestamp str - Creation timestamp in RFC3339 text format.
- deletion_
policy str - 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.
- description str
- An optional description of this resource.
- extension_
policies Sequence[ZoneVm Extension Policy Extension Policy Args] - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- instance_
selectors Sequence[ZoneVm Extension Policy Instance Selector Args] - Selectors to target VMs for this policy. Structure is documented below.
- kind str
- Type of the resource.
- managed_
by_ boolglobal - Indicates if this policy is managed by a global policy.
- name str
- Name of the resource. Provided by the client when the resource is created.
- priority int
- Priority of this policy.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state str
- Current state of the policy.
- zone str
- Name of the zone for this request.
- creation
Timestamp String - Creation timestamp in RFC3339 text format.
- deletion
Policy 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.
- description String
- An optional description of this resource.
- extension
Policies List<Property Map> - A map of extension names (for example, "ops-agent") to their corresponding policy configurations. Structure is documented below.
- instance
Selectors List<Property Map> - Selectors to target VMs for this policy. Structure is documented below.
- kind String
- Type of the resource.
- managed
By BooleanGlobal - Indicates if this policy is managed by a global policy.
- name String
- Name of the resource. Provided by the client when the resource is created.
- priority Number
- Priority of this policy.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- state String
- Current state of the policy.
- zone String
- Name of the zone for this request.
Supporting Types
ZoneVmExtensionPolicyExtensionPolicy, ZoneVmExtensionPolicyExtensionPolicyArgs
- Extension
Name string - The identifier for this object. Format specified above.
- Pinned
Version string - The specific version of the extension to install.
- String
Config string - String-based configuration data for the extension.
- Extension
Name string - The identifier for this object. Format specified above.
- Pinned
Version string - The specific version of the extension to install.
- String
Config string - String-based configuration data for the extension.
- extension_
name string - The identifier for this object. Format specified above.
- pinned_
version string - The specific version of the extension to install.
- string_
config string - String-based configuration data for the extension.
- extension
Name String - The identifier for this object. Format specified above.
- pinned
Version String - The specific version of the extension to install.
- string
Config String - String-based configuration data for the extension.
- extension
Name string - The identifier for this object. Format specified above.
- pinned
Version string - The specific version of the extension to install.
- string
Config string - String-based configuration data for the extension.
- extension_
name str - The identifier for this object. Format specified above.
- pinned_
version str - The specific version of the extension to install.
- string_
config str - String-based configuration data for the extension.
- extension
Name String - The identifier for this object. Format specified above.
- pinned
Version String - The specific version of the extension to install.
- string
Config String - String-based configuration data for the extension.
ZoneVmExtensionPolicyInstanceSelector, ZoneVmExtensionPolicyInstanceSelectorArgs
- Label
Selector ZoneVm Extension Policy Instance Selector Label Selector - LabelSelector matches VM labels. Structure is documented below.
- Label
Selector ZoneVm Extension Policy Instance Selector Label Selector - LabelSelector matches VM labels. Structure is documented below.
- label_
selector object - LabelSelector matches VM labels. Structure is documented below.
- label
Selector ZoneVm Extension Policy Instance Selector Label Selector - LabelSelector matches VM labels. Structure is documented below.
- label
Selector ZoneVm Extension Policy Instance Selector Label Selector - LabelSelector matches VM labels. Structure is documented below.
- label_
selector ZoneVm Extension Policy Instance Selector Label Selector - LabelSelector matches VM labels. Structure is documented below.
- label
Selector Property Map - LabelSelector matches VM labels. Structure is documented below.
ZoneVmExtensionPolicyInstanceSelectorLabelSelector, ZoneVmExtensionPolicyInstanceSelectorLabelSelectorArgs
- Inclusion
Labels Dictionary<string, string> - A map of key-value pairs representing VM labels.
- Inclusion
Labels map[string]string - A map of key-value pairs representing VM labels.
- inclusion_
labels map(string) - A map of key-value pairs representing VM labels.
- inclusion
Labels Map<String,String> - A map of key-value pairs representing VM labels.
- inclusion
Labels {[key: string]: string} - A map of key-value pairs representing VM labels.
- inclusion_
labels Mapping[str, str] - A map of key-value pairs representing VM labels.
- inclusion
Labels Map<String> - A map of key-value pairs representing VM labels.
Import
ZoneVmExtensionPolicy can be imported using any of these accepted formats:
projects/{{project}}/zones/{{zone}}/vmExtensionPolicies/{{name}}{{project}}/{{zone}}/{{name}}{{zone}}/{{name}}{{name}}
When using the pulumi import command, ZoneVmExtensionPolicy can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/zoneVmExtensionPolicy:ZoneVmExtensionPolicy default projects/{{project}}/zones/{{zone}}/vmExtensionPolicies/{{name}}
$ pulumi import gcp:compute/zoneVmExtensionPolicy:ZoneVmExtensionPolicy default {{project}}/{{zone}}/{{name}}
$ pulumi import gcp:compute/zoneVmExtensionPolicy:ZoneVmExtensionPolicy default {{zone}}/{{name}}
$ pulumi import gcp:compute/zoneVmExtensionPolicy:ZoneVmExtensionPolicy default {{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
published on Wednesday, Jul 29, 2026 by Pulumi