security

Enforce ephemeral passwords and IAM database authentication in Terraform configurations.

Updated Jan 20, 2026
One-click install
npx skills add https://github.com/poc-micro-frontends/terraform-infrastructure --skill security-poc-micro-frontends
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security
Source: https://github.com/poc-micro-frontends/terraform-infrastructure/tree/main/skills/security
Command: npx skills add https://github.com/poc-micro-frontends/terraform-infrastructure --skill security-poc-micro-frontends

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Terraform configurations frequently struggle with secret leakage (secrets in state) and overly permissive network access. This skill enforces best practices to prevent secret exposure and to implement least-privilege networking.

Core Features & Use Cases

  • Ephemeral password enforcement and IAM database authentication to ensure passwords are never stored in Terraform state.
  • Least-privilege security group guidance for Lambda, RDS, API Gateway, and ECS, avoiding open outbound/inbound rules such as 0.0.0.0/0.
  • Practical use cases and governance guidance for secure infrastructure patterns across AWS deployments.

Quick Start

Review your Terraform configurations and implement ephemeral password usage and least-privilege security group rules.

Frequently Asked Questions about security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent Terraform from storing RDS passwords in state?

To prevent Terraform from storing RDS passwords in state, enforce ephemeral passwords and implement IAM database authentication. This approach ensures sensitive credentials are dynamically generated and authenticated via AWS IAM rather than persisted in configuration files.

What is least-privilege networking for AWS Lambda and RDS security groups?

Least-privilege networking for AWS Lambda and RDS security groups involves configuring strict inbound and outbound rules that avoid open access like 0.0.0.0/0. This restricts network traffic to only necessary ports and IP ranges, minimizing attack surfaces.

How do I secure API Gateway and ECS security groups in Terraform?

To secure API Gateway and ECS security groups in Terraform, apply least-privilege rules by avoiding 0.0.0.0/0 inbound and outbound permissions. Restrict access to specific CIDR blocks and required ports for secure AWS deployments.

Does IAM database authentication work with Aurora and Secrets Manager in Terraform?

IAM database authentication works with Aurora and Secrets Manager in Terraform to manage ephemeral passwords securely. This integration prevents secret exposure by relying on temporary tokens instead of storing static database credentials in state files.

Why are my Terraform configurations leaking secrets into state?

Terraform configurations leak secrets into state when static passwords are defined directly in infrastructure code. Implementing ephemeral password enforcement and IAM database authentication prevents sensitive data like RDS credentials from being persisted in state files.