From e5cd88aec254105f44e4d97dcd3c73068872ea80 Mon Sep 17 00:00:00 2001 From: DevopsCBAdmin <137079327+DevopsCBAdmin@users.noreply.github.com> Date: Tue, 24 Jun 2025 13:12:39 +0000 Subject: [PATCH 1/2] feat: added the required changes for the AWS 6.0 provider. --- main.tf | 5 ----- variables.tf | 20 +------------------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/main.tf b/main.tf index 01a520d..1f7d07a 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 @@ -385,8 +383,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 +411,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..6e68ab2 100644 --- a/variables.tf +++ b/variables.tf @@ -231,7 +231,7 @@ variable "tenancy" { } variable "user_data" { - description = "The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead" + description = "The user data to provide when launching the instance. Do not pass gzip-compressed data via this argument; see user_data_base64 instead. This value is stored in plain-text, do not store sensitive information use user_data_base64 instead." type = string default = null } @@ -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 From 69cf07f729dd96398daea977e01d14d085f58360 Mon Sep 17 00:00:00 2001 From: DevopsCBAdmin <137079327+DevopsCBAdmin@users.noreply.github.com> Date: Tue, 24 Jun 2025 13:21:20 +0000 Subject: [PATCH 2/2] missed one --- main.tf | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.tf b/main.tf index 1f7d07a..0f11f92 100644 --- a/main.tf +++ b/main.tf @@ -199,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