{ "builders": [ { "type": "amazon-ebs", "region": "us-east-1", "source_ami_filter": { "filters": { "virtualization-type": "hvm", "name": "Windows_Server-2016-English-Full-Base-*", "root-device-type": "ebs" }, "owners": [ "amazon" ], "most_recent": true }, "instance_type": "t2.medium", "ami_name": "nomad-e2e-windows-2016-{{timestamp}}", "communicator": "winrm", "user_data_file": "windows/setupwinrm.ps1", "winrm_username": "Administrator", "winrm_insecure": true, "winrm_use_ssl": true, "tags": { "OS": "Windows2016" } } ], "provisioners": [ { "type": "powershell", "elevated_user": "Administrator", "elevated_password": "{{.WinRMPassword}}", "scripts": [ "windows/disable-windows-updates.ps1", "windows/fix-tls.ps1", "windows/install-nuget.ps1", "windows/install-tools.ps1", "windows/install-docker.ps1", "windows/setup-directories.ps1", "windows/install-openssh.ps1", "windows/install-consul.ps1", "windows/install-vault.ps1" ] }, { "type": "windows-restart" }, { "type": "file", "source": "../config", "destination": "/opt" }, { "type": "file", "source": "./windows/provision.ps1", "destination": "/opt/provision.ps1" }, { "type": "powershell", "elevated_user": "Administrator", "elevated_password": "{{.WinRMPassword}}", "inline": ["/opt/provision.ps1 -nomad_version 0.9.6 -nostart"] }, { "type": "powershell", "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" ] } ] }