test(network): add terraform test coverage for network/aws and network/azure#19
Open
dmchaledev wants to merge 1 commit into
Open
test(network): add terraform test coverage for network/aws and network/azure#19dmchaledev wants to merge 1 commit into
dmchaledev wants to merge 1 commit into
Conversation
…k/azure The network modules were the only modules without .tftest.hcl files and were absent from the terraform-test CI job. This gap meant regressions in CIDR logic, conditional NAT/flow-log resources, or subnet counts could merge undetected. Adds: - modules/network/aws/tests/basic.tftest.hcl: apply test with mocked AZs, asserts all outputs populated and default subnet/NAT counts are correct - modules/network/aws/tests/feature_flags.tftest.hcl: plan tests for enable_nat_gateway=false, enable_flow_logs=false, and az_count=3 - modules/network/azure/tests/basic.tftest.hcl: apply test asserting all five outputs populated and the Postgres private DNS zone name is canonical - .github/workflows/ci.yml: adds network/aws and network/azure to the terraform-test job matrix https://claude.ai/code/session_01Q9JUkcA9TUZhWAp4FdzFWo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
network/awsandnetwork/azurewere the only modules without.tftest.hclfiles, and were absent from theterraform-testCI job. All six tier modules (single-vm, ha-hot-hot, unlimited-scale for both clouds) had coverage; the shared network foundation did not.Files added
modules/network/aws/tests/basic.tftest.hclname_prefixset; asserts all 7 outputs populated and default subnet/NAT counts matchaz_count=2modules/network/aws/tests/feature_flags.tftest.hclenable_nat_gateway=false(zero NAT GWs + EIPs),enable_flow_logs=false(zero CW log group / IAM role / flow log),az_count=3(three subnets per tier, three NAT GWs)modules/network/azure/tests/basic.tftest.hclprivate_dns_zone_nameis the canonical Postgres Flexible Server zonemock_data "aws_availability_zones"(Terraform 1.7+, supported by the CI-pinned 1.9.8) supplies synthetic AZ names soslice()in the locals block resolves without real AWS credentials.CI change
network/awsandnetwork/azureadded to theterraform-testjob matrix in.github/workflows/ci.yml.Test plan
terraform-testCI job passes fornetwork/awsandnetwork/azureterraform-testjobs still green (no matrix changes to them)validate,tflint,wrapper-forwarding, and other existing jobs unaffectedhttps://claude.ai/code/session_01Q9JUkcA9TUZhWAp4FdzFWo
Generated by Claude Code