一键导入
lab-iaac-terraform
Terraform code generation procedures and patterns for Azure hands-on labs. Cross-cutting rules are in the lab-shared-contract skill.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Terraform code generation procedures and patterns for Azure hands-on labs. Cross-cutting rules are in the lab-shared-contract skill.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | lab-iaac-terraform |
| description | Terraform code generation procedures and patterns for Azure hands-on labs. Cross-cutting rules are in the lab-shared-contract skill. |
Terraform-specific code generation procedures. All cross-cutting rules (naming, tags, SKUs, regions, limits) are defined in the lab-shared-contract skill — reference by ID, do not restate.
Located in lab-azure-governance skill (see R-160):
.github/skills/lab-azure-governance/templates/terraform-module.stub/
Files: main.tf, variables.tf, outputs.tf, providers.tf, terraform.tfvars
Every providers.tf must contain:
terraform {
required_version = ">= 1.0"
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "~> 4.0"
}
random = {
source = "hashicorp/random"
version = "~> 3.0"
}
}
}
provider "azurerm" {
features {
resource_group {
prevent_deletion_if_contains_resources = false
}
}
subscription_id = var.lab_subscription_id
}
Use AzureRM by default. Use AzAPI only if AzureRM lacks a required feature.
.tfstate* is in .gitignore.| File | Content |
|---|---|
providers.tf | Per R-120 |
main.tf | Thin orchestration: locals, resource group, module calls. Tags per lab-shared-contract R-023 |
variables.tf | Must include: lab_subscription_id, location, owner, date_created |
outputs.tf | Resource group name, key endpoints, sensitive values |
terraform.tfvars | Per R-125 |
Each module directory contains:
main.tf — resource definitionsvariables.tf — inputs (must accept tags map + resource IDs from other modules)outputs.tf — resource IDs, endpoints, principal IDsModule organization rules: see lab-shared-contract R-022.
See lab-shared-contract R-024 for the canonical pattern and rules. Terraform implementation uses hashicorp/random. Never define passwords as input variables. Output as sensitive = true.
lab_subscription_id = "e091f6e7-031a-4924-97bb-8c983ca5d21a"
location = "eastus"
owner = "Greg Tate"
date_created = "<YYYY-MM-DD>"
Subscription ID: see lab-shared-contract R-020.
See lab-shared-contract R-016 for the resource table and Terraform disable patterns. Apply those settings to all resources in the R-016 table that are deployed in the lab.
See lab-shared-contract R-025. Always use storage_account_id (not storage_account_name):
resource "azurerm_storage_container" "example" {
name = "content"
storage_account_id = azurerm_storage_account.example.id
}
Generate a PowerShell script in validation/ that:
Confirm-LabSubscription from the lab-azure-governance skill (see R-161).Get-AzResource or az resource list).$Main / $Helpers script block pattern.lab-shared-contract R-012.Start or stop a certification study session by invoking Invoke-AzStudySession.ps1. Parses natural language to extract parameters and prompts for any that are missing. Use when asked to begin/start/stop a study session, start studying, track study time, or log study activity.
Reorganize practice exam questions by domain, skill, and task metadata for any certification exam, then update the coverage table on the exam README. Use when asked to organize practice exams, classify exam questions by domain, or update practice exam coverage.
Scaffold a new certification exam into the LearningAzure workspace. Creates the folder structure, README files, StudyLog, Skills.psd1, and updates all cross-cutting files (scripts, governance, shared contract, top-level README). Use when asked to add a new exam, create an exam, scaffold an exam, or introduce a new certification.
Extract and export flat URLs from a named markdown section and its subsections to a text file. Use when asked to extract links from a markdown section, flatten markdown links, export URLs from a section, get all links under a heading, or extract section/subsection link list.
Build structured reference link trees from Microsoft Learn learning paths or modules. Extracts modules, units, and inline documentation links into nested markdown for references pages. Use when building references, extracting learning path links, creating study reference documentation, or populating a references.md file.
Explain Microsoft Azure exam question outcomes from screenshots. Use when asked to explain why an exam answer is correct or incorrect, or to analyze a practice exam question result.