Apply Formatting

This commit is contained in:
Will Smith 2024-04-25 21:05:12 +00:00
parent 814af2f6aa
commit 57962f7988
No known key found for this signature in database
GPG key ID: A4162186EBD5C0FF
13 changed files with 37 additions and 37 deletions

View file

@ -72,7 +72,7 @@ module "primary_region_webapps_and_agents" {
redis_password = var.redis_password
manager_token = var.manager_token
service_registration_token = var.service_registration_token
aws_key_pair = module.primary_aws_key_pairs.aws_key_pair_name
aws_key_pair = module.primary_aws_key_pairs.aws_key_pair_name
kasm_db_ip = module.primary_region.kasm_db_ip
primary_vpc_id = module.primary_region.primary_vpc_id
certificate_arn = module.primary_region.certificate_arn
@ -81,7 +81,7 @@ module "primary_region_webapps_and_agents" {
}
module "primary_aws_key_pairs" {
source = "./aws_key_pairs"
source = "./aws_key_pairs"
ssh_authorized_keys = module.ssh_keys.ssh_public_key
project_name = var.project_name
}
@ -112,12 +112,12 @@ module "region2_webapps" {
database_password = var.database_password
redis_password = var.redis_password
manager_token = var.manager_token
kasm_db_ip = module.primary_region.kasm_db_ip
primary_vpc_id = module.primary_region.primary_vpc_id
certificate_arn = module.primary_region.certificate_arn
load_balancer_log_bucket = module.primary_region.lb_log_bucket
aws_ssm_instance_profile_name = var.aws_ssm_instance_profile_name
kasm_db_ip = module.primary_region.kasm_db_ip
primary_vpc_id = module.primary_region.primary_vpc_id
certificate_arn = module.primary_region.certificate_arn
load_balancer_log_bucket = module.primary_region.lb_log_bucket
aws_ssm_instance_profile_name = var.aws_ssm_instance_profile_name
}
module "region2_agents" {

View file

@ -17,8 +17,8 @@ ZONE
}
output "ssh_keys" {
description = "SSH Keys to be used with your Kasm Deployment"
value = module.ssh_keys.ssh_key_info
description = "SSH Keys to be used with your Kasm Deployment"
value = module.ssh_keys.ssh_key_info
}
#########################################################################
#

View file

@ -1,4 +1,4 @@
resource "aws_key_pair" "ssh_keys" {
key_name = "${var.project_name}-ssh-key"
public_key = var.ssh_authorized_keys == "" ? tls_private_key.ssh_key[0].public_key_openssh : var.ssh_authorized_keys
public_key = var.ssh_authorized_keys == "" ? tls_private_key.ssh_key[0].public_key_openssh : var.ssh_authorized_keys
}

View file

@ -6,7 +6,7 @@ terraform {
source = "hashicorp/aws"
version = "~> 5.0"
}
tls = {
tls = {
source = "hashicorp/tls"
version = "~> 4.0"
}

View file

@ -1,11 +1,11 @@
resource "tls_private_key" "ssh_key" {
count = var.ssh_authorized_keys == "" ? 1 : 0
algorithm = "ED25519"
count = var.ssh_authorized_keys == "" ? 1 : 0
algorithm = "ED25519"
}
output "ssh_key_info" {
description = "SSH Keys for use with Kasm Deployment"
value = <<-SSHKEYS
value = <<-SSHKEYS
SSH Keys:
%{if var.ssh_authorized_keys == ""}
Public Key: ${tls_private_key.ssh_key[0].public_key_openssh}

View file

@ -8,6 +8,6 @@ ZONE
output "ssh_key_info" {
description = "SSH Keys to use with Kasm Deployment"
value = module.standard.ssh_key_info
sensitive = true
value = module.standard.ssh_key_info
sensitive = true
}

View file

@ -1,8 +1,8 @@
## AWS Environment settings
ssh_authorized_keys = ""
aws_region = ""
aws_domain_name = "example.kasmweb.com"
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 = ""

View file

@ -89,7 +89,7 @@ module "webapp_private_load_balancer" {
project = var.project_id
region = each.key
network = module.vpc.network_name
subnetwork = one([for subnet in module.vpc.subnets_names : subnet if can(regex("${each.key}.webapp", subnet)) ])
subnetwork = one([for subnet in module.vpc.subnets_names : subnet if can(regex("${each.key}.webapp", subnet))])
name = "${each.key}-webapp-private-load-balancer"
port_range = var.webapp_named_ports[0].port
ip_protocol = "TCP"
@ -97,7 +97,7 @@ module "webapp_private_load_balancer" {
health_check = var.webapp_health_check
backends = local.private_load_balancer_backends[each.key]
depends_on = [ module.vpc ]
depends_on = [module.vpc]
}
## Public access Load balancer for client Kasm access
@ -133,7 +133,7 @@ module "database_instance" {
public_access_config = []
kasm_region = var.kasm_deployment_regions[0]
depends_on = [ module.vpc ]
depends_on = [module.vpc]
}
/*
@ -156,7 +156,7 @@ module "agent_instances" {
public_access_config = local.agent_public_ip
kasm_region = each.key
depends_on = [ module.vpc ]
depends_on = [module.vpc]
}
/*
@ -183,7 +183,7 @@ module "cpx_instance_template" {
startup_script = local.cpx_startup_configs[each.key]
labels = local.resource_labels
depends_on = [ module.vpc ]
depends_on = [module.vpc]
}
## Create Kasm Webapp Instance groups

View file

@ -37,6 +37,6 @@ module "kasm" {
output "ssh_key_info" {
description = "SSH Keys to use with Kasm Deployment"
value = module.standard.ssh_key_info
sensitive = true
value = module.standard.ssh_key_info
sensitive = true
}

View file

@ -1,11 +1,11 @@
resource "tls_private_key" "ssh_key" {
count = var.ssh_authorized_keys == "" ? 1 : 0
algorithm = "ED25519"
count = var.ssh_authorized_keys == "" ? 1 : 0
algorithm = "ED25519"
}
output "ssh_key_info" {
description = "SSH Keys for use with Kasm Deployment"
value = <<-SSHKEYS
value = <<-SSHKEYS
SSH Keys:
%{if var.ssh_authorized_keys == ""}
Public Key: ${tls_private_key.ssh_key[0].public_key_openssh}

View file

@ -47,6 +47,6 @@ module "kasm" {
output "ssh_key_info" {
description = "SSH Keys to use with Kasm Deployment"
value = module.standard.ssh_key_info
sensitive = true
value = module.standard.ssh_key_info
sensitive = true
}

View file

@ -1,11 +1,11 @@
resource "tls_private_key" "ssh_key" {
count = var.ssh_authorized_keys == "" ? 1 : 0
algorithm = "ED25519"
count = var.ssh_authorized_keys == "" ? 1 : 0
algorithm = "ED25519"
}
output "ssh_key_info" {
description = "SSH Keys for use with Kasm Deployment"
value = <<-SSHKEYS
value = <<-SSHKEYS
SSH Keys:
%{if var.ssh_authorized_keys == ""}
Public Key: ${tls_private_key.ssh_key[0].public_key_openssh}

View file

@ -39,7 +39,7 @@ ssh_authorized_keys = "changeme"
## OCI VM Settings
instance_image_ocid = ""
instance_shape = "VM.Standard.E4.Flex"
swap_size = 2
swap_size = 2
num_webapps = 2
num_agents = 2
num_cpx_nodes = 1