Tüm alıştırma soruları

1591 soru

Soru 1Soru

A developer in project `media-transcoder-dev` needs to enable the Cloud Video Intelligence API for a new video processing pipeline. When executing `gcloud services enable videointelligence.googleapis.com`, the command fails with a permission denied error. The developer currently holds the Service Usage Consumer (`roles/serviceusage.serviceUsageConsumer`) role on the project. Following the principle of least privilege, which action should the cloud administrator take to resolve this issue?

Cevabı ve açıklamayı göster

Cevap: Grant the developer the Service Usage Admin (`roles/serviceusage.serviceUsageAdmin`) role on `media-transcoder-dev`.

Cevap

Grant the developer the Service Usage Admin (`roles/serviceusage.serviceUsageAdmin`) role on project `media-transcoder-dev`.
The Service Usage Admin (`roles/serviceusage.serviceUsageAdmin`) role grants the `serviceusage.services.enable` permission required to enable GCP service APIs without granting excessive administrative permissions over other project resources.

Adım Adım Çözüm

1
Diagnose the root cause of the permission error
The user lacks the `serviceusage.services.enable` IAM permission required to enable APIs.
The developer only holds Service Usage Consumer (`roles/serviceusage.serviceUsageConsumer`), which allows using APIs that are already enabled, but not enabling new ones.
2
Identify the predefined role that grants API enablement under least privilege
Service Usage Admin (`roles/serviceusage.serviceUsageAdmin`) contains permissions to administer, enable, and disable services.
Using predefined role Service Usage Admin avoids granting unnecessary project permissions associated with broad primitive roles like Editor or Owner.
3
Assign the role at the appropriate resource scope
Grant the role on the specific project `media-transcoder-dev`.
APIs are enabled and managed on a per-project basis.

Anahtar Kavram

Enabling Cloud Service APIs requires IAM permissions provided by predefined roles such as Service Usage Admin (`roles/serviceusage.serviceUsageAdmin`) on the target project.
Tahmini Süre:1m 30s
Soru 2Soru

An operations administrator is estimating monthly expenses in the Google Cloud Pricing Calculator for a Compute Engine virtual machine instance that will run continuously 24 hours a day, 7 days a week. Which pricing mechanism does Google Cloud automatically factor into the calculation for workloads running continuously for most of the billing month?

Cevabı ve açıklamayı göster

Cevap: Sustained Use Discounts automatically applied to eligible Compute Engine resources

Cevap

Sustained Use Discounts automatically applied to eligible Compute Engine resources
Sustained Use Discounts (SUDs) are automatic discounts provided by Google Cloud for running specific Compute Engine resources for a significant portion of the billing month (more than 25%). The Pricing Calculator automatically incorporates these discounts when estimating costs for continuous 24/7 workloads.

Adım Adım Çözüm

1
Identify the workload characteristics described in the scenario.
The Compute Engine virtual machine instance will run continuously 24/7 throughout the billing month.
Understanding usage duration determines which discount models apply.
2
Evaluate Google Cloud pricing rules for continuous workloads.
Compute Engine automatically applies Sustained Use Discounts (SUDs) when an instance runs for more than 25% of a month.
SUDs require no upfront commitment or manual configuration; they are automatically calculated by the Google Cloud Pricing Calculator.

Anahtar Kavram

Sustained Use Discounts in GCP Pricing Calculator
Soru 3Soru

A digital health platform is designing a Google Kubernetes Engine (GKE) architecture to run two workloads with contrasting operational requirements:

• Workload 1: A legacy telemetry engine that requires custom Linux kernel (sysctl) parameters for network socket optimization.
• Workload 2: A batch data analysis service that is stateless, fault-tolerant, and requires rapid scaling at minimal cost.

The engineering team wants to minimize infrastructure management where possible while fully supporting both workloads. Which cluster architecture and node pool strategy should the cloud engineer select?

Cevabı ve açıklamayı göster

Cevap: Deploy a GKE Standard cluster; configure a custom node pool with tuned sysctl parameters for Workload 1, and a secondary node pool using Spot VMs with Cluster Autoscaler for Workload 2.

Cevap

Deploying a GKE Standard cluster with a customized node pool for kernel parameter tuning and a Spot VM node pool with Cluster Autoscaler for batch workloads satisfies all requirements.
GKE Standard must be selected because Workload 1 requires low-level kernel parameter tuning (sysctl), which is not permitted in GKE Autopilot mode. Provisioning a dedicated node pool for Workload 1 accommodates these kernel settings, while a separate Spot VM node pool with Cluster Autoscaler enabled optimizes costs and handles dynamic scaling for Workload 2's stateless, fault-tolerant batch process.

Adım Adım Çözüm

1
Evaluate the kernel customization requirements of Workload 1.
GKE Autopilot restricts node-level access and kernel modifications (such as sysctl settings). Therefore, a GKE Standard cluster is mandatory.
Autopilot automates node management by locking down node configuration, whereas Standard permits custom node pool settings.
2
Determine node pool configuration for Workload 1.
Configure a dedicated GKE Standard node pool with the necessary sysctl parameters applied during node provisioning.
Isolating Workload 1 to its own node pool ensures node-level settings do not impact other workloads.
3
Evaluate cost and scaling requirements for Workload 2.
Create a secondary node pool using Spot VMs paired with GKE Cluster Autoscaler.
Spot VMs deliver significantly discounted compute for fault-tolerant, stateless batch workloads, and Cluster Autoscaler handles dynamic node capacity changes.

Anahtar Kavram

Selecting between GKE Autopilot and GKE Standard based on node-level customization needs (sysctl, custom OS/node settings) vs. operational management overhead, alongside node pool specialization (Spot VMs and autoscaling).
Soru 4Soru

A cloud engineer needs to onboard a new business unit into an existing Google Cloud organization. The engineer must set up a dedicated environment that inherits organization policies, enable necessary infrastructure services, ensure resource usage is billed appropriately, and grant access to the development team while enforcing the principle of least privilege. In what sequential order should the engineer execute these setup operations?

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

The correct sequence places container structure creation first, followed by project instantiation, billing linkage, API enablement, and finally access control assignment.
The correct sequence follows the dependency path of Google Cloud resource administration: establishing the parent folder container under the organization, creating the project within that folder to inherit organizational policies, linking the billing account to satisfy service prerequisites, enabling the required APIs for the project, and finally applying IAM policy bindings for team access.

Adım Adım Çözüm

1
Establish the resource hierarchy container
Create the targeted environment folder under the organization node
Folders provide the structural boundaries for organization policy inheritance before projects are provisioned.
2
Instantiate the GCP project
Create the project under the specified folder node
Projects represent the fundamental billing, quota, and API enablement boundaries within the hierarchy.
3
Associate billing account
Link the enterprise billing account to the project
GCP services and APIs cannot consume paid resources until a billing account is linked to the project.
4
Enable cloud service APIs
Enable required APIs for the project
Service APIs must be enabled within the billing-active project context before resource creation can occur.
5
Grant access permissions
Bind predefined IAM roles to user identities at the project level
Assigning predefined roles to user groups ensures administrative control and least privilege access on active resources.

Anahtar Kavram

Resource Hierarchy Provisioning Workflow
Soru 5Soru

A cloud engineer must create a new project named `finance-analytics-prod` within a corporate folder and link it to an existing Cloud Billing Account (`012345-6789AB-CDEF01`) using the `gcloud` CLI while following Google Cloud least-privilege IAM principles. What is the correct sequence of steps required to successfully provision the project and establish the billing connection?

Öğeleri doğru sıraya koymak için sürükleyin

Cevabı ve açıklamayı göster

Cevap

The correct procedural sequence is: 1) Acquire Project Creator on the folder and Billing Account User on the billing account; 2) Execute `gcloud projects create` to instantiate the project; 3) Ensure Project Billing Manager role is held on the new project; 4) Execute `gcloud billing projects link` to complete the association.
The workflow follows least-privilege IAM validation and resource lifecycle management. First, the administrator must hold `roles/resourcemanager.projectCreator` on the parent folder to create projects and `roles/billing.user` on the billing account to use it. Second, the project must be created (`gcloud projects create`). Third, the administrator needs `roles/billing.projectManager` on the newly created project to modify its billing configuration. Finally, running `gcloud billing projects link` associates the project with the billing account.

Adım Adım Çözüm

1
Ensure initial organization and billing account IAM roles are assigned.
User has rights to create projects in the folder (`roles/resourcemanager.projectCreator`) and use the billing account (`roles/billing.user`).
Without folder-level project creation privileges and billing account usage privileges, subsequent project creation and billing linkage commands will fail.
2
Provision the project resource using the Google Cloud CLI.
The project `finance-analytics-prod` is created under the specified folder.
A project ID must exist as an active resource within the GCP resource hierarchy before billing accounts can be associated with it.
3
Validate project-level billing permissions.
User holds `roles/billing.projectManager` (or `roles/owner`) on `finance-analytics-prod`.
Linking a project to a billing account requires dual permissions: `billing.resourceAssociations.create` on the billing account AND `resourcemanager.projects.createBillingAssignment` on the project.
4
Run the gcloud billing link command.
Project `finance-analytics-prod` is linked to Cloud Billing Account `012345-6789AB-CDEF01`.
Executing `gcloud billing projects link` completes the association once permission checks on both the project and billing account pass.

Anahtar Kavram

Least-Privilege Billing Account and Project Linking Workflow
Soru 6Soru

An organization is evaluating Google Cloud compute solutions for two newly developed application components:
1. An overnight data transformation batch job that is stateless, fault-tolerant, and capable of resuming progress if interrupted.
2. A containerized HTTP microservice that experiences unpredictable traffic bursts and requires scaling down to zero when idle to minimize compute expenses.

Which TWO deployment options should the Cloud Engineer select to satisfy these requirements while optimizing costs and minimizing operational overhead? (Select TWO.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Provision Compute Engine Spot VMs for the overnight batch job.; Deploy the containerized HTTP microservice on Cloud Run.

Cevap

Select the option to provision Compute Engine Spot VMs for the overnight batch job and the option to deploy the containerized HTTP microservice on Cloud Run.
Compute Engine Spot VMs offer substantial discounts for workloads that are stateless and fault-tolerant, such as nightly batch processing. Cloud Run allows containerized HTTP applications to run in a fully managed serverless environment that automatically scales down to zero instances when idle, fulfilling both operational efficiency and cost targets.

Adım Adım Çözüm

1
Analyze the requirements for Component 1 (nightly batch job).
Identified as fault-tolerant, stateless, and interrupted-safe.
Fault-tolerant batch jobs should leverage Compute Engine Spot VMs to maximize cost savings.
2
Analyze the requirements for Component 2 (HTTP microservice).
Identified as a containerized web service with bursty traffic requiring scale-to-zero capability.
Cloud Run provides serverless container hosting that automatically scales down to zero instances during idle periods with no node management.

Anahtar Kavram

Selecting GCP compute solutions based on workload fault tolerance, containerization, and scaling characteristics.
Soru 7Soru

An administrator needs to expand the IP range of an existing subnet in a Google Cloud Virtual Private Cloud (VPC) network. The current subnet is configured with the primary IP address range 10.1.0.0/2410.1.0.0/24. Which of the following IP ranges is valid for expanding this subnet?

Cevabı ve açıklamayı göster

Cevap: 10.1.0.0/23

Cevap

The IP range 10.1.0.0/23 is the valid choice because it expands the existing 10.1.0.0/24 block while completely containing all existing IP addresses within the subnet.
In Google Cloud VPC, expanding a subnet requires reducing the prefix length (e.g., from /24 to /23). The range 10.1.0.0/23 spans from 10.1.0.0 to 10.1.1.255, which smoothly encompasses all IP addresses in the existing 10.1.0.0/24 block without service disruption.

Adım Adım Çözüm

1
Identify the existing subnet prefix and netmask
The current IP range is 10.1.0.0/24, covering addresses from 10.1.0.0 through 10.1.0.255.
Expanding a subnet requires selecting a broader range (smaller prefix number) that encompasses the current range.
2
Evaluate the netmask rules for GCP VPC subnet expansion
Changing the netmask from /24 to /23 expands the address space to cover 10.1.0.0 through 10.1.1.255.
GCP subnet expansion only permits decreasing prefix lengths without modifying the base start of the IP block in a way that excludes existing addresses.

Anahtar Kavram

VPC Subnet IP Range Expansion Rules
Soru 8Soru

An enterprise logistics company is redesigning its Google Cloud container infrastructure to support two distinct workload profiles. The first profile consists of stateless web APIs that experience highly variable traffic, where the operations team requires zero node management responsibility and pod-level SLA guarantees. The second profile consists of a batch analytics engine executing fault-tolerant, short-lived jobs that require deep customization of worker node kernel parameters (sysctl) and maximum cost reduction. Which TWO GKE cluster architecture decisions should the cloud architect implement to meet these requirements? (Select TWO.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Provision a GKE Autopilot cluster for the stateless web APIs to offload node configuration, maintenance, and node autoscaling to Google.; Provision a GKE Standard cluster with a Spot VM node pool configured with custom sysctl settings for the batch analytics engine.

Cevap

The correct decisions are to deploy a GKE Autopilot cluster for the stateless web APIs and a GKE Standard cluster with a Spot VM node pool featuring custom sysctl configurations for the batch analytics engine.
Deploying GKE Autopilot for the stateless web APIs fulfills the zero node management overhead requirement, as Google manages the underlying nodes. Deploying GKE Standard with a Spot VM node pool for the batch analytics engine permits custom sysctl kernel configurations while minimizing compute costs for fault-tolerant workloads.

Adım Adım Çözüm

1
Analyze the operational requirements for the stateless web APIs.
The requirements demand zero node management overhead and automated node maintenance. GKE Autopilot completely manages underlying infrastructure, making it the ideal fit.
GKE Autopilot abstracts node management away from the operator while guaranteeing pod-level SLAs.
2
Analyze the technical requirements for the batch analytics engine.
The batch analytics engine requires custom sysctl kernel configurations and maximum cost optimization for fault-tolerant workloads.
Custom node-level sysctl configurations require GKE Standard, while Spot VMs supply deep discounts for fault-tolerant compute.
3
Evaluate architectural separation.
Combining both requirements into Autopilot fails because Autopilot blocks custom node kernel modifications. Standard is required for node OS level customization.
Operational boundaries in Autopilot enforce strict security constraints preventing node-level privileged modifications.

Anahtar Kavram

Selecting between GKE Autopilot and GKE Standard based on node OS customization boundaries and choosing Spot VMs for cost-sensitive, fault-tolerant workloads.
Tahmini Süre:3m 0s
Soru 9Soru

A CI/CD automated deployment pipeline uses a dedicated service account to link newly provisioned workload projects to an enterprise Cloud Billing Account. To comply with corporate compliance policies following the principle of least privilege, which pair of predefined IAM roles must be granted to this service account?

Cevabı ve açıklamayı göster

Cevap: roles/billing.user on the Cloud Billing Account and roles/resourcemanager.projectBillingManager on the target project

Cevap

Granting roles/billing.user on the Cloud Billing Account and roles/resourcemanager.projectBillingManager on the target project.
To link a project to a Cloud Billing Account, an identity requires permissions on both resources: roles/billing.user (or Billing Account Administrator) on the billing account itself, and roles/resourcemanager.projectBillingManager (or Project Owner/Editor) on the project. Under the principle of least privilege, using roles/billing.user alongside roles/resourcemanager.projectBillingManager is the exact predefined combination recommended by Google Cloud.

Adım Adım Çözüm

1
Identify the required billing account permission
Determined that billing.resourceCosts.use (included in roles/billing.user) is required on the billing account.
Linking a project to a billing account consumes the billing account's funds, which requires user-level billing account permissions.
2
Identify the required project permission
Determined that resourcemanager.projects.createBillingAssignment (included in roles/resourcemanager.projectBillingManager) is required on the project.
Modifying a project's billing association requires specific project-level administrative permissions for billing management.
3
Evaluate least privilege compliance
Selected the combination of roles/billing.user and roles/resourcemanager.projectBillingManager.
Predefined narrow roles must be favored over broad primitive roles (like Owner/Editor) or overly broad administrative roles (like Billing Admin).

Anahtar Kavram

Dual-resource IAM permission requirements for project billing association under least privilege
Soru 10Soru

An enterprise application produces daily operation logs that require frequent, immediate access for troubleshooting during the first 14 days. After 14 days, the logs are accessed infrequently for routine audits for another 90 days before being deleted. Which Cloud Storage configuration actions should be planned to optimize costs and performance? (Select TWO)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Set the default storage class of the bucket to Standard Storage to accommodate initial frequent access without incurring retrieval fees.; Configure an Object Lifecycle Management rule to transition objects to Nearline Storage after 14 days.

Cevap

The correct configurations are setting the initial bucket class to Standard Storage and creating an Object Lifecycle Management rule to transition objects to Nearline Storage after 14 days.
Standard Storage handles active troubleshooting during the first 14 days without retrieval charges. Transitioning to Nearline Storage after 14 days via Object Lifecycle Management lowers storage costs for infrequently audited data while adhering to storage lifecycle best practices.

Adım Adım Çözüm

1
Analyze access frequency for the initial 14-day window.
Since logs are accessed frequently for active troubleshooting, Standard Storage is selected to avoid data retrieval charges.
Standard Storage provides high availability and no retrieval fees for active data.
2
Analyze access frequency and retention requirements after 14 days.
Logs are accessed infrequently during the subsequent 90 days, making Nearline Storage (designed for access once a month or less with a 30-day minimum duration) the optimal choice.
Nearline Storage reduces monthly storage costs while keeping retrieval fees minimal for occasional audit queries.
3
Automate storage class transition.
An Object Lifecycle Management action condition (Age = 14 days) automates the transition from Standard to Nearline Storage.
Lifecycle rules eliminate manual management overhead for object state transitions.

Anahtar Kavram

Selecting Cloud Storage classes based on access frequency and setting Object Lifecycle Management rules for automated tier transitions.
Soru 11Soru

An organization wants to configure a daily export of detailed Cloud Billing data to a BigQuery dataset located in a dedicated cost-management project. A cloud engineer is assigned to set up this export. Which IAM roles must be granted to the cloud engineer to successfully configure the Cloud Billing export to BigQuery?

Cevabı ve açıklamayı göster

Cevap: Billing Account Administrator (or Billing Account Costs Manager) on the Cloud Billing account, and BigQuery Data Editor (or BigQuery Admin) on the target project containing the BigQuery dataset.

Cevap

Granting the Billing Account Administrator (or Billing Account Costs Manager) role on the Cloud Billing account and the BigQuery Data Editor (or BigQuery Admin) role on the target project containing the BigQuery dataset.
To set up a Cloud Billing export to BigQuery, an administrator needs dual-level permissions: permission to read/export billing settings on the Cloud Billing account (Billing Account Administrator or Billing Account Costs Manager) AND permission to write to the destination BigQuery dataset in the target project (BigQuery Data Editor or BigQuery Admin).

Adım Adım Çözüm

1
Identify the required permissions on the Cloud Billing account resource level.
Configuring export options requires admin or cost management access on the Cloud Billing account (e.g., Billing Account Administrator or Billing Account Costs Manager).
Cloud Billing export is a billing account setting, so project-level access alone is insufficient.
2
Identify the required permissions on the target Google Cloud project hosting the BigQuery dataset.
Creating tables and writing exported cost data requires BigQuery Data Editor or BigQuery Admin role on the target project/dataset.
The user establishing the export link must have rights to write to the destination dataset.

Anahtar Kavram

BigQuery Billing Export IAM Permissions
Tahmini Süre:50s
Soru 12Soru

An enterprise security team requires that Compute Engine virtual machines in the 'Data-Processing' folder be prevented from enabling IP forwarding (acting as routers or network gateways), except for one specialized project named 'gw-prod-100' located inside that folder. A cloud engineer must implement this guardrail using the Google Cloud resource hierarchy while granting the explicit exception. Which configuration should the engineer apply?

Cevabı ve açıklamayı göster

Cevap: Enforce the `constraints/compute.vmCanActAsIpForwarder` Organization Policy constraint on the 'Data-Processing' folder, and set the policy constraint to false (enforcement off) at the 'gw-prod-100' project level.

Cevap

Enforce the `constraints/compute.vmCanActAsIpForwarder` Organization Policy constraint on the 'Data-Processing' folder, and set the policy constraint enforcement to false at the 'gw-prod-100' project level.
Organization Policy constraints set at a folder level automatically inherit down to all child projects. To grant an exception to a specific project within that folder, the constraint must be explicitly set to false (off) at the project level, which overrides the inherited folder policy.

Adım Adım Çözüm

1
Identify the proper Google Cloud mechanism for enforcing infrastructure configuration rules across resource hierarchy nodes.
Organization Policy constraints (such as `constraints/compute.vmCanActAsIpForwarder`) must be used instead of IAM roles.
Organization Policies govern what configurations resources can have, whereas IAM governs identity permissions.
2
Determine the resource hierarchy inheritance behavior for the folder and child project.
Enforcing the constraint at the 'Data-Processing' folder level applies the restriction to all projects in that folder by default.
Organization policies inherit downwards from parent nodes to child nodes.
3
Configure the exception for the target project.
Override the inherited policy at the 'gw-prod-100' project level by setting enforcement to false.
Setting a specific policy setting at a child node overrides inherited parent rules for that specific child node.

Anahtar Kavram

Organization Policy Hierarchy and Constraint Inheritance Overrides
Soru 13Soru

A security mandate for a Google Cloud project named `analytics-prod` prohibits developers from generating or downloading long-lived JSON service account keys. A cloud engineer using the identity `[email protected]` needs temporary authorization to mint short-lived OAuth 2.0 access tokens for an existing service account named `[email protected]`. Which command should an administrator run to grant the engineer the necessary permission directly on the service account using the principle of least privilege?

Cevabı ve açıklamayı göster

Cevap: gcloud iam service-accounts add-iam-policy-binding [email protected] --member="user:[email protected]" --role="roles/iam.serviceAccountTokenCreator"

Cevap

Execute the `gcloud iam service-accounts add-iam-policy-binding` command targeting the specific service account and assigning the `roles/iam.serviceAccountTokenCreator` role to the user.
To allow a developer to generate short-lived access tokens for a service account without key creation, the Service Account Token Creator role (`roles/iam.serviceAccountTokenCreator`) should be bound directly to the target service account resource using `gcloud iam service-accounts add-iam-policy-binding`.

Adım Adım Çözüm

1
Identify the security requirement and identity mechanism.
The scenario requires short-lived credential generation without creating static JSON keys.
Security best practices discourage long-lived service account key downloads in favor of IAM impersonation and token generation.
2
Select the appropriate IAM role for token creation.
The `roles/iam.serviceAccountTokenCreator` role allows generating short-lived access tokens.
This specific predefined role grants permissions to sign tokens and impersonate the target service account.
3
Determine the binding target resource.
Bind the policy directly to `[email protected]`.
Applying the role binding to the specific service account resource enforces the principle of least privilege instead of project-wide access.

Anahtar Kavram

Managing Service Account Impersonation and Token Creation via IAM Policy Bindings
Tahmini Süre:1m 30s
Soru 14Soru

A DevOps engineer is deploying a newly containerized Flask web application named `inventory-api` to Google Cloud Run using the `gcloud run deploy` command. The application is configured to listen internally on TCP port 5000 rather than the standard default port. The application needs to be accessible directly from the public internet without requiring IAM authentication header tokens. Which two configuration actions or `gcloud` command flags must be used to successfully deploy this service? (Select TWO.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Include the `--port=5000` flag during deployment to direct Cloud Run routing to the application's listening port.; Include the `--allow-unauthenticated` flag during deployment to enable public HTTP access.

Cevap

To successfully deploy the containerized web application to Cloud Run with public access and custom port routing, you must use the `--port=5000` flag to inform Cloud Run which port the container receives requests on, and use the `--allow-unauthenticated` flag to allow public ingress without authentication.
Deploying containerized applications to Cloud Run requires configuring container ingress port contract and access control. Specifying the flag `--port=5000` ensures Cloud Run routes incoming container requests to port 5000 where Flask is listening. Specifying `--allow-unauthenticated` allows public HTTP clients to invoke the Cloud Run URL without providing GCP authentication credentials.

Adım Adım Çözüm

1
Identify container port routing requirements.
Cloud Run injects the `PORT` environment variable (default 8080). If the application listens on port 5000, passing `--port=5000` sets `PORT=5000` and configures ingress traffic to target port 5000.
If Cloud Run attempts to send requests to 8080 while the process listens on 5000, startup probes will fail.
2
Identify public access invocation requirements.
Adding `--allow-unauthenticated` configures IAM policy bindings on the deployed service to allow `allUsers` invocation.
By default, new Cloud Run services require IAM authentication headers unless unauthenticated invocations are explicitly allowed.

Anahtar Kavram

Cloud Run Container Port Binding and Ingress Access Control
Tahmini Süre:1m 30s
Soru 15Soru

A security administrator needs to allow internal HTTPS traffic on TCP port 443 strictly to a set of Compute Engine virtual machines running a financial application within the custom VPC network `finance-vpc`. To prevent instance administrators from bypassing security policy by modifying instance network tags, the security team mandates that the firewall rule must be enforced based on the service identity of the virtual machines rather than arbitrary metadata tags. Which parameter should the administrator specify when configuring the ingress firewall rule?

Cevabı ve açıklamayı göster

Cevap: Specify the `--target-service-accounts` flag set to the email address of the service account attached to the financial application virtual machines.

Cevap

Specify the `--target-service-accounts` flag set to the email address of the service account attached to the financial application virtual machines.
In Google Cloud VPC networks, firewall rules can target instances using network tags or service accounts. When strict security policy is required, using `--target-service-accounts` ensures that access is bound to the instance's authenticated IAM service account identity. Because attaching a service account requires the `iam.serviceAccountUser` role, standard VM instance administrators cannot modify network controls by simply altering instance tags.

Adım Adım Çözüm

1
Identify the security requirement for firewall rule targeting
The firewall rule must enforce access based on the instance identity (IAM service account) rather than network tags, preventing instance admins from altering network policy.
Network tags can be modified by anyone with instance update permissions, whereas service account assignment is controlled by IAM permissions.
2
Determine the correct gcloud CLI flag for identity-based ingress target filtering
Use `--target-service-accounts` with the service account email address.
GCP VPC ingress firewall rules use `--target-service-accounts` to designate destination instances by their attached service account.

Anahtar Kavram

Identity-Based VPC Firewall Rule Targeting via Service Accounts
Tahmini Süre:1m 30s
Soru 16Soru

A DevOps engineer needs to configure automated real-time alerts whenever a specific error pattern (`[ERROR] Database connection failed`) is written to a custom application log file on a fleet of Compute Engine virtual machines. The solution must adhere to current Google Cloud recommended practices and follow the principle of least privilege. Which set of steps should the engineer execute?

Cevabı ve açıklamayı göster

Cevap: Install the Google Cloud Ops Agent on the virtual machines, configure a custom log receiver in config.yaml to ingest the log file path, create a counter log-based metric in Cloud Logging for the error pattern, and set up a Cloud Monitoring alerting policy based on that metric.

Cevap

The engineer should install the Google Cloud Ops Agent on the virtual machines, configure a custom log receiver in `config.yaml` for the log file path, create a counter log-based metric in Cloud Logging matching the error string, and set up an alerting policy in Cloud Monitoring based on that metric.
To monitor custom local application logs on Compute Engine VMs, the Google Cloud Ops Agent must be installed and configured with a file receiver in `config.yaml`. To trigger alerts on specific text patterns inside those logs, a counter log-based metric must be created in Cloud Logging to convert matching log entries into time-series metric data. Finally, a Cloud Monitoring alerting policy can be configured on that metric threshold.

Adım Adım Çözüm

1
Deploy and configure the Google Cloud Ops Agent telemetry collector
The Ops Agent streams custom application log files from the Linux filesystem to Cloud Logging.
Google Cloud Ops Agent is the recommended unified telemetry agent for Compute Engine VMs.
2
Define a counter log-based metric in Cloud Logging
Cloud Logging counts occurrences of incoming log entries matching the filter expression `textPayload:"[ERROR] Database connection failed"`.
Log-based metrics extract quantitative data from log streams so Cloud Monitoring can track and trigger alerts on specific log events.
3
Create a Cloud Monitoring Alerting Policy
An alert notification is dispatched when the log-based metric count exceeds the specified threshold.
Cloud Monitoring alerting policies monitor metric thresholds and notify operators of operational issues.

Anahtar Kavram

Log-Based Metrics and Ops Agent Configuration for Compute Engine Observability
Soru 17Soru

A cloud engineer is deploying a custom-mode Virtual Private Cloud (VPC) network named `corp-network` in Google Cloud to host multi-region microservices. The engineer needs to configure subnets in `us-central1` and `europe-west1` and ensure that internal Compute Engine virtual machines across these subnets can communicate with each other over TCP port 8080. Which TWO configurations accurately reflect Google Cloud VPC subnet and firewall rule deployment behaviors? (Select TWO answers.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Creating custom-mode subnets requires manually defining non-overlapping primary IPv4 CIDR ranges for each region, which can later be expanded without recreating the subnet.; Custom firewall ingress rules with priorities between 0 and 65534 must be explicitly created to allow internal TCP port 8080 traffic, because the implied ingress rule denies all incoming traffic.

Cevap

Custom-mode subnets require manual definition of non-overlapping primary IPv4 ranges that can be expanded later, and custom ingress firewall rules with higher precedence (0-65534) must be created to allow port 8080 traffic because VPC networks feature an implied deny-all ingress rule.
The correct responses state that custom-mode VPC subnets require manual definition of non-overlapping IP ranges (which can be expanded later) and that explicit ingress firewall rules (priority 0-65534) are required to allow internal port 8080 traffic due to the implied deny-all ingress rule.

Adım Adım Çözüm

1
Evaluate custom-mode VPC subnet provisioning requirements.
Identify that custom-mode VPC networks do not generate automatic subnets per region; subnets must be created manually with explicit, non-overlapping IP ranges.
Unlike auto-mode VPC networks which automatically create subnets in all regions, custom-mode VPC networks give full control to administrators to define subnets as required.
2
Evaluate default VPC firewall behavior for ingress communication.
Determine that an explicit ingress firewall rule allowing TCP port 8080 must be deployed.
Google Cloud VPC networks contain an implied 'deny all ingress' rule at priority 65535. Any incoming traffic, even between subnets in the same VPC, requires an explicit allow rule with higher priority (lower numerical value).

Anahtar Kavram

Deploying custom VPC networks, subnet expansion rules, and VPC firewall rule evaluation precedence.
Tahmini Süre:1m 30s
Soru 18Soru

An enterprise Google Cloud environment enforces the boolean Organization Policy constraint `constraints/compute.disableGlobalSerialPortAccess` (Enforced: True) at the root Organization node. A DevOps engineer who holds the primitive `roles/owner` IAM role on a child project within a subfolder attempts to enable interactive serial console access on a Compute Engine instance in that project using the Google Cloud CLI. Which statement correctly describes the outcome of this operational request and the underlying policy enforcement mechanism?

Cevabı ve açıklamayı göster

Cevap: The operational request will fail because Organization Policies establish programmatically enforced guardrails across the resource hierarchy that cannot be overridden by IAM permissions; enabling access requires an explicit policy override or exception configured by an Organization Policy Administrator at the folder or project level.

Cevap

The operational request will fail because Organization Policies establish programmatically enforced guardrails across the resource hierarchy that cannot be overridden by IAM permissions; enabling access requires an explicit policy override or exception configured by an Organization Policy Administrator at the folder or project level.
Google Cloud Organization Policies set constraints on specific Google Cloud service resources to configure guardrails across an entire organization. These constraints evaluate independently of IAM roles and permissions. Even users with primitive Owner (`roles/owner`) privileges cannot perform operations that violate active Organization Policy constraints. To allow the operation, an authorized user with the `roles/resourcemanager.organizationPolicyAdmin` role must explicitly alter or override the policy constraint at the appropriate folder or project level in the resource hierarchy.

Adım Adım Çözüm

1
Analyze the relationship between IAM permissions and Organization Policies.
IAM determines identity access authorization ('who can do what'), while Organization Policies define resource configuration restrictions ('what can be done to resources').
Understanding the separation of concerns between IAM and Organization Policies is essential.
2
Evaluate the effect of resource hierarchy inheritance for Organization Policy constraints.
The boolean constraint `constraints/compute.disableGlobalSerialPortAccess` set at the root Organization node is inherited down to folders and projects unless explicitly overridden by an authorized role.
Organization Policies follow the Google Cloud resource hierarchy inheritance model.
3
Determine if primitive Project Owner (`roles/owner`) privileges can bypass Organization Policy enforcement.
IAM roles, including primitive Owner/Editor roles, cannot bypass enforced Organization Policy constraints.
Organization Policies sit above IAM in restricting allowed resource configurations.

Anahtar Kavram

Organization Policies vs IAM Roles & Hierarchy Inheritance
Soru 19Soru

An organization is establishing strict compliance guardrails for service account administration in Google Cloud. A dedicated security team created a custom service account named `[email protected]` in project `proj-backend`. Developers in the project need to attach this service account to newly deployed Cloud Run services. However, security policy strictly forbids developers from modifying service account permissions, creating key files, or managing other service accounts in the project. Which IAM role configuration meets these security requirements while applying the principle of least privilege?

Cevabı ve açıklamayı göster

Cevap: Grant the developers the Service Account User role (roles/iam.serviceAccountUser) bound directly on the sa-app-deployer service account resource.

Cevap

Grant the developers the Service Account User role (roles/iam.serviceAccountUser) bound directly on the specific service account resource.
To allow a user or group to attach a service account to a GCP compute resource without granting permission to manage service accounts, you must grant the Service Account User role (roles/iam.serviceAccountUser) on that specific service account resource. Binding the role on the individual service account rather than at the project level enforces strict least-privilege control.

Adım Adım Çözüm

1
Identify the minimal permission required for workload attachment
The permission required to attach a service account to a compute resource (like Cloud Run or Compute Engine) is iam.serviceAccounts.actAs, which is provided by the Service Account User role (roles/iam.serviceAccountUser).
Developers only need to attach the service account to compute workloads, not manage IAM or service account metadata.
2
Determine the optimal resource scope for IAM binding
Binding roles/iam.serviceAccountUser on the specific service account resource ([email protected]) restricts the actAs permission strictly to that identity.
Granting the role at the project level would allow developers to attach any service account in the project, violating least privilege.
3
Verify compliance with security guardrails
Resource-level binding prevents developers from creating service account keys, modifying IAM policies, or managing other identities in the project.
This guarantees full alignment with security mandates prohibiting identity management rights.

Anahtar Kavram

Fine-grained IAM Delegation for Service Accounts
Tahmini Süre:2m 0s
Soru 20Soru

An enterprise security policy requires that an external automated CI/CD pipeline operating outside of Google Cloud deploy infrastructure into a project named `prod-app-services`. To eliminate security risks associated with long-lived credentials, a cloud administrator creates a dedicated deployment service account named `[email protected]` and configures Workload Identity Federation. Which IAM role configuration should the administrator apply to grant the external workload permission to act as the service account while following Google Cloud security best practices?

Cevabı ve açıklamayı göster

Cevap: Grant the external workload identity principal the Service Account Token Creator role (roles/iam.serviceAccountTokenCreator) directly on the deployer-sa service account resource.

Cevap

Grant the external workload identity principal the Service Account Token Creator role (roles/iam.serviceAccountTokenCreator) directly on the deployer-sa service account resource.
Granting the Service Account Token Creator role directly on the specific target service account allows the external workload identity to mint short-lived tokens for that exact account via Workload Identity Federation. This satisfies security requirements by maintaining a keyless authentication architecture while enforcing least privilege resource scoping.

Adım Adım Çözüm

1
Identify authentication and authorization security requirements
Workload Identity Federation allows external workloads to exchange external tokens for GCP short-lived tokens via service account impersonation.
Eliminating static, long-lived JSON keys is a core Google Cloud security best practice.
2
Determine the required IAM role for generating short-lived credentials
The Service Account Token Creator role (roles/iam.serviceAccountTokenCreator) permits a principal to mint OAuth 2.0 access tokens and ID tokens by impersonating the target service account.
Service Account User allows attaching accounts to resources, whereas Token Creator allows direct token generation/impersonation.
3
Apply resource-level scoping following the principle of least privilege
Bind the role directly on the specific service account resource (deployer-sa) rather than at the project or organization level.
Restricting the role binding to the targeted service account prevents the pipeline from impersonating other service accounts in the project.

Anahtar Kavram

Service Account Impersonation & Workload Identity Least Privilege
Sayfa 1 / 80Sonraki