» azurerm_hdinsight_ml_services_cluster
Manages a HDInsight ML Services Cluster.
» Example Usage
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_storage_account" "example" {
name = "hdinsightstor"
resource_group_name = "${azurerm_resource_group.example.name}"
location = "${azurerm_resource_group.example.location}"
account_tier = "Standard"
account_replication_type = "LRS"
}
resource "azurerm_storage_container" "example" {
name = "hdinsight"
resource_group_name = "${azurerm_resource_group.example.name}"
storage_account_name = "${azurerm_storage_account.example.name}"
container_access_type = "private"
}
resource "azurerm_hdinsight_ml_services_cluster" "example" {
name = "example-hdicluster"
resource_group_name = "${azurerm_resource_group.example.name}"
location = "${azurerm_resource_group.example.location}"
cluster_version = "3.6"
tier = "Standard"
rstudio = true
gateway {
enabled = true
username = "acctestusrgw"
password = "TerrAform123!"
}
storage_account {
storage_container_id = "${azurerm_storage_container.example.id}"
storage_account_key = "${azurerm_storage_account.example.primary_access_key}"
is_default = true
}
roles {
head_node {
vm_size = "Standard_D3_v2"
username = "acctestusrvm"
password = "AccTestvdSC4daf986!"
}
worker_node {
vm_size = "Standard_D4_V2"
username = "acctestusrvm"
password = "AccTestvdSC4daf986!"
target_instance_count = 3
}
zookeeper_node {
vm_size = "Standard_D3_v2"
username = "acctestusrvm"
password = "AccTestvdSC4daf986!"
}
edge_node {
vm_size = "Standard_D3_v2"
username = "acctestusrvm"
password = "AccTestvdSC4daf986!"
}
}
}
» Argument Reference
The following arguments are supported:
-
name
- (Required) Specifies the name for this HDInsight ML Services Cluster. Changing this forces a new resource to be created. -
resource_group_name
- (Required) Specifies the name of the Resource Group in which this HDInsight ML Services Cluster should exist. Changing this forces a new resource to be created. -
location
- (Required) Specifies the Azure Region which this HDInsight ML Services Cluster should exist. Changing this forces a new resource to be created. -
cluster_version
- (Required) Specifies the Version of HDInsights which should be used for this Cluster. Changing this forces a new resource to be created. -
gateway
- (Required) Agateway
block as defined below. -
roles
- (Required) Aroles
block as defined below. -
rstudio
- (Required) Should R Studio community edition for ML Services be installed? Changing this forces a new resource to be created. -
storage_account
- (Required) One or morestorage_account
block as defined below. -
tier
- (Required) Specifies the Tier which should be used for this HDInsight ML Services Cluster. Possible values areStandard
orPremium
. Changing this forces a new resource to be created.
-
tags
- (Optional) A map of Tags which should be assigned to this HDInsight ML Services Cluster.
A gateway
block supports the following:
-
enabled
- (Required) Is the Ambari portal enabled? Changing this forces a new resource to be created. -
password
- (Required) The password used for the Ambari Portal. Changing this forces a new resource to be created.
NOTE: This password must be different from the one used for the head_node
, worker_node
and zookeeper_node
roles.
-
username
- (Required) The username used for the Ambari Portal. Changing this forces a new resource to be created.
A edge_node
block supports the following:
-
username
- (Required) The Username of the local administrator for the Edge Node. Changing this forces a new resource to be created. -
vm_size
- (Required) The Size of the Virtual Machine which should be used as the Edge Node. Changing this forces a new resource to be created. -
password
- (Optional) The Password associated with the local administrator for the Edge Node. Changing this forces a new resource to be created.
NOTE: If specified, this password must be at least 10 characters in length and must contain at least one digit, one uppercase and one lower case letter, one non-alphanumeric character (except characters ' " ` ).
-
ssh_keys
- (Optional) A list of SSH Keys which should be used for the local administrator on the Edge Node. Changing this forces a new resource to be created.
NOTE: Either a password
or one or more ssh_keys
must be specified - but not both.
-
subnet_id
- (Optional) The ID of the Subnet within the Virtual Network where the Edge Node should be provisioned within. Changing this forces a new resource to be created. -
virtual_network_id
- (Optional) The ID of the Virtual Network where the Edge Node should be provisioned within. Changing this forces a new resource to be created.
A head_node
block supports the following:
-
username
- (Required) The Username of the local administrator for the Head Nodes. Changing this forces a new resource to be created. -
vm_size
- (Required) The Size of the Virtual Machine which should be used as the Head Nodes. Changing this forces a new resource to be created. -
password
- (Optional) The Password associated with the local administrator for the Head Nodes. Changing this forces a new resource to be created.
NOTE: If specified, this password must be at least 10 characters in length and must contain at least one digit, one uppercase and one lower case letter, one non-alphanumeric character (except characters ' " ` ).
-
ssh_keys
- (Optional) A list of SSH Keys which should be used for the local administrator on the Head Nodes. Changing this forces a new resource to be created.
NOTE: Either a password
or one or more ssh_keys
must be specified - but not both.
-
subnet_id
- (Optional) The ID of the Subnet within the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created. -
virtual_network_id
- (Optional) The ID of the Virtual Network where the Head Nodes should be provisioned within. Changing this forces a new resource to be created.
A roles
block supports the following:
-
edge_node
- (Required) Aedge_node
block as defined above. -
head_node
- (Required) Ahead_node
block as defined above. -
worker_node
- (Required) Aworker_node
block as defined below. -
zookeeper_node
- (Required) Azookeeper_node
block as defined below.
A storage_account
block supports the following:
-
is_default
- (Required) Is this the Default Storage Account for the HDInsight ML Services Cluster? Changing this forces a new resource to be created.
NOTE: One of the storage_account
blocks must be marked as the default.
-
storage_account_key
- (Required) The Access Key which should be used to connect to the Storage Account. Changing this forces a new resource to be created. -
storage_container_id
- (Required) The ID of the Storage Container. Changing this forces a new resource to be created.
NOTE: This can be obtained from the id
of the azurerm_storage_container
resource.
A worker_node
block supports the following:
-
username
- (Required) The Username of the local administrator for the Worker Nodes. Changing this forces a new resource to be created. -
vm_size
- (Required) The Size of the Virtual Machine which should be used as the Worker Nodes. Changing this forces a new resource to be created. -
min_instance_count
- (Optional) The minimum number of instances which should be run for the Worker Nodes. Changing this forces a new resource to be created. -
password
- (Optional) The Password associated with the local administrator for the Worker Nodes. Changing this forces a new resource to be created.
NOTE: If specified, this password must be at least 10 characters in length and must contain at least one digit, one uppercase and one lower case letter, one non-alphanumeric character (except characters ' " ` ).
-
ssh_keys
- (Optional) A list of SSH Keys which should be used for the local administrator on the Worker Nodes. Changing this forces a new resource to be created.
NOTE: Either a password
or one or more ssh_keys
must be specified - but not both.
-
subnet_id
- (Optional) The ID of the Subnet within the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created. -
target_instance_count
- (Optional) The number of instances which should be run for the Worker Nodes. -
virtual_network_id
- (Optional) The ID of the Virtual Network where the Worker Nodes should be provisioned within. Changing this forces a new resource to be created.
A zookeeper_node
block supports the following:
-
username
- (Required) The Username of the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. -
vm_size
- (Required) The Size of the Virtual Machine which should be used as the Zookeeper Nodes. Changing this forces a new resource to be created. -
password
- (Optional) The Password associated with the local administrator for the Zookeeper Nodes. Changing this forces a new resource to be created. -
ssh_keys
- (Optional) A list of SSH Keys which should be used for the local administrator on the Zookeeper Nodes. Changing this forces a new resource to be created.
NOTE: Either a password
or one or more ssh_keys
must be specified - but not both.
-
subnet_id
- (Optional) The ID of the Subnet within the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created. -
virtual_network_id
- (Optional) The ID of the Virtual Network where the Zookeeper Nodes should be provisioned within. Changing this forces a new resource to be created.
» Attributes Reference
The following attributes are exported:
-
id
- The ID of the HDInsight ML Services Cluster. -
edge_ssh_endpoint
- The SSH Connectivity Endpoint for the Edge Node of the HDInsight ML Cluster. -
https_endpoint
- The HTTPS Connectivity Endpoint for this HDInsight ML Services Cluster. -
ssh_endpoint
- The SSH Connectivity Endpoint for this HDInsight ML Services Cluster.
» Import
HDInsight ML Services Clusters can be imported using the resource id
, e.g.
terraform import azurerm_hdinsight_ml_services_cluster.test /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.HDInsight/clusters/cluster1}