Skip to content

Commit

Permalink
Merge pull request #74 from kookmin-sw/kmkim-dev
Browse files Browse the repository at this point in the history
ray 작업초안
  • Loading branch information
QueueMin authored May 12, 2024
2 parents a4dcd3b + 0282a76 commit 811d3b8
Show file tree
Hide file tree
Showing 4 changed files with 275 additions and 211 deletions.
1 change: 1 addition & 0 deletions automation/deploy_train/IaC/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var.tf
34 changes: 34 additions & 0 deletions automation/deploy_train/IaC/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module "train_deploy" {
source = "github.com/kookmin-sw/capstone-2024-12//IaC/serverless_api_template"
prefix = "train_deploy"
container_registry = "694448341573.dkr.ecr.ap-northeast-2.amazonaws.com"
container_repository = "train-deploy"
container_image_tag = "latest"
lambda_ram_size = 256
attach_s3_policy = true
attach_ec2_policy = true
attach_eks_policy = true
attach_ssm_readonly_policy = true
region_name = var.region
eks_cluster_name = var.eks_cluster_name
db_api_url = var.db_api_url
upload_s3_url = var.upload_s3_url
}

output "train_deploy_function_url" {
value = module.train_deploy.function_url
}

provider "aws" {
region = var.region
profile = var.awscli_profile
}

terraform {
backend "s3" {
bucket = "sskai-terraform-state"
key = "train_deploy/tf.state"
region = "ap-northeast-2"
encrypt = true
}
}
24 changes: 24 additions & 0 deletions automation/deploy_train/IaC/var.tf.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
variable "region" {
type = string
default = "ap-northeast-2"
}

variable "awscli_profile" {
type = string
default = ""
}

variable "eks_cluster_name" {
type = string
default = ""
}

variable "db_api_url" {
type = string
default = ""
}

variable "upload_s3_url" {
type = string
default = ""
}
Loading

0 comments on commit 811d3b8

Please sign in to comment.