In this repo I'm creating a sample python app using flask, terraform script to deploy the app in the cloud.
Using my Dockerfile and aws-cli
scripts to create the remaining resources.
├── README.md
├── aws-cli
│ ├── README.md
│ ├── create_bucket_for_terraform.sh
│ └── upload_image.sh
├── docker
│ ├── Dockerfile
│ ├── README.md
│ └── build.sh
├── python-sample-api
│ ├── Dockerfile
│ ├── LICENSE
│ ├── README.md
│ ├── app.py
│ ├── build.sh
│ └── requirements.txt
└── terraform
├── README.md
├── ecs.tf
├── iam.tf
├── main.tf
├── modules
│ ├── alb
│ │ ├── main.tf
│ │ ├── output.tf
│ │ └── variables.tf
│ ├── ecs
│ │ ├── main.tf
│ │ ├── output.tf
│ │ └── variables.tf
│ └── vpc
│ ├── main.tf
│ ├── output.tf
│ └── variables.tf
├── output.tf
├── providers.tf
├── terraform.tfvars
├── upload_image.sh
└── variables.tf
- install terraform
- install
aws-cli
- install Docker
- run
aws configure
to configure the default aws profile
- First run
aws-cli/create_bucket_for_terraform.sh
to create the bucket for terraform cd python-sample-api
./build.sh
cd ../terraform
terraform init
terraform plan
terraform apply
In each folder I've put the scripts I used for this project, all actions were made by these scripts, nothing with the console.
In aws-cli
and docker
you'll find copies for scripts used in other folders.