Skip to content

Commit

Permalink
fix: block_device_mappings required optional fields (#127)
Browse files Browse the repository at this point in the history
* fix: block_device_mappings required optional fields

As per the code in main.tf, all these stuff are optional

https://github.com/cloudposse/terraform-aws-ec2-autoscale-group/blob/b757eb9037b9eae3235522800530117e66d535b2/main.tf#L6-L24

* docs
  • Loading branch information
MaxymVlasov authored Nov 1, 2023
1 parent d39c727 commit dbe9e75
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Available targets:
| <a name="input_associate_public_ip_address"></a> [associate\_public\_ip\_address](#input\_associate\_public\_ip\_address) | Associate a public IP address with an instance in a VPC | `bool` | `false` | no |
| <a name="input_attributes"></a> [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,<br>in the order they appear in the list. New attributes are appended to the<br>end of the list. The elements of the list are joined by the `delimiter`<br>and treated as a single ID element. | `list(string)` | `[]` | no |
| <a name="input_autoscaling_policies_enabled"></a> [autoscaling\_policies\_enabled](#input\_autoscaling\_policies\_enabled) | Whether to create `aws_autoscaling_policy` and `aws_cloudwatch_metric_alarm` resources to control Auto Scaling | `bool` | `true` | no |
| <a name="input_block_device_mappings"></a> [block\_device\_mappings](#input\_block\_device\_mappings) | Specify volumes to attach to the instance besides the volumes specified by the AMI | <pre>list(object({<br> device_name = string<br> no_device = bool<br> virtual_name = string<br> ebs = object({<br> delete_on_termination = bool<br> encrypted = bool<br> iops = number<br> throughput = number<br> kms_key_id = string<br> snapshot_id = string<br> volume_size = number<br> volume_type = string<br> })<br> }))</pre> | `[]` | no |
| <a name="input_block_device_mappings"></a> [block\_device\_mappings](#input\_block\_device\_mappings) | Specify volumes to attach to the instance besides the volumes specified by the AMI | <pre>list(object({<br> device_name = optional(string)<br> no_device = optional(bool)<br> virtual_name = optional(string)<br> ebs = object({<br> delete_on_termination = optional(bool)<br> encrypted = optional(bool)<br> iops = optional(number)<br> throughput = optional(number)<br> kms_key_id = optional(string)<br> snapshot_id = optional(string)<br> volume_size = optional(number)<br> volume_type = optional(string)<br> })<br> }))</pre> | `[]` | no |
| <a name="input_capacity_rebalance"></a> [capacity\_rebalance](#input\_capacity\_rebalance) | Indicates whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled. | `bool` | `false` | no |
| <a name="input_context"></a> [context](#input\_context) | Single object for setting entire context at once.<br>See description of individual variables for details.<br>Leave string and numeric variables as `null` to use default value.<br>Individual variable settings (non-null) override settings in context object,<br>except for attributes, tags, and additional\_tag\_map, which are merged. | `any` | <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": null,<br> "descriptor_formats": {},<br> "enabled": true,<br> "environment": null,<br> "id_length_limit": null,<br> "label_key_case": null,<br> "label_order": [],<br> "label_value_case": null,<br> "labels_as_tags": [<br> "unset"<br> ],<br> "name": null,<br> "namespace": null,<br> "regex_replace_chars": null,<br> "stage": null,<br> "tags": {},<br> "tenant": null<br>}</pre> | no |
| <a name="input_cpu_utilization_high_evaluation_periods"></a> [cpu\_utilization\_high\_evaluation\_periods](#input\_cpu\_utilization\_high\_evaluation\_periods) | The number of periods over which data is compared to the specified threshold | `number` | `2` | no |
Expand Down
2 changes: 1 addition & 1 deletion docs/terraform.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
| <a name="input_associate_public_ip_address"></a> [associate\_public\_ip\_address](#input\_associate\_public\_ip\_address) | Associate a public IP address with an instance in a VPC | `bool` | `false` | no |
| <a name="input_attributes"></a> [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,<br>in the order they appear in the list. New attributes are appended to the<br>end of the list. The elements of the list are joined by the `delimiter`<br>and treated as a single ID element. | `list(string)` | `[]` | no |
| <a name="input_autoscaling_policies_enabled"></a> [autoscaling\_policies\_enabled](#input\_autoscaling\_policies\_enabled) | Whether to create `aws_autoscaling_policy` and `aws_cloudwatch_metric_alarm` resources to control Auto Scaling | `bool` | `true` | no |
| <a name="input_block_device_mappings"></a> [block\_device\_mappings](#input\_block\_device\_mappings) | Specify volumes to attach to the instance besides the volumes specified by the AMI | <pre>list(object({<br> device_name = string<br> no_device = bool<br> virtual_name = string<br> ebs = object({<br> delete_on_termination = bool<br> encrypted = bool<br> iops = number<br> throughput = number<br> kms_key_id = string<br> snapshot_id = string<br> volume_size = number<br> volume_type = string<br> })<br> }))</pre> | `[]` | no |
| <a name="input_block_device_mappings"></a> [block\_device\_mappings](#input\_block\_device\_mappings) | Specify volumes to attach to the instance besides the volumes specified by the AMI | <pre>list(object({<br> device_name = optional(string)<br> no_device = optional(bool)<br> virtual_name = optional(string)<br> ebs = object({<br> delete_on_termination = optional(bool)<br> encrypted = optional(bool)<br> iops = optional(number)<br> throughput = optional(number)<br> kms_key_id = optional(string)<br> snapshot_id = optional(string)<br> volume_size = optional(number)<br> volume_type = optional(string)<br> })<br> }))</pre> | `[]` | no |
| <a name="input_capacity_rebalance"></a> [capacity\_rebalance](#input\_capacity\_rebalance) | Indicates whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled. | `bool` | `false` | no |
| <a name="input_context"></a> [context](#input\_context) | Single object for setting entire context at once.<br>See description of individual variables for details.<br>Leave string and numeric variables as `null` to use default value.<br>Individual variable settings (non-null) override settings in context object,<br>except for attributes, tags, and additional\_tag\_map, which are merged. | `any` | <pre>{<br> "additional_tag_map": {},<br> "attributes": [],<br> "delimiter": null,<br> "descriptor_formats": {},<br> "enabled": true,<br> "environment": null,<br> "id_length_limit": null,<br> "label_key_case": null,<br> "label_order": [],<br> "label_value_case": null,<br> "labels_as_tags": [<br> "unset"<br> ],<br> "name": null,<br> "namespace": null,<br> "regex_replace_chars": null,<br> "stage": null,<br> "tags": {},<br> "tenant": null<br>}</pre> | no |
| <a name="input_cpu_utilization_high_evaluation_periods"></a> [cpu\_utilization\_high\_evaluation\_periods](#input\_cpu\_utilization\_high\_evaluation\_periods) | The number of periods over which data is compared to the specified threshold | `number` | `2` | no |
Expand Down
22 changes: 11 additions & 11 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@ variable "block_device_mappings" {
description = "Specify volumes to attach to the instance besides the volumes specified by the AMI"

type = list(object({
device_name = string
no_device = bool
virtual_name = string
device_name = optional(string)
no_device = optional(bool)
virtual_name = optional(string)
ebs = object({
delete_on_termination = bool
encrypted = bool
iops = number
throughput = number
kms_key_id = string
snapshot_id = string
volume_size = number
volume_type = string
delete_on_termination = optional(bool)
encrypted = optional(bool)
iops = optional(number)
throughput = optional(number)
kms_key_id = optional(string)
snapshot_id = optional(string)
volume_size = optional(number)
volume_type = optional(string)
})
}))

Expand Down

0 comments on commit dbe9e75

Please sign in to comment.