0
0
GCPcloud~20 mins

Organization policies in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Organization Policy Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding the effect of Organization Policy constraints

You have set the constraint constraints/compute.disableSerialPortAccess to ENFORCED at the organization level in Google Cloud. What is the expected behavior for all VM instances in projects under this organization?

AAll VM instances will have serial port access disabled, regardless of project or instance-level settings.
BVM instances can override this setting at the project level to enable serial port access.
COnly new VM instances created after the policy is set will have serial port access disabled.
DThe policy only applies to VM instances in projects with billing enabled.
Attempts:
2 left
💡 Hint

Think about how organization policies enforce constraints across all projects and resources.

Architecture
intermediate
2:00remaining
Applying Organization Policies to restrict resource locations

You want to restrict all projects in your organization to create resources only in the us-central1 and us-east1 regions. Which organization policy constraint should you apply, and where should it be set?

ASet the <code>constraints/compute.allowedRegions</code> constraint with allowed values <code>us-central1</code> and <code>us-east1</code> at the folder level.
BSet the <code>constraints/gcp.resourceLocations</code> constraint with allowed values <code>us-central1</code> and <code>us-east1</code> at the project level.
CSet the <code>constraints/gcp.resourceLocations</code> constraint with allowed values <code>us-central1</code> and <code>us-east1</code> at the organization level.
DSet the <code>constraints/compute.allowedRegions</code> constraint with allowed values <code>us-central1</code> and <code>us-east1</code> at the organization level.
Attempts:
2 left
💡 Hint

Consider which constraint controls resource location restrictions and the scope of enforcement.

security
advanced
2:00remaining
Impact of Organization Policy on Service Account Key creation

An organization policy is set to constraints/iam.disableServiceAccountKeyCreation with ENFORCED at the folder level. What will happen if a user tries to create a new service account key in a project under that folder?

AService account key creation is allowed but keys will be automatically rotated.
BUsers can create service account keys if they have the <code>iam.serviceAccountKeyAdmin</code> role.
CThe policy only blocks key creation if set at the project level, not folder level.
DThe creation of new service account keys will be blocked for all projects under the folder.
Attempts:
2 left
💡 Hint

Think about how organization policies propagate and enforce security constraints.

service_behavior
advanced
2:00remaining
Behavior of conflicting Organization Policies at different levels

An organization policy constraints/compute.vmExternalIpAccess is set to ENFORCED at the organization level to deny external IPs on VMs. However, at a specific project, the same constraint is set to NOT_ENFORCED. What is the effective behavior for VM instances in that project?

ABoth policies are merged, causing an error and blocking VM creation.
BThe organization-level policy overrides the project-level setting, so external IPs are denied on VMs.
CThe VM instances will have external IPs allowed only if explicitly set during creation.
DThe project-level policy overrides the organization-level, allowing external IPs on VMs.
Attempts:
2 left
💡 Hint

Consider the hierarchy and precedence of organization policies.

Best Practice
expert
3:00remaining
Designing Organization Policies for multi-team environment

Your company has multiple teams managing projects under a single organization. You want to enforce a policy that restricts VM instance machine types to a predefined list but allow teams to add more machine types if needed. What is the best way to implement this using organization policies?

ASet <code>constraints/compute.allowedMachineTypes</code> at the organization level with the predefined list, and require teams to request changes through a central admin to update the policy.
BSet <code>constraints/compute.allowedMachineTypes</code> at the organization level with the predefined list, and allow projects to add exceptions using policy inheritance and overrides.
CDo not set any organization policy and rely on IAM roles to restrict machine types per team.
DSet the constraint only at the project level for each team with their allowed machine types.
Attempts:
2 left
💡 Hint

Think about how organization policies enforce constraints and how exceptions can be managed.