diff --git a/.spacelift/config.yml b/.spacelift/config.yml index 72a6b7e..a4fdc84 100644 --- a/.spacelift/config.yml +++ b/.spacelift/config.yml @@ -1,5 +1,5 @@ version: 2 -module_version: 4.4.4 +module_version: 5.0.0 tests: - name: AMD64-based workerpool diff --git a/asg.tf b/asg.tf index bc336cf..5b2a123 100644 --- a/asg.tf +++ b/asg.tf @@ -9,7 +9,7 @@ locals { https_proxy_config = var.selfhosted_configuration.https_proxy_config == null ? "" : var.selfhosted_configuration.https_proxy_config no_proxy_config = var.selfhosted_configuration.no_proxy_config == null ? "" : var.selfhosted_configuration.no_proxy_config ca_certificates = var.selfhosted_configuration.ca_certificates == null ? [] : var.selfhosted_configuration.ca_certificates - region = data.aws_region.this.name + region = data.aws_region.this.region power_off_on_error = var.selfhosted_configuration.power_off_on_error == null ? true : var.selfhosted_configuration.power_off_on_error }) @@ -17,13 +17,13 @@ locals { custom_user_data = join("\n", [local.secure_env_vars, var.configuration]) domain_name = var.domain_name poweroff_delay = var.poweroff_delay - region = data.aws_region.this.name + region = data.aws_region.this.region }) } module "asg" { source = "terraform-aws-modules/autoscaling/aws" - version = "~> 8.0" + version = "~> 9.0" name = local.base_name diff --git a/examples/amd64/main.tf b/examples/amd64/main.tf index 5ec06a4..2fb71f5 100644 --- a/examples/amd64/main.tf +++ b/examples/amd64/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "< 6.0" + version = ">= 6.0.0" } random = { source = "hashicorp/random" } diff --git a/examples/arm64/main.tf b/examples/arm64/main.tf index fef22ce..6781f32 100644 --- a/examples/arm64/main.tf +++ b/examples/arm64/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "< 6.0" + version = ">= 6.0.0" } random = { source = "hashicorp/random" } diff --git a/examples/autoscaler-custom-s3-package/main.tf b/examples/autoscaler-custom-s3-package/main.tf index a04e9ab..edb31db 100644 --- a/examples/autoscaler-custom-s3-package/main.tf +++ b/examples/autoscaler-custom-s3-package/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "< 6.0" + version = ">= 6.0.0" } random = { source = "hashicorp/random" } @@ -64,7 +64,7 @@ module "this" { version = var.autoscaler_version s3_package = { bucket = aws_s3_bucket.autoscaler_binary.id - key = aws_s3_object.autoscaler_binary.id + key = aws_s3_object.autoscaler_binary.key } } diff --git a/examples/autoscaler/main.tf b/examples/autoscaler/main.tf index 3f54ee6..0a946d5 100644 --- a/examples/autoscaler/main.tf +++ b/examples/autoscaler/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "< 6.0" + version = ">= 6.0.0" } random = { source = "hashicorp/random" } diff --git a/examples/byo-ssm-secretsmanager-with-autoscaling-and-lifecycle/main.tf b/examples/byo-ssm-secretsmanager-with-autoscaling-and-lifecycle/main.tf index 7ef8870..d6a67ba 100644 --- a/examples/byo-ssm-secretsmanager-with-autoscaling-and-lifecycle/main.tf +++ b/examples/byo-ssm-secretsmanager-with-autoscaling-and-lifecycle/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "< 6.0" + version = ">= 6.0.0" } random = { source = "hashicorp/random" } diff --git a/examples/custom-iam-role/main.tf b/examples/custom-iam-role/main.tf index dc3f58a..832afd5 100644 --- a/examples/custom-iam-role/main.tf +++ b/examples/custom-iam-role/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "< 6.0" + version = ">= 6.0.0" } } } diff --git a/examples/extra-iam-statements/main.tf b/examples/extra-iam-statements/main.tf index 45ee2e5..56e5d34 100644 --- a/examples/extra-iam-statements/main.tf +++ b/examples/extra-iam-statements/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "< 6.0" + version = ">= 6.0.0" } random = { source = "hashicorp/random" } diff --git a/examples/self-hosted/main.tf b/examples/self-hosted/main.tf index a72af3b..f5fca01 100644 --- a/examples/self-hosted/main.tf +++ b/examples/self-hosted/main.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = "< 6.0" + version = ">= 6.0.0" } random = { source = "hashicorp/random" } diff --git a/main.tf b/main.tf index 291ad71..95eb0db 100644 --- a/main.tf +++ b/main.tf @@ -1,7 +1,7 @@ locals { base_name = var.base_name == null ? "sp5ft-${var.worker_pool_id}" : var.base_name autoscaling_enabled = var.autoscaling_configuration == null ? false : true - lifecycle_manager_enabled = length(var.instance_refresh) > 0 ? true : false + lifecycle_manager_enabled = var.instance_refresh != null ? true : false autoscaler_or_lifecycle_manager_enabled = local.autoscaling_enabled || local.lifecycle_manager_enabled byo_ssm = var.byo_ssm != null @@ -29,7 +29,7 @@ module "autoscaler" { auto_scaling_group_arn = module.asg.autoscaling_group_arn autoscaling_configuration = var.autoscaling_configuration aws_partition_dns_suffix = data.aws_partition.current.dns_suffix - aws_region = data.aws_region.this.name + aws_region = data.aws_region.this.region base_name = local.base_name cloudwatch_log_group_retention = var.cloudwatch_log_group_retention spacelift_api_credentials = var.spacelift_api_credentials @@ -49,7 +49,7 @@ module "lifecycle_manager" { auto_scaling_group_arn = module.asg.autoscaling_group_arn cloudwatch_log_group_retention = var.cloudwatch_log_group_retention aws_partition_dns_suffix = data.aws_partition.current.dns_suffix - aws_region = data.aws_region.this.name + aws_region = data.aws_region.this.region base_name = local.base_name iam_permissions_boundary = var.iam_permissions_boundary worker_pool_id = var.worker_pool_id diff --git a/providers.tf b/providers.tf index 4cd2be2..3365e35 100644 --- a/providers.tf +++ b/providers.tf @@ -2,7 +2,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.55.0" + version = ">= 6.0.0" } validation = { diff --git a/variables.tf b/variables.tf index 8527858..ec63d88 100644 --- a/variables.tf +++ b/variables.tf @@ -227,13 +227,13 @@ variable "enable_monitoring" { variable "instance_refresh" { description = "If this block is configured, start an Instance Refresh when this Auto Scaling Group is updated based on instance refresh configration." type = any - default = {} + default = null } variable "instance_market_options" { description = "The market (purchasing) option for the instance" type = any - default = {} + default = null } variable "iam_permissions_boundary" {