Skip to content

Commit 120db27

Browse files
committed
feat: fix powershell script
1 parent 6045ec7 commit 120db27

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

main.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,7 @@ resource "aws_instance" "web-windows" {
268268
user_data = <<-EOF
269269
<powershell>
270270
Install-WindowsFeature -name Web-Server -IncludeManagementTools
271-
$os = systeminfo | findstr /B /C:"OS Name“
272-
$ipAddress = Resolve-DnsName $env:COMPUTERNAME -Type A | Select -Property IPAddress
273-
New-Item -Path C:\inetpub\wwwroot\index.html -ItemType File -Value "Hello World from $ipAddress running on $os" -Force
271+
New-Item -Path C:\inetpub\wwwroot\index.html -ItemType File -Value "Hello World Page running on Windows Server" -Force
274272
</powershell>
275273
EOF
276274

0 commit comments

Comments
 (0)