Skip to content

Commit c971393

Browse files
support for ebs optimization in launch templates (#101)
* support for ebs optimization in launch templates * Auto Format * remove old comment and just set ebs_optimized * updated variable comment * Auto Format Co-authored-by: cloudpossebot <[email protected]>
1 parent 4f804eb commit c971393

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ Available targets:
307307
| <a name="input_delimiter"></a> [delimiter](#input\_delimiter) | Delimiter to be used between ID elements.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |
308308
| <a name="input_descriptor_formats"></a> [descriptor\_formats](#input\_descriptor\_formats) | Describe additional descriptors to be output in the `descriptors` output map.<br>Map of maps. Keys are names of descriptors. Values are maps of the form<br>`{<br> format = string<br> labels = list(string)<br>}`<br>(Type is `any` so the map values can later be enhanced to provide additional options.)<br>`format` is a Terraform format string to be passed to the `format()` function.<br>`labels` is a list of labels, in order, to pass to `format()` function.<br>Label values will be normalized before being passed to `format()` so they will be<br>identical to how they appear in `id`.<br>Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no |
309309
| <a name="input_desired_size"></a> [desired\_size](#input\_desired\_size) | Initial desired number of worker nodes (external changes ignored) | `number` | n/a | yes |
310+
| <a name="input_ebs_optimized"></a> [ebs\_optimized](#input\_ebs\_optimized) | Whether or not to launch instances with EBS optimization. Default is `false` | `bool` | `false` | no |
310311
| <a name="input_ec2_ssh_key_name"></a> [ec2\_ssh\_key\_name](#input\_ec2\_ssh\_key\_name) | SSH key pair name to use to access the worker nodes | `list(string)` | `[]` | no |
311312
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
312313
| <a name="input_enclave_enabled"></a> [enclave\_enabled](#input\_enclave\_enabled) | Set to `true` to enable Nitro Enclaves on the instance. | `bool` | `false` | no |
@@ -458,7 +459,7 @@ In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow.
458459

459460
## Copyright
460461

461-
Copyright © 2017-2021 [Cloud Posse, LLC](https://cpco.io/copyright)
462+
Copyright © 2017-2022 [Cloud Posse, LLC](https://cpco.io/copyright)
462463

463464

464465

docs/terraform.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
| <a name="input_delimiter"></a> [delimiter](#input\_delimiter) | Delimiter to be used between ID elements.<br>Defaults to `-` (hyphen). Set to `""` to use no delimiter at all. | `string` | `null` | no |
6464
| <a name="input_descriptor_formats"></a> [descriptor\_formats](#input\_descriptor\_formats) | Describe additional descriptors to be output in the `descriptors` output map.<br>Map of maps. Keys are names of descriptors. Values are maps of the form<br>`{<br> format = string<br> labels = list(string)<br>}`<br>(Type is `any` so the map values can later be enhanced to provide additional options.)<br>`format` is a Terraform format string to be passed to the `format()` function.<br>`labels` is a list of labels, in order, to pass to `format()` function.<br>Label values will be normalized before being passed to `format()` so they will be<br>identical to how they appear in `id`.<br>Default is `{}` (`descriptors` output will be empty). | `any` | `{}` | no |
6565
| <a name="input_desired_size"></a> [desired\_size](#input\_desired\_size) | Initial desired number of worker nodes (external changes ignored) | `number` | n/a | yes |
66+
| <a name="input_ebs_optimized"></a> [ebs\_optimized](#input\_ebs\_optimized) | Whether or not to launch instances with EBS optimization. Default is `false` | `bool` | `false` | no |
6667
| <a name="input_ec2_ssh_key_name"></a> [ec2\_ssh\_key\_name](#input\_ec2\_ssh\_key\_name) | SSH key pair name to use to access the worker nodes | `list(string)` | `[]` | no |
6768
| <a name="input_enabled"></a> [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no |
6869
| <a name="input_enclave_enabled"></a> [enclave\_enabled](#input\_enclave\_enabled) | Set to `true` to enable Nitro Enclaves on the instance. | `bool` | `false` | no |

launch-template.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ resource "aws_launch_template" "default" {
5050

5151
count = local.generate_launch_template ? 1 : 0
5252

53+
ebs_optimized = var.ebs_optimized
54+
5355
dynamic "block_device_mappings" {
5456
for_each = var.block_device_mappings
5557

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,12 @@ variable "module_depends_on" {
258258
description = "Can be any value desired. Module will wait for this value to be computed before creating node group."
259259
}
260260

261+
variable "ebs_optimized" {
262+
type = bool
263+
default = false
264+
description = "Whether or not to launch instances with EBS optimization. Default is `false`"
265+
}
266+
261267
variable "launch_template_id" {
262268
type = list(string)
263269
default = []

0 commit comments

Comments
 (0)