Created
December 2, 2016 01:18
-
-
Save davidobrien1985/f5610f48997ac9cb1132c2336062088d to your computer and use it in GitHub Desktop.
packer.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"aws_source_ami": "ami-3859605b", | |
"aws_instance_type": "t2.medium", | |
"aws_instance_profile": "", | |
"aws_vpc_id": "", | |
"aws_subnet_id": "", | |
"aws_region": "ap-southeast-2", | |
"soe_version": "", | |
"build_number": "" | |
}, | |
"builders": [ | |
{ | |
"ami_name": "{{ user `soe_version` }}-{{ user `build_number` }}-windows-server-2016-soe-{{isotime | clean_ami_name}}", | |
"ami_description": "Autobuild of Windows Server 2016 Full installed. Build Number: {{ user `build_number` }}", | |
"communicator": "winrm", | |
"iam_instance_profile": "{{ user `aws_instance_profile` }}", | |
"instance_type": "{{ user `aws_instance_type` }}", | |
"region": "{{ user `aws_region` }}", | |
"source_ami": "{{ user `aws_source_ami` }}", | |
"type": "amazon-ebs", | |
"user_data_file": "{{template_dir}}/scripts/user-data.ps1", | |
"windows_password_timeout": "60m", | |
"winrm_insecure": "true", | |
"winrm_port": "5986", | |
"winrm_use_ssl": "true", | |
"winrm_username": "administrator", | |
"vpc_id" : "{{ user `aws_vpc_id` }}", | |
"subnet_id" : "{{ user `aws_subnet_id` }}", | |
"tags": { | |
"BuildNumber": "{{user `build_number`}}" | |
} | |
} | |
], | |
"provisioners": [ | |
{ | |
"type": "powershell", | |
"scripts": [ | |
"{{template_dir}}/scripts/install_rds_webaccess.ps1" | |
] | |
}, | |
{ | |
"type": "powershell", | |
"scripts": [ | |
"{{template_dir}}/scripts/Ec2Config.ps1" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment