Repository navigation
Lab 3: partial-import recovery, forward-looking commit note, state-lock aside - #3
Merged
ajy0127 merged 1 commit intoSep 16, 2026
Conversation
…note, state-lock aside Documentation fixes for labs/03-foundation, found while running the lab end to end. 1. Step 2 - partial/missing imports surface as whack-a-mole. If any of the four imports does not land (interrupted run, skipped line), a later apply fails with "already exists - needs to be imported", but only for independent resources first and dependents after those are fixed. Added a note telling students to run `terraform state list` up front and re-import everything missing in one pass, rather than reacting to errors one wave at a time. 2. Verify section, "Committed and pushed" item - contradicted the steps above it. Labs 1-3 only import and apply the provided starter; nothing edits a tracked file, so `git status` is clean and there is nothing to commit. Reworded the item as a forward-looking workflow principle and noted that committable work begins in Lab 4. 3. (Optional) Step 2 - added a short aside for a run that hangs on "Acquiring state lock": a stale lock from an interrupted run; force-unlock or break the blob lease. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ajy0127
added a commit
that referenced
this pull request
Sep 16, 2026
- Lab 3: answer the open question from PR #3 — the deny test now tees its output to lab3-deny-evidence.txt and the text says the raw error (with the Policy identifiers block) is the artifact, not JSON - Lab 5: derive TF_VAR_state_storage_account from backend.hcl (same fix PR #4 made in Lab 4 — the placeholder produced a cryptic 'no such host') - Lab 2: note the one-time log-analytics CLI extension prompt (query block verified live against law-grc-sandbox) - VALIDATION-LOG: F16-F19 recording all four runthrough findings; stage 03 rename verified as a no-op plan against the live environment on azurerm 4.81 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documentation fixes for Lab 3 (
labs/03-foundation), all found while running the lab end to end on a fresh free subscription. Two core fixes, one optional polish, plus one open question for you.1. Step 2 — partial/missing imports surface as whack-a-mole (core)
If any of the four
terraform importcommands doesn't land (an interrupted run, a skipped line), a laterterraform applyfails with... already exists - to be managed via Terraform this resource needs to be imported into the State— but only for the independent resources first, and the dependents (mg-grc-sandboxneedsmg-grc; the workspace needs the RG) after those are fixed. So you fix two, re-apply, and get two more. It reads like the lab is broken.Fix: added a note after the import block telling students to run
terraform state listup front and re-import everything still missing in one pass, instead of reacting to errors one wave at a time.2. Verify section — "Committed and pushed" contradicts the steps (core)
## Verify, 4th item:- [ ] Committed and pushed — from here on: changes go through the repo, never the portalFollowing Steps 1–4 exactly (
bootstrap.sh, import the four existing resources,terraform apply, deny test), nothing edits a tracked file. The stage Terraform ships in the starter — you apply it, you don't write it — andbackend.hcl+ the evidence JSON are gitignored. Sogit statusis clean and there is literally nothing to commit. A student following the instructions cannot truthfully check that box.Fix: reworded the item as a forward-looking workflow principle, and noted that committable work actually begins in Lab 4.
3. Step 2 — stuck
Acquiring state lock…(optional polish)An interrupted run leaves a lease on the state blob, and the next
plan/applyhangs onAcquiring state lockforever. Added a short aside: take the lock ID from the error andterraform force-unlock <ID>, or break the blob lease. Drop this hunk if you consider it too generic-Terraform for the lab.Open question — Step 4 "Save the error JSON" (no change made)
Step 4 says: "Read the full error ... Save the error JSON — it's a preventive-control evidence artifact." But
azdoesn't return clean JSON on a policy deny — it prints a text error with an embeddedPolicy identifiers: [...]array. So "save the error JSON" doesn't map to a real command as written, and I didn't want to guess your intent with a file change.Which did you mean? (a) save the raw error text (
... 2> lab3-deny-evidence.txt), (b) extract just the policy-identifiers JSON, or (c) pull the structured denial record from somewhere else (e.g., the Activity Log)? Whichever it is, the step should include the exact command — happy to add it once you confirm.Scope
labs/03-foundation/README.md.🤖 Generated with Claude Code