vsphere/resource_vsphere_compute_cluster_vm_dependency_rule.go
func expandClusterDependencyRuleInfo(d *schema.ResourceData) (*types.ClusterDependencyRuleInfo, error) {
	obj := &types.ClusterDependencyRuleInfo{
		ClusterRuleInfo: types.ClusterRuleInfo{
			Enabled:     structure.GetBool(d, "enabled"),
			Mandatory:   structure.GetBool(d, "mandatory"),
			Name:        d.Get("name").(string),
			UserCreated: structure.BoolPtr(true),
		},
		DependsOnVmGroup: d.Get("dependency_vm_group_name").(string),
		VmGroup:          d.Get("vm_group_name").(string),
	}
	return obj, nil
}
func expandClusterDependencyRuleInfo(d *schema.ResourceData) (*types.ClusterDependencyRuleInfo, error) {
	obj := &types.ClusterDependencyRuleInfo{
		ClusterRuleInfo: types.ClusterRuleInfo{
			Enabled:     structure.GetBool(d, "enabled"),
			Mandatory:   structure.GetBool(d, "mandatory"),
			Name:        d.Get("name").(string),
			UserCreated: structure.BoolPtr(true),
		},
		DependsOnVmGroup: d.Get("dependency_vm_group_name").(string),
		VmGroup:          d.Get("vm_group_name").(string),
	}
	return obj, nil
}
// expandClusterDependencyRuleInfo reads certain ResourceData keys and returns a
// ClusterDependencyRuleInfo.