From 0cefd4e1175c17456672b43129aa082ff85b9ea2 Mon Sep 17 00:00:00 2001 From: Samuel CHNIBER Date: Fri, 12 Aug 2022 18:26:28 +0200 Subject: [PATCH 1/2] fix: capacity_reservation_specification default value updated from {} to null --- variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables.tf b/variables.tf index fbdb5b44..1f140fd4 100644 --- a/variables.tf +++ b/variables.tf @@ -31,7 +31,7 @@ variable "availability_zone" { variable "capacity_reservation_specification" { description = "Describes an instance's Capacity Reservation targeting option" type = any - default = {} + default = null } variable "cpu_credits" { From 8897f00e55e5f77855c0de1ec27ba501e20e1182 Mon Sep 17 00:00:00 2001 From: Samuel CHNIBER Date: Fri, 12 Aug 2022 18:28:03 +0200 Subject: [PATCH 2/2] fix: capacity_reservation_specification default value updated from {} to null --- README.md | 2 +- wrappers/main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c300adac..0b9c423e 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ No modules. | [ami](#input\_ami) | ID of AMI to use for the instance | `string` | `""` | no | | [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 | | [availability\_zone](#input\_availability\_zone) | AZ to start the instance in | `string` | `null` | no | -| [capacity\_reservation\_specification](#input\_capacity\_reservation\_specification) | Describes an instance's Capacity Reservation targeting option | `any` | `{}` | no | +| [capacity\_reservation\_specification](#input\_capacity\_reservation\_specification) | Describes an instance's Capacity Reservation targeting option | `any` | `null` | no | | [cpu\_core\_count](#input\_cpu\_core\_count) | Sets the number of CPU cores for an instance. | `number` | `null` | no | | [cpu\_credits](#input\_cpu\_credits) | The credit option for CPU usage (unlimited or standard) | `string` | `null` | no | | [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 | diff --git a/wrappers/main.tf b/wrappers/main.tf index 35c42ccc..3af75fd2 100644 --- a/wrappers/main.tf +++ b/wrappers/main.tf @@ -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, {}) + capacity_reservation_specification = try(each.value.capacity_reservation_specification, var.defaults.capacity_reservation_specification, null) 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, [])