Repository navigation
Conversation
…t practices - S3 backend example uses use_lockfile instead of deprecated dynamodb_table - Drift recovery uses apply -refresh-only and moved/import/removed blocks instead of deprecated terraform refresh and state commands - Bump example version pins (Terraform >= 1.14, aws ~> 6.0, azurerm ~> 4.0) - Add terraform test, lock file, sensitive, for_each and file layout conventions aligned with hashicorp/agent-skills terraform-style-guide - Require user approval for any state-writing recovery command Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…files
SKILL.md was updated in the previous commit; the five reference files still
taught obsolete or invalid patterns. Verified against provider schemas
(terraform providers schema -json) and Terraform 1.17.1.
- providers: aws ~> 6, azurerm ~> 5, google ~> 8, kubernetes/helm ~> 3;
Helm 3 attribute syntax (kubernetes = {}, set = []); exec-based EKS auth;
OIDC/WIF over stored secrets; explicit azurerm subscription_id
- state-management: use_lockfile instead of dynamodb_table (and drop the
invalid `versioning` backend argument); import/moved/removed blocks instead
of state CLI surgery; approval framing for force-unlock and state push;
azurerm 4+ attribute renames
- best-practices: managed/ephemeral secrets instead of secret data sources;
standalone aws_vpc_security_group_*_rule; Amazon Linux 2023 AMI; literal
prevent_destroy; terraform.tf file layout matching SKILL.md
- testing: mock_provider unit tests, flat tests/ layout (nested dirs are not
discovered), -filter usage, no -no-cleanup (experimental only); Rego v1
policy that works on plan JSON; Trivy replaces tfsec; current action, tflint
ruleset and pre-commit versions; Terratest go.mod (Go 1.26.0) with the
AWS SDK v1 example removed
- module-patterns: terraform.tf, .tftest.hcl instead of Go test, module
versions (vpc 6.x, eks 21.x)
- SKILL.md: trivy config instead of tfsec, azurerm ~> 5.0, secrets guidance
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Summary
Replaces obsolete recommendations across the whole
terraform-engineerskill:SKILL.mdand all five reference files. Content follows HashiCorp'sterraform-style-guide(including SECURITY.md) andterraform-testskills from hashicorp/agent-skills.What changed
use_lockfilereplacesdynamodb_table(DynamoDB table removed);import/moved/removedblocks replaceterraform importandstate mv/rm;force-unlockandstate pushflagged as approval-only; invalidversioningbackend argument removed; azurerm renames (https_traffic_only_enabled,storage_account_id).aws_vpc_security_group_*_rule; AL2023 AMI;prevent_destroyas a literal (variables are not allowed there);terraform.tflayout.mock_providerunit tests, flattests/layout,-filterusage; Rego v1 policy; Trivy replaces tfsec; updated action, tflint-ruleset and pre-commit versions; Terratest example updated (AWS SDK v1 example removed).terraform.tf, native tests, current module versions.trivy configinstead oftfsec; azurerm~> 5.0(the previous commit pinned 4.x); secrets guidance.Verification
terraform providers schema -jsonon Terraform 1.17.1.terraform fmt -check; the provider, state, module and best-practices snippets passterraform validateagainst the real provider schemas..tftest.hclexamples run and pass offline (terraform test, 3 passed).opa checkand was exercised against a sample plan JSON.go.modand test compile and vet with Go 1.26.0 (required by terratest v1.0.1).make validate: 0 errors (remaining warnings pre-date this PR).Not verified
apply) test and Terratest examples were not run, since they create real cloud resources.🤖 Generated with Claude Code