Skip to content

Instantly share code, notes, and snippets.

@gardleopard
Created January 12, 2016 08:51
Show Gist options
  • Save gardleopard/c59c4601d61cb31eb111 to your computer and use it in GitHub Desktop.
Save gardleopard/c59c4601d61cb31eb111 to your computer and use it in GitHub Desktop.
{
"variables": {
"aws_access_key": "",
"aws_secret_key": "",
"aws_subnet_id": "{{env `AWS_SUBNET_ID`}}",
"aws_vpc_id": "{{env `AWS_VPC_ID`}}",
"aws_region": null,
"aws_ssh_username": null,
"aws_instance_type": null,
"aws_source_ami": null,
"aws_target_ami": null,
"aws_associate_public_ip_address": "true",
"appversion": "",
"build_host": "",
"repository": "",
"package_type":"",
"packages": "",
"account": "{{env `CLOUD_ENVIRONMENT`}}",
"configDir": null,
"release": "{{ isotime \"20060102150405\"}}",
"share_with_1": "SECRET",
"share_with_2": "SECRET",
"share_with_3": "SECRET",
"share_with_4": "SECRET",
"share_with_5": "SECRET",
"copy_to_1": "eu-west-1",
"copy_to_2": "eu-west-1",
"copy_to_3": "eu-west-1",
"copy_to_4": "eu-west-1",
"copy_to_5": "eu-west-1"
},
"builders": [{
"type": "amazon-chroot",
"ami_virtualization_type": "hvm",
"access_key": "{{user `aws_access_key`}}",
"secret_key": "{{user `aws_secret_key`}}",
"source_ami": "{{user `aws_source_ami`}}",
"ami_name": "{{user `aws_target_ami`}}",
"ami_users": [
"{{user `share_with_1`}}",
"{{user `share_with_2`}}",
"{{user `share_with_3`}}",
"{{user `share_with_4`}}",
"{{user `share_with_5`}}"
],
"ami_regions": [
"{{user `copy_to_1`}}",
"{{user `copy_to_2`}}",
"{{user `copy_to_3`}}",
"{{user `copy_to_4`}}",
"{{user `copy_to_5`}}"
],
"tags": {
"Name": "{{user `ami_basename`}}-{{ user `release`}}",
"appversion": "{{user `appversion`}}",
"build_host": "{{user `build_host`}}"
}
}],
"provisioners": [{
"type": "shell",
"script": "{{user `configDir`}}/install_packages.sh",
"environment_vars": [
"repository=\"{{user `repository`}}\"",
"package_type=\"{{user `package_type`}}\"",
"packages={{user `packages`}}",
"account={{user `account`}}"
]
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment