opencode-skills-collection 4.0.67 → 4.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled-skills/.antigravity-install-manifest.json +281 -1
- package/bundled-skills/access-review/SKILL.md +394 -0
- package/bundled-skills/access-review/references/details.md +121 -0
- package/bundled-skills/agent-evals/SKILL.md +420 -0
- package/bundled-skills/agent-observability/SKILL.md +346 -0
- package/bundled-skills/agent-observability/references/details.md +786 -0
- package/bundled-skills/ai-agent-security/SKILL.md +393 -0
- package/bundled-skills/ai-agent-security/references/details.md +912 -0
- package/bundled-skills/ai-coding-agent-guardrails/SKILL.md +442 -0
- package/bundled-skills/ai-coding-agent-guardrails/references/details.md +753 -0
- package/bundled-skills/ai-inference-service-mesh/SKILL.md +449 -0
- package/bundled-skills/ai-pipeline-orchestration/SKILL.md +287 -0
- package/bundled-skills/ai-red-teaming/SKILL.md +409 -0
- package/bundled-skills/ai-security-hardening/SKILL.md +343 -0
- package/bundled-skills/ai-sre-incident-response/SKILL.md +336 -0
- package/bundled-skills/alerting-oncall/SKILL.md +458 -0
- package/bundled-skills/alerting-oncall/references/details.md +84 -0
- package/bundled-skills/anti-slop-design/SKILL.md +393 -0
- package/bundled-skills/antigravity-maintainer-batch-release/SKILL.md +1 -0
- package/bundled-skills/apk-redteam-pipeline/SKILL.md +446 -0
- package/bundled-skills/argocd-gitops/SKILL.md +469 -0
- package/bundled-skills/arm-templates/SKILL.md +438 -0
- package/bundled-skills/arm-templates/references/details.md +64 -0
- package/bundled-skills/artifact-yylo/SKILL.md +122 -0
- package/bundled-skills/asset-inventory/SKILL.md +412 -0
- package/bundled-skills/asset-inventory/references/details.md +127 -0
- package/bundled-skills/audit-logging/SKILL.md +476 -0
- package/bundled-skills/aws-cloudtrail/SKILL.md +486 -0
- package/bundled-skills/aws-cost-optimization/SKILL.md +331 -0
- package/bundled-skills/aws-ec2/SKILL.md +426 -0
- package/bundled-skills/aws-ecs-fargate/SKILL.md +388 -0
- package/bundled-skills/aws-iam/SKILL.md +463 -0
- package/bundled-skills/aws-lambda/SKILL.md +428 -0
- package/bundled-skills/aws-rds/SKILL.md +380 -0
- package/bundled-skills/aws-s3/SKILL.md +434 -0
- package/bundled-skills/aws-secrets-manager/SKILL.md +486 -0
- package/bundled-skills/aws-vpc/SKILL.md +436 -0
- package/bundled-skills/azure-ai-document-intelligence-ts/SKILL.md +1 -1
- package/bundled-skills/azure-aks/SKILL.md +423 -0
- package/bundled-skills/azure-devops/SKILL.md +457 -0
- package/bundled-skills/azure-functions-devsec/SKILL.md +436 -0
- package/bundled-skills/azure-keyvault/SKILL.md +455 -0
- package/bundled-skills/azure-keyvault/references/details.md +83 -0
- package/bundled-skills/azure-monitor-audit/SKILL.md +379 -0
- package/bundled-skills/azure-networking/SKILL.md +448 -0
- package/bundled-skills/azure-networking/references/details.md +135 -0
- package/bundled-skills/azure-sql/SKILL.md +413 -0
- package/bundled-skills/azure-sql/references/details.md +113 -0
- package/bundled-skills/azure-vms/SKILL.md +402 -0
- package/bundled-skills/azure-vms/references/details.md +134 -0
- package/bundled-skills/backup-recovery/SKILL.md +388 -0
- package/bundled-skills/bb-methodology/SKILL.md +451 -0
- package/bundled-skills/bb-methodology/references/details.md +120 -0
- package/bundled-skills/block-storage/SKILL.md +371 -0
- package/bundled-skills/blue-green-deploy/SKILL.md +453 -0
- package/bundled-skills/blue-green-deploy/references/details.md +90 -0
- package/bundled-skills/bug-bounty/SKILL.md +447 -0
- package/bundled-skills/bug-bounty/references/details.md +1316 -0
- package/bundled-skills/bugcrowd-reporting/SKILL.md +351 -0
- package/bundled-skills/business-continuity/SKILL.md +463 -0
- package/bundled-skills/career-ops/SKILL.md +186 -0
- package/bundled-skills/cdn-setup/SKILL.md +374 -0
- package/bundled-skills/change-management/SKILL.md +438 -0
- package/bundled-skills/change-management/references/details.md +105 -0
- package/bundled-skills/circleci/SKILL.md +475 -0
- package/bundled-skills/cis-benchmarks/SKILL.md +150 -0
- package/bundled-skills/cloudflare-pages/SKILL.md +318 -0
- package/bundled-skills/cloudflare-r2/SKILL.md +353 -0
- package/bundled-skills/cloudflare-workers/SKILL.md +415 -0
- package/bundled-skills/cloudflare-zero-trust/SKILL.md +361 -0
- package/bundled-skills/cloudformation/SKILL.md +461 -0
- package/bundled-skills/constraint-driven-development/SKILL.md +335 -0
- package/bundled-skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/bundled-skills/container-hardening/SKILL.md +126 -0
- package/bundled-skills/container-registries/SKILL.md +435 -0
- package/bundled-skills/container-scanning/SKILL.md +416 -0
- package/bundled-skills/convex-backend/SKILL.md +338 -0
- package/bundled-skills/dast-scanning/SKILL.md +437 -0
- package/bundled-skills/database-backups/SKILL.md +425 -0
- package/bundled-skills/datadog/SKILL.md +487 -0
- package/bundled-skills/dependency-scanning/SKILL.md +457 -0
- package/bundled-skills/devcontainers-nix/SKILL.md +416 -0
- package/bundled-skills/disaster-recovery/SKILL.md +374 -0
- package/bundled-skills/disaster-recovery/references/details.md +219 -0
- package/bundled-skills/dns-management/SKILL.md +375 -0
- package/bundled-skills/docker-compose/SKILL.md +482 -0
- package/bundled-skills/docker-management/SKILL.md +426 -0
- package/bundled-skills/ebpf-observability/SKILL.md +436 -0
- package/bundled-skills/ebpf-observability/references/details.md +542 -0
- package/bundled-skills/elk-stack/SKILL.md +487 -0
- package/bundled-skills/enterprise-vpn-attack/SKILL.md +395 -0
- package/bundled-skills/evidence-hygiene/SKILL.md +404 -0
- package/bundled-skills/feature-flags/SKILL.md +426 -0
- package/bundled-skills/feature-flags/references/details.md +86 -0
- package/bundled-skills/fedramp-compliance/SKILL.md +453 -0
- package/bundled-skills/firebase-app-platform/SKILL.md +381 -0
- package/bundled-skills/firewall-config/SKILL.md +479 -0
- package/bundled-skills/gcp-audit-logs/SKILL.md +452 -0
- package/bundled-skills/gcp-audit-logs/references/details.md +56 -0
- package/bundled-skills/gcp-cloud-functions/SKILL.md +284 -0
- package/bundled-skills/gcp-cloud-sql/SKILL.md +277 -0
- package/bundled-skills/gcp-compute/SKILL.md +319 -0
- package/bundled-skills/gcp-gke/SKILL.md +307 -0
- package/bundled-skills/gcp-networking/SKILL.md +293 -0
- package/bundled-skills/gcp-secret-manager/SKILL.md +421 -0
- package/bundled-skills/gcp-secret-manager/references/details.md +131 -0
- package/bundled-skills/gdpr-compliance/SKILL.md +451 -0
- package/bundled-skills/gdpr-compliance/references/details.md +145 -0
- package/bundled-skills/geo-audit/SKILL.md +368 -0
- package/bundled-skills/geo-brand-mentions/SKILL.md +68 -0
- package/bundled-skills/geo-brand-mentions/references/details.md +471 -0
- package/bundled-skills/geo-citability/SKILL.md +350 -0
- package/bundled-skills/geo-compare/SKILL.md +340 -0
- package/bundled-skills/geo-content/SKILL.md +383 -0
- package/bundled-skills/geo-crawlers/SKILL.md +408 -0
- package/bundled-skills/geo-llmstxt/SKILL.md +464 -0
- package/bundled-skills/geo-platform-optimizer/SKILL.md +314 -0
- package/bundled-skills/geo-proposal/SKILL.md +378 -0
- package/bundled-skills/geo-prospect/SKILL.md +225 -0
- package/bundled-skills/geo-report/SKILL.md +436 -0
- package/bundled-skills/geo-report-pdf/SKILL.md +157 -0
- package/bundled-skills/geo-schema/SKILL.md +408 -0
- package/bundled-skills/geo-technical/SKILL.md +78 -0
- package/bundled-skills/geo-technical/references/details.md +543 -0
- package/bundled-skills/git-workflow/SKILL.md +460 -0
- package/bundled-skills/github-actions/SKILL.md +368 -0
- package/bundled-skills/gitlab-ci/SKILL.md +340 -0
- package/bundled-skills/google-no-code/SKILL.md +136 -0
- package/bundled-skills/gpu-kubernetes-operations/SKILL.md +468 -0
- package/bundled-skills/gpu-server-management/SKILL.md +236 -0
- package/bundled-skills/hashicorp-vault/SKILL.md +408 -0
- package/bundled-skills/helm-charts/SKILL.md +469 -0
- package/bundled-skills/hipaa-compliance/SKILL.md +451 -0
- package/bundled-skills/hunt-aspnet/SKILL.md +321 -0
- package/bundled-skills/hunt-ato/SKILL.md +184 -0
- package/bundled-skills/hunt-auth-bypass/SKILL.md +426 -0
- package/bundled-skills/hunt-auth-bypass/references/details.md +80 -0
- package/bundled-skills/hunt-brute-force/SKILL.md +341 -0
- package/bundled-skills/hunt-business-logic/SKILL.md +281 -0
- package/bundled-skills/hunt-cache-poison/SKILL.md +382 -0
- package/bundled-skills/hunt-captcha-bypass/SKILL.md +136 -0
- package/bundled-skills/hunt-cicd/SKILL.md +311 -0
- package/bundled-skills/hunt-clickjacking/SKILL.md +110 -0
- package/bundled-skills/hunt-cors/SKILL.md +335 -0
- package/bundled-skills/hunt-dom/SKILL.md +323 -0
- package/bundled-skills/hunt-exceptional-conditions/SKILL.md +111 -0
- package/bundled-skills/hunt-file-upload/SKILL.md +202 -0
- package/bundled-skills/hunt-fintech-graphql/SKILL.md +289 -0
- package/bundled-skills/hunt-forgot-password/SKILL.md +114 -0
- package/bundled-skills/hunt-grpc/SKILL.md +317 -0
- package/bundled-skills/hunt-host-header/SKILL.md +309 -0
- package/bundled-skills/hunt-html-injection/SKILL.md +106 -0
- package/bundled-skills/hunt-http-smuggling/SKILL.md +129 -0
- package/bundled-skills/hunt-http-smuggling/references/phase2h-smuggling-cachepoison.md +177 -0
- package/bundled-skills/hunt-idor/SKILL.md +434 -0
- package/bundled-skills/hunt-jwt-crypto/SKILL.md +221 -0
- package/bundled-skills/hunt-k8s/SKILL.md +337 -0
- package/bundled-skills/hunt-laravel/SKILL.md +255 -0
- package/bundled-skills/hunt-ldap/SKILL.md +351 -0
- package/bundled-skills/hunt-lfi/SKILL.md +311 -0
- package/bundled-skills/hunt-llm-ai/SKILL.md +289 -0
- package/bundled-skills/hunt-mfa-bypass/SKILL.md +177 -0
- package/bundled-skills/hunt-misc/SKILL.md +378 -0
- package/bundled-skills/hunt-nextjs/SKILL.md +299 -0
- package/bundled-skills/hunt-nodejs/SKILL.md +263 -0
- package/bundled-skills/hunt-nosqli/SKILL.md +210 -0
- package/bundled-skills/hunt-ntlm-info/SKILL.md +314 -0
- package/bundled-skills/hunt-oauth/SKILL.md +459 -0
- package/bundled-skills/hunt-open-redirect/SKILL.md +223 -0
- package/bundled-skills/hunt-race-condition/SKILL.md +381 -0
- package/bundled-skills/hunt-race-condition/references/details.md +159 -0
- package/bundled-skills/hunt-rag-vector/SKILL.md +212 -0
- package/bundled-skills/hunt-rce/SKILL.md +444 -0
- package/bundled-skills/hunt-rce/references/details.md +110 -0
- package/bundled-skills/hunt-saml/SKILL.md +156 -0
- package/bundled-skills/hunt-session/SKILL.md +342 -0
- package/bundled-skills/hunt-shadow-api/SKILL.md +198 -0
- package/bundled-skills/hunt-source-leak/SKILL.md +345 -0
- package/bundled-skills/hunt-spa-api/SKILL.md +163 -0
- package/bundled-skills/hunt-springboot/SKILL.md +285 -0
- package/bundled-skills/hunt-sqli/SKILL.md +466 -0
- package/bundled-skills/hunt-ssrf/SKILL.md +396 -0
- package/bundled-skills/hunt-ssrf/references/details.md +179 -0
- package/bundled-skills/hunt-ssti/SKILL.md +163 -0
- package/bundled-skills/hunt-subdomain/SKILL.md +379 -0
- package/bundled-skills/hunt-tls-network/SKILL.md +399 -0
- package/bundled-skills/hunt-xxe/SKILL.md +466 -0
- package/bundled-skills/i-have-adhd/SKILL.md +170 -0
- package/bundled-skills/idea-evaluator/SKILL.md +75 -0
- package/bundled-skills/idea-evaluator/idea-evaluator-con/SKILL.md +64 -0
- package/bundled-skills/idea-evaluator/idea-evaluator-pro/SKILL.md +64 -0
- package/bundled-skills/identity-access-management/SKILL.md +382 -0
- package/bundled-skills/identity-access-management/references/details.md +524 -0
- package/bundled-skills/incident-management/SKILL.md +484 -0
- package/bundled-skills/incident-response/SKILL.md +448 -0
- package/bundled-skills/incident-response/references/details.md +113 -0
- package/bundled-skills/interview-me/SKILL.md +248 -0
- package/bundled-skills/iso27001-compliance/SKILL.md +460 -0
- package/bundled-skills/jenkins/SKILL.md +462 -0
- package/bundled-skills/jev-use/SKILL.md +158 -0
- package/bundled-skills/kubernetes-hardening/SKILL.md +154 -0
- package/bundled-skills/kubernetes-ops/SKILL.md +449 -0
- package/bundled-skills/kubernetes-ops/references/details.md +108 -0
- package/bundled-skills/kustomize/SKILL.md +478 -0
- package/bundled-skills/ledger-tasks-yylo/SKILL.md +219 -0
- package/bundled-skills/linux-administration/SKILL.md +367 -0
- package/bundled-skills/linux-hardening/SKILL.md +154 -0
- package/bundled-skills/llm-app-security/SKILL.md +389 -0
- package/bundled-skills/llm-app-security/references/details.md +674 -0
- package/bundled-skills/llm-caching/SKILL.md +334 -0
- package/bundled-skills/llm-cost-optimization/SKILL.md +311 -0
- package/bundled-skills/llm-fine-tuning/SKILL.md +329 -0
- package/bundled-skills/llm-gateway/SKILL.md +282 -0
- package/bundled-skills/llm-inference-scaling/SKILL.md +286 -0
- package/bundled-skills/llmops-platform-engineering/SKILL.md +472 -0
- package/bundled-skills/load-balancing/SKILL.md +403 -0
- package/bundled-skills/loki-logging/SKILL.md +479 -0
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package-lock.json +4 -4
- package/bundled-skills/loki-mode/examples/todo-app-generated/backend/package.json +1 -1
- package/bundled-skills/m365-entra-attack/SKILL.md +423 -0
- package/bundled-skills/mac-mini-llm-lab/SKILL.md +350 -0
- package/bundled-skills/mcp-server-security/SKILL.md +356 -0
- package/bundled-skills/mcp-server-security/references/details.md +745 -0
- package/bundled-skills/mdm-device-management/SKILL.md +404 -0
- package/bundled-skills/mdm-device-management/references/details.md +410 -0
- package/bundled-skills/meme-coin-audit/SKILL.md +402 -0
- package/bundled-skills/mid-engagement-ir-detection/SKILL.md +377 -0
- package/bundled-skills/model-registry-governance/SKILL.md +452 -0
- package/bundled-skills/model-serving-kubernetes/SKILL.md +339 -0
- package/bundled-skills/model-supply-chain-security/SKILL.md +427 -0
- package/bundled-skills/mongodb/SKILL.md +436 -0
- package/bundled-skills/multi-tenant-llm-hosting/SKILL.md +435 -0
- package/bundled-skills/multi-tenant-llm-hosting/references/details.md +211 -0
- package/bundled-skills/mysql/SKILL.md +390 -0
- package/bundled-skills/new-relic/SKILL.md +472 -0
- package/bundled-skills/nfs-storage/SKILL.md +356 -0
- package/bundled-skills/object-storage/SKILL.md +378 -0
- package/bundled-skills/offensive-osint/SKILL.md +443 -0
- package/bundled-skills/okta-attack/SKILL.md +436 -0
- package/bundled-skills/ollama-stack/SKILL.md +379 -0
- package/bundled-skills/openclaw-deployment-hardening/SKILL.md +135 -0
- package/bundled-skills/openclaw-local-mac-mini/SKILL.md +426 -0
- package/bundled-skills/openclaw-local-mac-mini/references/details.md +221 -0
- package/bundled-skills/openclaw-security-hardening/SKILL.md +135 -0
- package/bundled-skills/openshift/SKILL.md +485 -0
- package/bundled-skills/opentelemetry/SKILL.md +438 -0
- package/bundled-skills/opentelemetry/references/details.md +78 -0
- package/bundled-skills/opentofu-migration/SKILL.md +349 -0
- package/bundled-skills/osint-methodology/SKILL.md +460 -0
- package/bundled-skills/osint-methodology/references/details.md +1350 -0
- package/bundled-skills/pci-dss-compliance/SKILL.md +446 -0
- package/bundled-skills/penetration-testing/SKILL.md +152 -0
- package/bundled-skills/performance-tuning/SKILL.md +381 -0
- package/bundled-skills/plan-ledger-tasks-yylo/SKILL.md +52 -0
- package/bundled-skills/planetscale/SKILL.md +297 -0
- package/bundled-skills/platform-engineering/SKILL.md +348 -0
- package/bundled-skills/platform-engineering/references/details.md +944 -0
- package/bundled-skills/podman/SKILL.md +405 -0
- package/bundled-skills/policy-as-code/SKILL.md +434 -0
- package/bundled-skills/policy-as-code/references/details.md +204 -0
- package/bundled-skills/postgresql-devsec/SKILL.md +378 -0
- package/bundled-skills/prometheus-grafana/SKILL.md +469 -0
- package/bundled-skills/prompt-injection-defense/SKILL.md +483 -0
- package/bundled-skills/rag-infrastructure/SKILL.md +269 -0
- package/bundled-skills/rag-observability-evals/SKILL.md +444 -0
- package/bundled-skills/rag-observability-evals/references/details.md +92 -0
- package/bundled-skills/ralph-loop-yylo/SKILL.md +55 -0
- package/bundled-skills/ralph-loop-yylo/references/first_check.md +18 -0
- package/bundled-skills/ralph-loop-yylo/references/implement.md +60 -0
- package/bundled-skills/recon-scope-triage/SKILL.md +128 -0
- package/bundled-skills/redis/SKILL.md +421 -0
- package/bundled-skills/redteam-report-template/SKILL.md +370 -0
- package/bundled-skills/report-writing/SKILL.md +426 -0
- package/bundled-skills/report-writing/references/details.md +187 -0
- package/bundled-skills/resumable-implementation-contracts/SKILL.md +254 -0
- package/bundled-skills/reverse-proxy/SKILL.md +420 -0
- package/bundled-skills/runbook-creation/SKILL.md +438 -0
- package/bundled-skills/runbook-creation/references/details.md +71 -0
- package/bundled-skills/saas-security-posture/SKILL.md +415 -0
- package/bundled-skills/sast-scanning/SKILL.md +444 -0
- package/bundled-skills/sbom-supply-chain/SKILL.md +433 -0
- package/bundled-skills/security-arsenal/SKILL.md +446 -0
- package/bundled-skills/security-arsenal/references/details.md +540 -0
- package/bundled-skills/security-automation/SKILL.md +146 -0
- package/bundled-skills/semantic-versioning/SKILL.md +434 -0
- package/bundled-skills/semantic-versioning/references/details.md +83 -0
- package/bundled-skills/service-mesh/SKILL.md +422 -0
- package/bundled-skills/soc2-compliance/SKILL.md +409 -0
- package/bundled-skills/sops-encryption/SKILL.md +124 -0
- package/bundled-skills/sre-dashboards/SKILL.md +143 -0
- package/bundled-skills/ssh-configuration/SKILL.md +324 -0
- package/bundled-skills/ssl-tls-management/SKILL.md +428 -0
- package/bundled-skills/ssl-tls-management/references/details.md +99 -0
- package/bundled-skills/startup-it-troubleshooting/SKILL.md +415 -0
- package/bundled-skills/supply-chain-attack-recon/SKILL.md +453 -0
- package/bundled-skills/supply-chain-attack-recon/references/details.md +258 -0
- package/bundled-skills/systemd-services/SKILL.md +379 -0
- package/bundled-skills/terraform-aws/SKILL.md +125 -0
- package/bundled-skills/terraform-azure/SKILL.md +415 -0
- package/bundled-skills/terraform-azure/references/details.md +231 -0
- package/bundled-skills/terraform-gcp/SKILL.md +369 -0
- package/bundled-skills/threat-modeling/SKILL.md +487 -0
- package/bundled-skills/understand-project-yylo/SKILL.md +62 -0
- package/bundled-skills/user-management/SKILL.md +383 -0
- package/bundled-skills/using-agent-skills/SKILL.md +220 -0
- package/bundled-skills/vector-database-ops/SKILL.md +300 -0
- package/bundled-skills/vendor-management/SKILL.md +439 -0
- package/bundled-skills/vendor-management/references/details.md +109 -0
- package/bundled-skills/vercel-deployments/SKILL.md +296 -0
- package/bundled-skills/vllm-server/SKILL.md +236 -0
- package/bundled-skills/vmware-vcenter-attack/SKILL.md +412 -0
- package/bundled-skills/vpn-setup/SKILL.md +452 -0
- package/bundled-skills/vulnerability-scanning/SKILL.md +448 -0
- package/bundled-skills/waf-setup/SKILL.md +354 -0
- package/bundled-skills/waf-setup/references/details.md +211 -0
- package/bundled-skills/weather-model-data-fetching/SKILL.md +277 -0
- package/bundled-skills/weather-observation-fetching/SKILL.md +246 -0
- package/bundled-skills/web2-recon/SKILL.md +440 -0
- package/bundled-skills/web2-recon/references/details.md +319 -0
- package/bundled-skills/web3-audit/SKILL.md +445 -0
- package/bundled-skills/web3-audit/references/details.md +224 -0
- package/bundled-skills/wiki-yylo/SKILL.md +114 -0
- package/bundled-skills/windows-hardening/SKILL.md +454 -0
- package/bundled-skills/windows-hardening/references/details.md +204 -0
- package/bundled-skills/windows-server/SKILL.md +318 -0
- package/bundled-skills/workflow-yylo/SKILL.md +107 -0
- package/bundled-skills/zero-trust/SKILL.md +461 -0
- package/package.json +1 -1
- package/skills_index.json +6924 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: disaster-recovery
|
|
3
|
+
description: Implement disaster recovery strategies and runbooks. Configure RPO/RTO
|
|
4
|
+
targets and failover procedures. Use when planning for business continuity.
|
|
5
|
+
category: security
|
|
6
|
+
risk: safe
|
|
7
|
+
source: https://github.com/BagelHole/DevOps-Security-Agent-Skills
|
|
8
|
+
source_repo: BagelHole/DevOps-Security-Agent-Skills
|
|
9
|
+
source_type: community
|
|
10
|
+
date_added: '2026-09-20'
|
|
11
|
+
license: MIT
|
|
12
|
+
license_source: https://github.com/BagelHole/DevOps-Security-Agent-Skills/blob/main/LICENSE
|
|
13
|
+
compatibility: Checklist and framework guidance; no privileged tooling required. Apply
|
|
14
|
+
controls through your own change process.
|
|
15
|
+
metadata:
|
|
16
|
+
author: devops-skills
|
|
17
|
+
version: '1.0'
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Disaster Recovery
|
|
21
|
+
|
|
22
|
+
Implement disaster recovery strategies including RTO/RPO planning, AWS cross-region failover patterns, DR testing procedures, and automated failover scripts.
|
|
23
|
+
|
|
24
|
+
## RTO/RPO Planning
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
recovery_metrics:
|
|
28
|
+
RTO:
|
|
29
|
+
definition: "Recovery Time Objective - maximum acceptable downtime"
|
|
30
|
+
measurement: "From incident declaration to service restoration"
|
|
31
|
+
factors:
|
|
32
|
+
- Failover automation maturity
|
|
33
|
+
- Data replication lag
|
|
34
|
+
- DNS propagation time
|
|
35
|
+
- Application warm-up time
|
|
36
|
+
- Verification procedures
|
|
37
|
+
|
|
38
|
+
RPO:
|
|
39
|
+
definition: "Recovery Point Objective - maximum acceptable data loss"
|
|
40
|
+
measurement: "Time gap between last good backup and the incident"
|
|
41
|
+
factors:
|
|
42
|
+
- Backup frequency
|
|
43
|
+
- Replication method (sync vs. async)
|
|
44
|
+
- Transaction log shipping interval
|
|
45
|
+
- Cross-region replication lag
|
|
46
|
+
|
|
47
|
+
service_tier_targets:
|
|
48
|
+
tier_1_critical:
|
|
49
|
+
examples: "Authentication, payment processing, core API"
|
|
50
|
+
rto: "< 15 minutes"
|
|
51
|
+
rpo: "< 1 minute (near-zero)"
|
|
52
|
+
strategy: "Multi-site active-active or warm standby"
|
|
53
|
+
replication: "Synchronous or near-synchronous"
|
|
54
|
+
testing: "Quarterly failover test"
|
|
55
|
+
|
|
56
|
+
tier_2_essential:
|
|
57
|
+
examples: "Customer dashboards, reporting, notifications"
|
|
58
|
+
rto: "< 1 hour"
|
|
59
|
+
rpo: "< 15 minutes"
|
|
60
|
+
strategy: "Warm standby or pilot light"
|
|
61
|
+
replication: "Asynchronous with short interval"
|
|
62
|
+
testing: "Semi-annual failover test"
|
|
63
|
+
|
|
64
|
+
tier_3_standard:
|
|
65
|
+
examples: "Internal tools, analytics, batch processing"
|
|
66
|
+
rto: "< 4 hours"
|
|
67
|
+
rpo: "< 1 hour"
|
|
68
|
+
strategy: "Pilot light or backup and restore"
|
|
69
|
+
replication: "Periodic snapshots"
|
|
70
|
+
testing: "Annual failover test"
|
|
71
|
+
|
|
72
|
+
tier_4_non_essential:
|
|
73
|
+
examples: "Development environments, documentation sites"
|
|
74
|
+
rto: "< 24 hours"
|
|
75
|
+
rpo: "< 24 hours"
|
|
76
|
+
strategy: "Backup and restore"
|
|
77
|
+
replication: "Daily backups"
|
|
78
|
+
testing: "Annual backup restore verification"
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## DR Strategies Comparison
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
strategies:
|
|
85
|
+
backup_and_restore:
|
|
86
|
+
rto: "Hours"
|
|
87
|
+
rpo: "Hours (depends on backup frequency)"
|
|
88
|
+
cost: "$"
|
|
89
|
+
description: "Regular backups stored in DR region. Restore from backup when needed."
|
|
90
|
+
aws_services:
|
|
91
|
+
- "S3 cross-region replication for backups"
|
|
92
|
+
- "RDS automated snapshots copied to DR region"
|
|
93
|
+
- "AMI copies in DR region"
|
|
94
|
+
- "Terraform/CloudFormation for infrastructure rebuild"
|
|
95
|
+
pros: "Lowest cost, simplest to maintain"
|
|
96
|
+
cons: "Longest recovery time, highest data loss potential"
|
|
97
|
+
|
|
98
|
+
pilot_light:
|
|
99
|
+
rto: "Minutes to hours"
|
|
100
|
+
rpo: "Minutes"
|
|
101
|
+
cost: "$$"
|
|
102
|
+
description: "Core infrastructure running in DR region (databases replicated). Scale up compute on failover."
|
|
103
|
+
aws_services:
|
|
104
|
+
- "RDS cross-region read replica (always running)"
|
|
105
|
+
- "S3 cross-region replication"
|
|
106
|
+
- "AMIs pre-built in DR region"
|
|
107
|
+
- "Auto Scaling groups at zero/minimal capacity"
|
|
108
|
+
pros: "Fast database recovery, moderate cost"
|
|
109
|
+
cons: "Compute scale-up adds to recovery time"
|
|
110
|
+
|
|
111
|
+
warm_standby:
|
|
112
|
+
rto: "Minutes"
|
|
113
|
+
rpo: "Seconds to minutes"
|
|
114
|
+
cost: "$$$"
|
|
115
|
+
description: "Scaled-down but functional environment in DR region. Scale up on failover."
|
|
116
|
+
aws_services:
|
|
117
|
+
- "RDS cross-region read replica"
|
|
118
|
+
- "ECS/EKS running at reduced capacity"
|
|
119
|
+
- "Route53 health checks for automated DNS failover"
|
|
120
|
+
- "Global Accelerator for traffic management"
|
|
121
|
+
pros: "Fast failover, reduced risk"
|
|
122
|
+
cons: "Higher baseline cost for idle resources"
|
|
123
|
+
|
|
124
|
+
multi_site_active:
|
|
125
|
+
rto: "Near-zero"
|
|
126
|
+
rpo: "Near-zero"
|
|
127
|
+
cost: "$$$$"
|
|
128
|
+
description: "Active-active across regions. Traffic served from both regions simultaneously."
|
|
129
|
+
aws_services:
|
|
130
|
+
- "DynamoDB Global Tables or Aurora Global Database"
|
|
131
|
+
- "Route53 latency/weighted routing"
|
|
132
|
+
- "CloudFront with multi-origin"
|
|
133
|
+
- "Global Accelerator"
|
|
134
|
+
- "ECS/EKS in both regions"
|
|
135
|
+
pros: "Minimal downtime and data loss"
|
|
136
|
+
cons: "Highest cost, most complex to operate"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## AWS Cross-Region DR Implementation
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# === Database Replication ===
|
|
143
|
+
|
|
144
|
+
# Create cross-region RDS read replica
|
|
145
|
+
aws rds create-db-instance-read-replica \
|
|
146
|
+
--db-instance-identifier prod-db-dr-replica \
|
|
147
|
+
--source-db-instance-identifier arn:aws:rds:us-east-1:123456789012:db:prod-db \
|
|
148
|
+
--db-instance-class db.r6g.large \
|
|
149
|
+
--region us-west-2 \
|
|
150
|
+
--kms-key-id arn:aws:kms:us-west-2:123456789012:alias/rds-dr-key \
|
|
151
|
+
--multi-az \
|
|
152
|
+
--tags Key=Purpose,Value=DR Key=Environment,Value=production
|
|
153
|
+
|
|
154
|
+
# Create Aurora Global Database for near-zero RPO
|
|
155
|
+
aws rds create-global-cluster \
|
|
156
|
+
--global-cluster-identifier prod-global-db \
|
|
157
|
+
--source-db-cluster-identifier arn:aws:rds:us-east-1:123456789012:cluster:prod-aurora-cluster \
|
|
158
|
+
--region us-east-1
|
|
159
|
+
|
|
160
|
+
# Add secondary region to Aurora Global Database
|
|
161
|
+
aws rds create-db-cluster \
|
|
162
|
+
--db-cluster-identifier prod-aurora-dr \
|
|
163
|
+
--global-cluster-identifier prod-global-db \
|
|
164
|
+
--engine aurora-postgresql \
|
|
165
|
+
--region us-west-2 \
|
|
166
|
+
--kms-key-id arn:aws:kms:us-west-2:123456789012:alias/aurora-dr-key
|
|
167
|
+
|
|
168
|
+
# === Storage Replication ===
|
|
169
|
+
|
|
170
|
+
# S3 cross-region replication
|
|
171
|
+
cat > /tmp/replication-config.json << 'EOF'
|
|
172
|
+
{
|
|
173
|
+
"Role": "arn:aws:iam::123456789012:role/s3-replication-role",
|
|
174
|
+
"Rules": [
|
|
175
|
+
{
|
|
176
|
+
"ID": "ReplicateAll",
|
|
177
|
+
"Status": "Enabled",
|
|
178
|
+
"Filter": {"Prefix": ""},
|
|
179
|
+
"Destination": {
|
|
180
|
+
"Bucket": "arn:aws:s3:::prod-data-dr-usw2",
|
|
181
|
+
"StorageClass": "STANDARD",
|
|
182
|
+
"EncryptionConfiguration": {
|
|
183
|
+
"ReplicaKmsKeyID": "arn:aws:kms:us-west-2:123456789012:alias/s3-dr-key"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"DeleteMarkerReplication": {"Status": "Enabled"}
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
}
|
|
190
|
+
EOF
|
|
191
|
+
|
|
192
|
+
aws s3api put-bucket-replication \
|
|
193
|
+
--bucket prod-data-use1 \
|
|
194
|
+
--replication-configuration file:///tmp/replication-config.json
|
|
195
|
+
|
|
196
|
+
# === DNS Failover ===
|
|
197
|
+
|
|
198
|
+
# Route53 health check for primary region
|
|
199
|
+
aws route53 create-health-check --caller-reference "prod-health-$(date +%s)" \
|
|
200
|
+
--health-check-config '{
|
|
201
|
+
"Type": "HTTPS",
|
|
202
|
+
"FullyQualifiedDomainName": "api.example.com",
|
|
203
|
+
"Port": 443,
|
|
204
|
+
"ResourcePath": "/health",
|
|
205
|
+
"RequestInterval": 10,
|
|
206
|
+
"FailureThreshold": 3,
|
|
207
|
+
"EnableSNI": true
|
|
208
|
+
}'
|
|
209
|
+
|
|
210
|
+
# Configure failover routing
|
|
211
|
+
aws route53 change-resource-record-sets --hosted-zone-id Z123456 \
|
|
212
|
+
--change-batch '{
|
|
213
|
+
"Changes": [
|
|
214
|
+
{
|
|
215
|
+
"Action": "UPSERT",
|
|
216
|
+
"ResourceRecordSet": {
|
|
217
|
+
"Name": "api.example.com",
|
|
218
|
+
"Type": "A",
|
|
219
|
+
"SetIdentifier": "primary",
|
|
220
|
+
"Failover": "PRIMARY",
|
|
221
|
+
"AliasTarget": {
|
|
222
|
+
"HostedZoneId": "Z1234PRIMARY",
|
|
223
|
+
"DNSName": "primary-alb.us-east-1.elb.amazonaws.com",
|
|
224
|
+
"EvaluateTargetHealth": true
|
|
225
|
+
},
|
|
226
|
+
"HealthCheckId": "health-check-id-primary"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"Action": "UPSERT",
|
|
231
|
+
"ResourceRecordSet": {
|
|
232
|
+
"Name": "api.example.com",
|
|
233
|
+
"Type": "A",
|
|
234
|
+
"SetIdentifier": "secondary",
|
|
235
|
+
"Failover": "SECONDARY",
|
|
236
|
+
"AliasTarget": {
|
|
237
|
+
"HostedZoneId": "Z5678SECONDARY",
|
|
238
|
+
"DNSName": "dr-alb.us-west-2.elb.amazonaws.com",
|
|
239
|
+
"EvaluateTargetHealth": true
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
}'
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Failover Script
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
#!/usr/bin/env bash
|
|
251
|
+
# dr-failover.sh - Execute disaster recovery failover to DR region
|
|
252
|
+
set -euo pipefail
|
|
253
|
+
|
|
254
|
+
DR_REGION="us-west-2"
|
|
255
|
+
PRIMARY_REGION="us-east-1"
|
|
256
|
+
SLACK_WEBHOOK="${DR_SLACK_WEBHOOK}"
|
|
257
|
+
LOG_FILE="/var/log/dr-failover-$(date +%Y%m%d-%H%M%S).log"
|
|
258
|
+
|
|
259
|
+
log() {
|
|
260
|
+
echo "[$(date -u +%Y-%m-%dT%H:%M:%SZ)] $1" | tee -a "$LOG_FILE"
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
notify() {
|
|
264
|
+
curl -s -X POST "$SLACK_WEBHOOK" \
|
|
265
|
+
-H "Content-Type: application/json" \
|
|
266
|
+
-d "{\"text\":\"DR FAILOVER: $1\"}" > /dev/null
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
log "=== DR Failover Initiated ==="
|
|
270
|
+
notify "DR failover initiated to $DR_REGION"
|
|
271
|
+
|
|
272
|
+
# Step 1: Promote RDS read replica
|
|
273
|
+
log "Step 1: Promoting RDS read replica in $DR_REGION"
|
|
274
|
+
aws rds promote-read-replica \
|
|
275
|
+
--db-instance-identifier prod-db-dr-replica \
|
|
276
|
+
--region "$DR_REGION"
|
|
277
|
+
log "Waiting for RDS promotion to complete..."
|
|
278
|
+
aws rds wait db-instance-available \
|
|
279
|
+
--db-instance-identifier prod-db-dr-replica \
|
|
280
|
+
--region "$DR_REGION"
|
|
281
|
+
log "RDS promotion complete"
|
|
282
|
+
notify "RDS read replica promoted to primary in $DR_REGION"
|
|
283
|
+
|
|
284
|
+
# Step 2: Scale up application in DR region
|
|
285
|
+
log "Step 2: Scaling up application in $DR_REGION"
|
|
286
|
+
aws ecs update-service \
|
|
287
|
+
--cluster prod-cluster-dr \
|
|
288
|
+
--service api-service \
|
|
289
|
+
--desired-count 4 \
|
|
290
|
+
--region "$DR_REGION"
|
|
291
|
+
log "Waiting for ECS service to stabilize..."
|
|
292
|
+
aws ecs wait services-stable \
|
|
293
|
+
--cluster prod-cluster-dr \
|
|
294
|
+
--services api-service \
|
|
295
|
+
--region "$DR_REGION"
|
|
296
|
+
log "ECS service scaled up and stable"
|
|
297
|
+
notify "Application scaled up in $DR_REGION"
|
|
298
|
+
|
|
299
|
+
# Step 3: Verify health
|
|
300
|
+
log "Step 3: Verifying health in $DR_REGION"
|
|
301
|
+
for i in $(seq 1 10); do
|
|
302
|
+
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://dr-alb.us-west-2.elb.amazonaws.com/health")
|
|
303
|
+
if [ "$STATUS" = "200" ]; then
|
|
304
|
+
log "Health check passed (attempt $i)"
|
|
305
|
+
break
|
|
306
|
+
fi
|
|
307
|
+
log "Health check failed (attempt $i, status $STATUS), retrying..."
|
|
308
|
+
sleep 10
|
|
309
|
+
done
|
|
310
|
+
|
|
311
|
+
if [ "$STATUS" != "200" ]; then
|
|
312
|
+
log "ERROR: Health check failed after 10 attempts"
|
|
313
|
+
notify "ALERT: DR health check failing - manual intervention required"
|
|
314
|
+
exit 1
|
|
315
|
+
fi
|
|
316
|
+
|
|
317
|
+
# Step 4: Update DNS (if not using automatic Route53 failover)
|
|
318
|
+
log "Step 4: DNS failover (Route53 automatic failover should handle this)"
|
|
319
|
+
log "Verifying DNS resolution..."
|
|
320
|
+
DR_IP=$(dig +short api.example.com)
|
|
321
|
+
log "api.example.com resolves to: $DR_IP"
|
|
322
|
+
|
|
323
|
+
# Step 5: Verify end-to-end
|
|
324
|
+
log "Step 5: End-to-end verification"
|
|
325
|
+
RESPONSE=$(curl -s "https://api.example.com/health")
|
|
326
|
+
log "Health response: $RESPONSE"
|
|
327
|
+
|
|
328
|
+
log "=== DR Failover Complete ==="
|
|
329
|
+
notify "DR failover to $DR_REGION complete. Service restored."
|
|
330
|
+
|
|
331
|
+
# Generate failover report
|
|
332
|
+
cat > "/var/log/dr-failover-report-$(date +%Y%m%d).md" << EOF
|
|
333
|
+
# DR Failover Report
|
|
334
|
+
- **Date:** $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
|
335
|
+
- **Primary Region:** $PRIMARY_REGION
|
|
336
|
+
- **DR Region:** $DR_REGION
|
|
337
|
+
- **RTO Actual:** Calculate from incident declaration
|
|
338
|
+
- **RPO Actual:** Check replication lag at time of incident
|
|
339
|
+
- **Status:** Operational in DR region
|
|
340
|
+
- **Actions Required:**
|
|
341
|
+
- [ ] Monitor error rates and latency
|
|
342
|
+
- [ ] Plan failback when primary region is restored
|
|
343
|
+
- [ ] Conduct post-incident review
|
|
344
|
+
EOF
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
## Contents
|
|
349
|
+
|
|
350
|
+
- [DR Testing Procedures](references/details.md)
|
|
351
|
+
- [Terraform DR Infrastructure](references/details.md)
|
|
352
|
+
- [DR Compliance Checklist](references/details.md)
|
|
353
|
+
- [Best Practices](references/details.md)
|
|
354
|
+
|
|
355
|
+
## When to Use
|
|
356
|
+
|
|
357
|
+
- Defining RTO and RPO targets for critical systems
|
|
358
|
+
- Designing multi-region or multi-cloud disaster recovery architectures
|
|
359
|
+
- Implementing automated failover and failback procedures
|
|
360
|
+
- Conducting DR tests (tabletop, component, full failover)
|
|
361
|
+
- Meeting compliance requirements for contingency planning (SOC 2, HIPAA, FedRAMP, ISO 27001)
|
|
362
|
+
|
|
363
|
+
## Limitations
|
|
364
|
+
|
|
365
|
+
- Guidance and checklists only; not legal advice and not a substitute for a qualified auditor.
|
|
366
|
+
- Docs-only import: upstream templates and scripts not bundled.
|
|
367
|
+
|
|
368
|
+
### Example
|
|
369
|
+
|
|
370
|
+
```markdown
|
|
371
|
+
Map this skill's control checklist to our current evidence and list gaps.
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
> Adapted from [BagelHole/DevOps-Security-Agent-Skills](https://github.com/BagelHole/DevOps-Security-Agent-Skills) (MIT); frontmatter, When to Use/Limitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
# Details (moved from SKILL.md)
|
|
2
|
+
|
|
3
|
+
> Extended reference content for `disaster-recovery`, kept under `references/` so the entrypoint stays within the audit budget.
|
|
4
|
+
|
|
5
|
+
## DR Testing Procedures
|
|
6
|
+
|
|
7
|
+
```yaml
|
|
8
|
+
dr_test_types:
|
|
9
|
+
tabletop_exercise:
|
|
10
|
+
frequency: Quarterly
|
|
11
|
+
duration: "1-2 hours"
|
|
12
|
+
participants: "Engineering, SRE, management, communications"
|
|
13
|
+
process:
|
|
14
|
+
- Present a disaster scenario (region outage, data corruption, etc.)
|
|
15
|
+
- Walk through the response step by step
|
|
16
|
+
- Identify gaps in runbooks and communication plans
|
|
17
|
+
- Document action items
|
|
18
|
+
output: "Tabletop exercise report with findings and action items"
|
|
19
|
+
|
|
20
|
+
component_failover:
|
|
21
|
+
frequency: Monthly
|
|
22
|
+
duration: "1-4 hours"
|
|
23
|
+
scope: "Individual component failover (database, single service)"
|
|
24
|
+
process:
|
|
25
|
+
- Select component for testing
|
|
26
|
+
- Execute failover procedure from runbook
|
|
27
|
+
- Measure actual RTO and RPO
|
|
28
|
+
- Execute failback procedure
|
|
29
|
+
- Document results
|
|
30
|
+
output: "Component test report with measured RTO/RPO"
|
|
31
|
+
|
|
32
|
+
full_failover:
|
|
33
|
+
frequency: Annually
|
|
34
|
+
duration: "4-8 hours (scheduled maintenance window)"
|
|
35
|
+
scope: "Complete regional failover of all tier 1 and tier 2 services"
|
|
36
|
+
process:
|
|
37
|
+
1_preparation:
|
|
38
|
+
- Schedule maintenance window and notify stakeholders
|
|
39
|
+
- Verify DR environment is healthy
|
|
40
|
+
- Brief all participating teams
|
|
41
|
+
- Set up war room communication channel
|
|
42
|
+
2_execute:
|
|
43
|
+
- Simulate primary region failure
|
|
44
|
+
- Execute failover runbooks for all services
|
|
45
|
+
- Record timestamps at each milestone
|
|
46
|
+
3_verify:
|
|
47
|
+
- Run end-to-end test suite against DR environment
|
|
48
|
+
- Verify data consistency
|
|
49
|
+
- Check monitoring and alerting in DR region
|
|
50
|
+
- Confirm external integrations work
|
|
51
|
+
4_failback:
|
|
52
|
+
- Restore primary region
|
|
53
|
+
- Re-establish replication
|
|
54
|
+
- Execute failback to primary
|
|
55
|
+
- Verify data consistency post-failback
|
|
56
|
+
5_report:
|
|
57
|
+
- Document actual RTO and RPO for each service
|
|
58
|
+
- Compare against targets
|
|
59
|
+
- List all issues encountered
|
|
60
|
+
- Create action items for improvements
|
|
61
|
+
output: "Full DR test report with measured vs. target metrics"
|
|
62
|
+
|
|
63
|
+
dr_test_checklist:
|
|
64
|
+
before_test:
|
|
65
|
+
- [ ] Test plan documented and approved
|
|
66
|
+
- [ ] Maintenance window scheduled and communicated
|
|
67
|
+
- [ ] All DR runbooks reviewed and updated
|
|
68
|
+
- [ ] DR environment health verified
|
|
69
|
+
- [ ] Monitoring configured in DR region
|
|
70
|
+
- [ ] Communication channel established
|
|
71
|
+
- [ ] Rollback plan confirmed
|
|
72
|
+
|
|
73
|
+
during_test:
|
|
74
|
+
- [ ] Timestamps recorded for each step
|
|
75
|
+
- [ ] Screenshots captured for evidence
|
|
76
|
+
- [ ] Issues logged in real-time
|
|
77
|
+
- [ ] Data consistency verified
|
|
78
|
+
- [ ] External integrations tested
|
|
79
|
+
- [ ] Health checks passing in DR
|
|
80
|
+
|
|
81
|
+
after_test:
|
|
82
|
+
- [ ] Failback completed successfully
|
|
83
|
+
- [ ] Primary region replication re-established
|
|
84
|
+
- [ ] Data consistency verified post-failback
|
|
85
|
+
- [ ] Test report written with metrics
|
|
86
|
+
- [ ] Action items created and assigned
|
|
87
|
+
- [ ] Runbooks updated based on findings
|
|
88
|
+
- [ ] Results presented to management
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
## Terraform DR Infrastructure
|
|
93
|
+
|
|
94
|
+
```hcl
|
|
95
|
+
# DR region infrastructure
|
|
96
|
+
provider "aws" {
|
|
97
|
+
alias = "dr"
|
|
98
|
+
region = "us-west-2"
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
resource "aws_db_instance" "dr_replica" {
|
|
102
|
+
provider = aws.dr
|
|
103
|
+
identifier = "prod-db-dr-replica"
|
|
104
|
+
replicate_source_db = aws_db_instance.primary.arn
|
|
105
|
+
instance_class = "db.r6g.large"
|
|
106
|
+
storage_encrypted = true
|
|
107
|
+
kms_key_id = aws_kms_key.dr_rds.arn
|
|
108
|
+
multi_az = true
|
|
109
|
+
deletion_protection = true
|
|
110
|
+
skip_final_snapshot = false
|
|
111
|
+
|
|
112
|
+
tags = {
|
|
113
|
+
Purpose = "DR"
|
|
114
|
+
Environment = "production"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
resource "aws_route53_health_check" "primary" {
|
|
119
|
+
fqdn = "primary-alb.us-east-1.elb.amazonaws.com"
|
|
120
|
+
port = 443
|
|
121
|
+
type = "HTTPS"
|
|
122
|
+
resource_path = "/health"
|
|
123
|
+
failure_threshold = 3
|
|
124
|
+
request_interval = 10
|
|
125
|
+
enable_sni = true
|
|
126
|
+
|
|
127
|
+
tags = {
|
|
128
|
+
Name = "primary-health-check"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
resource "aws_route53_record" "failover_primary" {
|
|
133
|
+
zone_id = aws_route53_zone.main.zone_id
|
|
134
|
+
name = "api.example.com"
|
|
135
|
+
type = "A"
|
|
136
|
+
set_identifier = "primary"
|
|
137
|
+
|
|
138
|
+
failover_routing_policy {
|
|
139
|
+
type = "PRIMARY"
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
alias {
|
|
143
|
+
name = aws_lb.primary.dns_name
|
|
144
|
+
zone_id = aws_lb.primary.zone_id
|
|
145
|
+
evaluate_target_health = true
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
health_check_id = aws_route53_health_check.primary.id
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
resource "aws_route53_record" "failover_secondary" {
|
|
152
|
+
zone_id = aws_route53_zone.main.zone_id
|
|
153
|
+
name = "api.example.com"
|
|
154
|
+
type = "A"
|
|
155
|
+
set_identifier = "secondary"
|
|
156
|
+
|
|
157
|
+
failover_routing_policy {
|
|
158
|
+
type = "SECONDARY"
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
alias {
|
|
162
|
+
name = aws_lb.dr.dns_name
|
|
163
|
+
zone_id = aws_lb.dr.zone_id
|
|
164
|
+
evaluate_target_health = true
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
## DR Compliance Checklist
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
dr_compliance_checklist:
|
|
174
|
+
planning:
|
|
175
|
+
- [ ] RTO and RPO targets defined per service tier
|
|
176
|
+
- [ ] DR strategy selected based on targets and budget
|
|
177
|
+
- [ ] DR architecture documented with diagrams
|
|
178
|
+
- [ ] Failover and failback runbooks written
|
|
179
|
+
- [ ] Communication plan for DR events documented
|
|
180
|
+
- [ ] DR roles and responsibilities assigned
|
|
181
|
+
|
|
182
|
+
implementation:
|
|
183
|
+
- [ ] Cross-region database replication configured
|
|
184
|
+
- [ ] Storage replication configured (S3, EBS snapshots)
|
|
185
|
+
- [ ] DNS failover routing configured
|
|
186
|
+
- [ ] DR region infrastructure provisioned (IaC)
|
|
187
|
+
- [ ] Monitoring and alerting configured in DR region
|
|
188
|
+
- [ ] Secrets and credentials available in DR region
|
|
189
|
+
|
|
190
|
+
testing:
|
|
191
|
+
- [ ] Tabletop exercises conducted quarterly
|
|
192
|
+
- [ ] Component failover tests conducted monthly
|
|
193
|
+
- [ ] Full failover test conducted annually
|
|
194
|
+
- [ ] Actual RTO/RPO measured and compared to targets
|
|
195
|
+
- [ ] Test results documented and reviewed
|
|
196
|
+
- [ ] Runbooks updated based on test findings
|
|
197
|
+
|
|
198
|
+
operational:
|
|
199
|
+
- [ ] Replication lag monitored with alerting
|
|
200
|
+
- [ ] DR environment health checked regularly
|
|
201
|
+
- [ ] Backup integrity verified monthly
|
|
202
|
+
- [ ] DR runbooks reviewed and updated quarterly
|
|
203
|
+
- [ ] DR test evidence archived for compliance audits
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
## Best Practices
|
|
208
|
+
|
|
209
|
+
- Define RTO and RPO targets based on business impact analysis, not technical convenience
|
|
210
|
+
- Choose the DR strategy that matches your targets and budget: do not over-engineer or under-invest
|
|
211
|
+
- Automate failover as much as possible to reduce human error and recovery time
|
|
212
|
+
- Test DR procedures regularly at increasing levels of complexity (tabletop, component, full)
|
|
213
|
+
- Measure actual RTO and RPO during tests and compare against targets every time
|
|
214
|
+
- Include failback procedures in your DR plan: getting back to normal is as important as failing over
|
|
215
|
+
- Monitor replication lag continuously and alert when it exceeds RPO thresholds
|
|
216
|
+
- Keep DR infrastructure managed by the same IaC as production to prevent configuration drift
|
|
217
|
+
- Practice DR in non-emergency conditions so the team is prepared when a real disaster occurs
|
|
218
|
+
- Archive DR test results as compliance evidence for SOC 2, HIPAA, and other frameworks
|
|
219
|
+
|