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

@@ -452,8 +452,6 @@ resource "aws_instance" "domain_controller" {
http_tokens = "required"
instance_metadata_tags = "enabled"
}
get_password_data = true
tags = {
Name = "${var.prefix}-domain-controller-${local.username}"
}
@@ -472,6 +470,12 @@ resource "time_sleep" "wait_for_reboot" {
create_duration = "20m"
}
data "aws_instance" "instance_password" {
depends_on = [time_sleep.wait_10_minutes]
instance_id = aws_instance.domain_controller.id
get_password_data = true
}
# wait for the SSH service to be available on the instance. We specifically use
# BatchMode=Yes to prevent SSH from prompting for a password to ensure that we
# can just SSH using the private key
@@ -24,8 +24,7 @@ output "admin_username" {
output "password" {
description = "This is the decrypted administrator password for the EC2 instance"
value = nonsensitive(rsadecrypt(aws_instance.domain_controller.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 "ssh_private_key" {