Basics
IAP (Identity-Aware Proxy) for TCP forwarding
👀 : Identity-Aware Proxy を使用して Linux VM に接続する https://cloud.google.com/compute/docs/connect/ssh-using-iap?hl=ja
# 現在の設定を確認
gcloud config list
# 利用可能なプロジェクト一覧を表示
gcloud projects list
# gcloud経由でSSH
gcloud compute ssh INSTANCE_NAME --zone=ZONE --tunnel-through-iap --ssh-key-file=~/.ssh/id_rsa --project=PROJECT_ID
# ポートフォワーディング
gcloud compute start-iap-tunnel INSTANCE_NAME PORT --local-host-port=localhost:LOCAL_PORT --zone=ZONE