From dc0536c5a9b2effa5e3ad178f42ed12dd5e02050 Mon Sep 17 00:00:00 2001 From: "shimoda.m@nds-tyo.co.jp" Date: Thu, 9 Nov 2023 17:15:51 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20stepfunctions=E3=81=AE=E6=9C=AC?= =?UTF-8?q?=E7=95=AA=E7=94=A8=E8=A8=AD=E5=AE=9A=E3=81=AB=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=80=81=E6=9C=88=E6=AC=A1=E3=83=90=E3=83=83=E3=83=81=E3=81=AE?= =?UTF-8?q?=E8=A8=AD=E5=AE=9A=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- stepfunctions/TOOLS/convert_config.yaml | 41 +---------- .../r-jskult-batch-monthly-state.json | 72 ------------------- 2 files changed, 3 insertions(+), 110 deletions(-) delete mode 100644 stepfunctions/r-jskult-batch-monthly-state/r-jskult-batch-monthly-state.json diff --git a/stepfunctions/TOOLS/convert_config.yaml b/stepfunctions/TOOLS/convert_config.yaml index eaaf44c8..aa62a588 100644 --- a/stepfunctions/TOOLS/convert_config.yaml +++ b/stepfunctions/TOOLS/convert_config.yaml @@ -22,8 +22,6 @@ resource: - &STG_SG_CRM_DATAFETCH "sg-0b20b7bb1cb1ab886" # セキュリティグループ(ecs-jskult-batch-daily) - &STG_SG_JSKULT_BATCH_DAILY "sg-020b3f6a5a6d6a3a0" - # セキュリティグループ(ecs-jskult-batch-monthly) - - &STG_SG_JSKULT_BATCH_MONTHLY "sg-05c7ad620d69e6f5f" # セキュリティグループ(ecs-jskult-dbdump) - &STG_SG_JSKULT_DBDUMP "sg-0967779af13538a8e" # セキュリティグループ(ecs-jskult-batch-laundering) @@ -38,15 +36,12 @@ resource: - &PRD_SG_ECS_ALL "sg-05df4823fc789b0fa" # セキュリティグループ(ecs-crm-datafetch) - &PRD_SG_CRM_DATAFETCH "sg-04de7fc3357d852af" - # TODO: 本番リリース時にIDを正式化する # セキュリティグループ(ecs-jskult-batch-daily) - - &PRD_SG_JSKULT_BATCH_DAILY "sg-xxxxxxxxxxxxxxxx" - # セキュリティグループ(ecs-jskult-batch-monthly) - - &PRD_SG_JSKULT_BATCH_MONTHLY "sg-xxxxxxxxxxxxxxxx" + - &PRD_SG_JSKULT_BATCH_DAILY "sg-0276dc8acc80288cc" # セキュリティグループ(ecs-jskult-dbdump) - - &PRD_SG_JSKULT_DBDUMP "sg-xxxxxxxxxxxxxxxx" + - &PRD_SG_JSKULT_DBDUMP "sg-050ab3bc0d9ed261a" # セキュリティグループ(ecs-jskult-batch-laundering) - - &PRD_SG_JSKULT_BATCH_LAUNDERING "sg-xxxxxxxxxxxxxxxx" + - &PRD_SG_JSKULT_BATCH_LAUNDERING "sg-0d2bc30c1a2939c32" config: # CRMデータ取得 r-crm-datafetch-state: @@ -122,36 +117,6 @@ config: SG_ECS_ALL: *PRD_SG_ECS_ALL # セキュリティグループ(ecs-jskut-batch-daily) SG_JSKULT_BATCH_DAILY: *PRD_SG_JSKULT_BATCH_DAILY - # 実消化&アルトマーク 月次バッチ - r-jskult-batch-monthly-state: - # ステージング環境 - staging: - # AWSアカウントID - AWS_ACCOUNT_ID: *AWS_ACCOUNT_ID - # 東京リージョン - REGION_AP_NORTHEAST_1: *REGION_AP_NORTHEAST_1 - # サブネット(PrivateSubnet1) - SUBNET_PRI_1A: *STG_SUBNET_PRI_1A - # サブネット(PrivateSubnet2) - SUBNET_PRI_1D: *STG_SUBNET_PRI_1D - # セキュリティグループ(ecs-all) - SG_ECS_ALL: *STG_SG_ECS_ALL - # セキュリティグループ(ecs-jskut-batch-monthly) - SG_JSKULT_BATCH_MONTHLY: *STG_SG_JSKULT_BATCH_MONTHLY - # 本番環境 - product: - # AWSアカウントID - AWS_ACCOUNT_ID: *AWS_ACCOUNT_ID - # 東京リージョン - REGION_AP_NORTHEAST_1: *REGION_AP_NORTHEAST_1 - # サブネット(PrivateSubnet1) - SUBNET_PRI_1A: *PRD_SUBNET_PRI_1A - # サブネット(PrivateSubnet2) - SUBNET_PRI_1D: *PRD_SUBNET_PRI_1D - # セキュリティグループ(ecs-all) - SG_ECS_ALL: *PRD_SG_ECS_ALL - # セキュリティグループ(ecs-jskut-batch-monthly) - SG_JSKULT_BATCH_MONTHLY: *PRD_SG_JSKULT_BATCH_MONTHLY # 実消化&アルトマーク 日次dump取得 r-jskult-dbdump-state: # ステージング環境 diff --git a/stepfunctions/r-jskult-batch-monthly-state/r-jskult-batch-monthly-state.json b/stepfunctions/r-jskult-batch-monthly-state/r-jskult-batch-monthly-state.json deleted file mode 100644 index 468127bc..00000000 --- a/stepfunctions/r-jskult-batch-monthly-state/r-jskult-batch-monthly-state.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "Comment": "MeDaCA 実消化&アルトマーク 月次バッチ起動ステートマシン", - "StartAt": "params", - "States": { - "params": { - "Comment": "パラメータ設定", - "Type": "Pass", - "Parameters": { - "sns": { - "TopicArn": "arn:aws:sns:#{REGION_AP_NORTHEAST_1}:#{AWS_ACCOUNT_ID}:nds-notice-#{ENV_NAME}" - }, - "ecs": { - "Cluster": "arn:aws:ecs:#{REGION_AP_NORTHEAST_1}:#{AWS_ACCOUNT_ID}:cluster/mbj-newdwh2021-#{ENV_NAME}-jskult-batch-monthly-ecs", - "LaunchType": "FARGATE", - "NetworkConfiguration": { - "AwsvpcConfiguration": { - "Subnets": [ - "#{SUBNET_PRI_1A}", - "#{SUBNET_PRI_1D}" - ], - "SecurityGroups": [ - "#{SG_ECS_ALL}", - "#{SG_JSKULT_BATCH_MONTHLY}" - ], - "AssignPublicIp": "DISABLED" - } - } - } - }, - "ResultPath": "$.params", - "Next": "exec-batch-monthly" - }, - "exec-batch-monthly": { - "Comment": "実消化&アルトマーク 月次バッチ起動", - "Type": "Task", - "Resource": "arn:aws:states:::ecs:runTask.sync", - "Parameters": { - "Cluster.$": "$.params.ecs.Cluster", - "LaunchType.$": "$.params.ecs.LaunchType", - "TaskDefinition": "arn:aws:ecs:#{REGION_AP_NORTHEAST_1}:#{AWS_ACCOUNT_ID}:task-definition/mbj-newdwh2021-#{ENV_NAME}-task-jskult-batch-monthly", - "NetworkConfiguration.$": "$.params.ecs.NetworkConfiguration" - }, - "Retry": [ - { - "ErrorEquals": ["States.ALL"], - "BackoffRate": 2, - "IntervalSeconds": 5, - "MaxAttempts": 3 - } - ], - "Catch": [ - { - "ErrorEquals": ["States.ALL"], - "ResultPath": "$.result", - "Next": "ErrorEnd" - } - ], - "ResultPath": "$.result", - "Next": "NormalEnd" - }, - "NormalEnd": { - "Comment": "正常終了", - "Type": "Succeed" - }, - "ErrorEnd": { - "Comment": "異常終了", - "Type": "Fail", - "Error": "StatesError", - "Cause": "StepFunctions ErrorEnd" - } - } -}