Updated for 1.1.5.0. Updated Swap memory partition creation in Init scripts.

This commit is contained in:
Will Smith 2024-04-25 21:02:07 +00:00
parent 25f0dd183b
commit 814af2f6aa
No known key found for this signature in database
GPG key ID: A4162186EBD5C0FF
24 changed files with 135 additions and 155 deletions

View file

@ -1,7 +1,7 @@
## AWS Environment settings
aws_key_pair = ""
ssh_authorized_keys = ""
aws_primary_region = ""
aws_domain_name = "contoso.kasm.com"
aws_domain_name = "example.kasmweb.com"
primary_vpc_subnet_cidr = "10.0.0.0/16"
## Kasm deployment project
@ -16,7 +16,7 @@ manager_token = "changeme"
service_registration_token = "changeme"
## Kasm download URL
kasm_build = "https://kasm-static-content.s3.amazonaws.com/kasm_release_1.14.0.3a7abb.tar.gz"
kasm_build = "https://github.com/kasmtech/kasm-install-wizard/releases/download/1.15.0/kasm_release.tar.gz"
## VM Public Access subnets
web_access_cidrs = ["0.0.0.0/0"]
@ -27,7 +27,7 @@ aws_ssm_iam_role_name = ""
aws_ssm_instance_profile_name = ""
## Kasm Server Settings
swap_size = 2048
swap_size = 2
primary_region_ec2_ami_id = ""
## Kasm Webapp Instance Settings
@ -84,5 +84,5 @@ aws_default_tags = {
Deployed_by = "Terraform"
Deployment_type = "Multi-Region"
Service_name = "Kasm Workspaces"
Kasm_version = "1.14"
Kasm_version = "1.15"
}

View file

@ -20,16 +20,6 @@ variable "aws_secret_key" {
}
}
variable "aws_key_pair" {
description = "The name of an aws keypair to use."
type = string
validation {
condition = can(regex("^[a-zA-Z0-9-_]{4,15}", var.aws_key_pair))
error_message = "The aws_key_pair variable contains invalid characters. Allowed values are between 4-15 characters consisting of letters, numbers, and dashes (-)."
}
}
variable "create_aws_ssm_iam_role" {
description = "Create an AWS SSM IAM role to attach to VMs for SSH/console access to VMs."
type = bool
@ -283,12 +273,22 @@ variable "aws_primary_region" {
}
variable "swap_size" {
description = "The amount of swap (in MB) to configure inside the compute instances"
description = "The amount of swap (in GB) to configure inside the compute instances"
type = number
validation {
condition = var.swap_size >= 1024 && var.swap_size <= 8192 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in MB and must be an integer between 1024 and 8192."
condition = var.swap_size >= 1 && var.swap_size <= 8 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in GB and must be an integer between 1 and 8."
}
}
variable "ssh_authorized_keys" {
description = "The SSH Public Keys to be installed on the OCI compute instance"
type = string
validation {
condition = var.ssh_authorized_keys == "" ? true : can(regex("^(ssh-rsa|ssh-ed25519)", var.ssh_authorized_keys))
error_message = "The ssh_authorized_keys value is not in the correct format."
}
}

View file

@ -2,12 +2,12 @@
set -ex
echo "Starting Kasm Workspaces Agent Install"
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=${swap_size}
/sbin/mkswap /var/swap.1
chmod 600 /var/swap.1
/sbin/swapon /var/swap.1
echo '/var/swap.1 swap swap defaults 0 0' | tee -a /etc/fstab
## Create Swap partition
fallocate -l "${swap_size}"g /var/kasm.swap
chmod 600 /var/kasm.swap
mkswap /var/kasm.swap
swapon /var/kasm.swap
echo '/var/kasm.swap swap swap defaults 0 0' | tee -a /etc/fstab
cd /tmp

View file

@ -2,12 +2,12 @@
set -ex
echo "Starting Kasm Workspaces Agent Install"
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=${swap_size}
/sbin/mkswap /var/swap.1
chmod 600 /var/swap.1
/sbin/swapon /var/swap.1
echo '/var/swap.1 swap swap defaults 0 0' | tee -a /etc/fstab
## Create Swap partition
fallocate -l "${swap_size}"g /var/kasm.swap
chmod 600 /var/kasm.swap
mkswap /var/kasm.swap
swapon /var/kasm.swap
echo '/var/kasm.swap swap swap defaults 0 0' | tee -a /etc/fstab
cd /tmp

View file

@ -2,12 +2,12 @@
set -ex
echo "Starting Kasm Workspaces Install"
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=${swap_size}
/sbin/mkswap /var/swap.1
chmod 600 /var/swap.1
/sbin/swapon /var/swap.1
echo '/var/swap.1 swap swap defaults 0 0' | tee -a /etc/fstab
## Create Swap partition
fallocate -l "${swap_size}"g /var/kasm.swap
chmod 600 /var/kasm.swap
mkswap /var/kasm.swap
swapon /var/kasm.swap
echo '/var/kasm.swap swap swap defaults 0 0' | tee -a /etc/fstab
cd /tmp

View file

@ -2,12 +2,12 @@
set -ex
echo "Starting Kasm Workspaces Install"
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=${swap_size}
/sbin/mkswap /var/swap.1
chmod 600 /var/swap.1
/sbin/swapon /var/swap.1
echo '/var/swap.1 swap swap defaults 0 0' | tee -a /etc/fstab
## Create Swap partition
fallocate -l "${swap_size}"g /var/kasm.swap
chmod 600 /var/kasm.swap
mkswap /var/kasm.swap
swapon /var/kasm.swap
echo '/var/kasm.swap swap swap defaults 0 0' | tee -a /etc/fstab
cd /tmp

View file

@ -8,11 +8,6 @@ variable "aws_domain_name" {
type = string
}
variable "aws_key_pair" {
description = "The name of an aws keypair to use."
type = string
}
variable "vpc_subnet_cidr" {
description = "The subnet CIDR to use for the VPC"
type = string
@ -103,7 +98,7 @@ variable "kasm_build" {
}
variable "swap_size" {
description = "The amount of swap (in MB) to configure inside the compute instances"
description = "The amount of swap (in GB) to configure inside the compute instances"
type = number
}
@ -333,3 +328,8 @@ variable "default_egress" {
}
}
}
variable "ssh_authorized_keys" {
description = "The SSH Public Keys to be installed on the OCI compute instance"
type = string
}

View file

@ -1,12 +1,12 @@
## AWS Environment settings
aws_key_pair = ""
aws_region = ""
aws_domain_name = ""
vpc_subnet_cidr = "10.0.0.0/16"
ssh_authorized_keys = ""
aws_region = ""
aws_domain_name = "example.kasmweb.com"
vpc_subnet_cidr = "10.0.0.0/16"
## Kasm deployment settings
kasm_zone_name = "default"
project_name = "test"
kasm_zone_name = ""
project_name = ""
## Number of each Kasm role to deploy
num_agents = 2
@ -23,7 +23,7 @@ aws_ssm_instance_profile_name = ""
## Kasm Server settings
ec2_ami_id = ""
swap_size = 2048
swap_size = 2
## Kasm Webapp Instance Settings
webapp_instance_type = "t3.small"
@ -50,12 +50,12 @@ manager_token = "changeme"
service_registration_token = "changeme"
## Kasm download URL
kasm_build = "https://kasm-static-content.s3.amazonaws.com/kasm_release_1.14.0.3a7abb.tar.gz"
kasm_build = "https://github.com/kasmtech/kasm-install-wizard/releases/download/1.15.0/kasm_release.tar.gz"
## Default tags for all AWS resources
aws_default_tags = {
Deployed_by = "Terraform"
Deployment_type = "Multi-Server"
Service_name = "Kasm Workspaces"
Kasm_version = "1.14"
Kasm_version = "1.15"
}

View file

@ -62,16 +62,6 @@ variable "aws_domain_name" {
}
}
variable "aws_key_pair" {
description = "The name of an aws keypair to use."
type = string
validation {
condition = can(regex("^[a-zA-Z0-9-_]{4,15}", var.aws_key_pair))
error_message = "The aws_key_pair variable contains invalid characters. Allowed values are between 4-15 characters consisting of letters, numbers, and dashes (-)."
}
}
variable "vpc_subnet_cidr" {
description = "The subnet CIDR to use for the VPC"
type = string
@ -84,12 +74,12 @@ variable "vpc_subnet_cidr" {
}
variable "swap_size" {
description = "The amount of swap (in MB) to configure inside the compute instances"
description = "The amount of swap (in GB) to configure inside the compute instances"
type = number
validation {
condition = var.swap_size >= 1024 && var.swap_size <= 8192 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in MB and must be an integer between 1024 and 8192."
condition = var.swap_size >= 1 && var.swap_size <= 8 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in GB and must be an integer between 1 and 8."
}
}
@ -223,6 +213,16 @@ variable "ec2_ami_id" {
}
}
variable "ssh_authorized_keys" {
description = "The SSH Public Keys to be installed on the OCI compute instance"
type = string
validation {
condition = var.ssh_authorized_keys == "" ? true : can(regex("^(ssh-rsa|ssh-ed25519)", var.ssh_authorized_keys))
error_message = "The ssh_authorized_keys value is not in the correct format."
}
}
variable "database_password" {
description = "The password for the database. No special characters"
type = string

View file

@ -2,10 +2,12 @@
set -ex
echo "Starting Kasm Workspaces Install"
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=${swap_size}
/sbin/mkswap /var/swap.1
chmod 600 /var/swap.1
/sbin/swapon /var/swap.1
## Create Swap partition
fallocate -l "${swap_size}"g /var/kasm.swap
chmod 600 /var/kasm.swap
mkswap /var/kasm.swap
swapon /var/kasm.swap
echo '/var/kasm.swap swap swap defaults 0 0' | tee -a /etc/fstab
cd /tmp

View file

@ -62,12 +62,12 @@ variable "ssh_key_fingerprints" {
}
variable "swap_size" {
description = "The amount of swap (in MB) to configure inside the compute instances"
description = "The amount of swap (in GB) to configure inside the compute instances"
type = number
validation {
condition = var.swap_size >= 1024 && var.swap_size <= 8192 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in MB and must be an integer between 1024 and 8192."
condition = var.swap_size >= 1 && var.swap_size <= 8 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in GB and must be an integer between 1 and 8."
}
}

View file

@ -5,12 +5,12 @@ digital_ocean_region = "nyc3"
vpc_subnet_cidr = "10.0.0.0/24"
## DO Authentication variables
ssh_key_fingerprints = ["c2:4c:f2:5d:0c:59:5a:3f:93:a2:9d:25:94:24:9a:b1"]
ssh_key_fingerprints = []
## VM Settings
digital_ocean_image = "docker-20-04"
digital_ocean_droplet_slug = "s-2vcpu-4gb-intel"
swap_size = 2048
swap_size = 2
## Kasm passwords
user_password = "changeme"
@ -21,4 +21,4 @@ allow_ssh_cidrs = ["0.0.0.0/0"]
allow_kasm_web_cidrs = ["0.0.0.0/0"]
## Kasm download URL
kasm_build_url = "https://kasm-static-content.s3.amazonaws.com/kasm_release_1.14.0.3a7abb.tar.gz"
kasm_build_url = "https://github.com/kasmtech/kasm-install-wizard/releases/download/1.15.0/kasm_release.tar.gz"

View file

@ -125,12 +125,11 @@ variable "allow_kasm_web_cidrs" {
}
variable "swap_size" {
description = "The amount of swap (in MB) to configure inside the compute instances"
description = "The amount of swap (in GB) to configure inside the compute instances"
type = number
default = 2048
validation {
condition = var.swap_size >= 1024 && var.swap_size <= 8192 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in MB and must be an integer between 1024 and 8192."
condition = var.swap_size >= 1 && var.swap_size <= 8 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in GB and must be an integer between 1 and 8."
}
}

View file

@ -2,10 +2,12 @@
set -ex
echo "Starting Kasm Workspaces Install"
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=${swap_size}
/sbin/mkswap /var/swap.1
chmod 600 /var/swap.1
/sbin/swapon /var/swap.1
## Create Swap partition
fallocate -l "${swap_size}"g /var/kasm.swap
chmod 600 /var/kasm.swap
mkswap /var/kasm.swap
swapon /var/kasm.swap
echo '/var/kasm.swap swap swap defaults 0 0' | tee -a /etc/fstab
cd /tmp
@ -13,6 +15,8 @@ PRIVATE_IP=(`hostname -I | cut -d ' ' -f1 | tr -d '\\n'`)
wget ${kasm_build_url} -O kasm_workspaces.tar.gz
tar -xf kasm_workspaces.tar.gz
sleep 30
bash kasm_release/install.sh -e -U ${user_password} -P ${admin_password} -p $PRIVATE_IP -m $PRIVATE_IP
echo -e "${nginx_cert_in}" > /opt/kasm/current/certs/kasm_nginx.crt

View file

@ -102,7 +102,7 @@ variable "kasm_build_url" {
}
variable "swap_size" {
description = "The amount of swap (in MB) to configure inside the compute instances"
description = "The amount of swap (in GB) to configure inside the compute instances"
type = number
}

View file

@ -1,28 +1 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC9ue4AlUo3K11g
loxg3CvAUwJdkthsPmxZzOarkel1NZw22vdFnIbZhVWeO7U/WErzBWW0gpublWrq
MVZvtwitAs+++QsUV9NkDecCfghxoOV4xO3WIGmBUx32iuNM0jzqFSodUq2JpBLB
41lBToUaUbVVvd8934GoXIaFIjgvFhZcfMnQCj+FMCc86Sm5MEOtIfdI2fv6Ih71
Yqoeqwz85xM3O8AtXlVkTwea2MOrtaPe+FzvcyLMB+lemTlaVkZ/ZnasB1SC5nzS
eOCerdx7/E7QR8mpXCWovOUIWDvMAdJvGHZM9FzI/Ve0hcmOAHTTkVn3vplnFKdO
hXAyBbCXAgMBAAECggEAH2hFFwGfvIxIM/IYIPyxnW/gZ18kxp56z07VLLfF3upW
Btqurm5gAGhLKRuXQHo8RgixsnUgj1vnzAcI2QuCuylI/MM7a02yp9CJWmdEvJK3
CgwHlzfcX1VEE4kgYZo4DUQdqacDJVLs6/3Xy7DU5et6ykvZRePXEejnN+jXRivn
yOXD4rAA5C7Zf+vQRqfah41CqF85el7Iwc5s7//GTOoobanpxHbrQxqftfmYJooY
jWx2SEj1IWWesOp3uRUuldgfLDu9i5jr3uY9NaCHp4Q41sf/ww2Qa9SimPJWPVyi
F/UxYmasnygere/dEwEBbF7Qt9WWAFmgWEePG5OTkQKBgQDpG11wtp/KN74S70YN
StbsCnYqWjnfjwiUF0v45uqxMlcaF/i7/M/REyQgZ4c4pimdqLQiz+M1CLoG6K6v
XetK8waskxbduXtogjTZq0IbemLyLb0aw8hxb/VLP2DTOa/y21zKVSznT5RmEHuF
mMfeYVUjg70QqbpTvSP6NcSQ+QKBgQDQW+pO0vV52i6fvcLR/wRXxHdpOKyq/7SL
ugdWPiEZBSRdRT6L4pPDA0cbASsf79sYLiwqV9WlpKh4VXePot7xwU7w59AqWWrn
M3Oed9PtLZYMyKd1Udqx8nvkgHqmDEUw8q3iG7EcwT6FYMbfiKCdfiVYcMooHOeJ
NI3EKGlCDwKBgQDfUmooi612DAU7GqSgI2zX4gXm+V2sgdmUFuWf5Yo+jJ3Jz+Fq
J//oq0/XA5gWe4ovEurQ1x0zN9MQv2Zrd6zttvpT5u7nKMXED8oWJu5EaPHWVl9u
/tZPZxU3K9bVRdT8849oAEXurNzdEzljekUxFUp9pb5B8nkhtHh9Q3m38QKBgQCQ
mVlwvsMRf7OftKgB6MNwza45XdWnDrKTzdTNq2x42rKz8BxKJEJ7skikmxj8nw8k
JtcLw81HmZA5gsbo7hVfHdLVKWu0GD4ymeiBb5OqJFrgIFjm+JmXqTsGB4wWtKlI
IQM/ygwOcqYbFmCuPTmKU0NDr3L8h6K/+7LvEUSLTQKBgB7mHVR3IS08w8rdJi3v
Ej72UYtPDbCSkEwf2/grdfwSqPFq/BGCOJjRn9D/cHIS9g/OOBkssJX/TI3PHA17
mrtwF2F93H4wWptnmjyNnApIvndE5IoPNMZhTtsdk7+D/2QcSMaUtfv8dCi8E6K6
OQsbnf32CLR2ef1inNhCFBuO
-----END PRIVATE KEY-----
replaceme

View file

@ -34,10 +34,10 @@ ssh_authorized_keys = "changeme"
## OCI VM Settings
instance_image_ocid = ""
instance_shape = "VM.Standard.E4.Flex"
swap_size = 2048
swap_size = 2
kasm_server_cpus = 2
kasm_server_memory = 2
kasm_server_hdd_size = 120
## Kasm download URL
kasm_build_url = "https://kasm-static-content.s3.amazonaws.com/kasm_release_1.14.0.3a7abb.tar.gz"
kasm_build_url = "https://github.com/kasmtech/kasm-install-wizard/releases/download/1.15.0/kasm_release.tar.gz"

View file

@ -99,7 +99,7 @@ variable "ssh_authorized_keys" {
type = string
validation {
condition = can(regex("^ssh-rsa\\s+[A-Za-z0-9+/]+[=]{0,3}(\\s+.+)?\\s*$", var.ssh_authorized_keys))
condition = var.ssh_authorized_keys == "" ? true : can(regex("^(ssh-rsa|ssh-ed25519)", var.ssh_authorized_keys))
error_message = "The ssh_authorized_keys value is not in the correct format."
}
}
@ -212,12 +212,12 @@ variable "admin_password" {
}
variable "swap_size" {
description = "The amount of swap (in MB) to configure inside the compute instances"
description = "The amount of swap (in GB) to configure inside the compute instances"
type = number
validation {
condition = var.swap_size >= 1024 && var.swap_size <= 8192 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in MB and must be an integer between 1024 and 8192."
condition = var.swap_size >= 1 && var.swap_size <= 8 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in GB and must be an integer between 1 and 8."
}
}

View file

@ -2,12 +2,12 @@
set -ex
echo "Starting Kasm Workspaces Agent Install"
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=${swap_size}
/sbin/mkswap /var/swap.1
chmod 600 /var/swap.1
/sbin/swapon /var/swap.1
echo '/var/swap.1 swap swap defaults 0 0' | tee -a /etc/fstab
## Create Swap partition
fallocate -l "${swap_size}"g /var/kasm.swap
chmod 600 /var/kasm.swap
mkswap /var/kasm.swap
swapon /var/kasm.swap
echo '/var/kasm.swap swap swap defaults 0 0' | tee -a /etc/fstab
cd /tmp

View file

@ -2,12 +2,12 @@
set -ex
echo "Starting Kasm Workspaces Agent Install"
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=${swap_size}
/sbin/mkswap /var/swap.1
chmod 600 /var/swap.1
/sbin/swapon /var/swap.1
echo '/var/swap.1 swap swap defaults 0 0' | tee -a /etc/fstab
## Create Swap partition
fallocate -l "${swap_size}"g /var/kasm.swap
chmod 600 /var/kasm.swap
mkswap /var/kasm.swap
swapon /var/kasm.swap
echo '/var/kasm.swap swap swap defaults 0 0' | tee -a /etc/fstab
cd /tmp

View file

@ -2,12 +2,12 @@
set -ex
echo "Starting Kasm Workspaces Install"
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=${swap_size}
/sbin/mkswap /var/swap.1
chmod 600 /var/swap.1
/sbin/swapon /var/swap.1
echo '/var/swap.1 swap swap defaults 0 0' | tee -a /etc/fstab
## Create Swap partition
fallocate -l "${swap_size}"g /var/kasm.swap
chmod 600 /var/kasm.swap
mkswap /var/kasm.swap
swapon /var/kasm.swap
echo '/var/kasm.swap swap swap defaults 0 0' | tee -a /etc/fstab
cd /tmp
@ -15,6 +15,8 @@ PRIVATE_IP=(`hostname -I | cut -d ' ' -f1 | tr -d '\\n'`)
wget ${kasm_build_url} -O kasm_workspaces.tar.gz
tar -xf kasm_workspaces.tar.gz
sleep 30
bash kasm_release/install.sh -S db -e -Q ${database_password} -R ${redis_password} -U ${user_password} -P ${admin_password} -M ${manager_token} -k ${service_registration_token}
echo "Done"

View file

@ -2,12 +2,12 @@
set -ex
echo "Starting Kasm Workspaces Install"
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=${swap_size}
/sbin/mkswap /var/swap.1
chmod 600 /var/swap.1
/sbin/swapon /var/swap.1
echo '/var/swap.1 swap swap defaults 0 0' | tee -a /etc/fstab
## Create Swap partition
fallocate -l "${swap_size}"g /var/kasm.swap
chmod 600 /var/kasm.swap
mkswap /var/kasm.swap
swapon /var/kasm.swap
echo '/var/kasm.swap swap swap defaults 0 0' | tee -a /etc/fstab
cd /tmp
@ -30,7 +30,7 @@ while ! nc -w 1 -z ${db_ip} 6379; do
done
echo "Redis is alive"
sleep 30
bash kasm_release/install.sh -S app -e -z ${zone_name} -q "${db_ip}" -Q ${database_password} -R ${redis_password}
echo "Done"

View file

@ -1,7 +1,7 @@
## Kasm deployment settings
oci_domain_name = "kasm.contoso.com"
project_name = "contoso"
kasm_build_url = "https://kasm-static-content.s3.amazonaws.com/kasm_release_1.14.0.3a7abb.tar.gz"
kasm_build_url = "https://github.com/kasmtech/kasm-install-wizard/releases/download/1.15.0/kasm_release.tar.gz"
vcn_subnet_cidr = "10.0.0.0/16"
## OCI Authentication variables
@ -39,7 +39,7 @@ ssh_authorized_keys = "changeme"
## OCI VM Settings
instance_image_ocid = ""
instance_shape = "VM.Standard.E4.Flex"
swap_size = 2048
swap_size = 2
num_webapps = 2
num_agents = 2
num_cpx_nodes = 1
@ -59,7 +59,7 @@ kasm_database_vm_settings = {
kasm_agent_vm_settings = {
cpus = 4
memory = 8
hdd_size_gb = 120
hdd_size_gb = 150
}
kasm_cpx_vm_settings = {

View file

@ -98,7 +98,7 @@ variable "ssh_authorized_keys" {
type = string
validation {
condition = can(regex("^ssh-rsa\\s+[A-Za-z0-9+/]+[=]{0,3}(\\s+.+)?\\s*$", var.ssh_authorized_keys))
condition = var.ssh_authorized_keys == "" ? true : can(regex("^(ssh-rsa|ssh-ed25519)", var.ssh_authorized_keys))
error_message = "The ssh_authorized_keys value is not in the correct format."
}
}
@ -285,12 +285,12 @@ variable "num_webapps" {
}
variable "swap_size" {
description = "The amount of swap (in MB) to configure inside the compute instances"
description = "The amount of swap (in GB) to configure inside the compute instances"
type = number
validation {
condition = var.swap_size >= 1024 && var.swap_size <= 8192 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in MB and must be an integer between 1024 and 8192."
condition = var.swap_size >= 1 && var.swap_size <= 8 && floor(var.swap_size) == var.swap_size
error_message = "Swap size is the amount of disk space to use for Kasm in GB and must be an integer between 1 and 8."
}
}