Skip to content

Commit

Permalink
fix: The capacity_reservation_specification default value is updated …
Browse files Browse the repository at this point in the history
…from null to {} (#285)

Co-authored-by: Samuel CHNIBER <schniber@amazon.fr>
  • Loading branch information
schniber and Samuel CHNIBER committed Aug 12, 2022
1 parent c566926 commit 9af6601
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ No modules.
| <a name="input_ami"></a> [ami](#input\_ami) | ID of AMI to use for the instance | `string` | `""` | no |
| <a name="input_associate_public_ip_address"></a> [associate\_public\_ip\_address](#input\_associate\_public\_ip\_address) | Whether to associate a public IP address with an instance in a VPC | `bool` | `null` | no |
| <a name="input_availability_zone"></a> [availability\_zone](#input\_availability\_zone) | AZ to start the instance in | `string` | `null` | no |
| <a name="input_capacity_reservation_specification"></a> [capacity\_reservation\_specification](#input\_capacity\_reservation\_specification) | Describes an instance's Capacity Reservation targeting option | `any` | `null` | no |
| <a name="input_capacity_reservation_specification"></a> [capacity\_reservation\_specification](#input\_capacity\_reservation\_specification) | Describes an instance's Capacity Reservation targeting option | `any` | `{}` | no |
| <a name="input_cpu_core_count"></a> [cpu\_core\_count](#input\_cpu\_core\_count) | Sets the number of CPU cores for an instance. | `number` | `null` | no |
| <a name="input_cpu_credits"></a> [cpu\_credits](#input\_cpu\_credits) | The credit option for CPU usage (unlimited or standard) | `string` | `null` | no |
| <a name="input_cpu_threads_per_core"></a> [cpu\_threads\_per\_core](#input\_cpu\_threads\_per\_core) | Sets the number of CPU threads per core for an instance (has no effect unless cpu\_core\_count is also set). | `number` | `null` | no |
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ variable "availability_zone" {
variable "capacity_reservation_specification" {
description = "Describes an instance's Capacity Reservation targeting option"
type = any
default = null
default = {}
}

variable "cpu_credits" {
Expand Down
2 changes: 1 addition & 1 deletion wrappers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module "wrapper" {
ami = try(each.value.ami, var.defaults.ami, "")
associate_public_ip_address = try(each.value.associate_public_ip_address, var.defaults.associate_public_ip_address, null)
availability_zone = try(each.value.availability_zone, var.defaults.availability_zone, null)
capacity_reservation_specification = try(each.value.capacity_reservation_specification, var.defaults.capacity_reservation_specification, null)
capacity_reservation_specification = try(each.value.capacity_reservation_specification, var.defaults.capacity_reservation_specification, {})
cpu_credits = try(each.value.cpu_credits, var.defaults.cpu_credits, null)
disable_api_termination = try(each.value.disable_api_termination, var.defaults.disable_api_termination, null)
ebs_block_device = try(each.value.ebs_block_device, var.defaults.ebs_block_device, [])
Expand Down

0 comments on commit 9af6601

Please sign in to comment.