Google Associate Cloud Engineer Question 189
Select 3Google Cloud PlatformYou are tasked with deploying a new application on Google Cloud Platform using Compute Engine instances. Your team has created a custom VM image with all the necessary configurations and software. How can you make this custom image available for your Compute Engine instances in a different project within the same organization?
- A
A. Share the image with the target project by adding the project ID to the image's permissions.
- B
B. Export the image to a Cloud Storage bucket and then import it into the target project.
- C
C. Create a snapshot of the image and share the snapshot with the target project.
- D
D. Use the 'gcloud compute images copy' command to copy the image to the target project.
- E
E. Create a new image in the target project using the disk of a running instance from the source project.
Show answer and explanation
Correct answers: A, B, D
Explanation
To make a custom image available in a different project, you can share it by adjusting the image permissions, export it to a Cloud Storage bucket and import it, or use the 'gcloud compute images copy' command. These methods ensure that the image is accessible within the target project without unnecessary complexity.
- A. Correct.
A. Correct. You can share an image by granting the necessary IAM permissions to the target project.
- B. Correct.
B. Correct. Exporting the image to a Cloud Storage bucket and importing it is a valid way to make it available in another project.
- C. Incorrect.
C. Incorrect. Snapshots are used for disks, not images, and cannot be used to share images directly.
- D. Correct.
D. Correct. The 'gcloud compute images copy' command can be used to copy images across projects.
- E. Incorrect.
E. Incorrect. This method involves creating an image from a disk, which is not the most efficient way to share images across projects.