● 기본 설정
2023.03.30 - [분류 전체보기] - [Terraform] 시작하기
[Terraform] 시작하기
♡ 미리보기 ♡ 1. 테라폼 홈페이지에서 다운로드 2. 경로 설정 3. aws configure : key 등록 4. vs code 에서 hasicope terraform 다운로드 ● 윈도우 환경에 설치 https://www.terraform.io/downloads ● cmd 창에서 편리하
alsrudalsrudalsrud.tistory.com
● 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 |