outputs.tf - trying to get multiple Windows passwords decrypted - using count.
Getting error message…╷
│ Error: Invalid function argument
│
│ on outputs.tf line 16, in output “password”:
│ 16: value = ["${aws_instance.winrm..tags.Name}", “-”, rsadecrypt(aws_instance.winrm..password_data, file(var.private_key_path))]
│ ├────────────────
│ │ aws_instance.winrm is tuple with 2 elements
│
│ Invalid value for “ciphertext” parameter: string required.
output.tf:
output “password” {
value = ["${aws_instance.winrm.[star].tags.Name}", “-”,
rsadecrypt(aws_instance.winrm.[star].password_data, file(var.private_key_path))]
}
note: replace [star] with *
this is a funky editor, it was removing the *
Running Terraform …Terraform v0.15.0-beta2
on linux_amd64
- provider registry.terraform.io/hashicorp/aws v3.33.0
- provider registry.terraform.io/hashicorp/local v2.1.0
- provider registry.terraform.io/hashicorp/null v3.1.0
- provider registry.terraform.io/hashicorp/template v2.2.0