Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_hdinsight_cluster deprecate min_instance_count #7272

Merged
merged 1 commit into from Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions azurerm/helpers/azure/hdinsight.go
Expand Up @@ -665,10 +665,13 @@ func SchemaHDInsightNodeDefinition(schemaLocation string, definition HDInsightNo
}

if definition.CanSpecifyInstanceCount {
// TODO 3.0: remove this property
result["min_instance_count"] = &schema.Schema{
Type: schema.TypeInt,
Optional: true,
ForceNew: true,
Computed: true,
Deprecated: "this has been deprecated from the API and will be removed in version 3.0 of the provider",
ValidateFunc: validation.IntBetween(definition.MinInstanceCount, definition.MaxInstanceCount),
}
result["target_instance_count"] = &schema.Schema{
Expand Down
Expand Up @@ -382,7 +382,6 @@ resource "azurerm_hdinsight_hbase_cluster" "import" {
dynamic "worker_node" {
for_each = lookup(roles.value, "worker_node", [])
content {
min_instance_count = lookup(worker_node.value, "min_instance_count", null)
password = lookup(worker_node.value, "password", null)
ssh_keys = lookup(worker_node.value, "ssh_keys", null)
subnet_id = lookup(worker_node.value, "subnet_id", null)
Expand Down
Expand Up @@ -384,7 +384,6 @@ resource "azurerm_hdinsight_interactive_query_cluster" "import" {
dynamic "worker_node" {
for_each = lookup(roles.value, "worker_node", [])
content {
min_instance_count = lookup(worker_node.value, "min_instance_count", null)
password = lookup(worker_node.value, "password", null)
ssh_keys = lookup(worker_node.value, "ssh_keys", null)
subnet_id = lookup(worker_node.value, "subnet_id", null)
Expand Down
Expand Up @@ -389,7 +389,6 @@ resource "azurerm_hdinsight_kafka_cluster" "import" {
dynamic "worker_node" {
for_each = lookup(roles.value, "worker_node", [])
content {
min_instance_count = lookup(worker_node.value, "min_instance_count", null)
number_of_disks_per_node = worker_node.value.number_of_disks_per_node
password = lookup(worker_node.value, "password", null)
ssh_keys = lookup(worker_node.value, "ssh_keys", null)
Expand Down
Expand Up @@ -334,7 +334,6 @@ resource "azurerm_hdinsight_ml_services_cluster" "import" {
dynamic "worker_node" {
for_each = lookup(roles.value, "worker_node", [])
content {
min_instance_count = lookup(worker_node.value, "min_instance_count", null)
password = lookup(worker_node.value, "password", null)
ssh_keys = lookup(worker_node.value, "ssh_keys", null)
subnet_id = lookup(worker_node.value, "subnet_id", null)
Expand Down
Expand Up @@ -334,7 +334,6 @@ resource "azurerm_hdinsight_rserver_cluster" "import" {
dynamic "worker_node" {
for_each = lookup(roles.value, "worker_node", [])
content {
min_instance_count = lookup(worker_node.value, "min_instance_count", null)
password = lookup(worker_node.value, "password", null)
ssh_keys = lookup(worker_node.value, "ssh_keys", null)
subnet_id = lookup(worker_node.value, "subnet_id", null)
Expand Down
Expand Up @@ -384,7 +384,6 @@ resource "azurerm_hdinsight_spark_cluster" "import" {
dynamic "worker_node" {
for_each = lookup(roles.value, "worker_node", [])
content {
min_instance_count = lookup(worker_node.value, "min_instance_count", null)
password = lookup(worker_node.value, "password", null)
ssh_keys = lookup(worker_node.value, "ssh_keys", null)
subnet_id = lookup(worker_node.value, "subnet_id", null)
Expand Down
Expand Up @@ -304,7 +304,6 @@ resource "azurerm_hdinsight_storm_cluster" "import" {
dynamic "worker_node" {
for_each = lookup(roles.value, "worker_node", [])
content {
min_instance_count = lookup(worker_node.value, "min_instance_count", null)
password = lookup(worker_node.value, "password", null)
ssh_keys = lookup(worker_node.value, "ssh_keys", null)
subnet_id = lookup(worker_node.value, "subnet_id", null)
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/hdinsight_hadoop_cluster.html.markdown
Expand Up @@ -200,7 +200,7 @@ A `worker_node` block supports the following:

* `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.
* `min_instance_count` - (Optional / **Deprecated** ) 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.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/hdinsight_hbase_cluster.html.markdown
Expand Up @@ -196,7 +196,7 @@ A `worker_node` block supports the following:

* `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.
* `min_instance_count` - (Optional / **Deprecated** ) 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.

Expand Down
Expand Up @@ -199,7 +199,7 @@ A `worker_node` block supports the following:

-> **NOTE:** High memory instances must be specified for the Head Node (Azure suggests a `Standard_D14_V2`).

* `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.
* `min_instance_count` - (Optional / **Deprecated** ) 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.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/hdinsight_kafka_cluster.html.markdown
Expand Up @@ -199,7 +199,7 @@ A `worker_node` block supports the following:

* `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.
* `min_instance_count` - (Optional / **Deprecated** ) 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.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/hdinsight_ml_services_cluster.html.markdown
Expand Up @@ -197,7 +197,7 @@ A `worker_node` block supports the following:

* `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.
* `min_instance_count` - (Optional / **Deprecated** ) 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.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/hdinsight_rserver_cluster.html.markdown
Expand Up @@ -195,7 +195,7 @@ A `worker_node` block supports the following:

* `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.
* `min_instance_count` - (Optional / **Deprecated** ) 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.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/hdinsight_spark_cluster.html.markdown
Expand Up @@ -196,7 +196,7 @@ A `worker_node` block supports the following:

* `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.
* `min_instance_count` - (Optional / **Deprecated** ) 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.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/hdinsight_storm_cluster.html.markdown
Expand Up @@ -182,7 +182,7 @@ A `worker_node` block supports the following:

* `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.
* `min_instance_count` - (Optional / **Deprecated** ) 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.

Expand Down