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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding resource_policy to GCEs within a Node Pool #2163

Open
JavierTobar opened this issue Oct 30, 2024 · 0 comments
Open

Adding resource_policy to GCEs within a Node Pool #2163

JavierTobar opened this issue Oct 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@JavierTobar
Copy link

TL;DR

Attaching google_compute_resource_policy to GCEs within a Node Pool would allow us to have a sleeping schedule for all the VMs.

Terraform Resources

https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_instance.html#resource_policies

Detailed design

The `google_compute_resource_policy` would be created as a standalone TF resource.
e.g. 


resource "google_compute_resource_policy" "weekday_hours_policy" {
  name   = "weekday-hours-policy"
# rest of config

When creating node_pools, we would pass a resource_policy for all the VMs within.

e.g.

{
      name                        = "weekday-hours-node-pool"
      resource_policy             = google_compute_resource_policy.weekday_hours_policy
      machine_type                = "n2d-standard-16"
      disk_size_gb                = 200
      disk_type                   = "pd-ssd"
# Rest of Config
    }


### Additional information

_No response_
@JavierTobar JavierTobar added the enhancement New feature or request label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant