This repository is split into four groups:
demo/: Cloud-usable wrapper modulesdummy/: No-cloud AWS-shaped modules (thedemo/AWS chain plus EKS, RDS PostgreSQL and workload wiring)executors/: Dummy task modules for InfraKitchen executors (no cloud)test/: Focused test modules for validating InfraKitchen behavior
InfraKitchen runs OpenTofu (tofu) during dry-run, apply, destroy, and output extraction.
demo/00-dummy: Dummy module for demonstrating plan and apply. Uses only therandomprovider and built-interraform_data, so it needs no cloud provider or credentials.
demo/01-aws-account: Account bootstrap wrapper.demo/02-aws-vpc: VPC and subnet networking wrapper.demo/03-aws-redis: ElastiCache Redis wrapper.demo/04-aws-redis-iam: Redis IAM policy/user binding wrapper.
Modules 01-04 mirror the demo/ AWS chain with the same variables and outputs (04 adds a few extras); 05-09 add EKS and RDS PostgreSQL chains with AWS-shaped variables and outputs. Parent-child wiring can be exercised in InfraKitchen without AWS credentials. Resources are simulated with the random provider and built-in terraform_data; IDs, ARNs and endpoints are generated in AWS format from the inputs.
dummy/01-account: Dummy ofdemo/01-aws-account.dummy/02-vpc: Dummy ofdemo/02-aws-vpc.dummy/03-redis: Dummy ofdemo/03-aws-redis(vpc_idfromdummy/02-vpc).dummy/04-redis-iam: Dummy IAM Redis credentials for a service account, likedummy/09-rds-postgres-credentials; a superset ofdemo/04-aws-redis-iaminputs/outputs that addsredis_username,redis_user_arnandconnection_url(cluster_arn/iam_user_arn(oriam_user_read_only_arn)/redis_primary_endpointfromdummy/03-redis,aws_iam_role_namefromdummy/08-eks-service-account'siam_role_name).dummy/05-eks: Dummy EKS cluster with a managed node group, IAM roles and OIDC provider (vpc_idfromdummy/02-vpc, optionaladmin_role_arnfromdummy/01-account'scicd_admin_role_arn).dummy/06-rds-postgres: Dummy RDS PostgreSQL instance with subnet/parameter/security groups and a Secrets Manager-managed master password (vpc_idfromdummy/02-vpc).dummy/07-eks-namespace: Dummy Kubernetes namespace with a resource quota (cluster_namefromdummy/05-eks).dummy/08-eks-service-account: Dummy Kubernetes service account with an IRSA IAM role; outputsiam_role_arn(cluster_name/oidc_provider_arn/oidc_issuer_urlfromdummy/05-eks,namespacefromdummy/07-eks-namespace).dummy/09-rds-postgres-credentials: Dummy IAM database credentials, likedemo/04-aws-redis-iam: anrds_iamPostgreSQL user plus anrds-db:connectpolicy attached to the service account role (aws_iam_role_namefromdummy/08-eks-service-account'siam_role_name;db_instance_resource_id/db_instance_address/db_instance_port/db_namefromdummy/06-rds-postgres).
One-off task modules meant to be run by InfraKitchen executors. They use only the random provider and built-in terraform_data, so they need no cloud provider or credentials. Each module sets all its variables per environment in tfvars/{dev,staging,prod}.tfvars, passed with -var-file=tfvars/<env>.tfvars.
executors/01-db-migration: Simulates applying database migrations.executors/02-data-import: Simulates importing a dataset of records.executors/03-cleanup: Simulates removing stale items from a target.
test/01-variable-types: Validates InfraKitchen handling of multiple variable types.test/02-long-running: Validates InfraKitchen stability during a long-runningapply.test/03-intentional-failure: Validates InfraKitchen behavior when a module fails intentionally.test/04-parent-child-outputs: Validates parent-child module output wiring and inheritance behavior.test/05-terraform-opentofu-compat: Validates that the same module runs consistently on Terraform/OpenTofu-compatible syntax.
Use this flow for any module in demo/, dummy/, executors/ or test/:
- Import the template from this repo.
- Create a resource (and parent resource first when required by module chain).
- Run dry-run and verify the plan can be generated.
- Run provision and verify status moves to
provisioned. - Verify expected outputs are extracted and visible in resource outputs.
- Run destroy and verify cleanup succeeds.
test/01-variable-types: Variables are parsed correctly, form/schema generation works, and provision uses submitted values without type errors.test/02-long-running: Provision stays in progress for the expected duration and completes without timeout or worker crash.test/03-intentional-failure: Provision fails predictably, status is set to error, and logs expose the root cause.test/04-parent-child-outputs: Parent outputs are available for child input mapping, and child provisioning succeeds using inherited values.test/05-terraform-opentofu-compat: Module provisions successfully with InfraKitchen's OpenTofu runtime and only uses shared Terraform/OpenTofu language features.
If you want a strict dual-engine check for test/05-terraform-opentofu-compat, run the same module once with local terraform CLI and once with local tofu CLI outside InfraKitchen, then compare plan/apply/output behavior.