Terraform with aws by iamjjanga-ouo
1️⃣ I implemented interworking between 3-tier (WEB-WAS-DB) using Terraform and Ansible.
2️⃣ If possible,
- Provision of Cloud Resource → Terraform
- Resource Management, Package Control → Ansible implementation
3️⃣ I worked on the project by myself, but I configured Backend to manage Terraform in "tfstate" file (S3) and "lock" file (Dynamo DB) to enable simultaneous work.
4️⃣ Ansible created individual roles to differentiate the concept of each package.
ansible
├── main.yml # main playbook
└── role
├── flask
├── mysql
└── nginx
5️⃣ As it is a Test Project, the file containing the variable name is uploaded to public. (Excluding Secret KEY, SSL value, etc.)
- Python3
- AWS CLI v2
- Terraform Version >= v0.14.3
- Clone my project repo
$ git clone https://github.com/iamjjanga-ouo/terraform_w_aws.git
- Initialize Terraform Backend
$ cd terraform_w_aws/init
$ terraform init
$ terraform apply
...
Enter a value: yes
- Start Project Provision
$ cd ../aws-terraform-w-ansible
$ terraform init
$ terraform apply
...
Enter a value: yes
...
Wait provisioning....
clean this project
$ pwd
../aws-terraform-w-ansible
$ terraform destroy
Enter a value: yes
# you need to delete Backend S3, DynamoDB
$ cd ../init
$ python remove_s3.py # delete all s3 verisoned object
$ terraform destory
Enter a value: yes
When you want to see a project notes(LANG : KR), Go into the notion LINK