-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 instanceSchedulePolicy #9001
Add support for instanceSchedulePolicy #9001
Comments
note: this may require changes on the affected resource (eg GCE instance) if it is not already supported |
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. |
Community Note
Description
Google now lets you create a schedule and attach VMs to it, to actively shut down machines when not in use.
This is managed via a resource policy so called "instanceSchedulePolicy"
POST https://compute.googleapis.com/compute/v1/projects/PROJECT/regions/REGION/resourcePolicies
{
"name": "SCHEDULE_NAME",
"description": "SCHEDULE_DESCRIPTION",
"instanceSchedulePolicy": {
"vmStartSchedule": {
"schedule": "START-OPERATION_SCHEDULE"
},
"vmStopSchedule": {
"schedule": "STOP-OPERATION_SCHEDULE"
},
"timeZone": "TIME_ZONE",
"startTime":"INITIATION_DATE",
"expirationTime":"END_DATE"
}
}
New or Affected Resource(s)
https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_resource_policy
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: