chore(e2e): Update windows worker module to support other configs (#6077)

pull/6078/head
Michael Li 5 months ago committed by GitHub
parent 394c0690ea
commit f8a5894e29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -311,11 +311,12 @@ resource "local_file" "worker_config" {
enos_local_exec.add_boundary_cli,
]
content = templatefile("${path.module}/scripts/worker.hcl", {
controller_ip = var.controller_ip
aws_kms_key = data.aws_kms_key.kms_key.id
aws_region = var.aws_region
worker_public_ip = aws_instance.worker.public_ip
test_dir = local.test_dir
controller_ip = var.controller_ip
aws_kms_key = data.aws_kms_key.kms_key.id
aws_region = var.aws_region
worker_public_ip = aws_instance.worker.public_ip
test_dir = local.test_dir
hcp_boundary_cluster_id = var.hcp_boundary_cluster_id
})
filename = "${path.root}/.terraform/tmp/worker.hcl"
}

@ -4,7 +4,7 @@
# disable memory from being swapped to disk
disable_mlock = true
# Increase log level for debuggin
# Increase log level for debugging
log_level = "debug"
# listener denoting this is a worker proxy
@ -20,7 +20,7 @@ worker {
name = "win-worker-0"
initial_upstreams = ["[${controller_ip}]:9201"]
tags {
type = ["worker", "egress", "windows"]
type = ["worker", "rdp", "windows"]
}
}

@ -0,0 +1,59 @@
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: BUSL-1.1
# disable memory from being swapped to disk
disable_mlock = true
# Increase log level for debugging
log_level = "debug"
# listener denoting this is a worker proxy
listener "tcp" {
address = "0.0.0.0:9202"
purpose = "proxy"
}
hcp_boundary_cluster_id = "${hcp_boundary_cluster_id}"
# worker block for configuring the specifics of the
# worker service
worker {
public_addr = "${worker_public_ip}"
tags {
type = ["worker", "rdp", "windows"]
}
auth_storage_path = "${test_dir}/worker"
recording_storage_path = "${test_dir}/recordings"
}
# Events (logging) configuration. This
# configures logging for ALL events to both
# stderr and a file at ${test_dir}<boundary_use>.log
events {
audit_enabled = true
sysevents_enabled = true
observations_enable = true
sink "stderr" {
name = "all-events"
description = "All events sent to stderr"
event_types = ["*"]
format = "cloudevents-json"
}
sink {
name = "file-sink"
description = "All events sent to a file"
event_types = ["*"]
format = "cloudevents-json"
file {
path = "${test_dir}"
file_name = "worker.log"
}
audit_config {
audit_filter_overrides {
sensitive = "redact"
secret = "redact"
}
}
}
}

@ -109,4 +109,21 @@ variable "domain_controller_private_key" {
variable "domain_controller_sec_group_id_list" {
type = list(any)
description = "ID's of AWS Network Security Groups created during creation of the domain controller."
}
}
# =================================================================
# Boundary Worker Configuration
# =================================================================
variable "worker_config_file_path" {
description = "Path to config file to use (relative to module directory)"
type = string
default = "scripts/worker.hcl"
}
variable "hcp_boundary_cluster_id" {
description = "ID of the Boundary cluster in HCP"
type = string
default = ""
// If using HCP int, ensure that the cluster id starts with "int-"
// Example: "int-19283a-123123-..."
}

Loading…
Cancel
Save