はじめに
- 参考
- 関連
GCP Pub/SubでTopicを作成
- CREATE TOPICボタンを押す

- Topic ID: shopify-app-s3lab-app-2
- 他はデフォルトのまま

- 生成の完了

- PERMISSIONSのADD PRINCIPALボタンをクリックする

- New principals: Shopify partner service account addressを入力
- メアドのフォーマットであることが必須
- Role: Pub/Sub Publisher

Shopify partnerでPub/Subのservice account addressを取得

Shopifyアプリ側の設定
shopify.app.toml
Partner event source ARNを以下に設定する
※ Event busではなく、Event sourceのARNを設定する
[[webhooks.subscriptions]]
topics = ["orders/create"]
uri = "pubsub://<PROJECT-ID>:<PUBSUB-TOPIC-ID>"
Pub/Sub画面 SubscriptionsのMessagesでログを確認
- PULLを押すとWebhookのログの受信が確認できた
