Created
February 16, 2019 20:38
-
-
Save schmiddy/af31feb84ac088c73f2c37c13da228e7 to your computer and use it in GitHub Desktop.
example packer template with instance_type being a user variable
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_access_key": "", | |
"aws_secret_key": "" | |
}, | |
"builders": [{ | |
"type": "amazon-ebs", | |
"access_key": "{{user `aws_access_key`}}", | |
"secret_key": "{{user `aws_secret_key`}}", | |
"region": "us-east-1", | |
"source_ami_filter": { | |
"filters": { | |
"virtualization-type": "hvm", | |
"name": "ubuntu/images/*ubuntu-xenial-16.04-amd64-server-*", | |
"root-device-type": "ebs" | |
}, | |
"owners": ["099720109477"], | |
"most_recent": true | |
}, | |
"instance_type": "{{user `instance_type`}}", | |
"ssh_username": "ubuntu", | |
"ami_name": "packer-example {{timestamp}}" | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment