Skip to content

Commit 717e722

Browse files
committed
Infra: 테라폼 기본 세팅
- main.tf 파일 생성 - .gitignore에 terraform에 대한 민감한 정보를 등록
1 parent 41a38ba commit 717e722

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,10 @@ out/
3939
### Custom ###
4040
db_dev.mv.db
4141
db_dev.trace.db
42-
.env
42+
.env
43+
44+
### Terraform ###
45+
/infra/terraform/.terraform
46+
/infra/terraform/.terraform.lock.hcl
47+
/infra/terraform/terraform.tfstate
48+
/infra/terraform/terraform.tfstate.backup

infra/terraform/main.tf

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
terraform {
2+
// aws 라이브러리 불러옴
3+
required_providers {
4+
aws = {
5+
source = "hashicorp/aws"
6+
}
7+
}
8+
}
9+
10+
# 디폴드 리전 설정
11+
provider "aws" {
12+
region = "ap-northeast-2"
13+
}
14+
15+
resource "aws_vpc" "example" {
16+
cidr_block = "10.0.0.0/16"
17+
18+
tags = {
19+
Name = "example"
20+
}
21+
}
22+

0 commit comments

Comments
 (0)