This message was deleted.
# general
s
This message was deleted.
g
Can you share your code for the cluster resource specifically?
g
Copy code
## Create vSphere Cluster(s)
cluster_list = []
def create_cluster():
    for x in all_hosts:
        cluster = [x['cluster']]
        for n in cluster:
            compCluster = vsphere.ComputeCluster(resource_name=n, datacenter_id=dc_list[0].moid,name=n,
                drs_enabled = cl_settings["drs_enabled"],
                drs_automation_level=cl_settings["drs_automation_level"],
                ha_enabled = cl_settings["ha_enabled"],
                ha_advanced_options = cl_settings["ha_advanced_options"],
                ha_admission_control_policy = 'disabled')
            x.update(clusterObject = compCluster)
    return cluster_list
create_cluster()
Copy code
cl_settings = {"drs_enabled": True, "drs_automation_level": 'fullyAutomated', "ha_enabled": True, 
               "ha_advanced_options":{'das.IgnoreInsufficientHbDatastore':'True',
               'das.IgnoreRedundantNetWarning':'True'}, "ha_admission_control_policy": 'disabled'}
g
You should be able to add it like this:
Copy code
opts=pulumi.ResourceOptions(depends_on=[other_resource])
g
UGH! I'm an idiot!
Hmm I think the issue is I'm actually adding the hosts directly into the cluster. So I can't even use dependsOn because the hosts aren't in the vCenter yet. Thanks though the depends_on option that helps future work!
👍 1