Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support snapshotType=ARCHIVE in google_compute_resource_policy #12747

Open
kristoferlundgren opened this issue Oct 10, 2022 · 3 comments
Open

Comments

@kristoferlundgren
Copy link

Community Note

  • Please vote on this issue by adding a 馃憤 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.

Description

I want to create create disk snapshots of type ARCHIVE as a scheduled, recurring event.
As detailed here, https://cloud.google.com/compute/pricing-announce, the price difference between the STANDARD and ARCHIVE snapshot types are substantial (2-3x), and the 90 day retention period of the ARCHIVE type is typically of no issue since disk snapshots are generally used for backup purposes.

I fail to find the ARCHIVE snapshotType supported in the current Terraform Google provider.

The ARCHIVE snapshotType, a.k.a. "Persistent Disk Archive Snapshots" is mentioned in this Google blog post:
https://cloud.google.com/blog/products/compute/long-term-data-protection-persistent-disk-archive-snapshots

New or Affected Resource(s)

  • google_compute_resource_policy

Add a snapshot_type to the snapshot_properties block. Where valid options are STANDARD(the default) and ARCHIVE.

Potential Terraform Configuration

resource "google_compute_resource_policy" "daily_snapshot_policy" {
  name   = "daily-snapshot-policy"
  snapshot_schedule_policy {
    schedule {
      daily_schedule {
        days_in_cycle = 1
        start_time    = "04:00"
      }
    }
    snapshot_properties {
      snapshot_type = "ARCHIVE"
    }
  }
}

References

@DrFaust92
Copy link
Contributor

will look into this

@DrFaust92
Copy link
Contributor

https://cloud.google.com/compute/docs/reference/rest/beta/resourcePolicies/insert does not seem to support it on the schedule resource (yet?)

@melinath
Copy link
Collaborator

b/253256148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants