init
This commit is contained in:
commit
922fa0e77a
62 changed files with 2586 additions and 0 deletions
31
api-gateway/deploy_dev.sh
Executable file
31
api-gateway/deploy_dev.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
# 環境変数
|
||||
API_NAME="sales-tool-api"
|
||||
API_CONFIG_NAME="sales-tool-gw-dev-conf-20250619"
|
||||
GATEWAY_NAME="sales-tool-gw-dev"
|
||||
OPENAPI_SPEC="openapi_dev.yaml"
|
||||
PROJECT_ID="datacom-poc"
|
||||
SERVICE_ACCOUNT="api-gateway-mpos@datacom-poc.iam.gserviceaccount.com"
|
||||
LOCATION="asia-northeast1"
|
||||
|
||||
gcloud auth application-default set-quota-project $PROJECT_ID
|
||||
gcloud config set project $PROJECT_ID
|
||||
|
||||
# API GatewayのAPI Configを作成
|
||||
echo "Creating API Config..."
|
||||
gcloud api-gateway api-configs create $API_CONFIG_NAME \
|
||||
--api=$API_NAME \
|
||||
--openapi-spec=$OPENAPI_SPEC \
|
||||
--project=$PROJECT_ID \
|
||||
--backend-auth-service-account=$SERVICE_ACCOUNT
|
||||
|
||||
# API GatewayのGatewayを作成
|
||||
echo "Creating Gateway..."
|
||||
gcloud api-gateway gateways create $GATEWAY_NAME \
|
||||
--api=$API_NAME \
|
||||
--api-config=$API_CONFIG_NAME \
|
||||
--location=$LOCATION \
|
||||
--project=$PROJECT_ID
|
||||
|
||||
echo "API Gateway deployment completed successfully."
|
||||
Loading…
Add table
Add a link
Reference in a new issue