소스 정보
- 저장소
- tomevault-io/skills-registry
- 최근 소스 활동
- 2026년 7월 3일 19:45
- 감지된 SKILL.md 언어
- 영어
- 스타
- 0
- 포크
- 0
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill terraform-native-tests명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | terraform-native-tests |
| description | >- Use when this capability is needed. |
You guide the creation of .tftest.hcl files for Catalyst Terraform modules using the native test framework (Terraform 1.10+). You enforce the mandatory assertion set from AGENTS.md §6 and AGENTS.md (every module that touches IAM, encryption, or security must be tested).
Co-located with the module, named <module-name>.tftest.hcl:
infrastructure/modules/leaf/s3-secure-bucket/
main.tf
variables.tf
outputs.tf
s3-secure-bucket.tftest.hcl # <-- here
# s3-secure-bucket.tftest.hcl
variables {
name = "test-bucket"
environment = "dev"
kms_key_arn = "arn:aws:kms:us-east-1:123456789012:key/test-key-id"
tags = { TestRun = "true" }
}
run "creates_bucket_with_encryption" {
command = plan # plan-only — no real resources
assert {
condition = aws_s3_bucket.this.bucket == "test-bucket"
error_message = "Bucket name should match input"
}
assert {
condition = aws_s3_bucket_server_side_encryption_configuration.this.rule[0].apply_server_side_encryption_by_default[0].sse_algorithm == "aws:kms"
error_message = "Bucket must use KMS encryption"
}
}
run "denies_non_tls_access" {
command = plan
assert {
condition = can(regex("aws:SecureTransport", aws_s3_bucket_policy.this.policy))
error_message = "Bucket policy must enforce TLS-only access"
}
}
run "blocks_public_access" {
command = plan
assert {
condition = aws_s3_bucket_public_access_block.this.block_public_acls == true
error_message = "Block public ACLs must be enabled"
}
assert {
condition = aws_s3_bucket_public_access_block.this.block_public_policy == true
error_message = "Block public policy must be enabled"
}
assert {
condition = aws_s3_bucket_public_access_block.this.ignore_public_acls == true
error_message = "Ignore public ACLs must be enabled"
}
assert {
condition = aws_s3_bucket_public_access_block.this.restrict_public_buckets == true
error_message = "Restrict public buckets must be enabled"
}
}
run "versioning_enabled" {
command = plan
assert {
condition = aws_s3_bucket_versioning.this.versioning_configuration[0].status == "Enabled"
error_message = "Versioning must be enabled"
}
}
Per AGENTS.md §6 and AGENTS.md, every module MUST assert:
| Module type | Required assertions |
|---|---|
| Any with IAM | No "*" in Resource or Action of rendered policy |
| Any with encryption | KMS key ARN is set, SSE algorithm is aws:kms |
| Any with networking | Security groups have no 0.0.0.0/0 ingress (except ALB on 443) |
| All modules | At least one happy-path output value is non-empty |
# iam-role.tftest.hcl
run "no_wildcard_in_policy" {
command = plan
assert {
condition = !can(regex("\"\\*\"", data.aws_iam_policy_document.permissions.json))
error_message = "IAM policy must not contain wildcard '*' in Resource or Action"
}
}
run "trust_policy_matches_input" {
command = plan
assert {
condition = can(regex(var.trust_principal, aws_iam_role.this.assume_role_policy))
error_message = "Trust policy principal must match the input trust_principal"
}
}
# aurora-serverless-v2.tftest.hcl
variables {
cluster_name = "test-aurora"
environment = "dev"
kms_key_arn = "arn:aws:kms:us-east-1:123456789012:key/test"
min_acu = 0.5
max_acu = 4
vpc_id = "vpc-test"
subnet_ids = ["subnet-a", "subnet-b"]
tags = {}
}
run "iam_auth_enabled" {
command = plan
assert {
condition = aws_rds_cluster.this.iam_database_authentication_enabled == true
error_message = "IAM database authentication must be enabled"
}
}
run "storage_encrypted" {
command = plan
assert {
condition = aws_rds_cluster.this.storage_encrypted == true
error_message = "Storage encryption must be enabled"
}
}
run "deletion_protection" {
command = plan
assert {
condition = aws_rds_cluster.this.deletion_protection == true
error_message = "Deletion protection must be enabled"
}
}
run "acu_within_bounds" {
command = plan
assert {
condition = aws_rds_cluster.this.serverlessv2_scaling_configuration[0].min_capacity >= 0.5
error_message = "Min ACU must be >= 0.5"
}
assert {
condition = aws_rds_cluster.this.serverlessv2_scaling_configuration[0].max_capacity <= 16
error_message = "Max ACU must be <= 16"
}
}
# At the top of the test file, override provider config
provider "aws" {
region = "us-east-1"
# For plan-only tests, mock responses are sufficient
skip_credentials_validation = true
skip_metadata_api_check = true
skip_requesting_account_id = true
default_tags {
tags = {
TestRun = "true"
}
}
}
Tests run in the GitHub Actions PR workflow:
- name: Terraform Test
run: |
cd infrastructure/modules/leaf/s3-secure-bucket
terraform init
terraform test
Per AGENTS.md: do not bypass terraform test — it is the line-stop. Fix the code, don't disable the gate.
run block names use snake_case describing what is assertedrun block.tftest.hcl with variables block + run blocks covering the mandatory set.tftest.hcl before it can be merged.command = plan for assertion tests — no real resources needed.command = apply only for integration tests that verify real AWS behavior (rare, in infrastructure/tests/).Source: Cloud-Byte-Consulting/Catalyst — distributed by TomeVault.