<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Build VM's with Terraform and Cluster Placement in VMware{code} Discussions</title>
    <link>https://communities.vmware.com/t5/VMware-code-Discussions/Build-VM-s-with-Terraform-and-Cluster-Placement/m-p/2959008#M2249</link>
    <description>&lt;P class=""&gt;Asking here since I may have asked in the wrong location...&lt;/P&gt;&lt;P class=""&gt;Im using Terraform to build VM's. We have specific roles defined for VM's (app, web, login, etc). In my main.tf I have the computer cluster name defined,&amp;nbsp;server/s gets built, configured and all is well.&lt;/P&gt;&lt;P class=""&gt;We currently have multiple clusters in vCenter. What Im running into now is lets say we have 8 servers for each role. I want terraform to balance them across the multiple clusters in vCenter and not place all the web servers on one cluster.&lt;/P&gt;&lt;P class=""&gt;How can I get VMWare to NOT put all 8 servers for a specific role on one host in the cluster? Either put 2 from each role type on 4 servers, or 4 on 2 different servers? I've used Anti-Affinity rules before but I dont think theres a way, using Terraform, to tell it which anti-affinity rule to use when deployed and the&amp;nbsp;&lt;SPAN&gt;vm's need to be created first before adding them to a VM/Host rule?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 13 Mar 2023 21:26:49 GMT</pubDate>
    <dc:creator>justinsmith</dc:creator>
    <dc:date>2023-03-13T21:26:49Z</dc:date>
    <item>
      <title>Build VM's with Terraform and Cluster Placement</title>
      <link>https://communities.vmware.com/t5/VMware-code-Discussions/Build-VM-s-with-Terraform-and-Cluster-Placement/m-p/2959008#M2249</link>
      <description>&lt;P class=""&gt;Asking here since I may have asked in the wrong location...&lt;/P&gt;&lt;P class=""&gt;Im using Terraform to build VM's. We have specific roles defined for VM's (app, web, login, etc). In my main.tf I have the computer cluster name defined,&amp;nbsp;server/s gets built, configured and all is well.&lt;/P&gt;&lt;P class=""&gt;We currently have multiple clusters in vCenter. What Im running into now is lets say we have 8 servers for each role. I want terraform to balance them across the multiple clusters in vCenter and not place all the web servers on one cluster.&lt;/P&gt;&lt;P class=""&gt;How can I get VMWare to NOT put all 8 servers for a specific role on one host in the cluster? Either put 2 from each role type on 4 servers, or 4 on 2 different servers? I've used Anti-Affinity rules before but I dont think theres a way, using Terraform, to tell it which anti-affinity rule to use when deployed and the&amp;nbsp;&lt;SPAN&gt;vm's need to be created first before adding them to a VM/Host rule?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Mar 2023 21:26:49 GMT</pubDate>
      <guid>https://communities.vmware.com/t5/VMware-code-Discussions/Build-VM-s-with-Terraform-and-Cluster-Placement/m-p/2959008#M2249</guid>
      <dc:creator>justinsmith</dc:creator>
      <dc:date>2023-03-13T21:26:49Z</dc:date>
    </item>
  </channel>
</rss>

