Testing Infrastructure Code

#5 - Infrastructure as Code - Kief Morris

Topic 12 of 17

Published Sep 7, 2020 · Clip 44:37–48:30 (3:53)

Kief discusses infrastructure testing, which is still immature with few tools. Unit tests have limited value for declarative code—testing that a subnet exists with a given range duplicates what the tool itself checks. Testing is more valuable at the aggregate level, e.g., verifying connectivity through subnets, gateways, and security groups. With general-purpose-language tools like Pulumi and CDK, reusable libraries with logic benefit from true unit tests using parameters and mocks, leveraging the full language ecosystem.