Skip to content

add VM affinity policies#997

Merged
Haroon-Dweikat-Ntx merged 18 commits intonutanix:masterfrom
jcantrell-ntnx:feat/vm_affinity_policies
Mar 26, 2026
Merged

add VM affinity policies#997
Haroon-Dweikat-Ntx merged 18 commits intonutanix:masterfrom
jcantrell-ntnx:feat/vm_affinity_policies

Conversation

@jcantrell-ntnx
Copy link
Copy Markdown
Contributor

@jcantrell-ntnx jcantrell-ntnx commented Nov 2, 2025

Resolves #1005

Adds resources:

  • nutanix_vm_anti_affinity_policy_v2
  • nutanix_vm_host_affinity_policy_v2

Adds datasources:

  • nutanix_vm_anti_affinity_policy_v2
  • nutanix_vm_anti_affinity_poliices_v2
  • ntuanix_vm_host_affinity_policy_v2
  • nutanix_vm_host_affinity_policies_v2

@jcantrell-ntnx jcantrell-ntnx force-pushed the feat/vm_affinity_policies branch from 9ac6ade to f554c52 Compare November 2, 2025 02:21
@GullapalliAkhil
Copy link
Copy Markdown
Collaborator

@jcantrell-ntnx Thanks for the contribution. I see this branch has conflicts, please resolve them. Also can you please raise a improvement add all necessary details and link with this PR.

@jcantrell-ntnx jcantrell-ntnx force-pushed the feat/vm_affinity_policies branch from 8ee86d2 to 13d61de Compare November 5, 2025 21:17
@jcantrell-ntnx
Copy link
Copy Markdown
Contributor Author

Done and done. i wasn't sure what was being used to generate docs, but I'm happy to do that too if needed.

@GullapalliAkhil
Copy link
Copy Markdown
Collaborator

@jcantrell-ntnx For now, we typically build the docs manually to be cautious and avoid any chance of errors. Refer to the API documentation for developing the same.

@Haroon-Dweikat-Ntx
Copy link
Copy Markdown
Collaborator

hi @jcantrell-ntnx
can you please update the branch and the documentation for the implemented resources and datasources

Do it ASAP, we planned to take your changes in the next release 2.4.1
Thanks!

@jcantrell-ntnx jcantrell-ntnx force-pushed the feat/vm_affinity_policies branch from b1fe614 to e75fc24 Compare February 6, 2026 20:12
@jcantrell-ntnx
Copy link
Copy Markdown
Contributor Author

@Haroon-Dweikat-Ntx should be good now.

Copy link
Copy Markdown
Collaborator

@Haroon-Dweikat-Ntx Haroon-Dweikat-Ntx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jcantrell-ntnx
Please address the requested changes as soon as possible, we're planning to include this PR in release 2.4.1.

In addition, the documentation is missing for the new resources and data sources. Please add full docs for all newly implemented resources and data sources (e.g. in the provider docs/website).

Thanks.

Comment thread examples/vm_anti_affinity_policy_v2/main.tf Outdated
Comment thread examples/vm_host_affinity_policy_v2/main.tf Outdated
Comment thread nutanix/services/vmmv2/data_source_nutanix_vm_anti_affinity_policies_v2.go Outdated
Comment thread nutanix/services/vmmv2/data_source_nutanix_vm_anti_affinity_policies_v2.go Outdated
Comment thread nutanix/services/vmmv2/data_source_nutanix_vm_anti_affinity_policy_v2.go Outdated
Comment thread nutanix/services/vmmv2/resource_nutanix_vm_host_affinity_policy.go Outdated
Comment thread nutanix/services/vmmv2/resource_nutanix_vm_host_affinity_policy.go Outdated
Comment thread nutanix/services/vmmv2/resource_nutanix_vm_host_affinity_policy.go
Comment thread nutanix/services/vmmv2/resource_nutanix_vm_host_affinity_policy.go Outdated
Comment thread nutanix/services/vmmv2/resource_nutanix_vm_host_affinity_policy.go Outdated
@jcantrell-ntnx
Copy link
Copy Markdown
Contributor Author

Still need to add documentation, but code changes should be complete.

Copy link
Copy Markdown
Collaborator

@Haroon-Dweikat-Ntx Haroon-Dweikat-Ntx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @username, just a quick follow-up. Could you please take a look when you have a moment?

Comment thread website/docs/d/vm_anti_affinity_policy_v2.html.markdown Outdated
Comment thread website/docs/d/vm_anti_affinity_policies_v2.html.markdown
Comment thread nutanix/services/vmmv2/resource_nutanix_vm_anti_affinity_policy.go
Comment thread nutanix/services/vmmv2/resource_nutanix_vm_host_affinity_policy.go
Comment thread website/docs/r/vm_anti_affinity_policy_v2.html.markdown
Comment thread website/docs/r/vm_anti_affinity_policy_v2.html.markdown Outdated
Comment thread website/docs/r/vm_host_affinity_policy_v2.html.markdown Outdated
@Haroon-Dweikat-Ntx Haroon-Dweikat-Ntx merged commit 2f2e471 into nutanix:master Mar 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Development

Successfully merging this pull request may close these issues.

VM affinity policies are not implemented

3 participants