Skip to content

Commit

Permalink
fix: fix issue where SSH public key was not baked into the Windows Je…
Browse files Browse the repository at this point in the history
…nkins build agent AMI (aws-games#150)
  • Loading branch information
jorisdon authored Jul 24, 2024
1 parent 2db0bd0 commit 2996e1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/packer/build-agents/windows/windows.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ build {
elevated_password = build.Password
inline = [
"$authorizedKey = '${var.public_key}'",
"powershell Add-Content -Force -Path $env:ProgramData/ssh/administrators_authorized_keys -Value '$authorizedKey';icacls.exe \"\"$env:ProgramData/ssh/administrators_authorized_keys\"\" /inheritance:r /grant \"\"Administrators:F\"\" /grant \"\"SYSTEM:F\"\"",
"Add-Content -Force -Path $env:ProgramData/ssh/administrators_authorized_keys -Value $authorizedKey;icacls.exe \"\"$env:ProgramData/ssh/administrators_authorized_keys\"\" /inheritance:r /grant \"\"Administrators:F\"\" /grant \"\"SYSTEM:F\"\"",
"Get-Disk | where partitionstyle -eq \"raw\" | Initialize-Disk -PartitionStyle GPT -PassThru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem NTFS -NewFileSystemLabel \"Data Drive\" -Confirm:$false"
]
}
Expand Down

0 comments on commit 2996e1a

Please sign in to comment.