From 5b7ea6b3ce981d12998af390c7ad14b91dc7a667 Mon Sep 17 00:00:00 2001 From: heedaeshin Date: Tue, 12 Nov 2024 20:38:24 +0900 Subject: [PATCH] Fix: operate Service --- data/var/run/data-manager/task/task.json | 1486 ++++++++++++++++- .../template/example/AWS/BUILDER/main.tf | 24 +- .../example/AWS/BUILDER/modules/mysql/main.tf | 1 + .../AWS/BUILDER/modules/mysql/variables.tf | 40 - .../AWS/BUILDER/modules/storage/main.tf | 2 +- .../template/example/AWS/BUILDER/variables.tf | 10 +- .../template/example/GCP/BUILDER/main.tf | 8 + .../GCP/BUILDER/modules/firestore/main.tf | 5 +- .../BUILDER/modules/firestore/variables.tf | 8 +- .../example/GCP/BUILDER/modules/mysql/main.tf | 8 + .../GCP/BUILDER/modules/mysql/variables.tf | 14 +- .../GCP/BUILDER/modules/storage/main.tf | 1 + .../GCP/BUILDER/modules/storage/variables.tf | 8 +- .../template/example/GCP/BUILDER/variables.tf | 44 +- .../template/example/NCP/BUILDER/main.tf | 74 +- .../example/NCP/BUILDER/modules/rdb/main.tf | 11 + .../NCP/BUILDER/modules/rdb/variables.tf | 5 + .../template/example/NCP/BUILDER/variables.tf | 15 +- pkg/rdbms/mysql/mysql.go | 1 + web/templates/mig-firestoreToMongodb.html | 8 + web/templates/mig-mongodbToDynamodb.html | 8 + web/templates/mig-mongodbToFirestore.html | 8 + 22 files changed, 1694 insertions(+), 95 deletions(-) diff --git a/data/var/run/data-manager/task/task.json b/data/var/run/data-manager/task/task.json index 1568e12..c40ed5a 100644 --- a/data/var/run/data-manager/task/task.json +++ b/data/var/run/data-manager/task/task.json @@ -1,5 +1,1489 @@ { - "tasks": [], + "tasks": [ + { + "meta": { + "serviceType": "objectstorage", + "taskType": "generate", + "taskId": "-task-0-20241112-192300" + }, + "dummy": { + "dummyPath": "/tmp/datamold-dummy1550705843", + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": true, + "checkServerSQL": false, + "sizeSQL": "10", + "sizeCSV": "10", + "sizeTXT": "10", + "sizePNG": "10", + "sizeGIF": "10", + "sizeZIP": "10", + "sizeJSON": "10", + "sizeXML": "10", + "sizeServerJSON": "1", + "sizeServerSQL": "1" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "aws", + "region": "us-east-1", + "profileName": "admin", + "path": "", + "bucket": "mcdatamanager", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "objectstorage", + "taskType": "generate", + "taskId": "-task-0-20241112-192333" + }, + "dummy": { + "dummyPath": "/tmp/datamold-dummy1491797605", + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": true, + "checkServerSQL": false, + "sizeSQL": "10", + "sizeCSV": "10", + "sizeTXT": "10", + "sizePNG": "10", + "sizeGIF": "10", + "sizeZIP": "10", + "sizeJSON": "10", + "sizeXML": "10", + "sizeServerJSON": "1", + "sizeServerSQL": "1" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "aws", + "region": "ap-northeast-2", + "profileName": "admin", + "path": "", + "bucket": "mcdatamanager", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "objectstorage", + "taskType": "generate", + "taskId": "-task-0-20241112-192400" + }, + "dummy": { + "dummyPath": "/tmp/datamold-dummy1096052594", + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": true, + "checkServerSQL": false, + "sizeSQL": "10", + "sizeCSV": "10", + "sizeTXT": "10", + "sizePNG": "10", + "sizeGIF": "10", + "sizeZIP": "10", + "sizeJSON": "10", + "sizeXML": "10", + "sizeServerJSON": "1", + "sizeServerSQL": "1" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "gcp", + "region": "asia-east1", + "profileName": "admin", + "path": "", + "bucket": "mcdatamanager", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "objectstorage", + "taskType": "migrate", + "taskId": "-task-0-20241112-192721" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "aws", + "region": "ap-northeast-2", + "profileName": "admin", + "path": "", + "bucket": "mcdatamanager", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "gcp", + "region": "asia-east1", + "profileName": "admin", + "path": "", + "bucket": "mcdatamanager", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "objectstorage", + "taskType": "backup", + "taskId": "-task-0-20241112-192744" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "aws", + "region": "ap-northeast-2", + "profileName": "admin", + "path": "", + "bucket": "mcdatamanager", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "/tmp/dummy", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "objectstorage", + "taskType": "backup", + "taskId": "-task-0-20241112-192751" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "gcp", + "region": "asia-east1", + "profileName": "admin", + "path": "", + "bucket": "mcdatamanager", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "/tmp/dummy", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "objectstorage", + "taskType": "restore", + "taskId": "-task-0-20241112-192817" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "/tmp/dummy", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "aws", + "region": "ap-northeast-2", + "profileName": "admin", + "path": "", + "bucket": "mcdatamanager", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "objectstorage", + "taskType": "restore", + "taskId": "-task-0-20241112-192829" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "/tmp/dummy", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "gcp", + "region": "asia-east1", + "profileName": "admin", + "path": "", + "bucket": "mcdatamanager", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "rdbms", + "taskType": "generate", + "taskId": "-task-0-20241112-193010" + }, + "dummy": { + "dummyPath": "/tmp/datamold-dummy1414500718", + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": true, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "1" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "aws", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "terraform-20241112095231924200000001.c36826os8m6p.ap-northeast-2.rds.amazonaws.com", + "port": "3306", + "username": "mcdatamanager", + "password": "mcdatamanager", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "rdbms", + "taskType": "backup", + "taskId": "-task-0-20241112-193243" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "aws", + "region": "", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "terraform-20241112095231924200000001.c36826os8m6p.ap-northeast-2.rds.amazonaws.com", + "port": "3306", + "username": "mcdatamanager", + "password": "mcdatamanager", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "/tmp/aws/rdb/backup", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "rdbms", + "taskType": "restore", + "taskId": "-task-0-20241112-193352" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "/tmp/aws/rdb/backup", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "gcp", + "region": "", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "34.81.51.111", + "port": "3306", + "username": "mcdatamanager", + "password": "mcdatamanager", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "generate", + "taskId": "-task-0-20241112-194432" + }, + "dummy": { + "dummyPath": "/tmp/datamold-dummy119020017", + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": true, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "1", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "aws", + "region": "ap-northeast-2", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "backup", + "taskId": "-task-0-20241112-194842" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "aws", + "region": "ap-northeast-2", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "/tmp/aws/nrdb/backup2", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "restore", + "taskId": "-task-0-20241112-194853" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "/tmp/aws/nrdb/backup2", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "gcp", + "region": "asia-east1", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "objectstorage", + "taskType": "migrate", + "taskId": "-task-0-20241112-195514" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "aws", + "region": "ap-northeast-2", + "profileName": "admin", + "path": "", + "bucket": "mcdatamanager", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "ncp", + "region": "", + "profileName": "admin", + "path": "", + "bucket": "mcdatamanager", + "endpoint": "https://kr.object.ncloudstorage.com", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "rdbms", + "taskType": "migrate", + "taskId": "-task-0-20241112-195842" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "aws", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "terraform-20241112095231924200000001.c36826os8m6p.ap-northeast-2.rds.amazonaws.com", + "port": "3306", + "username": "mcdatamanager", + "password": "mcdatamanager", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "ncp", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "db-2vopql-kr.vpc-pub-cdb.ntruss.com", + "port": "3306", + "username": "mcdatamanager", + "password": "mcdatamanager1!", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "generate", + "taskId": "-task-0-20241112-200033" + }, + "dummy": { + "dummyPath": "/tmp/datamold-dummy3102645907", + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": true, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "1", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "ncp", + "region": "", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "2vopqr.pub-vpc.mg.naverncp.com", + "port": "3306", + "username": "mcdatamanager", + "password": "mcdatamanager1!", + "databaseName": "mcdatamanager", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "generate", + "taskId": "-task-0-20241112-200345" + }, + "dummy": { + "dummyPath": "/tmp/datamold-dummy2447384536", + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": true, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "1", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "ncp", + "region": "", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "2vopqr.pub-vpc.mg.naverncp.com", + "port": "27017", + "username": "mcdatamanager", + "password": "mcdatamanager1!", + "databaseName": "mcdatamanager", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "generate", + "taskId": "-task-0-20241112-200613" + }, + "dummy": { + "dummyPath": "/tmp/datamold-dummy3665621432", + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": true, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "1", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "ncp", + "region": "", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "2vopqr.pub-vpc.mg.naverncp.com", + "port": "17017", + "username": "mcdatamanager", + "password": "mcdatamanager1!", + "databaseName": "mcdatamanager", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "migrate", + "taskId": "-task-0-20241112-200841" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "ncp", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "2vopqr.pub-vpc.mg.naverncp.com", + "port": "17107", + "username": "mcdatamanager", + "password": "mcdatamanager1!", + "databaseName": "mcdatamanager", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "gcp", + "region": "asia-northeast3", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "migrate", + "taskId": "-task-0-20241112-200848" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "ncp", + "region": "", + "profileName": "", + "path": "", + "bucket": "", + "endpoint": "", + "host": "2vopqr.pub-vpc.mg.naverncp.com", + "port": "17107", + "username": "mcdatamanager", + "password": "mcdatamanager1!", + "databaseName": "mcdatamanager", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "gcp", + "region": "asia-northeast3", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "migrate", + "taskId": "-task-0-20241112-201637" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "aws", + "region": "ap-northeast-2", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "gcp", + "region": "", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "migrate", + "taskId": "-task-0-20241112-201736" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "aws", + "region": "ap-northeast-2", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "gcp", + "region": "", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "migrate", + "taskId": "-task-0-20241112-201857" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "aws", + "region": "us-east-2", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "ncp", + "region": "", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "2vopqr.pub-vpc.mg.naverncp.com", + "port": "17017", + "username": "mcdatamanager", + "password": "mcdatamanager1!", + "databaseName": "mcdatamanager", + "databaseId": "", + "projectId": "" + } + }, + { + "meta": { + "serviceType": "nrdbms", + "taskType": "migrate", + "taskId": "-task-0-20241112-201907" + }, + "dummy": { + "checkSQL": false, + "checkCSV": false, + "checkTXT": false, + "checkPNG": false, + "checkGIF": false, + "checkZIP": false, + "checkJSON": false, + "checkXML": false, + "checkServerJSON": false, + "checkServerSQL": false, + "sizeSQL": "", + "sizeCSV": "", + "sizeTXT": "", + "sizePNG": "", + "sizeGIF": "", + "sizeZIP": "", + "sizeJSON": "", + "sizeXML": "", + "sizeServerJSON": "", + "sizeServerSQL": "" + }, + "sourcePoint": { + "provider": "aws", + "region": "ap-northeast-2", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "", + "port": "", + "username": "", + "password": "", + "databaseName": "", + "databaseId": "", + "projectId": "" + }, + "targetPoint": { + "provider": "ncp", + "region": "", + "profileName": "admin", + "path": "", + "bucket": "", + "endpoint": "", + "host": "2vopqr.pub-vpc.mg.naverncp.com", + "port": "17017", + "username": "mcdatamanager", + "password": "mcdatamanager1!", + "databaseName": "mcdatamanager", + "databaseId": "", + "projectId": "" + } + } + ], "flows": [], "schedules": [] } diff --git a/data/var/run/data-manager/template/example/AWS/BUILDER/main.tf b/data/var/run/data-manager/template/example/AWS/BUILDER/main.tf index b29f5f7..6ac2983 100644 --- a/data/var/run/data-manager/template/example/AWS/BUILDER/main.tf +++ b/data/var/run/data-manager/template/example/AWS/BUILDER/main.tf @@ -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 +# } diff --git a/data/var/run/data-manager/template/example/AWS/BUILDER/modules/mysql/main.tf b/data/var/run/data-manager/template/example/AWS/BUILDER/modules/mysql/main.tf index a72b991..07ed92d 100644 --- a/data/var/run/data-manager/template/example/AWS/BUILDER/modules/mysql/main.tf +++ b/data/var/run/data-manager/template/example/AWS/BUILDER/modules/mysql/main.tf @@ -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 } \ No newline at end of file diff --git a/data/var/run/data-manager/template/example/AWS/BUILDER/modules/mysql/variables.tf b/data/var/run/data-manager/template/example/AWS/BUILDER/modules/mysql/variables.tf index 5ad12a6..58cc9c8 100644 --- a/data/var/run/data-manager/template/example/AWS/BUILDER/modules/mysql/variables.tf +++ b/data/var/run/data-manager/template/example/AWS/BUILDER/modules/mysql/variables.tf @@ -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 diff --git a/data/var/run/data-manager/template/example/AWS/BUILDER/modules/storage/main.tf b/data/var/run/data-manager/template/example/AWS/BUILDER/modules/storage/main.tf index 64bbbdd..155738d 100644 --- a/data/var/run/data-manager/template/example/AWS/BUILDER/modules/storage/main.tf +++ b/data/var/run/data-manager/template/example/AWS/BUILDER/modules/storage/main.tf @@ -2,5 +2,5 @@ resource "aws_s3_bucket" "bucket" { bucket = var.bucket_name - + force_destroy = true } \ No newline at end of file diff --git a/data/var/run/data-manager/template/example/AWS/BUILDER/variables.tf b/data/var/run/data-manager/template/example/AWS/BUILDER/variables.tf index 342fe00..97b2a29 100644 --- a/data/var/run/data-manager/template/example/AWS/BUILDER/variables.tf +++ b/data/var/run/data-manager/template/example/AWS/BUILDER/variables.tf @@ -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" } diff --git a/data/var/run/data-manager/template/example/GCP/BUILDER/main.tf b/data/var/run/data-manager/template/example/GCP/BUILDER/main.tf index f41d159..0d8ac30 100644 --- a/data/var/run/data-manager/template/example/GCP/BUILDER/main.tf +++ b/data/var/run/data-manager/template/example/GCP/BUILDER/main.tf @@ -18,6 +18,8 @@ module "firestore_database" { source = "./modules/firestore" project_id = var.project_id region = var.region + nrdbName = var.nrdbName + } # MySQL RDB Gen @@ -25,6 +27,11 @@ 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 @@ -32,4 +39,5 @@ module "storage" { source = "./modules/storage" project_id = var.project_id region = var.region + bucketName = var.bucketName } diff --git a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/firestore/main.tf b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/firestore/main.tf index 5457063..6d19f75 100644 --- a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/firestore/main.tf +++ b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/firestore/main.tf @@ -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 -} - +} \ No newline at end of file diff --git a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/firestore/variables.tf b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/firestore/variables.tf index 11a6b04..a1a4221 100644 --- a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/firestore/variables.tf +++ b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/firestore/variables.tf @@ -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" } diff --git a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/mysql/main.tf b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/mysql/main.tf index 8503caa..06e5246 100644 --- a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/mysql/main.tf +++ b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/mysql/main.tf @@ -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 diff --git a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/mysql/variables.tf b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/mysql/variables.tf index cf88182..6430047 100644 --- a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/mysql/variables.tf +++ b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/mysql/variables.tf @@ -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 } diff --git a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/storage/main.tf b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/storage/main.tf index c9b0727..8040a95 100644 --- a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/storage/main.tf +++ b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/storage/main.tf @@ -8,4 +8,5 @@ resource "google_storage_bucket" "data_storage" { versioning { enabled = true } + force_destroy = true } diff --git a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/storage/variables.tf b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/storage/variables.tf index 0dc4727..b5ffed2 100644 --- a/data/var/run/data-manager/template/example/GCP/BUILDER/modules/storage/variables.tf +++ b/data/var/run/data-manager/template/example/GCP/BUILDER/modules/storage/variables.tf @@ -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" } \ No newline at end of file diff --git a/data/var/run/data-manager/template/example/GCP/BUILDER/variables.tf b/data/var/run/data-manager/template/example/GCP/BUILDER/variables.tf index 6106f81..c1be4e0 100644 --- a/data/var/run/data-manager/template/example/GCP/BUILDER/variables.tf +++ b/data/var/run/data-manager/template/example/GCP/BUILDER/variables.tf @@ -1,4 +1,4 @@ -# 공통 변수 설정 +# Common variable "project_id" { description = "GCP 프로젝트 ID" @@ -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)" } diff --git a/data/var/run/data-manager/template/example/NCP/BUILDER/main.tf b/data/var/run/data-manager/template/example/NCP/BUILDER/main.tf index 98742c9..702c849 100644 --- a/data/var/run/data-manager/template/example/NCP/BUILDER/main.tf +++ b/data/var/run/data-manager/template/example/NCP/BUILDER/main.tf @@ -45,6 +45,48 @@ resource "ncloud_network_acl_rule" "acl_rule" { } } +# Define Access Control Group +resource "ncloud_access_control_group" "db_acg" { + vpc_no = ncloud_vpc.vpc.id + name = var.acg_name + description = "Database Access Control Group" +} + +# Define Access Control Group Rule (Inbound Rule for MySQL) +resource "ncloud_access_control_group_rule" "acg_rule" { + access_control_group_no = ncloud_access_control_group.db_acg.id + # Inbound rules + inbound { + protocol = "TCP" + ip_block = "0.0.0.0/0" + port_range = "22" + description = "Accept SSH connections on port 22" + } + + inbound { + protocol = "TCP" + ip_block = "0.0.0.0/0" + port_range = "80" + description = "Accept HTTP traffic on port 80" + } + # Inbound rule (all ports allowed) + inbound { + protocol = "TCP" + ip_block = "0.0.0.0/0" + port_range = "1-65535" + description = "Accept MySQL traffic on port 3306" + } + + # Outbound rule (all ports allowed) + outbound { + protocol = "TCP" + ip_block = "0.0.0.0/0" + port_range = "1-65535" + description = "Allow outbound traffic on all ports" + } +} + +## subnet resource "ncloud_subnet" "subnet" { depends_on = [ncloud_vpc.vpc, ncloud_network_acl.acl] vpc_no = ncloud_vpc.vpc.id @@ -67,8 +109,28 @@ resource "ncloud_subnet" "public_subnet" { usage_type = "GEN" } +## nic +resource "ncloud_network_interface" "nic" { + depends_on = [ ncloud_subnet.public_subnet, ncloud_access_control_group_rule.acg_rule ] + name = "mcmp-nic" + subnet_no = ncloud_subnet.public_subnet.id + access_control_groups = [ncloud_access_control_group.db_acg.id] +} + + + +# Object Storage Module +module "storage" { + source = "./modules/storage" + bucket_name = var.bucket_name + access_key = var.access_key + secret_key = var.secret_key + region = var.region +} + # RDB Module module "rdb" { + depends_on = [ ncloud_network_interface.nic ] source = "./modules/rdb" access_key = var.access_key secret_key = var.secret_key @@ -77,19 +139,13 @@ module "rdb" { db_name = var.db_name db_user = var.db_user db_pswd = var.db_pswd + acg_id = ncloud_access_control_group.db_acg.id } -# Object Storage Module -module "storage" { - source = "./modules/storage" - bucket_name = var.bucket_name - access_key = var.access_key - secret_key = var.secret_key - region = var.region -} # MongoDB Module module "mongodb" { + depends_on = [ ncloud_network_interface.nic ] source = "./modules/mongodb" access_key = var.access_key secret_key = var.secret_key @@ -104,3 +160,5 @@ module "mongodb" { db_user = var.db_user db_pswd = var.db_pswd } + +# NCP rdb and mongodb as DB instance, not supported network interface settings. diff --git a/data/var/run/data-manager/template/example/NCP/BUILDER/modules/rdb/main.tf b/data/var/run/data-manager/template/example/NCP/BUILDER/modules/rdb/main.tf index 2128322..2d44ddd 100644 --- a/data/var/run/data-manager/template/example/NCP/BUILDER/modules/rdb/main.tf +++ b/data/var/run/data-manager/template/example/NCP/BUILDER/modules/rdb/main.tf @@ -1,3 +1,5 @@ +# moddule / rdb + terraform { required_providers { ncloud = { @@ -16,4 +18,13 @@ resource "ncloud_mysql" "mysql" { user_name = var.db_user user_password = var.db_pswd host_ip = "%" + is_ha = false // stanby server false + + + +} + +output "mysql_acg_list" { + depends_on = [ ncloud_mysql.mysql ] + value = ncloud_mysql.mysql.mysql_server_list } \ No newline at end of file diff --git a/data/var/run/data-manager/template/example/NCP/BUILDER/modules/rdb/variables.tf b/data/var/run/data-manager/template/example/NCP/BUILDER/modules/rdb/variables.tf index 59b21fc..2d8cc66 100644 --- a/data/var/run/data-manager/template/example/NCP/BUILDER/modules/rdb/variables.tf +++ b/data/var/run/data-manager/template/example/NCP/BUILDER/modules/rdb/variables.tf @@ -18,6 +18,11 @@ variable "subnet_id" { type = string } +variable "acg_id" { + description = "acg_id" + type = string +} + variable "db_user" { description = "DB user" type = string diff --git a/data/var/run/data-manager/template/example/NCP/BUILDER/variables.tf b/data/var/run/data-manager/template/example/NCP/BUILDER/variables.tf index ee5e18d..86cd6b0 100644 --- a/data/var/run/data-manager/template/example/NCP/BUILDER/variables.tf +++ b/data/var/run/data-manager/template/example/NCP/BUILDER/variables.tf @@ -30,6 +30,13 @@ variable "acl_name" { } +variable "acg_name" { + description = "acg_name" + type = string + default = "mcmp-acg" + +} + variable "private_subnet_name" { description = "private_subnet_name" type = string @@ -46,24 +53,24 @@ variable "public_subnet_name" { variable "bucket_name" { description = "bucket_name" type = string - default = "mc-data-manager" + default = "mcdatamanager" } variable "db_name" { description = "DB name" type = string - default = "mc-data-manager" + default = "mcdatamanager" } variable "db_user" { description = "DB user" type = string - default = "datamanager" + default = "mcdatamanager" } variable "db_pswd" { description = "DB PW" type = string - default = "N@mutech7^^7" + default = "mcdatamanager1!" } diff --git a/pkg/rdbms/mysql/mysql.go b/pkg/rdbms/mysql/mysql.go index bfe3fdb..4cf106e 100644 --- a/pkg/rdbms/mysql/mysql.go +++ b/pkg/rdbms/mysql/mysql.go @@ -78,6 +78,7 @@ func (d *MysqlDBMS) Exec(query string) error { log.Error().Err(retryErr).Str("Provider", string(d.provider)).Str("tagetProvider", string(d.provider)).Str("query", query).Msg("Failed to execute transformed NCP SQL query") return retryErr } + err = nil // If retry query Not Failed } log.Debug().Str("query", query).Msg("SQL query executed successfully") diff --git a/web/templates/mig-firestoreToMongodb.html b/web/templates/mig-firestoreToMongodb.html index 7053ee0..fdfcb9d 100644 --- a/web/templates/mig-firestoreToMongodb.html +++ b/web/templates/mig-firestoreToMongodb.html @@ -51,6 +51,14 @@

마이그레이션 Firestore

+
+ +
+ + +
+
+
diff --git a/web/templates/mig-mongodbToDynamodb.html b/web/templates/mig-mongodbToDynamodb.html index fc10440..bf12cb7 100644 --- a/web/templates/mig-mongodbToDynamodb.html +++ b/web/templates/mig-mongodbToDynamodb.html @@ -19,6 +19,14 @@

마이그레이션 MongoDB

+
+ +
+ + +
+
+
diff --git a/web/templates/mig-mongodbToFirestore.html b/web/templates/mig-mongodbToFirestore.html index 5411f0a..73491d5 100644 --- a/web/templates/mig-mongodbToFirestore.html +++ b/web/templates/mig-mongodbToFirestore.html @@ -18,6 +18,14 @@

마이그레이션 MongoDB

+
+ +
+ + +
+
+