Tüm alıştırma soruları

816 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

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 5Soru

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 6Soru

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 7Soru

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 8Soru

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 9Soru

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 10Soru

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 11Soru

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 12Soru

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 13Soru

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
Soru 14Soru

A cloud engineer is configuring customer-managed encryption keys (CMEK) in Google Cloud KMS for a sensitive Cloud Storage bucket residing in the us-central1 region. The organization requires strict separation of duties: security administrators must manage keys and IAM policies without being able to encrypt or decrypt data, whereas the Cloud Storage service account requires permissions solely to perform cryptographic encryption and decryption operations. Additionally, an operator asks to permanently delete an outdated Cloud KMS Key Ring to clean up resources. Which configuration correctly satisfies these requirements while adhering to Google Cloud KMS operational capabilities?

Cevabı ve açıklamayı göster

Cevap: Grant security administrators the Cloud KMS Admin role, assign the Cloud KMS CryptoKey Encrypter/Decrypter role to the service account on the key, and explain that Key Rings cannot be deleted once created in Cloud KMS.

Cevap

Assign the Cloud KMS Admin role to security administrators, grant the Cloud KMS CryptoKey Encrypter/Decrypter role to the service account, and explain that Key Rings cannot be deleted once created in Cloud KMS.
Separation of duties in Cloud KMS is enforced by combining predefined roles. The Cloud KMS Admin role permits management of keys and IAM policies without granting encrypt/decrypt data access. The Cloud KMS CryptoKey Encrypter/Decrypter role allows workload service accounts to perform cryptographic operations on data. Additionally, Google Cloud KMS enforces immutability for Key Rings and CryptoKeys—they cannot be deleted once created.

Adım Adım Çözüm

1
Evaluate separation of duties for IAM roles
Cloud KMS Admin (`roles/cloudkms.admin`) allows managing key rings, keys, and IAM policies, but explicitly lacks permissions to encrypt or decrypt data (`cloudkms.cryptoKeyVersions.useToEncrypt`/`useToDecrypt`), ensuring administrative duties are isolated from data access.
Security policy requires administrators to manage keys without being capable of viewing or decrypting payload data.
2
Assign cryptographic permissions to the workload service account
The Cloud KMS CryptoKey Encrypter/Decrypter role (`roles/cloudkms.cryptoKeyEncrypterDecrypter`) gives the Cloud Storage service account necessary rights to use the key for CMEK operations without granting administrative access.
Service accounts integrating with CMEK require explicit permission to perform cryptographic operations.
3
Analyze key ring lifecycle operations and limitations
Cloud KMS resources, specifically Key Rings and CryptoKeys, are permanent entities once created to prevent data loss and ensure audit trail integrity; they cannot be deleted.
Google Cloud KMS design mandates that key names and key ring resource paths remain permanent in GCP project history.

Anahtar Kavram

Cloud KMS Separation of Duties and Key Lifecycle Governance
Soru 15Soru

A cloud administrator manages resource constraints across an enterprise Google Cloud hierarchy. An Organization Policy using the Boolean constraint constraints/compute.vmCanIpForward is set to Enforced at the Analytics folder level to prevent virtual machines from enabling IP forwarding. A specific workload inside this folder, located in the Network-Appliance project, requires a virtual machine to act as a router with IP forwarding enabled. How should the administrator configure the environment to allow IP forwarding specifically for the Network-Appliance project while maintaining the constraint for all other projects in the folder?

Cevabı ve açıklamayı göster

Cevap: Override the inherited policy by configuring the constraints/compute.vmCanIpForward constraint to Enforced: Off specifically at the Network-Appliance project level.

Cevap

Override the inherited policy by setting the constraints/compute.vmCanIpForward Organization Policy constraint to Enforced: Off explicitly at the Network-Appliance project level.
Google Cloud Organization Policies evaluate constraints hierarchically. When a parent folder enforces a Boolean constraint such as disabling IP forwarding, all descendant projects inherit that restriction. To create an exception for a single project, an administrator configures an explicit Organization Policy on that project with the Boolean constraint enforcement set to Off (unenforced), which overrides the inherited policy for that project only.

Adım Adım Çözüm

1
Analyze how Organization Policies inherit down the Google Cloud resource hierarchy.
Policies applied at a parent node (Folder) automatically apply to all child nodes (Projects) unless an explicit policy override is configured at the child level.
Hierarchical inheritance ensures consistent guardrails across sub-resources.
2
Determine the mechanism required to disable a Boolean Organization Policy constraint for a specific sub-resource.
Setting the Boolean constraint enforcement status to Off (false) on the specific target project overrides the inherited Enforced status from the parent folder.
Explicit child node settings take precedence over inherited parent node policies.

Anahtar Kavram

Organization Policy Boolean Constraint Inheritance and Explicit Overrides
Tahmini Süre:1m 30s
Soru 16Soru

A software team deployed an application to Compute Engine that processes images uploaded to a Cloud Storage bucket named `media-processing-prod`. The security team recently enabled Uniform Bucket-Level Access on the bucket to meet organizational compliance requirements. Following this change, the application throws an error whenever it attempts to grant fine-grained permissions using object Access Control Lists (ACLs). According to Google Cloud security best practices, which action should the cloud administrator take to resolve the application errors and properly manage access?

Cevabı ve açıklamayı göster

Cevap: Update the application logic to rely on IAM permissions and assign the predefined role Storage Object Viewer or Storage Object Admin to the service account at the bucket level.

Cevap

Update the application logic to rely on IAM permissions and assign the predefined role Storage Object Viewer or Storage Object Admin to the service account at the bucket level.
Enabling Uniform Bucket-Level Access (UBLA) centralizes access control under Google Cloud IAM and turns off fine-grained Access Control Lists (ACLs) for all objects in the bucket. To grant access properly, applications must rely on bucket-level or project-level IAM bindings using predefined Cloud Storage roles (e.g., Storage Object Viewer or Storage Object User).

Adım Adım Çözüm

1
Identify the cause of the failure
Uniform Bucket-Level Access (UBLA) disables fine-grained object Access Control Lists (ACLs), causing operations that attempt to set or modify object ACLs to fail.
UBLA unifies access control exclusively under Identity and Access Management (IAM).
2
Remediate application permissions strategy
Refactor application code to stop making ACL modification API calls.
ACL manipulation calls are invalid when UBLA is enforced on the target Cloud Storage bucket.
3
Apply principle of least privilege using IAM predefined roles
Grant the service account the required predefined role, such as Storage Object Viewer (`roles/storage.objectViewer`), at the bucket level.
Bucket-level IAM role assignment provides consistent access management without relying on deprecated object-level ACLs.

Anahtar Kavram

Configuring Storage Access Controls and Uniform Bucket-Level Access
Soru 17Soru

An enterprise software team manages multiple environment folders under their Google Cloud organization. In the Staging folder, service account JSON key creation is currently permitted to support legacy integration tests. However, for a newly created high-security project named finance-vault-prod residing inside the Staging folder, security compliance mandates that service account key creation must be blocked completely. Which action should a Cloud Engineer take to enforce this security restriction on finance-vault-prod without modifying the policy settings for other projects in the Staging folder?

Cevabı ve açıklamayı göster

Cevap: Apply the Organization Policy boolean constraint constraints/iam.disableServiceAccountKeyCreation with enforcement set to Enforce directly at the finance-vault-prod project level.

Cevap

Apply the Organization Policy boolean constraint constraints/iam.disableServiceAccountKeyCreation with enforcement set to Enforce directly at the finance-vault-prod project level.
In the Google Cloud resource hierarchy, Organization Policies are inherited from top to bottom (Organization → Folder → Project). Applying a constraint directly at the project level allows an administrator to set a specific enforcement rule that applies exclusively to that project, overriding any looser policy settings inherited from its parent folder.

Adım Adım Çözüm

1
Analyze the resource hierarchy and inheritance model
Organization policies applied at lower nodes in the resource hierarchy (such as a specific project) override or narrow policies inherited from parent folders or organization nodes.
Targeted project-level policy application allows specific security controls without impacting sibling projects under the same parent folder.
2
Select the appropriate constraint type and target node
Configuring constraints/iam.disableServiceAccountKeyCreation to Enforce on the finance-vault-prod project blocks key creation specifically for that project.
This directly fulfills the security requirement while preserving the folder-level configuration for legacy workloads in sibling projects.

Anahtar Kavram

Organization Policy inheritance and node-level constraint overrides
Soru 18Soru

A cloud security engineer receives an alert that a specific key version of a CryptoKey in Cloud KMS may have been exposed. The security policy dictates that no new data should be encrypted using this compromised key version, but existing backup files encrypted with prior key versions must remain decryptable by authorized service accounts. Additionally, to clean up the project resources, the engineer attempts to remove the parent KeyRing that holds the CryptoKey. Which action correctly fulfills the security requirement while reflecting Cloud KMS resource capabilities?

Cevabı ve açıklamayı göster

Cevap: Disable the compromised CryptoKey version, and acknowledge that Cloud KMS KeyRings and CryptoKeys cannot be deleted once created.

Cevap

Disable the compromised CryptoKey version, and acknowledge that Cloud KMS KeyRings and CryptoKeys cannot be deleted once created.
Disabling a specific CryptoKey version stops it from being used for cryptographic operations. Furthermore, Cloud KMS enforces strict immutability for catalog structure: KeyRings and CryptoKeys cannot be deleted once created.

Adım Adım Çözüm

1
Analyze key lifecycle options in Cloud KMS
Disabling a specific CryptoKeyVersion prevents any future cryptographic operations (encryption/decryption) using that specific version, which addresses the security compromise requirement.
Cloud KMS allows managing individual key versions independently through state transitions (Enabled, Disabled, Scheduled for destruction, Destroyed).
2
Evaluate resource deletion capabilities in Cloud KMS
Recognize that KeyRings and CryptoKeys are immutable resources in terms of deletion; they cannot be deleted from a GCP project.
Google Cloud KMS intentionally prevents the deletion of KeyRings and CryptoKeys to preserve audit logs, prevent key loss disasters, and ensure cryptographic history remain traceable.
3
Evaluate IAM policy inheritance
Confirm that IAM roles granted at parent levels (e.g., Project) are inherited downwards and cannot be restricted by child-level revocations.
IAM permissions are purely additive; child resources inherit all access granted at higher levels in the GCP resource hierarchy.

Anahtar Kavram

Cloud KMS Key Lifecycle and Resource Immutability
Soru 19Soru

An enterprise organization is migrating a legacy batch processing and simulation application to Google Cloud Compute Engine. The application operates continuously 24/7 as a steady-state workload and requires a non-standard resource ratio of 1 vCPU to 8 GB of RAM to prevent paying for unneeded compute processing power. Furthermore, the application performs synchronous state writes to attached disks and cannot tolerate abrupt or ungraceful instance terminations. The infrastructure team must minimize total cost of ownership over a 3-year horizon while ensuring full operational stability and exact resource fit. Which compute planning strategy best meets these requirements?

Cevabı ve açıklamayı göster

Cevap: Provision N2 custom machine types configured with a 1 vCPU to 8 GB RAM ratio, and purchase 3-year resource-based Committed Use Discounts (CUDs) for the baseline vCPU and memory capacity.

Cevap

Provision N2 custom machine types configured with a 1 vCPU to 8 GB RAM ratio, and purchase 3-year resource-based Committed Use Discounts (CUDs) for the baseline vCPU and memory capacity.
The correct strategy leverages N2 custom machine types to precisely fit the required 1 vCPU to 8 GB RAM ratio without over-provisioning unused vCPUs. Pairing this configuration with 3-year resource-based Committed Use Discounts (CUDs) yields the lowest cost for a steady-state 24/7 workload while guaranteeing VM availability and persistent disk statefulness.

Adım Adım Çözüm

1
Analyze workload resource ratio requirements.
Standard predefined machine types offer specific vCPU-to-RAM ratios (e.g., standard is 1:4, highmem is 1:8). Custom machine types (such as N2 custom) permit precise specification of vCPU and RAM allocations to eliminate wasted compute costs.
Matching exact resource needs requires custom machine configuration when standard ratios do not fit.
2
Evaluate fault tolerance and availability needs.
The application is stateful and cannot sustain ungraceful terminations, which disqualifies Spot/Preemptible VMs despite their deep discounts.
Spot instances offer no availability SLA and can be reclaimed with a 30-second notification.
3
Determine optimal pricing model for 24/7 steady-state long-term execution.
For a 24/7 baseline workload running continuously over a 3-year horizon, purchasing resource-based Committed Use Discounts (CUDs) provides the highest guaranteed discount rate.
CUDs commit to a specific vCPU and memory footprint over 1 or 3 years in exchange for significant cost reductions without operational risk.

Anahtar Kavram

Compute Engine Resource Planning and Machine Type Customization
Tahmini Süre:2m 0s
Soru 20Soru

A logistics platform is evaluating Google Cloud compute options for two application services with distinct operational and cost constraints:

1. Workload X: A stateless, containerized REST API that experiences unpredictable traffic spikes and extended idle periods. It requires automatic scaling down to zero instances to eliminate ongoing infrastructure expenses.
2. Workload Y: A 4-hour batch processing job that analyzes historical GPS telemetry. The job is fault-tolerant, regularly checkpoints its state, and must execute at the lowest possible per-hour compute cost.

Which deployment strategy best meets the requirements for both workloads while minimizing operational overhead and cost?

Cevabı ve açıklamayı göster

Cevap: Deploy Workload X on Cloud Run, and deploy Workload Y on Compute Engine Spot VMs.

Cevap

Deploy Workload X on Cloud Run, and deploy Workload Y on Compute Engine Spot VMs.
The combination of Cloud Run for the stateless REST API and Compute Engine Spot VMs for the batch job perfectly matches all operational constraints. Cloud Run scales seamlessly to zero during idle periods to eliminate cost, while Spot VMs provide the lowest per-hour compute rates for a long-running, fault-tolerant batch application.

Adım Adım Çözüm

1
Analyze Workload X requirements.
Workload X is a stateless containerized REST API with variable traffic requiring zero-cost scaling during idle periods.
Cloud Run is a fully managed serverless container platform that automatically scales instances based on incoming traffic down to 0 when no requests are received.
2
Analyze Workload Y requirements.
Workload Y is a long-running (4-hour), batch job that is fault-tolerant and requires maximum cost reduction.
Compute Engine Spot VMs offer unused capacity at deep discounts (up to 90% off standard pricing). Because Workload Y checkpoints state and tolerates preemptions, Spot VMs provide the optimal balance of execution length support and cost efficiency.
3
Evaluate combined architecture options against constraints.
Cloud Run for Workload X and Compute Engine Spot VMs for Workload Y meets all functional, timing, and pricing criteria.
Alternative options violate serverless execution timeout limits (Cloud Functions/Cloud Run for 4-hour jobs) or introduce unnecessary idle infrastructure costs and availability risks (GKE Standard or Spot VMs for live API traffic).

Anahtar Kavram

Selecting GCP compute resources based on workload statefulness, execution duration, scaling characteristics, and fault tolerance.
Tahmini Süre:2m 0s
Sayfa 1 / 41Sonraki
Tüm alıştırma soruları — Google Cloud Associate Cloud Engineer | Examkin