● 기본 설정
2023.03.30 - [분류 전체보기] - [Terraform] 시작하기
● VS code
# main.tf
provider "aws" {
region = "ap-northeast-2"
}
resource "aws_db_instance" "terraform_db" {
allocated_storage = 20
identifier = "mydb"
db_name = "DB01"
engine = "mysql"
engine_version = "8.0.32"
instance_class = "db.t3.micro"
username = "admin"
password = "qwer1234"
parameter_group_name = "default.mysql8.0"
publicly_accessible = true
skip_final_snapshot = true
}
● 실행
terraform init
terraform apply
● 확인
● 삭제
terraform destroy
'CLOUD > IaC' 카테고리의 다른 글
[Git/GitHub] Git 시작하기 (0) | 2023.04.01 |
---|---|
[Terraform/AWS] Module 이용해서 EC2 생성 & 네트워크 설정 (0) | 2023.03.30 |
[Terraform/AWS] 변수 이용해서 EC2 생성하기 (0) | 2023.03.30 |
[Terraform/AWS] AWS 네트워크 생성 (VPC/Subnet/Internet Gateway/Routing Table) (0) | 2023.03.30 |
[Terraform/AWS] AWS EC2 생성하기 (0) | 2023.03.30 |