ExamGecko
Home Home / Google / Professional Cloud Developer

Google Professional Cloud Developer Practice Test - Questions Answers, Page 10

Question list
Search
Search

List of questions

Search

Related questions











Your application requires service accounts to be authenticated to GCP products via credentials stored on its host Compute Engine virtual machine instances. You want to distribute these credentials to the host instances as securely as possible. What should you do?

A.
Use HTTP signed URLs to securely provide access to the required resources.
A.
Use HTTP signed URLs to securely provide access to the required resources.
Answers
B.
Use the instance's service account Application Default Credentials to authenticate to the required resources.
B.
Use the instance's service account Application Default Credentials to authenticate to the required resources.
Answers
C.
Generate a P12 file from the GCP Console after the instance is deployed, and copy the credentials to the host instance before starting the application.
C.
Generate a P12 file from the GCP Console after the instance is deployed, and copy the credentials to the host instance before starting the application.
Answers
D.
Commit the credential JSON file into your application's source repository, and have your CI/CD process package it with the software that is deployed to the instance.
D.
Commit the credential JSON file into your application's source repository, and have your CI/CD process package it with the software that is deployed to the instance.
Answers
Suggested answer: B

Your application is deployed in a Google Kubernetes Engine (GKE) cluster. You want to expose this application publicly behind a Cloud Load Balancing HTTP(S) load balancer. What should you do?

A.
Configure a GKE Ingress resource.
A.
Configure a GKE Ingress resource.
Answers
B.
Configure a GKE Service resource.
B.
Configure a GKE Service resource.
Answers
C.
Configure a GKE Ingress resource with type: LoadBalancer.
C.
Configure a GKE Ingress resource with type: LoadBalancer.
Answers
D.
Configure a GKE Service resource with type: LoadBalancer.
D.
Configure a GKE Service resource with type: LoadBalancer.
Answers
Suggested answer: A

Your company is planning to migrate their on-premises Hadoop environment to the cloud. Increasing storage cost and maintenance of data stored in HDFS is a major concern for your company. You also want to make minimal changes to existing data analytics jobs and existing architecture. How should you proceed with the migration?

A.
Migrate your data stored in Hadoop to BigQuery. Change your jobs to source their information from BigQuery instead of the on-premises Hadoop environment.
A.
Migrate your data stored in Hadoop to BigQuery. Change your jobs to source their information from BigQuery instead of the on-premises Hadoop environment.
Answers
B.
Create Compute Engine instances with HDD instead of SSD to save costs. Then perform a full migration of your existing environment into the new one in Compute Engine instances.
B.
Create Compute Engine instances with HDD instead of SSD to save costs. Then perform a full migration of your existing environment into the new one in Compute Engine instances.
Answers
C.
Create a Cloud Dataproc cluster on Google Cloud Platform, and then migrate your Hadoop environment to the new Cloud Dataproc cluster. Move your HDFS data into larger HDD disks to save on storage costs.
C.
Create a Cloud Dataproc cluster on Google Cloud Platform, and then migrate your Hadoop environment to the new Cloud Dataproc cluster. Move your HDFS data into larger HDD disks to save on storage costs.
Answers
D.
Create a Cloud Dataproc cluster on Google Cloud Platform, and then migrate your Hadoop code objects to the new cluster. Move your data to Cloud Storage and leverage the Cloud Dataproc connector to run jobs on that data.
D.
Create a Cloud Dataproc cluster on Google Cloud Platform, and then migrate your Hadoop code objects to the new cluster. Move your data to Cloud Storage and leverage the Cloud Dataproc connector to run jobs on that data.
Answers
Suggested answer: D

Your data is stored in Cloud Storage buckets. Fellow developers have reported that data downloaded from Cloud Storage is resulting in slow API performance. You want to research the issue to provide details to the GCP support team. Which command should you run?

A.
gsutil test --o output.json gs://my-bucket
A.
gsutil test --o output.json gs://my-bucket
Answers
B.
gsutil perfdiag --o output.json gs://my-bucket
B.
gsutil perfdiag --o output.json gs://my-bucket
Answers
C.
gcloud compute scp example-instance:~/test-data --o output.json gs://my-bucket
C.
gcloud compute scp example-instance:~/test-data --o output.json gs://my-bucket
Answers
D.
gcloud services test --o output.json gs://my-bucket
D.
gcloud services test --o output.json gs://my-bucket
Answers
Suggested answer: B

You are using Cloud Build build to promote a Docker image to Development, Test, and Production environments. You need to ensure that the same Docker image is deployed to each of these environments. How should you identify the Docker image in your build?

A.
Use the latest Docker image tag.
A.
Use the latest Docker image tag.
Answers
B.
Use a unique Docker image name.
B.
Use a unique Docker image name.
Answers
C.
Use the digest of the Docker image.
C.
Use the digest of the Docker image.
Answers
D.
Use a semantic version Docker image tag.
D.
Use a semantic version Docker image tag.
Answers
Suggested answer: D

Your company has created an application that uploads a report to a Cloud Storage bucket. When the report is uploaded to the bucket, you want to publish a message to a Cloud Pub/Sub topic. You want to implement a solution that will take a small amount to effort to implement. What should you do?

A.
Configure the Cloud Storage bucket to trigger Cloud Pub/Sub notifications when objects are modified.
A.
Configure the Cloud Storage bucket to trigger Cloud Pub/Sub notifications when objects are modified.
Answers
B.
Create an App Engine application to receive the file; when it is received, publish a message to the Cloud Pub/Sub topic.
B.
Create an App Engine application to receive the file; when it is received, publish a message to the Cloud Pub/Sub topic.
Answers
C.
Create a Cloud Function that is triggered by the Cloud Storage bucket. In the Cloud Function, publish a message to the Cloud Pub/Sub topic.
C.
Create a Cloud Function that is triggered by the Cloud Storage bucket. In the Cloud Function, publish a message to the Cloud Pub/Sub topic.
Answers
D.
Create an application deployed in a Google Kubernetes Engine cluster to receive the file; when it is received, publish a message to the Cloud Pub/Sub topic.
D.
Create an application deployed in a Google Kubernetes Engine cluster to receive the file; when it is received, publish a message to the Cloud Pub/Sub topic.
Answers
Suggested answer: C

Explanation:

: https://cloud.google.com/storage/docs/pubsub-notifications

Your teammate has asked you to review the code below, which is adding a credit to an account balance in Cloud Datastore. Which improvement should you suggest your teammate make?

A.
Get the entity with an ancestor query.
A.
Get the entity with an ancestor query.
Answers
B.
Get and put the entity in a transaction.
B.
Get and put the entity in a transaction.
Answers
C.
Use a strongly consistent transactional database.
C.
Use a strongly consistent transactional database.
Answers
D.
Don't return the account entity from the function.
D.
Don't return the account entity from the function.
Answers
Suggested answer: A

Your company stores their source code in a Cloud Source Repositories repository. Your company wants to build and test their code on each source code commit to the repository and requires a solution that is managed and has minimal operations overhead.

Which method should they use?

A.
Use Cloud Build with a trigger configured for each source code commit.
A.
Use Cloud Build with a trigger configured for each source code commit.
Answers
B.
Use Jenkins deployed via the Google Cloud Platform Marketplace, configured to watch for source code commits.
B.
Use Jenkins deployed via the Google Cloud Platform Marketplace, configured to watch for source code commits.
Answers
C.
Use a Compute Engine virtual machine instance with an open source continuous integration tool, configured to watch for source code commits.
C.
Use a Compute Engine virtual machine instance with an open source continuous integration tool, configured to watch for source code commits.
Answers
D.
Use a source code commit trigger to push a message to a Cloud Pub/Sub topic that triggers an App Engine service to build the source code.
D.
Use a source code commit trigger to push a message to a Cloud Pub/Sub topic that triggers an App Engine service to build the source code.
Answers
Suggested answer: A

Explanation:

https://cloud.google.com/build/docs/automating-builds/create-manage-triggers#:~:text=A%20Cloud%20Build%20trigger%20automatically,changes%20that%20match%20certain%20criteria.

You are writing a Compute Engine hosted application in project A that needs to securely authenticate to a Cloud Pub/Sub topic in project B.

What should you do?

A.
Configure the instances with a service account owned by project B. Add the service account as a Cloud Pub/Sub publisher to project A.
A.
Configure the instances with a service account owned by project B. Add the service account as a Cloud Pub/Sub publisher to project A.
Answers
B.
Configure the instances with a service account owned by project A. Add the service account as a publisher on the topic.
B.
Configure the instances with a service account owned by project A. Add the service account as a publisher on the topic.
Answers
C.
Configure Application Default Credentials to use the private key of a service account owned by project B. Add the service account as a Cloud Pub/Sub publisher to project A.
C.
Configure Application Default Credentials to use the private key of a service account owned by project B. Add the service account as a Cloud Pub/Sub publisher to project A.
Answers
D.
Configure Application Default Credentials to use the private key of a service account owned by project A. Add the service account as a publisher on the topic
D.
Configure Application Default Credentials to use the private key of a service account owned by project A. Add the service account as a publisher on the topic
Answers
Suggested answer: B

Explanation:

https://cloud.google.com/pubsub/docs/access-control

'For example, suppose a service account in Cloud Project A wants to publish messages to a topic in Cloud Project B. You could accomplish this by granting the service account Edit permission in Cloud Project B'

You are developing a corporate tool on Compute Engine for the finance department, which needs to authenticate users and verify that they are in the finance department. All company employees use G Suite.

What should you do?

A.
Enable Cloud Identity-Aware Proxy on the HTTP(s) load balancer and restrict access to a Google Group containing users in the finance department. Verify the provided JSON Web Token within the application.
A.
Enable Cloud Identity-Aware Proxy on the HTTP(s) load balancer and restrict access to a Google Group containing users in the finance department. Verify the provided JSON Web Token within the application.
Answers
B.
Enable Cloud Identity-Aware Proxy on the HTTP(s) load balancer and restrict access to a Google Group containing users in the finance department. Issue client-side certificates to everybody in the finance team and verify the certificates in the application.
B.
Enable Cloud Identity-Aware Proxy on the HTTP(s) load balancer and restrict access to a Google Group containing users in the finance department. Issue client-side certificates to everybody in the finance team and verify the certificates in the application.
Answers
C.
Configure Cloud Armor Security Policies to restrict access to only corporate IP address ranges. Verify the provided JSON Web Token within the application.
C.
Configure Cloud Armor Security Policies to restrict access to only corporate IP address ranges. Verify the provided JSON Web Token within the application.
Answers
D.
Configure Cloud Armor Security Policies to restrict access to only corporate IP address ranges. Issue client side certificates to everybody in the finance team and verify the certificates in the application.
D.
Configure Cloud Armor Security Policies to restrict access to only corporate IP address ranges. Issue client side certificates to everybody in the finance team and verify the certificates in the application.
Answers
Suggested answer: A

Explanation:

https://cloud.google.com/iap/docs/signed-headers-howto#securing_iap_headers

(https://cloud.google.com/endpoints/docs/openapi/authenticating-users-google-id).

https://cloud.google.com/armor/docs/security-policy-overview#:~:text=Google%20Cloud%20Armor%20security%20policies%20enable%20you%20to%20allow%20or,Private%20Cloud%20(VPC)%20networks

'Google Cloud Armor security policies protect your application by providing Layer 7 filtering and by scrubbing incoming requests for common web attacks or other Layer 7 attributes to potentially block traffic before it reaches your load balanced backend services or backend buckets'

Total 265 questions
Go to page: of 27