-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
r/datastore_cluster_vm_anti_affinity_rule: New resource #520
Merged
vancluever
merged 2 commits into
master
from
f-vsphere-datastore-cluster-vm-anti-affinity-rule-resource
May 11, 2018
Merged
r/datastore_cluster_vm_anti_affinity_rule: New resource #520
vancluever
merged 2 commits into
master
from
f-vsphere-datastore-cluster-vm-anti-affinity-rule-resource
May 11, 2018
Conversation
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
vancluever
added
enhancement
Type: Enhancement
new-resource
Feature: New Resource
labels
May 10, 2018
bill-rich
approved these changes
May 11, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment to address on the docs. Looks good other than that!
bill-rich
reviewed
May 11, 2018
|
||
The following arguments are supported: | ||
|
||
* `compute_cluster_id` - (Required) The [managed object reference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be datastore_cluster_id
Updated! |
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)
compute_cluster_id should be datastore_cluster_id and explain itself in the correct context of datastore clusters, not compute clusters.
vancluever
force-pushed
the
f-vsphere-datastore-cluster-vm-anti-affinity-rule-resource
branch
from
May 11, 2018 14:09
1e087d4
to
e370f1f
Compare
bill-rich
deleted the
f-vsphere-datastore-cluster-vm-anti-affinity-rule-resource
branch
November 17, 2018 00:36
ghost
locked and limited conversation to collaborators
Apr 18, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thecluster, 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 thelength of a glob of computed values - ie:
vsphere_virtual_machine.vm.*.id
, even when thecount
invsphere_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)