terraform-provider-azurerm icon indicating copy to clipboard operation
terraform-provider-azurerm copied to clipboard

azurerm_machine_learning_compute_cluster subnet_resource_id should be optional, even though node_public_ip_enabled is false

Open hmrc87 opened this issue 9 months ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Terraform Version

1.8.2

AzureRM Provider Version

3.98.0

Affected Resource(s)/Data Source(s)

azurerm_machine_learning_compute_cluster

Terraform Configuration Files

esource "azurerm_machine_learning_compute_cluster" "default_compute_cluster" {
  name                          = var.default_compute_cluster_name
  location                      = var.location
  vm_priority                   = "Dedicated"
  vm_size                       = var.default_compute_cluster_vm_size
  machine_learning_workspace_id = azurerm_machine_learning_workspace.mlw.id

  node_public_ip_enabled    = false
  ssh_public_access_enabled = false

  scale_settings {
    min_node_count                       = 0
    max_node_count                       = 4
    scale_down_nodes_after_idle_duration = "PT3600S" # 3600 seconds
  }

  identity {
    type = "SystemAssigned"
  }
}

Debug Output/Panic Output

Error: `subnet_resource_id` must be set if `node_public_ip_enabled` is set to `false`

Expected Behaviour

Since we are in a private networking scenario with a Managed VNET I don't have to provide the subnetid in the Azure MLW UI.

I have created a compute cluster manually in my scenario via Azure UI and it says subnetid NULL and "enableNodePublicIp": false


`  "id": ".../subscriptions/xxx/d-cpu-ds11",
  "name": "d-cpu-ds11",
  "type": "Microsoft.MachineLearningServices/workspaces/computes",
  "location": "westeurope",
  "tags": {},
  "identity": {
    "type": "SystemAssigned",
    "principalId": "xx-acf2-4c56-9e8b-xx",
    "tenantId": "xx-6509-4014-9859-xx"
  },
  "properties": {
    "createdOn": "2024-04-08T13:38:57.6595494+00:00",
    "modifiedOn": "2024-04-08T13:47:46.1190125+00:00",
    "disableLocalAuth": true,
    "description": null,
    "resourceId": null,
    "computeType": "AmlCompute",
    "computeLocation": "westeurope",
    "provisioningState": "Succeeded",
    "provisioningErrors": null,
    "provisioningWarnings": {},
    "isAttachedCompute": false,
    "properties": {
      "vmSize": "Standard_DS11_v2",
      "vmPriority": "Dedicated",
      "scaleSettings": {
        "maxNodeCount": 1,
        "minNodeCount": 0,
        "nodeIdleTimeBeforeScaleDown": "PT2M"
      },
      "subnet": null,
      "currentNodeCount": 0,
      "targetNodeCount": 0,
      "nodeStateCounts": {
        "preparingNodeCount": 0,
        "runningNodeCount": 0,
        "idleNodeCount": 0,
        "unusableNodeCount": 0,
        "leavingNodeCount": 0,
        "preemptedNodeCount": 0
      },
      "allocationState": "Steady",
      "allocationStateTransitionTime": "2024-04-22T09:39:29.695+00:00",
      "errors": null,
      "remoteLoginPortPublicAccess": "Disabled",
      "osType": "Linux",
      "virtualMachineImage": null,
      "isolatedNetwork": false,
      "enableNodePublicIp": false,
      "enableBatchPrivateLink": false,
      "propertyBag": {}
    }
  }
}

Actual Behaviour

Error: subnet_resource_id must be set if node_public_ip_enabled is set to false

Steps to Reproduce

No response

Important Factoids

No response

References

No response

hmrc87 avatar May 08 '24 10:05 hmrc87

@Lucasjuv @stephybun I saw that you committed the original addition of the constraint in https://github.com/hashicorp/terraform-provider-azurerm/commit/3e5769fdf6911f1cba84d25c5ce6802a458795dc

However in a private networking scenario with a managed net I can setup a compute without public ip and without an explicit subnetid via the azure ui as described above.

hmrc87 avatar May 13 '24 08:05 hmrc87

This functionality has been released in v3.105.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] avatar May 24 '24 09:05 github-actions[bot]

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Jun 24 '24 02:06 github-actions[bot]