-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
r/datastore_cluster_vm_anti_affinity_rule: New resource
This contains the full CRUD/tests/docs for the vsphere_datastore_cluster_vm_anti_affinity_rule resource. One thing to note here - during testing, it was found that a virtual_machine_ids length of less than 2 is essentially a no-op on the cluster, resulting in no rules created. This was causing issues where the apply was succeeding but no rule was being returned, resulting in odd errors post-creation. In addition to this, we cannot restrict this with MinItems, as there currently seems to be an issue calculating the length of a glob of computed values - ie: vsphere_virtual_machine.vm.*.id, even when the count in vsphere_virtual_machine is static. If I'm assuming correctly, this is because when the computed/unknown value is seen, the entire field becomes unknown with a length of 1, regardless of if the final length is known beforehand. Further reading can be found at: hashicorp/terraform#14677 (comment)
- Loading branch information
1 parent
1ef325a
commit 8da3b28
Showing
7 changed files
with
1,087 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.