diff --git a/modules/runners/variables.tf b/modules/runners/variables.tf index 75e851695e..252cac305e 100644 --- a/modules/runners/variables.tf +++ b/modules/runners/variables.tf @@ -58,26 +58,18 @@ variable "s3_runner_binaries" { variable "block_device_mappings" { description = "The EC2 instance block device configuration. Takes the following keys: `device_name`, `delete_on_termination`, `volume_type`, `volume_size`, `encrypted`, `iops`, `throughput`, `kms_key_id`, `snapshot_id`." type = list(object({ - delete_on_termination = bool - device_name = string - encrypted = bool - iops = number - kms_key_id = string - snapshot_id = string - throughput = number + delete_on_termination = optional(bool, true) + device_name = optional(string, "/dev/xvda") + encrypted = optional(bool, true) + iops = optional(number) + kms_key_id = optional(string) + snapshot_id = optional(string) + throughput = optional(number) volume_size = number - volume_type = string + volume_type = optional(string, "gp3") })) default = [{ - delete_on_termination = true - device_name = "/dev/xvda" - encrypted = true - iops = null - kms_key_id = null - snapshot_id = null - throughput = null - volume_size = 30 - volume_type = "gp3" + volume_size = 30 }] } diff --git a/variables.tf b/variables.tf index eaf0651740..d69f952331 100644 --- a/variables.tf +++ b/variables.tf @@ -274,26 +274,18 @@ variable "runner_allow_prerelease_binaries" { variable "block_device_mappings" { description = "The EC2 instance block device configuration. Takes the following keys: `device_name`, `delete_on_termination`, `volume_type`, `volume_size`, `encrypted`, `iops`, `throughput`, `kms_key_id`, `snapshot_id`." type = list(object({ - delete_on_termination = bool - device_name = string - encrypted = bool - iops = number - kms_key_id = string - snapshot_id = string - throughput = number + delete_on_termination = optional(bool, true) + device_name = optional(string, "/dev/xvda") + encrypted = optional(bool, true) + iops = optional(number) + kms_key_id = optional(string) + snapshot_id = optional(string) + throughput = optional(number) volume_size = number - volume_type = string + volume_type = optional(string, "gp3") })) default = [{ - delete_on_termination = true - device_name = "/dev/xvda" - encrypted = true - iops = null - kms_key_id = null - snapshot_id = null - throughput = null - volume_size = 30 - volume_type = "gp3" + volume_size = 30 }] }