Commit 1191aa1
fix: resolve perpetual Terraform plan diffs for workspace_profile and data_sources (#176)
* fix: add Computed to optional workspace_profile fields to prevent perpetual diff
Fields like sql_result_size, query_timeout_in_seconds, password_restriction,
external_url, and token duration fields are server-managed with defaults.
Without Computed, Terraform plans to null them when absent from HCL, but the
update never sends the change (field mask excludes them), causing a
perpetual diff.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: prevent data_sources perpetual diff from spurious redisType default
The API returns redisType: STANDALONE for all data sources regardless of
engine. The flatten function wrote this to state, changing the TypeSet hash
vs the config-side hash (which lacks redis_type for non-Redis instances).
Guard redis-specific fields behind an engine check so they only appear
in state for Redis instances.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent b106656 commit 1191aa1
3 files changed
Lines changed: 25 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
| 286 | + | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
| |||
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
| 325 | + | |
324 | 326 | | |
325 | 327 | | |
326 | 328 | | |
| |||
373 | 375 | | |
374 | 376 | | |
375 | 377 | | |
| 378 | + | |
376 | 379 | | |
377 | 380 | | |
378 | 381 | | |
379 | 382 | | |
380 | 383 | | |
| 384 | + | |
381 | 385 | | |
382 | 386 | | |
383 | 387 | | |
384 | 388 | | |
385 | 389 | | |
| 390 | + | |
386 | 391 | | |
387 | 392 | | |
388 | 393 | | |
389 | 394 | | |
390 | 395 | | |
391 | 396 | | |
| 397 | + | |
392 | 398 | | |
393 | 399 | | |
394 | 400 | | |
395 | 401 | | |
396 | 402 | | |
397 | 403 | | |
| 404 | + | |
398 | 405 | | |
399 | 406 | | |
400 | 407 | | |
401 | 408 | | |
402 | 409 | | |
403 | 410 | | |
404 | 411 | | |
| 412 | + | |
405 | 413 | | |
406 | 414 | | |
407 | 415 | | |
408 | 416 | | |
409 | 417 | | |
410 | 418 | | |
| 419 | + | |
411 | 420 | | |
412 | 421 | | |
413 | 422 | | |
414 | 423 | | |
415 | 424 | | |
| 425 | + | |
416 | 426 | | |
417 | 427 | | |
418 | 428 | | |
419 | 429 | | |
420 | 430 | | |
| 431 | + | |
421 | 432 | | |
422 | 433 | | |
423 | 434 | | |
424 | 435 | | |
425 | 436 | | |
| 437 | + | |
426 | 438 | | |
427 | 439 | | |
428 | 440 | | |
429 | 441 | | |
430 | 442 | | |
| 443 | + | |
431 | 444 | | |
432 | 445 | | |
433 | 446 | | |
434 | 447 | | |
435 | 448 | | |
| 449 | + | |
436 | 450 | | |
437 | 451 | | |
438 | 452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
965 | 965 | | |
966 | 966 | | |
967 | 967 | | |
968 | | - | |
| 968 | + | |
969 | 969 | | |
970 | 970 | | |
971 | 971 | | |
| |||
994 | 994 | | |
995 | 995 | | |
996 | 996 | | |
997 | | - | |
| 997 | + | |
998 | 998 | | |
999 | 999 | | |
1000 | 1000 | | |
| |||
1050 | 1050 | | |
1051 | 1051 | | |
1052 | 1052 | | |
1053 | | - | |
1054 | | - | |
1055 | | - | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
1056 | 1061 | | |
1057 | | - | |
1058 | | - | |
1059 | 1062 | | |
1060 | 1063 | | |
1061 | 1064 | | |
| |||
0 commit comments