Commit 246221e
Fix test failures: validation enforcement and subnet count
**Fixes:**
1. **TestValidationMutualExclusivity** - Replace non-blocking `check` block with `null_resource` precondition
- Terraform `check` blocks only produce warnings, they don't fail the plan
- Added `null_resource` with lifecycle precondition to properly fail when both NAT placement methods are specified
- Added null provider (>= 3.0) to required_providers
- Test now correctly expects plan failure when `nat_gateway_public_subnet_indices` AND `nat_gateway_public_subnet_names` are both set
2. **TestNATPlacementByName** - Add explicit subnet counts to test fixture
- Test expected 4 public subnets (2 per AZ × 2 AZs) but only got 2
- Root cause: Missing `public_subnets_per_az_count` and `private_subnets_per_az_count` in test config
- The dynamic-subnets module requires both count AND names when using named subnets
- Added `public_subnets_per_az_count: 2` and `private_subnets_per_az_count: 2` to match the passing nat-by-index test pattern
**Files Changed:**
- src/main.tf: Removed `check` block, added `null_resource` with precondition and depends_on
- src/versions.tf: Added null provider requirement
- test/fixtures/stacks/catalog/usecase/nat-by-name.yaml: Added explicit subnet counts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 81658d1 commit 246221e
File tree
3 files changed
+22
-8
lines changed- src
- test/fixtures/stacks/catalog/usecase
3 files changed
+22
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | 99 | | |
108 | 100 | | |
109 | 101 | | |
| |||
151 | 143 | | |
152 | 144 | | |
153 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
154 | 159 | | |
155 | 160 | | |
156 | 161 | | |
157 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
158 | 166 | | |
159 | 167 | | |
160 | 168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
0 commit comments