Created
March 29, 2020 12:04
-
-
Save larkintuckerllc/f1a9c56fdb42d977b655ca71487d3aa7 to your computer and use it in GitHub Desktop.
aws
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": "t2.micro", | |
"ssh_username": "ubuntu", | |
"ami_name": "todosrus {{timestamp}}" | |
}], | |
"provisioners": [ | |
{ | |
"type": "shell", | |
"inline":[ | |
"sudo apt-get update", | |
"sudo apt-get upgrade -y", | |
"sudo apt-get install apache2 -y", | |
"sudo systemctl enable apache2" | |
] | |
}, | |
{ | |
"type": "file", | |
"source": "./index.html", | |
"destination": "/tmp/" | |
}, | |
{ | |
"type": "shell", | |
"inline":[ | |
"sudo cp /tmp/index.html /var/www/html" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment