Skip to content

Commit

Permalink
Merge pull request #85 from cloud-barista/feature/fix-operate-service
Browse files Browse the repository at this point in the history
Fix: operate Service
  • Loading branch information
heedaeshin authored Nov 12, 2024
2 parents da7a049 + 5b7ea6b commit 047a7bd
Show file tree
Hide file tree
Showing 22 changed files with 1,694 additions and 95 deletions.
1,486 changes: 1,485 additions & 1 deletion data/var/run/data-manager/task/task.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions data/var/run/data-manager/template/example/AWS/BUILDER/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ module "s3" {
bucket_name = var.bucket_name
}

# mysql module call
module "mysql" {
source = "./modules/mysql"
db_name = var.db_name
db_user = var.db_user
db_pswd = var.db_pswd
}
# # mysql module call
# module "mysql" {
# source = "./modules/mysql"
# db_name = var.db_name
# db_user = var.db_user
# db_pswd = var.db_pswd
# }

# DynamoDB module call
module "dynamodb" {
source = "./modules/dynamodb"
table_name = var.table_name
}
# # DynamoDB module call
# module "dynamodb" {
# source = "./modules/dynamodb"
# table_name = var.table_name
# }
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ resource "aws_db_instance" "default" {
parameter_group_name = "default.mysql8.0"
skip_final_snapshot = true
deletion_protection = false
publicly_accessible = true # Allow public access
}
Original file line number Diff line number Diff line change
@@ -1,50 +1,10 @@
# variables.tf

# variable "access_key" {
# description = "AWS Access Key"
# type = string
# }

# variable "secret_key" {
# description = "AWS Secret Key"
# type = string
# }

# variable "region" {
# description = "AWS Region"
# type = string
# default = "KR"
# }

# variable "vpc_name" {
# description = "vpc_name"
# type = string
# default = "mcmp-vpc"

# }

# variable "private_subnet_name" {
# description = "private_subnet_name"
# type = string

# }
# variable "public_subnet_name" {
# description = "public_subnet_name"
# type = string

# }

# variable "bucket_name" {
# description = "bucket_name"
# type = string
# }

variable "db_name" {
description = "DB name"
type = string
}


variable "db_user" {
description = "DB user"
type = string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

resource "aws_s3_bucket" "bucket" {
bucket = var.bucket_name

force_destroy = true
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,33 @@ variable "public_subnet_name" {
variable "bucket_name" {
description = "bucket_name"
type = string
default = "mc-data-manager"
default = "mcdatamanager"
}

variable "table_name" {
description = "table_name"
type = string
default = "mc-data-manager"
default = "mcdatamanager"
}


variable "db_name" {
description = "DB name"
type = string
default = "MCDataManager"
default = "mcdatamanager"
}


variable "db_user" {
description = "DB user"
type = string
default = "datamanager"
default = "mcdatamanager"
}

variable "db_pswd" {
description = "DB PW"
type = string
default = "NAmutech7^^7"
default = "mcdatamanager"
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,26 @@ module "firestore_database" {
source = "./modules/firestore"
project_id = var.project_id
region = var.region
nrdbName = var.nrdbName

}

# MySQL RDB Gen
module "mysql" {
source = "./modules/mysql"
project_id = var.project_id
region = var.region
cidr_range = var.cidr_range
dbName = var.dbName
userName = var.dbName
password = var.password

}

# Google Cloud Storage Gen
module "storage" {
source = "./modules/storage"
project_id = var.project_id
region = var.region
bucketName = var.bucketName
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
resource "google_firestore_database" "datastore_mode_database" {
project = var.project_id
location_id = var.region # Firestore region
name = var.dbName # Firestore DB name
name = var.nrdbName # Firestore DB name
type = "FIRESTORE_NATIVE" # Firestore type

# DELETE Policty and State
deletion_policy = "DELETE"
delete_protection_state = "DELETE_PROTECTION_DISABLED" # Firestore state

}

}
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
# 공통 변수 설정
# module
variable "project_id" {
description = "GCP 프로젝트 ID"
type = string
default = "spatial-conduit-399006"
}

variable "region" {
description = "GCP 리전"
type = string
default = "asia-east1"
}

# 로컬 변수 설정
variable "dbName" {
variable "nrdbName" {
description = "DB 이름"
type = string
default = "mc-data-manager"
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ resource "google_sql_database_instance" "mysql_instance" {

settings {
tier = "db-f1-micro" # instance reesource flavor
ip_configuration {
ipv4_enabled = true
authorized_networks {
name = "Allow All Port"
value = var.cidr_range
}
}

}
deletion_protection = false # Delete protection

Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
# 공통 변수 설정
# common

variable "project_id" {
description = "GCP 프로젝트 ID"
type = string
default = "spatial-conduit-399006"
}

variable "region" {
description = "GCP 리전"
type = string
default = "asia-east1"
}


# 로컬 변수 설정
# local
variable "dbName" {
description = "DB 이름"
type = string
default = "mc-data-manager"
}


variable "userName" {
description = "DB 유저"
type = string
default = "mc-data-manager"
}

variable "password" {
description = "DB PW"
type = string
default = "mcdatamanager"
}

variable "cidr_range" {
description = "DB PW"
type = string
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ resource "google_storage_bucket" "data_storage" {
versioning {
enabled = true
}
force_destroy = true
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
# 공통 변수 설정
# common
variable "project_id" {
description = "GCP 프로젝트 ID"
type = string
default = "spatial-conduit-399006"
}

variable "region" {
description = "GCP 리전"
type = string
default = "asia-east1"
}

# 로컬 변수 설정

# local
variable "bucketName" {
description = "버킷 명"
type = string
default = "mc-data-manager"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 공통 변수 설정
# Common

variable "project_id" {
description = "GCP 프로젝트 ID"
Expand All @@ -9,5 +9,45 @@ variable "project_id" {
variable "region" {
description = "GCP 리전"
type = string
default = "asia-east1"
default = "asia-northeast3"
}

## storage
variable "bucketName" {
description = "버킷 명"
type = string
default = "mcdatamanager"
}

## rdb
variable "dbName" {
description = "DB 이름"
type = string
default = "mcdatamanager"
}


variable "userName" {
description = "DB 유저"
type = string
default = "mcdatamanager"
}

variable "password" {
description = "DB PW"
type = string
default = "mcdatamanager"
}

variable "cidr_range" {
description = "DB PW"
type = string
default = "0.0.0.0/0"
}

## nrdb
variable "nrdbName" {
description = "DB 이름"
type = string
default = "(default)"
}
Loading

0 comments on commit 047a7bd

Please sign in to comment.