1. Registry
  2. Packages
  3. Google Cloud (GCP)
  4. API Docs
  5. compute
  6. OrganizationSnapshotRecycleBinPolicy
Viewing docs for Google Cloud v10.2.0
published on Tuesday, Oct 20, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v10.2.0
published on Tuesday, Oct 20, 2026 by Pulumi

    Represents the singleton resource Organization Snapshot Recycle Bin Policy that configures the retention duration for snapshots in the recycle bin at organization level. All projects in that organization will share the same policy. If you configure the policy at the project level it will be merged with org level policy (if any) and the snapshots in that project will use that policy.

    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 OrganizationSnapshotRecycleBinPolicy, see:

    Example Usage

    Organization Snapshot Recycle Bin Policy Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const _default = new gcp.compute.OrganizationSnapshotRecycleBinPolicy("default", {
        organization: "123412341234",
        rules: [{
            name: "some-project/12345/6789",
            standardSnapshots: {
                retentionDurationDays: 2,
            },
        }],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.compute.OrganizationSnapshotRecycleBinPolicy("default",
        organization="123412341234",
        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.NewOrganizationSnapshotRecycleBinPolicy(ctx, "default", &compute.OrganizationSnapshotRecycleBinPolicyArgs{
    			Organization: pulumi.String("123412341234"),
    			Rules: compute.OrganizationSnapshotRecycleBinPolicyRuleArray{
    				&compute.OrganizationSnapshotRecycleBinPolicyRuleArgs{
    					Name: pulumi.String("some-project/12345/6789"),
    					StandardSnapshots: &compute.OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs{
    						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.OrganizationSnapshotRecycleBinPolicy("default", new()
        {
            Organization = "123412341234",
            Rules = new[]
            {
                new Gcp.Compute.Inputs.OrganizationSnapshotRecycleBinPolicyRuleArgs
                {
                    Name = "some-project/12345/6789",
                    StandardSnapshots = new Gcp.Compute.Inputs.OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs
                    {
                        RetentionDurationDays = 2,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.OrganizationSnapshotRecycleBinPolicy;
    import com.pulumi.gcp.compute.OrganizationSnapshotRecycleBinPolicyArgs;
    import com.pulumi.gcp.compute.inputs.OrganizationSnapshotRecycleBinPolicyRuleArgs;
    import com.pulumi.gcp.compute.inputs.OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs;
    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 OrganizationSnapshotRecycleBinPolicy("default", OrganizationSnapshotRecycleBinPolicyArgs.builder()
                .organization("123412341234")
                .rules(OrganizationSnapshotRecycleBinPolicyRuleArgs.builder()
                    .name("some-project/12345/6789")
                    .standardSnapshots(OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs.builder()
                        .retentionDurationDays(2)
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      default:
        type: gcp:compute:OrganizationSnapshotRecycleBinPolicy
        properties:
          organization: 1.23412341234e+11
          rules:
            - name: some-project/12345/6789
              standardSnapshots:
                retentionDurationDays: 2
    
    terraform {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    resource "gcp_compute_organization_snapshot_recycle_bin_policy" "default" {
      lifecycle {
        create_before_destroy = true
      }
      organization = 123412341234
      rules {
        name = "some-project/12345/6789"
        standard_snapshots = {
          retention_duration_days = 2
        }
      }
    }
    

    Organization Snapshot Recycle Bin Policy Multiple

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const multiple = new gcp.compute.OrganizationSnapshotRecycleBinPolicy("multiple", {
        organization: "123412341234",
        rules: [
            {
                name: "some-project/66546/8792",
                standardSnapshots: {
                    retentionDurationDays: 3,
                },
            },
            {
                name: "some-project/12345/6789",
                standardSnapshots: {
                    retentionDurationDays: 5,
                },
            },
        ],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    multiple = gcp.compute.OrganizationSnapshotRecycleBinPolicy("multiple",
        organization="123412341234",
        rules=[
            {
                "name": "some-project/66546/8792",
                "standard_snapshots": {
                    "retention_duration_days": 3,
                },
            },
            {
                "name": "some-project/12345/6789",
                "standard_snapshots": {
                    "retention_duration_days": 5,
                },
            },
        ])
    
    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.NewOrganizationSnapshotRecycleBinPolicy(ctx, "multiple", &compute.OrganizationSnapshotRecycleBinPolicyArgs{
    			Organization: pulumi.String("123412341234"),
    			Rules: compute.OrganizationSnapshotRecycleBinPolicyRuleArray{
    				&compute.OrganizationSnapshotRecycleBinPolicyRuleArgs{
    					Name: pulumi.String("some-project/66546/8792"),
    					StandardSnapshots: &compute.OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs{
    						RetentionDurationDays: pulumi.Int(3),
    					},
    				},
    				&compute.OrganizationSnapshotRecycleBinPolicyRuleArgs{
    					Name: pulumi.String("some-project/12345/6789"),
    					StandardSnapshots: &compute.OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs{
    						RetentionDurationDays: pulumi.Int(5),
    					},
    				},
    			},
    		})
    		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.OrganizationSnapshotRecycleBinPolicy("multiple", new()
        {
            Organization = "123412341234",
            Rules = new[]
            {
                new Gcp.Compute.Inputs.OrganizationSnapshotRecycleBinPolicyRuleArgs
                {
                    Name = "some-project/66546/8792",
                    StandardSnapshots = new Gcp.Compute.Inputs.OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs
                    {
                        RetentionDurationDays = 3,
                    },
                },
                new Gcp.Compute.Inputs.OrganizationSnapshotRecycleBinPolicyRuleArgs
                {
                    Name = "some-project/12345/6789",
                    StandardSnapshots = new Gcp.Compute.Inputs.OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs
                    {
                        RetentionDurationDays = 5,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.OrganizationSnapshotRecycleBinPolicy;
    import com.pulumi.gcp.compute.OrganizationSnapshotRecycleBinPolicyArgs;
    import com.pulumi.gcp.compute.inputs.OrganizationSnapshotRecycleBinPolicyRuleArgs;
    import com.pulumi.gcp.compute.inputs.OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs;
    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 OrganizationSnapshotRecycleBinPolicy("multiple", OrganizationSnapshotRecycleBinPolicyArgs.builder()
                .organization("123412341234")
                .rules(            
                    OrganizationSnapshotRecycleBinPolicyRuleArgs.builder()
                        .name("some-project/66546/8792")
                        .standardSnapshots(OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs.builder()
                            .retentionDurationDays(3)
                            .build())
                        .build(),
                    OrganizationSnapshotRecycleBinPolicyRuleArgs.builder()
                        .name("some-project/12345/6789")
                        .standardSnapshots(OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs.builder()
                            .retentionDurationDays(5)
                            .build())
                        .build())
                .build());
    
        }
    }
    
    resources:
      multiple:
        type: gcp:compute:OrganizationSnapshotRecycleBinPolicy
        properties:
          organization: 1.23412341234e+11
          rules:
            - name: some-project/66546/8792
              standardSnapshots:
                retentionDurationDays: 3
            - name: some-project/12345/6789
              standardSnapshots:
                retentionDurationDays: 5
    
    terraform {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    resource "gcp_compute_organization_snapshot_recycle_bin_policy" "multiple" {
      lifecycle {
        create_before_destroy = true
      }
      organization = 123412341234
      rules {
        name = "some-project/66546/8792"
        standard_snapshots = {
          retention_duration_days = 3
        }
      }
      rules {
        name = "some-project/12345/6789"
        standard_snapshots = {
          retention_duration_days = 5
        }
      }
    }
    

    Create OrganizationSnapshotRecycleBinPolicy Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new OrganizationSnapshotRecycleBinPolicy(name: string, args: OrganizationSnapshotRecycleBinPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationSnapshotRecycleBinPolicy(resource_name: str,
                                             args: OrganizationSnapshotRecycleBinPolicyArgs,
                                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def OrganizationSnapshotRecycleBinPolicy(resource_name: str,
                                             opts: Optional[ResourceOptions] = None,
                                             organization: Optional[str] = None,
                                             rules: Optional[Sequence[OrganizationSnapshotRecycleBinPolicyRuleArgs]] = None)
    func NewOrganizationSnapshotRecycleBinPolicy(ctx *Context, name string, args OrganizationSnapshotRecycleBinPolicyArgs, opts ...ResourceOption) (*OrganizationSnapshotRecycleBinPolicy, error)
    public OrganizationSnapshotRecycleBinPolicy(string name, OrganizationSnapshotRecycleBinPolicyArgs args, CustomResourceOptions? opts = null)
    public OrganizationSnapshotRecycleBinPolicy(String name, OrganizationSnapshotRecycleBinPolicyArgs args)
    public OrganizationSnapshotRecycleBinPolicy(String name, OrganizationSnapshotRecycleBinPolicyArgs args, CustomResourceOptions options)
    
    type: gcp:compute:OrganizationSnapshotRecycleBinPolicy
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "gcp_compute_organization_snapshot_recycle_bin_policy" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args OrganizationSnapshotRecycleBinPolicyArgs
    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 OrganizationSnapshotRecycleBinPolicyArgs
    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 OrganizationSnapshotRecycleBinPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationSnapshotRecycleBinPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationSnapshotRecycleBinPolicyArgs
    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 organizationSnapshotRecycleBinPolicyResource = new Gcp.Compute.OrganizationSnapshotRecycleBinPolicy("organizationSnapshotRecycleBinPolicyResource", new()
    {
        Organization = "string",
        Rules = new[]
        {
            new Gcp.Compute.Inputs.OrganizationSnapshotRecycleBinPolicyRuleArgs
            {
                Name = "string",
                StandardSnapshots = new Gcp.Compute.Inputs.OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs
                {
                    RetentionDurationDays = 0,
                },
            },
        },
    });
    
    example, err := compute.NewOrganizationSnapshotRecycleBinPolicy(ctx, "organizationSnapshotRecycleBinPolicyResource", &compute.OrganizationSnapshotRecycleBinPolicyArgs{
    	Organization: pulumi.String("string"),
    	Rules: compute.OrganizationSnapshotRecycleBinPolicyRuleArray{
    		&compute.OrganizationSnapshotRecycleBinPolicyRuleArgs{
    			Name: pulumi.String("string"),
    			StandardSnapshots: &compute.OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs{
    				RetentionDurationDays: pulumi.Int(0),
    			},
    		},
    	},
    })
    
    resource "gcp_compute_organization_snapshot_recycle_bin_policy" "organizationSnapshotRecycleBinPolicyResource" {
      lifecycle {
        create_before_destroy = true
      }
      organization = "string"
      rules {
        name = "string"
        standard_snapshots = {
          retention_duration_days = 0
        }
      }
    }
    
    var organizationSnapshotRecycleBinPolicyResource = new OrganizationSnapshotRecycleBinPolicy("organizationSnapshotRecycleBinPolicyResource", OrganizationSnapshotRecycleBinPolicyArgs.builder()
        .organization("string")
        .rules(OrganizationSnapshotRecycleBinPolicyRuleArgs.builder()
            .name("string")
            .standardSnapshots(OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs.builder()
                .retentionDurationDays(0)
                .build())
            .build())
        .build());
    
    organization_snapshot_recycle_bin_policy_resource = gcp.compute.OrganizationSnapshotRecycleBinPolicy("organizationSnapshotRecycleBinPolicyResource",
        organization="string",
        rules=[{
            "name": "string",
            "standard_snapshots": {
                "retention_duration_days": 0,
            },
        }])
    
    const organizationSnapshotRecycleBinPolicyResource = new gcp.compute.OrganizationSnapshotRecycleBinPolicy("organizationSnapshotRecycleBinPolicyResource", {
        organization: "string",
        rules: [{
            name: "string",
            standardSnapshots: {
                retentionDurationDays: 0,
            },
        }],
    });
    
    type: gcp:compute:OrganizationSnapshotRecycleBinPolicy
    properties:
        organization: string
        rules:
            - name: string
              standardSnapshots:
                retentionDurationDays: 0
    

    OrganizationSnapshotRecycleBinPolicy 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 OrganizationSnapshotRecycleBinPolicy resource accepts the following input properties:

    Organization string
    The organization ID for this request (e.g., "organizations/1234").
    Rules List<OrganizationSnapshotRecycleBinPolicyRule>
    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.
    Organization string
    The organization ID for this request (e.g., "organizations/1234").
    Rules []OrganizationSnapshotRecycleBinPolicyRuleArgs
    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.
    organization string
    The organization ID for this request (e.g., "organizations/1234").
    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.
    organization String
    The organization ID for this request (e.g., "organizations/1234").
    rules List<OrganizationSnapshotRecycleBinPolicyRule>
    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.
    organization string
    The organization ID for this request (e.g., "organizations/1234").
    rules OrganizationSnapshotRecycleBinPolicyRule[]
    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.
    organization str
    The organization ID for this request (e.g., "organizations/1234").
    rules Sequence[OrganizationSnapshotRecycleBinPolicyRuleArgs]
    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.
    organization String
    The organization ID for this request (e.g., "organizations/1234").
    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 OrganizationSnapshotRecycleBinPolicy resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    SystemRules List<OrganizationSnapshotRecycleBinPolicySystemRule>
    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.
    SystemRules []OrganizationSnapshotRecycleBinPolicySystemRule
    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.
    systemRules List<OrganizationSnapshotRecycleBinPolicySystemRule>
    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.
    systemRules OrganizationSnapshotRecycleBinPolicySystemRule[]
    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[OrganizationSnapshotRecycleBinPolicySystemRule]
    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.
    systemRules 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 OrganizationSnapshotRecycleBinPolicy Resource

    Get an existing OrganizationSnapshotRecycleBinPolicy 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?: OrganizationSnapshotRecycleBinPolicyState, opts?: CustomResourceOptions): OrganizationSnapshotRecycleBinPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            organization: Optional[str] = None,
            rules: Optional[Sequence[OrganizationSnapshotRecycleBinPolicyRuleArgs]] = None,
            system_rules: Optional[Sequence[OrganizationSnapshotRecycleBinPolicySystemRuleArgs]] = None) -> OrganizationSnapshotRecycleBinPolicy
    func GetOrganizationSnapshotRecycleBinPolicy(ctx *Context, name string, id IDInput, state *OrganizationSnapshotRecycleBinPolicyState, opts ...ResourceOption) (*OrganizationSnapshotRecycleBinPolicy, error)
    public static OrganizationSnapshotRecycleBinPolicy Get(string name, Input<string> id, OrganizationSnapshotRecycleBinPolicyState? state, CustomResourceOptions? opts = null)
    public static OrganizationSnapshotRecycleBinPolicy get(String name, Output<String> id, OrganizationSnapshotRecycleBinPolicyState state, CustomResourceOptions options)
    resources:  _:    type: gcp:compute:OrganizationSnapshotRecycleBinPolicy    get:      id: ${id}
    import {
      to = gcp_compute_organization_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.
    The following state arguments are supported:
    Organization string
    The organization ID for this request (e.g., "organizations/1234").
    Rules List<OrganizationSnapshotRecycleBinPolicyRule>
    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.
    SystemRules List<OrganizationSnapshotRecycleBinPolicySystemRule>
    The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
    Organization string
    The organization ID for this request (e.g., "organizations/1234").
    Rules []OrganizationSnapshotRecycleBinPolicyRuleArgs
    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.
    SystemRules []OrganizationSnapshotRecycleBinPolicySystemRuleArgs
    The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
    organization string
    The organization ID for this request (e.g., "organizations/1234").
    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.
    organization String
    The organization ID for this request (e.g., "organizations/1234").
    rules List<OrganizationSnapshotRecycleBinPolicyRule>
    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.
    systemRules List<OrganizationSnapshotRecycleBinPolicySystemRule>
    The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
    organization string
    The organization ID for this request (e.g., "organizations/1234").
    rules OrganizationSnapshotRecycleBinPolicyRule[]
    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.
    systemRules OrganizationSnapshotRecycleBinPolicySystemRule[]
    The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
    organization str
    The organization ID for this request (e.g., "organizations/1234").
    rules Sequence[OrganizationSnapshotRecycleBinPolicyRuleArgs]
    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[OrganizationSnapshotRecycleBinPolicySystemRuleArgs]
    The system rules for snapshot recycle bin policy. Defines the default rule that applies if no customer-defined rule matches. Structure is documented below.
    organization String
    The organization ID for this request (e.g., "organizations/1234").
    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.
    systemRules 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

    OrganizationSnapshotRecycleBinPolicyRule, OrganizationSnapshotRecycleBinPolicyRuleArgs

    Name string
    The identifier for this object. Format specified above.
    StandardSnapshots OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshots
    The rule config for standard snapshots. Structure is documented below.
    Name string
    The identifier for this object. Format specified above.
    StandardSnapshots OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshots
    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.
    standardSnapshots OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshots
    The rule config for standard snapshots. Structure is documented below.
    name string
    The identifier for this object. Format specified above.
    standardSnapshots OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshots
    The rule config for standard snapshots. Structure is documented below.
    name str
    The identifier for this object. Format specified above.
    standard_snapshots OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshots
    The rule config for standard snapshots. Structure is documented below.
    name String
    The identifier for this object. Format specified above.
    standardSnapshots Property Map
    The rule config for standard snapshots. Structure is documented below.

    OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshots, OrganizationSnapshotRecycleBinPolicyRuleStandardSnapshotsArgs

    RetentionDurationDays int
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    RetentionDurationDays int
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    retention_duration_days number
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    retentionDurationDays Integer
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    retentionDurationDays number
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    retention_duration_days int
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    retentionDurationDays Number
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.

    OrganizationSnapshotRecycleBinPolicySystemRule, OrganizationSnapshotRecycleBinPolicySystemRuleArgs

    Name string
    (Required) The identifier for this object. Format specified above.
    StandardSnapshots List<OrganizationSnapshotRecycleBinPolicySystemRuleStandardSnapshot>
    (Output) The rule config for standard snapshots. Structure is documented below.
    Name string
    (Required) The identifier for this object. Format specified above.
    StandardSnapshots []OrganizationSnapshotRecycleBinPolicySystemRuleStandardSnapshot
    (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.
    standardSnapshots List<OrganizationSnapshotRecycleBinPolicySystemRuleStandardSnapshot>
    (Output) The rule config for standard snapshots. Structure is documented below.
    name string
    (Required) The identifier for this object. Format specified above.
    standardSnapshots OrganizationSnapshotRecycleBinPolicySystemRuleStandardSnapshot[]
    (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[OrganizationSnapshotRecycleBinPolicySystemRuleStandardSnapshot]
    (Output) The rule config for standard snapshots. Structure is documented below.
    name String
    (Required) The identifier for this object. Format specified above.
    standardSnapshots List<Property Map>
    (Output) The rule config for standard snapshots. Structure is documented below.

    OrganizationSnapshotRecycleBinPolicySystemRuleStandardSnapshot, OrganizationSnapshotRecycleBinPolicySystemRuleStandardSnapshotArgs

    RetentionDurationDays int
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    RetentionDurationDays int
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    retention_duration_days number
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    retentionDurationDays Integer
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    retentionDurationDays number
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    retention_duration_days int
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.
    retentionDurationDays Number
    The retention duration for snapshots in the recycle bin after which the snapshots are automatically deleted from recycle bin.

    Import

    OrganizationSnapshotRecycleBinPolicy can be imported using any of these accepted formats:

    • organizations/{{organization}}/global/snapshotRecycleBinPolicy
    • {{organization}}

    When using the pulumi import command, OrganizationSnapshotRecycleBinPolicy can be imported using one of the formats above. For example:

    $ pulumi import gcp:compute/organizationSnapshotRecycleBinPolicy:OrganizationSnapshotRecycleBinPolicy default organizations/{{organization}}/global/snapshotRecycleBinPolicy
    $ pulumi import gcp:compute/organizationSnapshotRecycleBinPolicy:OrganizationSnapshotRecycleBinPolicy default {{organization}}
    

    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-beta Terraform Provider.
    gcp logo
    Viewing docs for Google Cloud v10.2.0
    published on Tuesday, Oct 20, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial