Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .spacelift/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 2
module_version: 4.4.4
module_version: 5.0.0

tests:
- name: AMD64-based workerpool
Expand Down
6 changes: 3 additions & 3 deletions asg.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ 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
})

saas_user_data = templatefile("${path.module}/user_data/saas.tftpl", {
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

Expand Down
2 changes: 1 addition & 1 deletion examples/amd64/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "< 6.0"
version = ">= 6.0.0"
}

random = { source = "hashicorp/random" }
Expand Down
2 changes: 1 addition & 1 deletion examples/arm64/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "< 6.0"
version = ">= 6.0.0"
}

random = { source = "hashicorp/random" }
Expand Down
4 changes: 2 additions & 2 deletions examples/autoscaler-custom-s3-package/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "< 6.0"
version = ">= 6.0.0"
}

random = { source = "hashicorp/random" }
Expand Down Expand Up @@ -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
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/autoscaler/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "< 6.0"
version = ">= 6.0.0"
}

random = { source = "hashicorp/random" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "< 6.0"
version = ">= 6.0.0"
}

random = { source = "hashicorp/random" }
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-iam-role/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "< 6.0"
version = ">= 6.0.0"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/extra-iam-statements/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "< 6.0"
version = ">= 6.0.0"
}

random = { source = "hashicorp/random" }
Expand Down
2 changes: 1 addition & 1 deletion examples/self-hosted/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "< 6.0"
version = ">= 6.0.0"
}

random = { source = "hashicorp/random" }
Expand Down
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.55.0"
version = ">= 6.0.0"
}

validation = {
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down