Medium1 markMultiple Choice
Domain 4.5: Managing networking resourcesDomain 4.5NetworkingStatic IPgcloud

GCP ACE · Question 40 · Domain 4.5: Managing networking resources

You have an existing Compute Engine instance named 'ftp-server' that currently has an ephemeral external IP address. You need to assign it a static external IP address so that clients can reliably connect to it. You have not yet created the static IP.

Which TWO gcloud commands must you run to accomplish this? (Select TWO)

Answer options:

A.

gcloud compute addresses create [ADDRESS_NAME] --region=[REGION]

B.

gcloud compute instances update ftp-server --static-ip

C.

gcloud compute instances add-access-config ftp-server --address=[IP_ADDRESS]

D.

gcloud compute networks assign-ip ftp-server --type=static

E.

gcloud compute instances delete-access-config ftp-server

How to approach this question

Identify the two-step process: reserve the address, then attach it to the instance.

Full Answer

gcloud compute addresses create [ADDRESS_NAME] --region=[REGION], gcloud compute instances add-access-config ftp-server --address=[IP_ADDRESS]
Assigning a static IP is a two-step process. First, you reserve the static IP address using `gcloud compute addresses create`. Second, you assign it to the instance using `gcloud compute instances add-access-config`. (Note: If the instance already has an ephemeral IP, you would technically use `delete-access-config` first, but A and C are the primary commands for creating and assigning the new IP).

Common mistakes

Looking for a single 'update' command that does both simultaneously.

Practice the full GCP Associate Cloud Engineer Practice Exam 3

50 questions · hints · full answers · grading

More questions from this exam