Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Managed Instance Group (MIG)

This module is used to create a google_compute_region_instance_group_manager, and optionally, an autoscaler and healthchecks.

Usage

See the simple example for a usage example.

Inputs

Name Description Type Default Required
autoscaling_cpu Autoscaling, cpu utilization policy block as single element array. https://www.terraform.io/docs/providers/google/r/compute_autoscaler.html#cpu_utilization list(map(number)) <list> no
autoscaling_enabled Creates an autoscaler for the managed instance group string "false" no
autoscaling_lb Autoscaling, load balancing utilization policy block as single element array. https://www.terraform.io/docs/providers/google/r/compute_autoscaler.html#load_balancing_utilization list(map(number)) <list> no
autoscaling_metric Autoscaling, metric policy block as single element array. https://www.terraform.io/docs/providers/google/r/compute_autoscaler.html#metric object <list> no
cooldown_period The number of seconds that the autoscaler should wait before it starts collecting information from a new instance. string "60" no
distribution_policy_zones The distribution policy, i.e. which zone(s) should instances be create in. Default is all zones in given region. list(string) <list> no
hc_healthy_threshold Health check healthy threshold. string "1" no
hc_initial_delay_sec Health check, intial delay in seconds. string "30" no
hc_interval_sec Health check interval in seconds. string "30" no
hc_path Health check http path to check. string "/" no
hc_port Health check port. string "" no
hc_timeout_sec Health check timeout in seconds. string "10" no
hc_unhealthy_threshold Health check unhealthy threshold. string "5" no
hostname Hostname prefix for instances string "default" no
http_healthcheck_enable Enable HTTP healthcheck string "false" no
instance_template Instance template self_link used to create compute instances string n/a yes
max_replicas The maximum number of instances that the autoscaler can scale up to. This is required when creating or updating an autoscaler. The maximum number of replicas should not be lower than minimal number of replicas. string "10" no
min_replicas The minimum number of replicas that the autoscaler can scale down to. This cannot be less than 0. string "2" no
named_ports Named name and named port. https://cloud.google.com/load-balancing/docs/backend-service#named_ports object <list> no
network Network to deploy to. Only one of network or subnetwork should be specified. string "" no
project_id The GCP project ID string "null" no
region The GCP region where the managed instance group resides. string n/a yes
subnetwork Subnet to deploy to. Only one of network or subnetwork should be specified. string "" no
subnetwork_project The project that subnetwork belongs to string "" no
target_pools The target load balancing pools to assign this group to. list(string) <list> no
target_size The target number of running instances for this managed instance group. This value should always be explicitly set unless this resource is attached to an autoscaler, in which case it should never be set. string "1" no
tcp_healthcheck_enable Enable TCP healthcheck string "false" no
update_policy The rolling update policy. https://www.terraform.io/docs/providers/google/r/compute_region_instance_group_manager.html#rolling_update_policy object <list> no

Outputs

Name Description
instance_group Instance-group url of managed instance group
self_link Self-link of managed instance group