Created
December 28, 2018 07:22
-
-
Save mbairagi85/63c746ed33c17c267b3660aaaa5b5db4 to your computer and use it in GitHub Desktop.
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": "{{env `AWS_ACCESS_KEY`}}", | |
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}", | |
"aws_region": "{{env `REGION`}}", | |
"aws_source_ami": "{{env `AMI`}}", | |
"aws_instance_type": "t2.medium", | |
"organization": "{{env `ORGANIZATION`}}", | |
"ssh_username": "{{env `MAIN_USER`}}" | |
}, | |
"builders": [{ | |
"name": "knoldus-blog", | |
"type": "amazon-ebs", | |
"access_key": "{{user `aws_access_key`}}", | |
"secret_key": "{{user `aws_secret_key`}}", | |
"region": "{{user `aws_region`}}", | |
"source_ami": "{{user `aws_source_ami`}}", | |
"instance_type": "{{user `aws_instance_type`}}", | |
"ami_name": "{{user `organization`}}-blog", | |
"ssh_username": "{{user `ssh_username`}}", | |
"ssh_pty": "true", | |
"tags": { | |
"Name": "{{user `orgazination`}}-blog", | |
"Role": "Packer Image", | |
"BuildDate": "{{isotime}}" | |
} | |
}], | |
"provisioners": [{ | |
"type": "shell", | |
"script": "demo-script.sh", | |
"environment_vars": [ | |
"AWS_ACCESS_KEY={{user `aws_access_key`}}", | |
"AWS_SECRET_KEY={{user `aws_secret_key`}}", | |
"AWS_DEFAULT_REGION={{user `aws_region`}}" | |
] | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment