Skip to content

yexjin/terraform-aws-provider

Repository files navigation

terraform-aws-provider

Terraform with AWS Provider
with AWS Provider
이것저것 해보기

1️⃣ asg-elb-s3-db

Architecture

image

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

✨ Notion 설명 바로가기



2️⃣ Modularization

위의 구성을 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

✨ Notion 설명 바로가기

About

Terraform with AWS Provider

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages