Prompt file imported from samueltauil/copilot-lz (
.github/prompts/act3-remediate-drift.prompt.md). Copyright stays with the author.
A nightly drift.yml workflow detected that the Azure estate has drifted
from Terraform and opened a GitHub Issue (label drift).
Your task:
- Read the linked drift Issue body to understand what changed out-of-band
(the issue includes the full
terraform plandiff). - Decide the correct remediation per the landing-zone policy in
.github/instructions/terraform-landing-zone.instructions.md:- If the out-of-band change violates policy (e.g., someone enabled public network access), the fix is to re-assert the Terraform value (do not update code to match reality).
- If the out-of-band change is benign and policy-compliant, update the Terraform code to match so the estate stops being "drifted."
- Make the minimum set of changes to
*.tffiles to reconcile drift. - Run
terraform fmt -recursiveandterraform validate. - Run
terraform planand confirm the diff matches the stated intent. Do not runterraform apply. - Open a pull request targeting
mainwhose body includes:- A link to the originating drift issue.
- A bulleted list of
LZ-*rules the change satisfies. - The
terraform plansummary (adds / changes / destroys). - The sentence: "This PR reconciles drift detected by
drift.yml."
Branch name: drift/remediate-<short-description>.