Allow resource_policies to be passed to the compute_instance. For example, a policy could cause the bastion-host to be started and/or stopped on a schedule. e.g shutdown every day at midnight, or startup 15 minutes before the patch schedule.
module "gis-bastion-vm" {
source = "terraform-google-modules/bastion-host/google"
...
resource_policies = [google_compute_resource_policy.startup_for_patching_schedule.id]
}
Ability to pass the parameter from bastion-host to compute_instance, which supports resource_policies
Additional information
An alternative approach could be for the google_compute_resource_policy to support an instance_template variable, as in
resource google_os_config_patch_deployment.
TL;DR
Allow resource_policies to be passed to the compute_instance. For example, a policy could cause the bastion-host to be started and/or stopped on a schedule. e.g shutdown every day at midnight, or startup 15 minutes before the patch schedule.
Terraform Resources
Detailed design
Additional information
An alternative approach could be for the google_compute_resource_policy to support an instance_template variable, as in resource google_os_config_patch_deployment.
No response