An open API service indexing awesome lists of open source software.

https://github.com/terraform-yacloud-modules/terraform-yandex-instance-group

Terraform module to manage Compute Instance Group resources within the Yandex.Cloud.
https://github.com/terraform-yacloud-modules/terraform-yandex-instance-group

hacktoberfest iam terraform terraform-module yandex yandex-cloud

Last synced: 5 months ago
JSON representation

Terraform module to manage Compute Instance Group resources within the Yandex.Cloud.

Awesome Lists containing this project

README

          

# Yandex Cloud VM Instance group Terraform module

Terraform module which creates Yandex Cloud VM Instance group resources.

## Examples

Examples codified under
the [`examples`](https://github.com/terraform-yacloud-modules/terraform-yandex-instance-group/tree/main/examples) are intended
to give users references for how to use the module(s) as well as testing/validating changes to the source code of the
module. If contributing to the project, please be sure to make any appropriate updates to the relevant examples to allow
maintainers to test your changes and to keep the examples up to date for users. Thank you!

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 1.3 |
| [tls](#requirement\_tls) | >= 3.1.0 |
| [yandex](#requirement\_yandex) | >= 0.72.0 |

## Providers

| Name | Version |
|------|---------|
| [tls](#provider\_tls) | >= 3.1.0 |
| [yandex](#provider\_yandex) | >= 0.72.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [tls_private_key.this](https://registry.terraform.io/providers/hashicorp/tls/latest/docs/resources/private_key) | resource |
| [yandex_compute_disk.main](https://registry.terraform.io/providers/yandex-cloud/yandex/latest/docs/resources/compute_disk) | resource |
| [yandex_compute_instance_group.this](https://registry.terraform.io/providers/yandex-cloud/yandex/latest/docs/resources/compute_instance_group) | resource |
| [yandex_compute_image.this](https://registry.terraform.io/providers/yandex-cloud/yandex/latest/docs/data-sources/compute_image) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [boot\_disk](#input\_boot\_disk) | Basic boot disk parameters |

object({
mode = optional(string)
device_name = optional(string)
})
| `{}` | no |
| [boot\_disk\_initialize\_params](#input\_boot\_disk\_initialize\_params) | Additional boot disk parameters |
object({
size = optional(number, 10)
type = optional(string, "network-hdd")
})
| `{}` | no |
| [core\_fraction](#input\_core\_fraction) | Core fraction applied to instance | `number` | `null` | no |
| [cores](#input\_cores) | Cores allocated to instance | `number` | `2` | no |
| [deletion\_protection](#input\_deletion\_protection) | Flag that protects the instance group from accidental deletion | `bool` | `false` | no |
| [deploy\_policy](#input\_deploy\_policy) | Instance group deploy policy |
object({
max_unavailable = number
max_expansion = number
max_deleting = optional(number)
max_creating = optional(number)
startup_duration = optional(string)
strategy = optional(string, "proactive")
})
|
{
"max_expansion": 1,
"max_unavailable": 1
}
| no |
| [enable\_alb\_integration](#input\_enable\_alb\_integration) | If true, Application load balancer integration will be created | `bool` | `false` | no |
| [enable\_nat](#input\_enable\_nat) | Enable public IPv4 address | `bool` | `false` | no |
| [enable\_nlb\_integration](#input\_enable\_nlb\_integration) | If true, Network load balancer integration will be created | `bool` | `false` | no |
| [generate\_ssh\_key](#input\_generate\_ssh\_key) | If true, SSH key will be generated for instance group | `string` | `true` | no |
| [health\_check](#input\_health\_check) | Health check configuration |
object({
enabled = optional(bool, false)
interval = optional(number, 15)
timeout = optional(number, 10)
healthy_threshold = optional(number, 3)
unhealthy_threshold = optional(number, 3)
tcp_options = optional(object({
port = number
}), null)
http_options = optional(object({
port = number,
path = string
}), null)
})
|
{
"enabled": true,
"tcp_options": {
"port": 8080
}
}
| no |
| [hostname](#input\_hostname) | Hostname of the instance. More info: https://cloud.yandex.ru/docs/compute/concepts/network#hostname | `string` | `null` | no |
| [image\_family](#input\_image\_family) | Default image family name (lowest priority) | `string` | `"ubuntu-2004-lts"` | no |
| [image\_id](#input\_image\_id) | Image ID (medium priority) | `string` | `null` | no |
| [image\_snapshot\_id](#input\_image\_snapshot\_id) | Image snapshot id to initialize from.
Highest priority over var.image\_id
and var.image\_family" | `string` | `null` | no |
| [instance\_description](#input\_instance\_description) | Instance description | `string` | `null` | no |
| [instance\_group\_description](#input\_instance\_group\_description) | Instance group description | `string` | `null` | no |
| [labels](#input\_labels) | A set of labels which will be applied to all resources | `map(string)` | `{}` | no |
| [max\_checking\_health\_duration](#input\_max\_checking\_health\_duration) | Timeout for waiting for the VM to become healthy | `number` | `10` | no |
| [memory](#input\_memory) | Memory allocated to instance (in Gb) | `number` | `2` | no |
| [name](#input\_name) | Name which will be used for all resources | `string` | n/a | yes |
| [network\_acceleration\_type](#input\_network\_acceleration\_type) | Network acceleration type | `string` | `"STANDARD"` | no |
| [network\_id](#input\_network\_id) | Network ID | `string` | `null` | no |
| [platform\_id](#input\_platform\_id) | Hardware CPU platform name (Intel Ice Lake by default) | `string` | `"standard-v3"` | no |
| [preemptible](#input\_preemptible) | Make instance preemptible | `bool` | `false` | no |
| [scale](#input\_scale) | Instance group scaling policy |
object({
fixed = optional(object({
size = number
}), null)
auto = optional(object({
initial_size = number
measurement_duration = number
cpu_utilization_target = string
min_zone_size = number
max_size = number
warmup_duration = string
stabilization_duration = string
}), null)

})
|
{
"fixed": {
"size": 1
}
}
| no |
| [secondary\_disks](#input\_secondary\_disks) | Additional disks with params |
map(object({
enabled = optional(bool, true)
description = optional(string, "")
labels = optional(map(string), {})
zone = optional(string, null)
size = optional(number, 10)
block_size = optional(number, 4096)
type = optional(string, "network-hdd")

mode = optional(string, "READ_WRITE")
device_name = optional(string, "data")
}))
| `{}` | no |
| [security\_group\_ids](#input\_security\_group\_ids) | Security group IDs linked to instances | `list(string)` | `null` | no |
| [serial\_port\_enable](#input\_serial\_port\_enable) | Enable serial port on instances | `bool` | `false` | no |
| [service\_account\_id](#input\_service\_account\_id) | ID of the service account authorized for instance | `string` | `null` | no |
| [ssh\_pubkey](#input\_ssh\_pubkey) | Public RSA key path to inject | `string` | `null` | no |
| [ssh\_user](#input\_ssh\_user) | Initial SSH username for instance | `string` | `"ubuntu"` | no |
| [subnet\_ids](#input\_subnet\_ids) | VPC Subnet IDs | `list(string)` | `[]` | no |
| [user\_data](#input\_user\_data) | Cloud-init user-data | `string` | `null` | no |
| [variables](#input\_variables) | A set of key/value variables pairs to assign to the instance group | `map(string)` | `{}` | no |
| [zones](#input\_zones) | A list of availability zones | `list(string)` | `[]` | no |

## Outputs

| Name | Description |
|------|-------------|
| [compute\_disks](#output\_compute\_disks) | Secondary disk's data |
| [instance\_group\_id](#output\_instance\_group\_id) | Compute instance group ID |
| [ssh\_key\_prv](#output\_ssh\_key\_prv) | Private SSH key |
| [ssh\_key\_pub](#output\_ssh\_key\_pub) | Public SSH key |
| [target\_group\_id](#output\_target\_group\_id) | Target group ID |

## License

Apache-2.0 Licensed.
See [LICENSE](https://github.com/terraform-yacloud-modules/terraform-yandex-instance-group/blob/main/LICENSE).