- Notifications
You must be signed in to change notification settings - Fork3
Commit9321b39
authored
fix: skip validating unknown version names (#123)
Same problem as seen in#115.This fixes a problem where having multiple template version namesmanually set using Terraform variables would always return a duplicatename error, as Terraform would mark the attribute, although it isrequired and already written in the config, as Unknown before callingour custom validator. This unknown value is only ever passed to thevalidator, never `Create` or `Update`.Knowing this, we see the same problem exists for all attributes we readin our custom validator. The only remaining one is `active`, where wecheck at least one version is marked as active. In this case, we alsoneed to skip validating `active` if any of the booleans are unknown.We previously didn't have any tests that explicitly used Terraformvariables, so this PR adds one, in case the behaviour of these variableset attributes is changed in the future.1 parent39ce21c commit9321b39
File tree
2 files changed
+74
-13
lines changed- internal/provider
2 files changed
+74
-13
lines changedLines changed: 18 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
896 | 896 |
| |
897 | 897 |
| |
898 | 898 |
| |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
899 | 912 |
| |
900 | 913 |
| |
901 | 914 |
| |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
902 | 920 |
| |
903 | 921 |
| |
904 | 922 |
| |
| |||
910 | 928 |
| |
911 | 929 |
| |
912 | 930 |
| |
913 |
| - | |
914 |
| - | |
915 |
| - | |
916 |
| - | |
917 |
| - | |
918 |
| - | |
919 |
| - | |
920 |
| - | |
921 |
| - | |
922 |
| - | |
923 |
| - | |
924 |
| - | |
925 |
| - | |
926 | 931 |
| |
927 | 932 |
| |
928 | 933 |
| |
|
Lines changed: 56 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
648 | 648 |
| |
649 | 649 |
| |
650 | 650 |
| |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
651 | 707 |
| |
652 | 708 |
| |
653 | 709 |
| |
|
0 commit comments
Comments
(0)