published on Tuesday, Oct 20, 2026 by Pulumi
published on Tuesday, Oct 20, 2026 by Pulumi
Represents the singleton resource Snapshot Recycle Bin Policy that configures the retention duration for snapshots in the recycle bin.
Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.
To get more information about SnapshotRecycleBinPolicy, see:
- API documentation
- How-to Guides
Example Usage
Snapshot Recycle Bin Policy Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.compute.SnapshotRecycleBinPolicy("default", {rules: [{
name: "some-project/12345/6789",
standardSnapshots: {
retentionDurationDays: 2,
},
}]});
import pulumi
import pulumi_gcp as gcp
default = gcp.compute.SnapshotRecycleBinPolicy("default", rules=[{
"name": "some-project/12345/6789",
"standard_snapshots": {
"retention_duration_days": 2,
},
}])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewSnapshotRecycleBinPolicy(ctx, "default", &compute.SnapshotRecycleBinPolicyArgs{
Rules: compute.SnapshotRecycleBinPolicyRuleArray{
&compute.SnapshotRecycleBinPolicyRuleArgs{
Name: pulumi.String("some-project/12345/6789"),
StandardSnapshots: &compute.SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs{
RetentionDurationDays: pulumi.Int(2),
},
},
},
})
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 @default = new Gcp.Compute.SnapshotRecycleBinPolicy("default", new()
{
Rules = new[]
{
new Gcp.Compute.Inputs.SnapshotRecycleBinPolicyRuleArgs
{
Name = "some-project/12345/6789",
StandardSnapshots = new Gcp.Compute.Inputs.SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs
{
RetentionDurationDays = 2,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.SnapshotRecycleBinPolicy;
import com.pulumi.gcp.compute.SnapshotRecycleBinPolicyArgs;
import com.pulumi.gcp.compute.inputs.SnapshotRecycleBinPolicyRuleArgs;
import com.pulumi.gcp.compute.inputs.SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs;
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 default_ = new SnapshotRecycleBinPolicy("default", SnapshotRecycleBinPolicyArgs.builder()
.rules(SnapshotRecycleBinPolicyRuleArgs.builder()
.name("some-project/12345/6789")
.standardSnapshots(SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs.builder()
.retentionDurationDays(2)
.build())
.build())
.build());
}
}
resources:
default:
type: gcp:compute:SnapshotRecycleBinPolicy
properties:
rules:
- name: some-project/12345/6789
standardSnapshots:
retentionDurationDays: 2
terraform {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_compute_snapshot_recycle_bin_policy" "default" {
lifecycle {
create_before_destroy = true
}
rules {
name = "some-project/12345/6789"
standard_snapshots = {
retention_duration_days = 2
}
}
}
Snapshot Recycle Bin Policy Multiple
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const multiple = new gcp.compute.SnapshotRecycleBinPolicy("multiple", {rules: [
{
name: "some-project/54653/5476",
standardSnapshots: {
retentionDurationDays: 3,
},
},
{
name: "some-project/12345/6789",
standardSnapshots: {
retentionDurationDays: 6,
},
},
]});
import pulumi
import pulumi_gcp as gcp
multiple = gcp.compute.SnapshotRecycleBinPolicy("multiple", rules=[
{
"name": "some-project/54653/5476",
"standard_snapshots": {
"retention_duration_days": 3,
},
},
{
"name": "some-project/12345/6789",
"standard_snapshots": {
"retention_duration_days": 6,
},
},
])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/compute"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewSnapshotRecycleBinPolicy(ctx, "multiple", &compute.SnapshotRecycleBinPolicyArgs{
Rules: compute.SnapshotRecycleBinPolicyRuleArray{
&compute.SnapshotRecycleBinPolicyRuleArgs{
Name: pulumi.String("some-project/54653/5476"),
StandardSnapshots: &compute.SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs{
RetentionDurationDays: pulumi.Int(3),
},
},
&compute.SnapshotRecycleBinPolicyRuleArgs{
Name: pulumi.String("some-project/12345/6789"),
StandardSnapshots: &compute.SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs{
RetentionDurationDays: pulumi.Int(6),
},
},
},
})
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 multiple = new Gcp.Compute.SnapshotRecycleBinPolicy("multiple", new()
{
Rules = new[]
{
new Gcp.Compute.Inputs.SnapshotRecycleBinPolicyRuleArgs
{
Name = "some-project/54653/5476",
StandardSnapshots = new Gcp.Compute.Inputs.SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs
{
RetentionDurationDays = 3,
},
},
new Gcp.Compute.Inputs.SnapshotRecycleBinPolicyRuleArgs
{
Name = "some-project/12345/6789",
StandardSnapshots = new Gcp.Compute.Inputs.SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs
{
RetentionDurationDays = 6,
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.SnapshotRecycleBinPolicy;
import com.pulumi.gcp.compute.SnapshotRecycleBinPolicyArgs;
import com.pulumi.gcp.compute.inputs.SnapshotRecycleBinPolicyRuleArgs;
import com.pulumi.gcp.compute.inputs.SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs;
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 multiple = new SnapshotRecycleBinPolicy("multiple", SnapshotRecycleBinPolicyArgs.builder()
.rules(
SnapshotRecycleBinPolicyRuleArgs.builder()
.name("some-project/54653/5476")
.standardSnapshots(SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs.builder()
.retentionDurationDays(3)
.build())
.build(),
SnapshotRecycleBinPolicyRuleArgs.builder()
.name("some-project/12345/6789")
.standardSnapshots(SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs.builder()
.retentionDurationDays(6)
.build())
.build())
.build());
}
}
resources:
multiple:
type: gcp:compute:SnapshotRecycleBinPolicy
properties:
rules:
- name: some-project/54653/5476
standardSnapshots:
retentionDurationDays: 3
- name: some-project/12345/6789
standardSnapshots:
retentionDurationDays: 6
terraform {
required_providers {
gcp = {
source = "pulumi/gcp"
}
}
}
resource "gcp_compute_snapshot_recycle_bin_policy" "multiple" {
lifecycle {
create_before_destroy = true
}
rules {
name = "some-project/54653/5476"
standard_snapshots = {
retention_duration_days = 3
}
}
rules {
name = "some-project/12345/6789"
standard_snapshots = {
retention_duration_days = 6
}
}
}
Create SnapshotRecycleBinPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new SnapshotRecycleBinPolicy(name: string, args?: SnapshotRecycleBinPolicyArgs, opts?: CustomResourceOptions);@overload
def SnapshotRecycleBinPolicy(resource_name: str,
args: Optional[SnapshotRecycleBinPolicyArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def SnapshotRecycleBinPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
rules: Optional[Sequence[SnapshotRecycleBinPolicyRuleArgs]] = None)func NewSnapshotRecycleBinPolicy(ctx *Context, name string, args *SnapshotRecycleBinPolicyArgs, opts ...ResourceOption) (*SnapshotRecycleBinPolicy, error)public SnapshotRecycleBinPolicy(string name, SnapshotRecycleBinPolicyArgs? args = null, CustomResourceOptions? opts = null)
public SnapshotRecycleBinPolicy(String name, SnapshotRecycleBinPolicyArgs args)
public SnapshotRecycleBinPolicy(String name, SnapshotRecycleBinPolicyArgs args, CustomResourceOptions options)
type: gcp:compute:SnapshotRecycleBinPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "gcp_compute_snapshot_recycle_bin_policy" "name" {
# resource properties
}Parameters
- name string
- The unique name of the resource.
- args SnapshotRecycleBinPolicyArgs
- 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 SnapshotRecycleBinPolicyArgs
- 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 SnapshotRecycleBinPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnapshotRecycleBinPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SnapshotRecycleBinPolicyArgs
- 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 snapshotRecycleBinPolicyResource = new Gcp.Compute.SnapshotRecycleBinPolicy("snapshotRecycleBinPolicyResource", new()
{
Project = "string",
Rules = new[]
{
new Gcp.Compute.Inputs.SnapshotRecycleBinPolicyRuleArgs
{
Name = "string",
StandardSnapshots = new Gcp.Compute.Inputs.SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs
{
RetentionDurationDays = 0,
},
},
},
});
example, err := compute.NewSnapshotRecycleBinPolicy(ctx, "snapshotRecycleBinPolicyResource", &compute.SnapshotRecycleBinPolicyArgs{
Project: pulumi.String("string"),
Rules: compute.SnapshotRecycleBinPolicyRuleArray{
&compute.SnapshotRecycleBinPolicyRuleArgs{
Name: pulumi.String("string"),
StandardSnapshots: &compute.SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs{
RetentionDurationDays: pulumi.Int(0),
},
},
},
})
resource "gcp_compute_snapshot_recycle_bin_policy" "snapshotRecycleBinPolicyResource" {
lifecycle {
create_before_destroy = true
}
project = "string"
rules {
name = "string"
standard_snapshots = {
retention_duration_days = 0
}
}
}
var snapshotRecycleBinPolicyResource = new SnapshotRecycleBinPolicy("snapshotRecycleBinPolicyResource", SnapshotRecycleBinPolicyArgs.builder()
.project("string")
.rules(SnapshotRecycleBinPolicyRuleArgs.builder()
.name("string")
.standardSnapshots(SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs.builder()
.retentionDurationDays(0)
.build())
.build())
.build());
snapshot_recycle_bin_policy_resource = gcp.compute.SnapshotRecycleBinPolicy("snapshotRecycleBinPolicyResource",
project="string",
rules=[{
"name": "string",
"standard_snapshots": {
"retention_duration_days": 0,
},
}])
const snapshotRecycleBinPolicyResource = new gcp.compute.SnapshotRecycleBinPolicy("snapshotRecycleBinPolicyResource", {
project: "string",
rules: [{
name: "string",
standardSnapshots: {
retentionDurationDays: 0,
},
}],
});
type: gcp:compute:SnapshotRecycleBinPolicy
properties:
project: string
rules:
- name: string
standardSnapshots:
retentionDurationDays: 0
SnapshotRecycleBinPolicy 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 SnapshotRecycleBinPolicy resource accepts the following input properties:
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Rules
List<Snapshot
Recycle Bin Policy Rule> - The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Rules
[]Snapshot
Recycle Bin Policy Rule Args - The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rules list(object)
- The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rules
List<Snapshot
Recycle Bin Policy Rule> - The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rules
Snapshot
Recycle Bin Policy Rule[] - The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rules
Sequence[Snapshot
Recycle Bin Policy Rule Args] - The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rules List<Property Map>
- The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
Outputs
All input properties are implicitly available as output properties. Additionally, the SnapshotRecycleBinPolicy resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- System
Rules List<SnapshotRecycle Bin Policy System Rule> - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- Id string
- The provider-assigned unique ID for this managed resource.
- System
Rules []SnapshotRecycle Bin Policy System Rule - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- id string
- The provider-assigned unique ID for this managed resource.
- system_
rules list(object) - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- system
Rules List<SnapshotRecycle Bin Policy System Rule> - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- id string
- The provider-assigned unique ID for this managed resource.
- system
Rules SnapshotRecycle Bin Policy System Rule[] - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- id str
- The provider-assigned unique ID for this managed resource.
- system_
rules Sequence[SnapshotRecycle Bin Policy System Rule] - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- id String
- The provider-assigned unique ID for this managed resource.
- system
Rules List<Property Map> - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
Look up Existing SnapshotRecycleBinPolicy Resource
Get an existing SnapshotRecycleBinPolicy 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?: SnapshotRecycleBinPolicyState, opts?: CustomResourceOptions): SnapshotRecycleBinPolicy@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
rules: Optional[Sequence[SnapshotRecycleBinPolicyRuleArgs]] = None,
system_rules: Optional[Sequence[SnapshotRecycleBinPolicySystemRuleArgs]] = None) -> SnapshotRecycleBinPolicyfunc GetSnapshotRecycleBinPolicy(ctx *Context, name string, id IDInput, state *SnapshotRecycleBinPolicyState, opts ...ResourceOption) (*SnapshotRecycleBinPolicy, error)public static SnapshotRecycleBinPolicy Get(string name, Input<string> id, SnapshotRecycleBinPolicyState? state, CustomResourceOptions? opts = null)public static SnapshotRecycleBinPolicy get(String name, Output<String> id, SnapshotRecycleBinPolicyState state, CustomResourceOptions options)resources: _: type: gcp:compute:SnapshotRecycleBinPolicy get: id: ${id}import {
to = gcp_compute_snapshot_recycle_bin_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.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Rules
List<Snapshot
Recycle Bin Policy Rule> - The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- System
Rules List<SnapshotRecycle Bin Policy System Rule> - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Rules
[]Snapshot
Recycle Bin Policy Rule Args - The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- System
Rules []SnapshotRecycle Bin Policy System Rule Args - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rules list(object)
- The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- system_
rules list(object) - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rules
List<Snapshot
Recycle Bin Policy Rule> - The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- system
Rules List<SnapshotRecycle Bin Policy System Rule> - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rules
Snapshot
Recycle Bin Policy Rule[] - The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- system
Rules SnapshotRecycle Bin Policy System Rule[] - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rules
Sequence[Snapshot
Recycle Bin Policy Rule Args] - The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- system_
rules Sequence[SnapshotRecycle Bin Policy System Rule Args] - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rules List<Property Map>
- The rules for the snapshot recycle bin policy. The key name is either 'default' or namespaced name of the tag value which can be in the format: {organization_id}/{tag_key_short_name}/{tag_value_short_name} or {project_id}/{tag_key_short_name}/{tag_value_short_name} or {project_number}/{tag_key_short_name}/{tag_value_short_name}. The default rule is applied if snapshots do not have any of these tags. The value is the rule for the key. Structure is documented below.
- system
Rules List<Property Map> - The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
Supporting Types
SnapshotRecycleBinPolicyRule, SnapshotRecycleBinPolicyRuleArgs
- Name string
- The identifier for this object. Format specified above.
- Standard
Snapshots SnapshotRecycle Bin Policy Rule Standard Snapshots - The rule config for standard snapshots. Structure is documented below.
- Name string
- The identifier for this object. Format specified above.
- Standard
Snapshots SnapshotRecycle Bin Policy Rule Standard Snapshots - The rule config for standard snapshots. Structure is documented below.
- name string
- The identifier for this object. Format specified above.
- standard_
snapshots object - The rule config for standard snapshots. Structure is documented below.
- name String
- The identifier for this object. Format specified above.
- standard
Snapshots SnapshotRecycle Bin Policy Rule Standard Snapshots - The rule config for standard snapshots. Structure is documented below.
- name string
- The identifier for this object. Format specified above.
- standard
Snapshots SnapshotRecycle Bin Policy Rule Standard Snapshots - The rule config for standard snapshots. Structure is documented below.
- name str
- The identifier for this object. Format specified above.
- standard_
snapshots SnapshotRecycle Bin Policy Rule Standard Snapshots - The rule config for standard snapshots. Structure is documented below.
- name String
- The identifier for this object. Format specified above.
- standard
Snapshots Property Map - The rule config for standard snapshots. Structure is documented below.
SnapshotRecycleBinPolicyRuleStandardSnapshots, SnapshotRecycleBinPolicyRuleStandardSnapshotsArgs
- Retention
Duration intDays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- Retention
Duration intDays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- retention_
duration_ numberdays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- retention
Duration IntegerDays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- retention
Duration numberDays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- retention_
duration_ intdays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- retention
Duration NumberDays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
SnapshotRecycleBinPolicySystemRule, SnapshotRecycleBinPolicySystemRuleArgs
- Name string
- (Required) The identifier for this object. Format specified above.
- Standard
Snapshots List<SnapshotRecycle Bin Policy System Rule Standard Snapshot> - (Output) The rule config for standard snapshots. Structure is documented below.
- Name string
- (Required) The identifier for this object. Format specified above.
- Standard
Snapshots []SnapshotRecycle Bin Policy System Rule Standard Snapshot - (Output) The rule config for standard snapshots. Structure is documented below.
- name string
- (Required) The identifier for this object. Format specified above.
- standard_
snapshots list(object) - (Output) The rule config for standard snapshots. Structure is documented below.
- name String
- (Required) The identifier for this object. Format specified above.
- standard
Snapshots List<SnapshotRecycle Bin Policy System Rule Standard Snapshot> - (Output) The rule config for standard snapshots. Structure is documented below.
- name string
- (Required) The identifier for this object. Format specified above.
- standard
Snapshots SnapshotRecycle Bin Policy System Rule Standard Snapshot[] - (Output) The rule config for standard snapshots. Structure is documented below.
- name str
- (Required) The identifier for this object. Format specified above.
- standard_
snapshots Sequence[SnapshotRecycle Bin Policy System Rule Standard Snapshot] - (Output) The rule config for standard snapshots. Structure is documented below.
- name String
- (Required) The identifier for this object. Format specified above.
- standard
Snapshots List<Property Map> - (Output) The rule config for standard snapshots. Structure is documented below.
SnapshotRecycleBinPolicySystemRuleStandardSnapshot, SnapshotRecycleBinPolicySystemRuleStandardSnapshotArgs
- Retention
Duration intDays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- Retention
Duration intDays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- retention_
duration_ numberdays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- retention
Duration IntegerDays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- retention
Duration numberDays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- retention_
duration_ intdays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
- retention
Duration NumberDays - The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
Import
SnapshotRecycleBinPolicy can be imported using any of these accepted formats:
projects/{{project}}/global/snapshotRecycleBinPolicy{{project}}
When using the pulumi import command, SnapshotRecycleBinPolicy can be imported using one of the formats above. For example:
$ pulumi import gcp:compute/snapshotRecycleBinPolicy:SnapshotRecycleBinPolicy default projects/{{project}}/global/snapshotRecycleBinPolicy
$ pulumi import gcp:compute/snapshotRecycleBinPolicy:SnapshotRecycleBinPolicy default {{project}}
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 Tuesday, Oct 20, 2026 by Pulumi