test: Set worker config to a variable (#3324)

This commit is contained in:
Michael Li authored and GitHub committed 2023-06-14 13:44:08 -04:00
1 parent d15f3cec88
commit 5f2f6ca6ca
3 files changed
+7 -1

No files matched your search

+1
View File
@@ -195,6 +195,7 @@ scenario "e2e_aws" {
controller_addresses = step.create_boundary_cluster.public_controller_addresses
controller_sg_id = step.create_boundary_cluster.controller_aux_sg_id
worker_type_tags = ["worker_e2e_test"]
config_file_path = "templates/worker.hcl"
}
}
+1 -1
View File
@@ -173,7 +173,7 @@ resource "enos_file" "worker_config" {
depends_on = [enos_bundle_install.worker]
destination = "/etc/boundary/boundary.hcl"
content = templatefile("${path.module}/templates/worker.hcl", {
content = templatefile("${path.module}/${var.config_file_path}", {
id = random_pet.worker.id
kms_key_id = data.aws_kms_key.kms_key.id
public_addr = aws_instance.worker.public_ip
+5
View File
@@ -129,3 +129,8 @@ variable "controller_sg_id" {
description = "The controllers' security group ID for adding rules allowing this worker to communicate with them"
type = string
}
variable "config_file_path" {
description = "Path to a config file (relative to module directory)"
type = string
}