output "evidence_bucket" { description = "Where manifests, memory images, hashes, and capture logs land." value = aws_s3_bucket.evidence.id } output "stage_avml" { description = "Run once, before you need it. AVML is Microsoft's open-source Linux memory capture tool." value = "aws s3 cp ./avml s3://${aws_s3_bucket.evidence.id}/${var.avml_key}" } output "status_topic" { description = "Subscribe the incident channel here." value = aws_sns_topic.status.arn } output "verify" { description = "Run a drill on a test instance and follow the evidence." value = <<-EOT aws ec2 create-tags --resources --tags Key=incident,Value=drill-1 aws s3 ls s3://${aws_s3_bucket.evidence.id}/incidents/drill-1/ --recursive # instance.json and manifest.json, each with a .sha256 aws s3 ls s3://${aws_s3_bucket.evidence.id}/memory/drill-1/ --recursive # the image and its sha256, once capture finishes aws s3api get-object-retention --bucket ${aws_s3_bucket.evidence.id} --key # a retain-until date: the lock is on aws s3 sync s3://${aws_s3_bucket.evidence.id}/incidents/drill-1/ ./evidence/incidents/drill-1/ aws s3 sync s3://${aws_s3_bucket.evidence.id}/memory/drill-1/ ./evidence/memory/drill-1/ evidence-verify -json verify-report.json ./evidence # PASSED; see iac.htora.dev/learn/evidence-verify/ aws ec2 describe-instances --instance-ids --query 'Reservations[].Instances[].Tags[?Key==`incident-status`]' aws ec2 terminate-instances --instance-ids # must be refused: termination protection is on EOT }