Skip to content

Commit

Permalink
wip: remove ec2 launch config v1 for AWS EC2
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Duportal <[email protected]>
  • Loading branch information
dduportal committed May 5, 2022
1 parent 8a94d10 commit d6cd3b3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
16 changes: 0 additions & 16 deletions jenkins-agent.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -288,20 +288,4 @@ build {
"while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10 } else { break } }"
]
}
provisioner "file" {
only = ["amazon-ebs.windows-2022"]
source = "./scripts/EC2-LaunchConfig.json"
destination = "C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Config\\LaunchConfig.json"
}
provisioner "powershell" {
only = ["amazon-ebs.windows-2022"]
elevated_user = local.windows_winrm_user[var.image_type]
elevated_password = build.Password
# Ref. https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-user-data.html#user-data-scripts-subsequent
inline = [
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SendWindowsIsReady.ps1 -Schedule",
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\InitializeInstance.ps1 -Schedule",
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SysprepInstance.ps1 -NoShutdown"
]
}
}
9 changes: 0 additions & 9 deletions scripts/EC2-LaunchConfig.json

This file was deleted.

0 comments on commit d6cd3b3

Please sign in to comment.