test
This commit is contained in:
24
modules/efs-fs/main.tf
Normal file
24
modules/efs-fs/main.tf
Normal file
@ -0,0 +1,24 @@
|
||||
# EFS 파일 시스템 생성
|
||||
resource "aws_efs_file_system" "efs" {
|
||||
# 원존 클래스를 이용할 경우
|
||||
# availability_zone_name = "ap-northeast-2a"
|
||||
|
||||
# 유휴 시 데이터 암호화
|
||||
encrypted = true
|
||||
# KMS에서 관리형 키를 이용하려면 kms_key_id 속성을 붙여줍니다.
|
||||
|
||||
# 버스팅 처리량 모드
|
||||
throughput_mode = "bursting"
|
||||
|
||||
# 성능 모드: generalPurpose(범용 모드), maxIO(최대 IO 모드)
|
||||
performance_mode = "generalPurpose"
|
||||
|
||||
# 프로비저닝 처리량 모드
|
||||
# throughput_mode = "provisioned"
|
||||
# provisioned_throughput_in_mibps = 100
|
||||
|
||||
# 수명 주기 관리
|
||||
lifecycle_policy {
|
||||
transition_to_ia = "AFTER_30_DAYS"
|
||||
}
|
||||
}
|
4
modules/efs-fs/outputs.tf
Normal file
4
modules/efs-fs/outputs.tf
Normal file
@ -0,0 +1,4 @@
|
||||
output "efs_fs_id" {
|
||||
description = "efs fs id"
|
||||
value = aws_efs_file_system.efs.id
|
||||
}
|
10
modules/efs-fs/variables.tf
Normal file
10
modules/efs-fs/variables.tf
Normal file
@ -0,0 +1,10 @@
|
||||
# variable "sg_list" {
|
||||
# description = "security group list"
|
||||
# type = list(string)
|
||||
|
||||
# }
|
||||
# variable "subnet_id" {
|
||||
# description = "security group list"
|
||||
# type = string
|
||||
|
||||
# }
|
6
modules/efs-mnt-tg/main.tf
Normal file
6
modules/efs-mnt-tg/main.tf
Normal file
@ -0,0 +1,6 @@
|
||||
resource "aws_efs_mount_target" "mount" {
|
||||
file_system_id = var.fs_id
|
||||
subnet_id = var.subnet_id
|
||||
|
||||
security_groups = var.sg_list
|
||||
}
|
14
modules/efs-mnt-tg/variables.tf
Normal file
14
modules/efs-mnt-tg/variables.tf
Normal file
@ -0,0 +1,14 @@
|
||||
variable "fs_id" {
|
||||
description = "fs_id"
|
||||
type = string
|
||||
}
|
||||
variable "sg_list" {
|
||||
description = "security group list"
|
||||
type = list(string)
|
||||
|
||||
}
|
||||
variable "subnet_id" {
|
||||
description = "security group list"
|
||||
type = string
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
resource "aws_eks_cluster" "eks-cluster" {
|
||||
name = "${var.name}-eks-cluster"
|
||||
name = "${var.name}"
|
||||
role_arn = var.iam_role_arn
|
||||
|
||||
#enabled_cluster_log_types = ["api", "audit", "authenticator", "controllerManager", "scheduler"]
|
||||
|
@ -0,0 +1,5 @@
|
||||
output "ng_sg" {
|
||||
description = "Identifier of the remote access EC2 Security Group."
|
||||
value = "${aws_eks_node_group.eks-ng.resources[0].remote_access_security_group_id}"
|
||||
|
||||
}
|
Reference in New Issue
Block a user