Add tag to instances with OS and add merged output (#25071)

* func: add a new output that merges both windowa and linux clients, but add tags to distinguish them

* fix: outputs cant referrence other outputs in terraform

* Update e2e/terraform/provision-infra/compute.tf

Co-authored-by: Tim Gross <tgross@hashicorp.com>

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
This commit is contained in:
Juana De La Cuesta
2025-02-10 17:08:07 +01:00
committed by GitHub
parent c5d74a96a3
commit cfc24116b3
2 changed files with 6 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ resource "aws_instance" "client_ubuntu_jammy" {
Name = "${local.random_name}-client-ubuntu-jammy-${count.index}"
ConsulAutoJoin = "auto-join-${local.random_name}"
User = data.aws_caller_identity.current.arn
OS = "linux"
}
}
@@ -59,6 +60,7 @@ resource "aws_instance" "client_windows_2016" {
Name = "${local.random_name}-client-windows-2016-${count.index}"
ConsulAutoJoin = "auto-join-${local.random_name}"
User = data.aws_caller_identity.current.arn
OS = "windows"
}
}

View File

@@ -13,6 +13,10 @@ output "windows_clients" {
value = aws_instance.client_windows_2016.*.public_ip
}
output "clients" {
value = concat(aws_instance.client_ubuntu_jammy.*.public_ip, aws_instance.client_windows_2016.*.public_ip)
}
output "message" {
value = <<EOM
Your cluster has been provisioned! To prepare your environment, run: