Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/petersonwsantos/packer-terraform-aws-ami
Build AWS AMI with Packer and Terraroform
https://github.com/petersonwsantos/packer-terraform-aws-ami
Last synced: about 15 hours ago
JSON representation
Build AWS AMI with Packer and Terraroform
- Host: GitHub
- URL: https://github.com/petersonwsantos/packer-terraform-aws-ami
- Owner: petersonwsantos
- Created: 2017-11-28T14:39:19.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-28T18:00:14.000Z (almost 7 years ago)
- Last Synced: 2024-05-31T04:42:38.624Z (6 months ago)
- Language: HCL
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Security: securitygroup.tf
Awesome Lists containing this project
README
# Build AWS AMI with Packer and Terraroform
Buid
======1. Clone the repositóry
```
$ git clone https://github.com/petersonwsantos/packer-terraform-aws-ami.git
$ cd packer-terraform-aws-ami```
2. Run container with cli tools for building (terraform, packer and awscli).
```
$ docker run -ti \
--mount type=bind,source="$(pwd)",target=/code \
petersonwsantos/build-ec2-ami \
bash
```3. Configure awscli. [**]
```
container_#> aws configure
```4. Build AMI
```
container_#> sh build-ami.sh```
5. Verfify in your AWS Console / EC2 / AMI.Remove
=======1. Remove terraform resources on AWS
```
container_#> terraform destroy -force
```
2. Please enter the AWS console and manually delete AMI created.Finish
----------
[**]: Note: If you already have awscli configured on your terminal it is possible to mount the aws configuration file for the container.
( -v ~/.aws:/root/.aws ) -> With this option you do not need to run aws configure.
Example:
```
$ docker run -ti \
--mount type=bind,source="$(pwd)",target=/code \
-v ~/.aws:/root/.aws \
petersonwsantos/build-ec2-ami \
bash```