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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_machine_learning_compute_cluster subnet_resource_id should be optional, even though node_public_ip_enabled is false #25901

Closed
1 task done
hmrc87 opened this issue May 8, 2024 · 3 comments · Fixed by #26073

Comments

@hmrc87
Copy link
Contributor

hmrc87 commented May 8, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 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 hmrc87 changed the title subnet_resource_id should be optional, even though node_public_ip_enabled is false azurerm_machine_learning_compute_cluster subnet_resource_id should be optional, even though node_public_ip_enabled is false May 8, 2024
@hmrc87
Copy link
Contributor Author

hmrc87 commented May 13, 2024

@Lucasjuv @stephybun I saw that you committed the original addition of the constraint in 3e5769f

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.

stephybun added a commit that referenced this issue May 23, 2024
…nstraint: Respect Managed Vnet when creating compute clusters fixes #25901  (#26073)

* Respect ManagedVnet constraints when creating compute clusters

* Apply suggestions from code review

Co-authored-by: stephybun <steph@hashicorp.com>

* extend nil checks

* fix error statement

* add accidently removed ImportAsExistsErrore

* fix linting and test issues

---------

Co-authored-by: Hamade, Marcel  SF/HZA-ZC3P <hamadmrc@schaeffler.com>
Co-authored-by: stephybun <steph@hashicorp.com>
@github-actions github-actions bot added this to the v3.105.0 milestone May 23, 2024
Copy link

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!

Copy link

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 github-actions bot locked as resolved and limited conversation to collaborators Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.