test(e2e): update rdp enos modules to wait for pw (#6373)
This commit is contained in:
8 files changed
+29
-12
No files matched your search
@@ -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
|
||||
}
|
||||
@@ -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" {
|
||||
|
||||
Reference in new issue
Block a user