|
|
|
|
@ -12,7 +12,7 @@ resource "aws_instance" "controller" {
|
|
|
|
|
aws_security_group.boundary_aux_sg.id,
|
|
|
|
|
]
|
|
|
|
|
subnet_id = tolist(data.aws_subnets.infra.ids)[count.index % length(data.aws_subnets.infra.ids)]
|
|
|
|
|
key_name = var.ssh_aws_keypair
|
|
|
|
|
key_name = var.aws_ssh_keypair_name
|
|
|
|
|
iam_instance_profile = aws_iam_instance_profile.boundary_profile.name
|
|
|
|
|
monitoring = var.controller_monitoring
|
|
|
|
|
ipv6_address_count = local.network_stack[var.ip_version].ipv6_address_count
|
|
|
|
|
@ -45,7 +45,7 @@ resource "aws_instance" "worker" {
|
|
|
|
|
instance_type = var.worker_instance_type
|
|
|
|
|
vpc_security_group_ids = [aws_security_group.boundary_sg.id]
|
|
|
|
|
subnet_id = tolist(data.aws_subnets.infra.ids)[count.index % length(data.aws_subnets.infra.ids)]
|
|
|
|
|
key_name = var.ssh_aws_keypair
|
|
|
|
|
key_name = var.aws_ssh_keypair_name
|
|
|
|
|
iam_instance_profile = aws_iam_instance_profile.boundary_profile.name
|
|
|
|
|
monitoring = var.worker_monitoring
|
|
|
|
|
ipv6_address_count = local.network_stack[var.ip_version].ipv6_address_count
|
|
|
|
|
@ -84,7 +84,7 @@ resource "enos_bundle_install" "controller" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.controller[tonumber(each.value)].ipv6_addresses[0] : aws_instance.controller[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -102,7 +102,7 @@ resource "enos_remote_exec" "update_path_controller" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.controller[tonumber(each.value)].ipv6_addresses[0] : aws_instance.controller[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -141,7 +141,7 @@ resource "enos_file" "controller_config" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.controller[tonumber(each.value)].ipv6_addresses[0] : aws_instance.controller[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -157,7 +157,7 @@ resource "enos_boundary_init" "controller" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = try(var.ip_version == "6" ? aws_instance.controller[0].ipv6_addresses[0] : aws_instance.controller[0].public_ip, null)
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -175,7 +175,7 @@ resource "enos_boundary_start" "controller_start" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.controller[tonumber(each.value)].ipv6_addresses[0] : aws_instance.controller[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -201,7 +201,7 @@ resource "enos_remote_exec" "create_controller_audit_log_dir" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.controller[tonumber(each.value)].ipv6_addresses[0] : aws_instance.controller[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -219,7 +219,7 @@ resource "enos_bundle_install" "worker" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.worker[tonumber(each.value)].ipv6_addresses[0] : aws_instance.worker[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -237,7 +237,7 @@ resource "enos_remote_exec" "update_path_worker" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.worker[tonumber(each.value)].ipv6_addresses[0] : aws_instance.worker[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -266,7 +266,7 @@ resource "enos_file" "worker_config" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.worker[tonumber(each.value)].ipv6_addresses[0] : aws_instance.worker[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -284,7 +284,7 @@ resource "enos_boundary_start" "worker_start" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.worker[tonumber(each.value)].ipv6_addresses[0] : aws_instance.worker[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -305,7 +305,7 @@ resource "enos_remote_exec" "create_worker_audit_log_dir" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.worker[tonumber(each.value)].ipv6_addresses[0] : aws_instance.worker[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -326,7 +326,7 @@ resource "enos_remote_exec" "create_worker_auth_storage_dir" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.worker[tonumber(each.value)].ipv6_addresses[0] : aws_instance.worker[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -339,7 +339,7 @@ resource "enos_remote_exec" "get_worker_token" {
|
|
|
|
|
transport = {
|
|
|
|
|
ssh = {
|
|
|
|
|
host = var.ip_version == "6" ? aws_instance.worker[tonumber(each.value)].ipv6_addresses[0] : aws_instance.worker[tonumber(each.value)].public_ip
|
|
|
|
|
private_key = var.ssh_private_key
|
|
|
|
|
private_key = var.aws_ssh_private_key
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|