diff --git a/README.md b/README.md index 863555d..8017196 100644 --- a/README.md +++ b/README.md @@ -199,10 +199,8 @@ No modules. | [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 | -| [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\_options](#input\_cpu\_options) | Defines CPU options to apply to the instance at launch time. | `any` | `{}` | 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 | | [create](#input\_create) | Whether to create an instance | `bool` | `true` | no | | [create\_eip](#input\_create\_eip) | Determines whether a public EIP will be created and associated with the instance. | `bool` | `false` | no | | [create\_iam\_instance\_profile](#input\_create\_iam\_instance\_profile) | Determines whether an IAM instance profile is created or to use an existing IAM instance profile | `bool` | `false` | no | @@ -247,7 +245,6 @@ No modules. | [root\_block\_device](#input\_root\_block\_device) | Customize details about the root block device of the instance. See Block Devices below for details | `list(any)` | `[]` | no | | [secondary\_private\_ips](#input\_secondary\_private\_ips) | A list of secondary private IPv4 addresses to assign to the instance's primary network interface (eth0) in a VPC. Can only be assigned to the primary network interface (eth0) attached at instance creation, not a pre-existing network interface i.e. referenced in a `network_interface block` | `list(string)` | `null` | no | | [source\_dest\_check](#input\_source\_dest\_check) | Controls if traffic is routed to the instance when the destination address does not match the instance. Used for NAT or VPNs | `bool` | `null` | no | -| [spot\_block\_duration\_minutes](#input\_spot\_block\_duration\_minutes) | The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360) | `number` | `null` | no | | [spot\_instance\_interruption\_behavior](#input\_spot\_instance\_interruption\_behavior) | Indicates Spot instance behavior when it is interrupted. Valid values are `terminate`, `stop`, or `hibernate` | `string` | `null` | no | | [spot\_launch\_group](#input\_spot\_launch\_group) | A launch group is a group of spot instances that launch together and terminate together. If left empty instances are launched and terminated individually | `string` | `null` | no | | [spot\_price](#input\_spot\_price) | The maximum price to request on the spot market. Defaults to on-demand price | `string` | `null` | no | diff --git a/main.tf b/main.tf index 01a520d..0f11f92 100644 --- a/main.tf +++ b/main.tf @@ -23,8 +23,6 @@ resource "aws_instance" "this" { ami = local.ami instance_type = var.instance_type - cpu_core_count = var.cpu_core_count - cpu_threads_per_core = var.cpu_threads_per_core hibernation = var.hibernation user_data = var.user_data @@ -201,8 +199,6 @@ resource "aws_instance" "ignore_ami" { ami = local.ami instance_type = var.instance_type - cpu_core_count = var.cpu_core_count - cpu_threads_per_core = var.cpu_threads_per_core hibernation = var.hibernation user_data = var.user_data @@ -385,8 +381,6 @@ resource "aws_spot_instance_request" "this" { ami = local.ami instance_type = var.instance_type - cpu_core_count = var.cpu_core_count - cpu_threads_per_core = var.cpu_threads_per_core hibernation = var.hibernation user_data = var.user_data @@ -415,7 +409,6 @@ resource "aws_spot_instance_request" "this" { wait_for_fulfillment = var.spot_wait_for_fulfillment spot_type = var.spot_type launch_group = var.spot_launch_group - block_duration_minutes = var.spot_block_duration_minutes instance_interruption_behavior = var.spot_instance_interruption_behavior valid_until = var.spot_valid_until valid_from = var.spot_valid_from diff --git a/variables.tf b/variables.tf index e59a9dc..525c59a 100644 --- a/variables.tf +++ b/variables.tf @@ -278,18 +278,6 @@ variable "cpu_options" { default = {} } -variable "cpu_core_count" { - description = "Sets the number of CPU cores for an instance" # This option is only supported on creation of instance type that support CPU Options https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html#cpu-options-supported-instances-values - type = number - default = null -} - -variable "cpu_threads_per_core" { - description = "Sets the number of CPU threads per core for an instance (has no effect unless cpu_core_count is also set)" - type = number - default = null -} - # Spot instance request variable "create_spot_instance" { description = "Depicts if the instance is a spot instance" @@ -321,12 +309,6 @@ variable "spot_launch_group" { default = null } -variable "spot_block_duration_minutes" { - description = "The required duration for the Spot instances, in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360)" - type = number - default = null -} - variable "spot_instance_interruption_behavior" { description = "Indicates Spot instance behavior when it is interrupted. Valid values are `terminate`, `stop`, or `hibernate`" type = string diff --git a/wrappers/main.tf b/wrappers/main.tf index 048da56..50f5f35 100644 --- a/wrappers/main.tf +++ b/wrappers/main.tf @@ -8,10 +8,8 @@ module "wrapper" { 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, {}) - cpu_core_count = try(each.value.cpu_core_count, var.defaults.cpu_core_count, null) cpu_credits = try(each.value.cpu_credits, var.defaults.cpu_credits, null) cpu_options = try(each.value.cpu_options, var.defaults.cpu_options, {}) - cpu_threads_per_core = try(each.value.cpu_threads_per_core, var.defaults.cpu_threads_per_core, null) create = try(each.value.create, var.defaults.create, true) create_eip = try(each.value.create_eip, var.defaults.create_eip, false) create_iam_instance_profile = try(each.value.create_iam_instance_profile, var.defaults.create_iam_instance_profile, false) @@ -60,7 +58,6 @@ module "wrapper" { root_block_device = try(each.value.root_block_device, var.defaults.root_block_device, []) secondary_private_ips = try(each.value.secondary_private_ips, var.defaults.secondary_private_ips, null) source_dest_check = try(each.value.source_dest_check, var.defaults.source_dest_check, null) - spot_block_duration_minutes = try(each.value.spot_block_duration_minutes, var.defaults.spot_block_duration_minutes, null) spot_instance_interruption_behavior = try(each.value.spot_instance_interruption_behavior, var.defaults.spot_instance_interruption_behavior, null) spot_launch_group = try(each.value.spot_launch_group, var.defaults.spot_launch_group, null) spot_price = try(each.value.spot_price, var.defaults.spot_price, null)