-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for scheduled snapshots for persistent disk #3062
Add support for scheduled snapshots for persistent disk #3062
Comments
For reference, this would entail adding resource policies as a resource: https://cloud.google.com/compute/docs/reference/rest/beta/resourcePolicies/ |
Hey, I've encountered some permission problems with the scheduled snapshot resource policy. I am not sure if this is a bug in provider, but maybe somebody else bumped into this?
resource "google_compute_resource_policy" "XYZ-snapshot-schedule" {
name = "XYZ-snapshot-schedule"
provider = "google-beta"
project = "project1"
region = "us-central1"
snapshot_schedule_policy {
schedule {
daily_schedule {
days_in_cycle = 1
start_time = "02:00"
}
}
retention_policy {
max_retention_days = 7
on_source_disk_delete = "APPLY_RETENTION_POLICY"
}
snapshot_properties {
labels = {
app = "XYZ"
}
}
}
}
Error: Error reading ComputeResourcePolicy "XYZ-snapshot-schedule": googleapi:
Error 403: Required 'compute.resourcePolicies.get' permission for
'projects/<PROJECT_NAME>/regions/us-central1/resourcePolicies/<XYZ>-snapshot-schedule',
forbidden.
Compute Viewer should be enough for permission |
Hi @Lirt, I attempted to repro this using admin credentials and |
I solved it, issue was I didn't have specified |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks! |
Community Note
Description
Scheduled snapshots feature is promoted to beta now, so it worth adding to google-beta provider :)
https://cloud.google.com/compute/docs/disks/scheduled-snapshots
The text was updated successfully, but these errors were encountered: