Terraform with AWS Provider
with AWS Provider
이것저것 해보기
tf-aws-provider
ㄴ 📁 global
ㄴ 📁 s3 # Remote State Storage(s3 bucket)
ㄴ 📄 main.tf
ㄴ 📄 output.tf
ㄴ 📁 stage
ㄴ 📁 datastores
ㄴ 📁 mysql # Database
ㄴ 📄 main.tf
ㄴ 📄 var.tf
ㄴ 📄 output.tf
ㄴ 📁 services
ㄴ 📁 webserver-cluster # ASG(EC2 instances) + ELB
ㄴ 📄 main.tf
ㄴ 📄 var.tf
ㄴ 📄 data.tf
ㄴ 📄 output.tf
위의 구성을 module로 리펙토링
tf-aws-provider
ㄴ 📁 modules
ㄴ 📁 services
ㄴ 📁 webserver-cluster
ㄴ 📄 var.tf
ㄴ 📄 data.tf
ㄴ 📄 output.tf
ㄴ 📄 main.tf
ㄴ 📁 global
ㄴ 📁 s3 # Remote State Storage(s3 bucket)
ㄴ 📄 main.tf
ㄴ 📄 output.tf
ㄴ 📁 stage
ㄴ 📁 datastores
ㄴ 📁 mysql # Database
ㄴ 📄 main.tf
ㄴ 📄 var.tf
ㄴ 📄 output.tf
ㄴ 📁 services
ㄴ 📁 webserver-cluster # ASG(EC2 instances) + ELB
ㄴ 📄 main.tf
ㄴ 📄 var.tf
ㄴ 📄 data.tf
ㄴ 📄 output.tf
ㄴ 📁 prod
ㄴ 📁 datastores
ㄴ 📁 mysql # Database
ㄴ 📄 main.tf
ㄴ 📄 var.tf
ㄴ 📄 output.tf
ㄴ 📁 services
ㄴ 📁 webserver-cluster # ASG(EC2 instances) + ELB
ㄴ 📄 main.tf
ㄴ 📄 var.tf
ㄴ 📄 data.tf
ㄴ 📄 output.tf