Commit 7083802
committed
fix(workload-identity): resolve inconsistent conditional result types in output
Fixes #1112
When use_existing_gcp_sa is unknown at plan time, Terraform fails with
'Inconsistent conditional result types' because data.google_service_account
and google_service_account.cluster_service_account have different object types.
The fix uses one(concat(...)) instead of a conditional expression:
- Only one list will ever have elements (based on count conditions)
- concat() avoids type comparison between the two different resource types
- one() extracts the single element from the concatenated list
This approach is type-safe and works regardless of when use_existing_gcp_sa
is known.1 parent a04f3ee commit 7083802
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
0 commit comments