Associate Cloud Engineer
You are deploying a new application on a Compute Engine VM instance. This application needs to store operational logs in a Cloud Storage bucket named project-logs-us-central1 and have the ability to create new objects (logs) in this bucket. The application must be restricted from modifying or deleting existing objects or accessing any other buckets in the Google Cloud project. You must configure access following the principle of least privilege. What should you do?
- A. Create a dedicated service account for the application. Grant this service account the predefined roles/storage.objectCreator IAM role on the project-logs-us-central1 Cloud Storage bucket. Attach the service account to the Compute Engine VM instance.
- B. Grant the Compute Engine default service account the predefined roles/storage.objectAdmin IAM role on the Google Cloud project.
- C. Create a dedicated service account for the application. Generate a service account key, and grant the service account the predefined roles/storage.adm in IAM role on the project-logs-us-central1 Cloud Storage bucket. Store the key file on the Compute Engine VM.
- D. Grant the Compute Engine default service account the predefined roles/storage.objectCreator IAM role on the Google Cloud project. Attach the service account to the Compute Engine VM instance.