switch (hostGroupData.getHostGroupType()) {
case HOST_GROUP_TYPE_RAW:
datacenter = new RawDatacenterManager();
break;
case HOST_GROUP_TYPE_AMAZON_EC2:
HostGroupSecretData secretData = computeSecrets.getSecretData(hostGroupData);
datacenter = new Ec2DatacenterManager(hostGroupData, secretData);
break;
default:
throw new IllegalStateException();
}