mirror of
https://github.com/farcasclaudiu/terraform-course.git
synced 2026-06-22 07:01:56 +03:00
terraform packer demo
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"variables": {
|
||||
"aws_access_key": "",
|
||||
"aws_secret_key": ""
|
||||
},
|
||||
"builders": [{
|
||||
"type": "amazon-ebs",
|
||||
"access_key": "{{user `aws_access_key`}}",
|
||||
"secret_key": "{{user `aws_secret_key`}}",
|
||||
"region": "eu-west-1",
|
||||
"source_ami": "ami-844e0bf7",
|
||||
"instance_type": "t2.micro",
|
||||
"ssh_username": "ubuntu",
|
||||
"ami_name": "packer-example {{timestamp}}"
|
||||
}],
|
||||
"provisioners": [{
|
||||
"type": "shell",
|
||||
"scripts": [ "scripts/install_software.sh" ],
|
||||
"execute_command": "{{ .Vars }} sudo -E sh '{{ .Path }}'",
|
||||
"pause_before": "10s"
|
||||
}]
|
||||
}
|
||||
Reference in New Issue
Block a user