mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-28 21:01:57 +03:00
Merge pull request #4 from kewalaka/fix-long-password-with-spaces
In the PS script - quote the password and add /y
This commit is contained in:
@@ -9,7 +9,7 @@ resource "aws_instance" "win-example" {
|
|||||||
key_name = "${aws_key_pair.mykey.key_name}"
|
key_name = "${aws_key_pair.mykey.key_name}"
|
||||||
user_data = <<EOF
|
user_data = <<EOF
|
||||||
<powershell>
|
<powershell>
|
||||||
net user ${var.INSTANCE_USERNAME} ${var.INSTANCE_PASSWORD} /add
|
net user ${var.INSTANCE_USERNAME} '${var.INSTANCE_PASSWORD}' /add /y
|
||||||
net localgroup administrators ${var.INSTANCE_USERNAME} /add
|
net localgroup administrators ${var.INSTANCE_USERNAME} /add
|
||||||
|
|
||||||
winrm quickconfig -q
|
winrm quickconfig -q
|
||||||
|
|||||||
Reference in New Issue
Block a user