chore(e2e): Add session recording resources for UI tests (#4498)
This commit is contained in:
1 parent
19b19d6756
commit
b251e7a8b9
7 files changed
+108
-14
No files matched your search
@@ -158,11 +158,14 @@ resource "enos_file" "worker_config" {
|
||||
depends_on = [enos_bundle_install.worker]
|
||||
destination = "/etc/boundary/boundary.hcl"
|
||||
content = templatefile("${path.module}/${var.worker_config_file_path}", {
|
||||
id = each.value
|
||||
kms_key_id = data.aws_kms_key.kms_key.id,
|
||||
controller_ips = jsonencode(aws_instance.controller.*.private_ip),
|
||||
public_addr = aws_instance.worker.0.public_ip
|
||||
region = var.aws_region
|
||||
id = each.value
|
||||
kms_key_id = data.aws_kms_key.kms_key.id,
|
||||
controller_ips = jsonencode(aws_instance.controller.*.private_ip),
|
||||
public_addr = aws_instance.worker.0.public_ip
|
||||
region = var.aws_region
|
||||
type = jsonencode(var.worker_type_tags)
|
||||
recording_storage_path = var.recording_storage_path
|
||||
|
||||
})
|
||||
for_each = toset([for idx in range(var.worker_count) : tostring(idx)])
|
||||
|
||||
@@ -177,10 +180,12 @@ resource "enos_boundary_start" "worker_start" {
|
||||
depends_on = [enos_boundary_start.controller_start, enos_file.worker_config]
|
||||
for_each = toset([for idx in range(var.worker_count) : tostring(idx)])
|
||||
|
||||
bin_name = var.boundary_binary_name
|
||||
bin_path = var.boundary_install_dir
|
||||
config_path = "/etc/boundary"
|
||||
license = var.boundary_license
|
||||
bin_name = var.boundary_binary_name
|
||||
bin_path = var.boundary_install_dir
|
||||
config_path = "/etc/boundary"
|
||||
license = var.boundary_license
|
||||
recording_storage_path = var.recording_storage_path != "" ? var.recording_storage_path : null
|
||||
|
||||
transport = {
|
||||
ssh = {
|
||||
host = aws_instance.worker[tonumber(each.value)].public_ip
|
||||
|
||||
@@ -18,7 +18,7 @@ worker {
|
||||
public_addr = "${public_addr}"
|
||||
|
||||
tags {
|
||||
type = ["prod", "webservers"]
|
||||
type = ${type}
|
||||
region = ["${region}"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# Copyright (c) HashiCorp, Inc.
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
listener "tcp" {
|
||||
purpose = "proxy"
|
||||
tls_disable = true
|
||||
address = "0.0.0.0"
|
||||
}
|
||||
|
||||
worker {
|
||||
# Name attr must be unique across workers
|
||||
name = "demo-worker-${id}"
|
||||
description = "Enos Boundary worker ${id}"
|
||||
|
||||
# Workers must be able to reach controllers on :9201
|
||||
controllers = ${controller_ips}
|
||||
|
||||
public_addr = "${public_addr}"
|
||||
|
||||
tags {
|
||||
type = ${type}
|
||||
region = ["${region}"]
|
||||
}
|
||||
|
||||
recording_storage_path = "${recording_storage_path}"
|
||||
}
|
||||
|
||||
# must be same key as used on controller config
|
||||
kms "awskms" {
|
||||
purpose = "worker-auth"
|
||||
region = "${region}"
|
||||
kms_key_id = "${kms_key_id}"
|
||||
}
|
||||
@@ -28,6 +28,12 @@ variable "worker_instance_type" {
|
||||
default = "t2.micro"
|
||||
}
|
||||
|
||||
variable "worker_type_tags" {
|
||||
description = "Tag to set on worker for use in worker filters"
|
||||
type = list(string)
|
||||
default = ["collocated", "prod", "webservers"]
|
||||
}
|
||||
|
||||
variable "worker_ebs_iops" {
|
||||
description = "EBS IOPS for the root volume"
|
||||
type = number
|
||||
@@ -358,3 +364,9 @@ variable "vpc_tag_module" {
|
||||
type = string
|
||||
default = "aws_vpc"
|
||||
}
|
||||
|
||||
variable "recording_storage_path" {
|
||||
description = "Path on instance to store recordings"
|
||||
type = string
|
||||
default = ""
|
||||
}
|
||||
Reference in new issue
Block a user