LoginSignup
0
0

More than 5 years have passed since last update.

GCEのインスタンスにgcloudコマンドで予約済みの静的IPを割り当てる

Posted at

gcloudコマンドでもインスタンスに予約済みの静的IPを割り当てる事ができます。

注意点としては、先にIPを削除しておかないと以下のエラーが起きます。

ERROR: (gcloud.compute.instances.add-access-config) Could not fetch resource: - At most one access config currently supported.

# 先にIPを削除
gcloud compute instances delete-access-config インスタンス名
# IPの割当
gcloud compute instances add-access-config インスタンス名 --address IPアドレス

参考:https://stackoverflow.com/questions/51475053/assigning-a-reserved-ip-to-instance-from-command-line-google-cloud

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0