Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions enos/modules/aws_rdp_member_server_with_worker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -20,7 +20,7 @@ worker {
name = "win-worker-0"
initial_upstreams = ["[${controller_ip}]:9201"]
tags {
type = ["worker", "egress", "windows"]
type = ["worker", "rdp", "windows"]
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
19 changes: 18 additions & 1 deletion enos/modules/aws_rdp_member_server_with_worker/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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