test(e2e): update rdp enos modules to wait for pw (#6373)

This commit is contained in:
Tony authored and GitHub committed 2026-01-27 11:54:55 -05:00
1 parent 3e3ecd59c9
commit 36d91b0086
8 files changed
+29 -12

No files matched your search

+6 -1
View File
@@ -286,7 +286,6 @@ resource "aws_instance" "client" {
http_tokens = "required"
instance_metadata_tags = "enabled"
}
get_password_data = true
tags = {
Name = "${var.prefix}-windows-client-${local.username}"
@@ -405,3 +404,9 @@ resource "local_file" "powershell_script_output" {
content = enos_local_exec.run_powershell_script[0].stdout
filename = "${path.root}/.terraform/tmp/setup_windows_client.out"
}
data "aws_instance" "instance_password" {
depends_on = [enos_local_exec.run_powershell_script]
instance_id = aws_instance.client.id
get_password_data = true
}
+1 -1
View File
@@ -26,7 +26,7 @@ output "admin_username" {
// This is the decrypted administrator password for the EC2 instance
output "admin_password" {
description = "The password for the administrator account"
value = nonsensitive(rsadecrypt(aws_instance.client.password_data, tls_private_key.rsa-4096-key.private_key_pem))
value = nonsensitive(rsadecrypt(data.aws_instance.instance_password.password_data, tls_private_key.rsa-4096-key.private_key_pem))
}
output "test_username" {