Skip to content

fix: Remove deprecated variables #427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,8 @@ No modules.
| <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` | `{}` | 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_options"></a> [cpu\_options](#input\_cpu\_options) | Defines CPU options to apply to the instance at launch time. | `any` | `{}` | 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 |
| <a name="input_create"></a> [create](#input\_create) | Whether to create an instance | `bool` | `true` | no |
| <a name="input_create_eip"></a> [create\_eip](#input\_create\_eip) | Determines whether a public EIP will be created and associated with the instance. | `bool` | `false` | no |
| <a name="input_create_iam_instance_profile"></a> [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 |
Expand Down Expand Up @@ -247,7 +245,6 @@ No modules.
| <a name="input_root_block_device"></a> [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 |
| <a name="input_secondary_private_ips"></a> [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 |
| <a name="input_source_dest_check"></a> [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 |
| <a name="input_spot_block_duration_minutes"></a> [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 |
| <a name="input_spot_instance_interruption_behavior"></a> [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 |
| <a name="input_spot_launch_group"></a> [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 |
| <a name="input_spot_price"></a> [spot\_price](#input\_spot\_price) | The maximum price to request on the spot market. Defaults to on-demand price | `string` | `null` | no |
Expand Down
7 changes: 0 additions & 7 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 0 additions & 18 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions wrappers/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down