Maghrib · Cert prep · Tue 2026-11-10 · Data

State, import and drift, remote state, resilience and storage

Practice self-check. Answers stay in this page so you can grade yourself. This is not a scored exam.

Twelve scenario items on Terraform state and drift, remote state and locking, AWS resilience and scaling, and Kubernetes storage. Companion lab: ledger state and drift in Terraform.

Q1 · Terraform Advanced, resource lifecycle (TFA-1), drift and refresh-only
During an incident a teammate changed a tag on the Terraform-managed bucket aws_s3_bucket.ledger in the console. The team wants Terraform state to record the real tag value without changing any infrastructure, and wants to review the proposed state change before it is saved. Which command fits?
Q2 · Terraform Advanced, resource lifecycle (TFA-1), state show
An engineer wants to read every attribute Terraform has recorded in state for the single resource aws_s3_bucket.ledger. The configuration has not changed and no plan is needed. Which command should they run?
Q3 · Terraform Advanced, resource lifecycle (TFA-1), saved plans
A pipeline produces a plan for a change, a reviewer inspects it, and then the pipeline must apply exactly the plan that was reviewed. Between review and apply, the real infrastructure or configuration could change. Which approach guarantees the reviewed plan is the one applied?
Q4 · Terraform Advanced, collaborative workflows (TFA-3), state lock timeout
Two CI jobs run against the same remote state. Whenever the first job is running, the second fails immediately with a state-lock error. The team wants the second job to wait up to five minutes for the lock before giving up, while keeping locking enabled.
Q5 · Terraform Advanced, collaborative workflows (TFA-3), S3 native locking
A team on Terraform 1.11 stores state in an S3 backend and wants state locking, but does not want to create or manage a DynamoDB table. The bucket is already versioned and encrypted. Which backend setting provides locking without DynamoDB?
Q6 · Terraform Advanced, collaborative workflows (TFA-3), force-unlock
A CI runner was killed in the middle of terraform apply and left the remote state locked. No other run is active, and the lock error message shows a lock ID. The team needs to release the lock safely.
Q7 · Terraform Advanced, collaborative workflows (TFA-3), partial backend configuration
The S3 backend bucket and key differ for each environment and should not be hard-coded. A teammate writes bucket = var.state_bucket inside the backend "s3" block and terraform init rejects it. How should the values be supplied?
Q8 · DOP-C02, resilient cloud solutions (DOP-3.1), RDS Multi-AZ
A production Amazon RDS database must survive the disruption of one Availability Zone with automatic failover. The application must keep using the same database endpoint, with no configuration change and no manual promotion step.
Q9 · DOP-C02, scalable solutions (DOP-3.2), lifecycle hooks
An Auto Scaling group must run a bootstrap script on every new instance. A new instance must not be put into service and receive traffic until the script has finished. Which feature is designed for this?
Q10 · DOP-C02, resilient cloud solutions (DOP-3.1), warm standby
A team wants a disaster recovery strategy in which a scaled-down but fully functional copy of the workload is always running in a second Region. At failover it can take traffic immediately at reduced capacity, and the team then scales it out to full production size.
Q11 · CKA Storage, ReadWriteOncePod
A CSI-backed PersistentVolumeClaim holds the single writable copy of a ledger index. Only one Pod in the whole cluster may mount it read-write at any time, even if other Pods are scheduled onto the same node. Which access mode should the claim request?
Q12 · CKA Storage, default StorageClass
Developers create PersistentVolumeClaims without a storageClassName. The cluster admin wants every such claim to be provisioned from the existing StorageClass named fast, without editing each claim.