-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
new resource - azurerm_machine_learning_compute_cluster
#11675
new resource - azurerm_machine_learning_compute_cluster
#11675
Conversation
azurerm/internal/services/machinelearning/machine_learning_compute_cluster_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/machinelearning/machine_learning_compute_cluster_resource.go
Outdated
Show resolved
Hide resolved
azurerm/internal/services/machinelearning/machine_learning_compute_cluster_resource.go
Outdated
Show resolved
Hide resolved
@aristosvo If you have time would be happy if you could review this as well. I tried to fix the requiresImport error, but I did not find what the issue is. I removed the update for now, as this is impossible to achieve with the current API. For the requiresImport I still get this error:
It seems like the computes/CC-21051207 part is unexpected, but why. I thought that I am using the correct parsers and I did not find any erroneous ones. But maybe you can find something?! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To solve your initial problem we can fix the test, haven't looked at the whole resource in detail
azurerm/internal/services/machinelearning/machine_learning_compute_cluster_resource_test.go
Outdated
Show resolved
Hide resolved
TEST SUMMARY: TF_ACC=1 go test -v ./azurerm/internal/services/machinelearning -run=TestAccComputeCluster -timeout 60m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc" |
azurerm_machine_learning_compute_cluster
azurerm_machine_learning_compute_cluster
azurerm/internal/services/machinelearning/machine_learning_compute_cluster_resource.go
Outdated
Show resolved
Hide resolved
44236cd
to
178d4ca
Compare
As there have been some small changes, I tested again and everything still looks good: TF_ACC=1 go test -v ./azurerm/internal/services/machinelearning -run=TestAccComputeCluster -timeout 60m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
2021/05/18 10:18:42 [DEBUG] not using binary driver name, it's no longer needed
2021/05/18 10:18:42 [DEBUG] not using binary driver name, it's no longer needed
=== RUN TestAccComputeCluster_basic
=== PAUSE TestAccComputeCluster_basic
=== RUN TestAccComputeCluster_requiresImport
=== PAUSE TestAccComputeCluster_requiresImport
=== CONT TestAccComputeCluster_basic
=== CONT TestAccComputeCluster_requiresImport
--- PASS: TestAccComputeCluster_basic (461.23s)
--- PASS: TestAccComputeCluster_requiresImport (472.31s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/machinelearning 476.998s |
My 2ct on the matter - since the cluster is ephemeral by design, we could potentially release these without ability to update the scale settings and basically recreate it every time, it's not a super time-consuming operation. While we're working with Service Team on fixing the swagger - people (we) could use this already and implement scaling updates once SDK has a fix? |
@katbyte Should look good as well now:) TF_ACC=1 go test -v ./azurerm/internal/services/machinelearning -run=TestAccComputeCluster -timeout 60m -ldflags="-X=github.com/terraform-providers/terraform-provider-azurerm/version.ProviderVersion=acc"
2021/05/20 11:10:17 [DEBUG] not using binary driver name, it's no longer needed
2021/05/20 11:10:17 [DEBUG] not using binary driver name, it's no longer needed
=== RUN TestAccComputeCluster_basic
=== PAUSE TestAccComputeCluster_basic
=== RUN TestAccComputeCluster_requiresImport
=== PAUSE TestAccComputeCluster_requiresImport
=== CONT TestAccComputeCluster_basic
=== CONT TestAccComputeCluster_requiresImport
--- PASS: TestAccComputeCluster_basic (764.75s)
--- PASS: TestAccComputeCluster_requiresImport (785.94s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/machinelearning 790.986s |
245103e
to
4a80be0
Compare
…rm_machine_learning_workspace` (hashicorp#11739)
4a80be0
to
51d5ca1
Compare
@katbyte @tombuildsstuff @aristosvo @favoretti @ArcturusZhang Microsoft informed us that they expect we could start implementing the update operation in August (fix in July, communication in August). The workaround for the time being to get unblocked would be to manually update the auto generated GO SDK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THanks @caius - just have a couple comments on schema bit otherwise this is looking good
|
||
* `scale_settings` - (Required) A `scale_settings` block as defined below. Changing this forces a new Machine Learning Compute Cluster to be created. | ||
|
||
* `vm_priority` - (Required) The priority of the VM. Changing this forces a new Machine Learning Compute Cluster to be created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what values are possible here? and can we validate against them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Options are "LowPriority" or "Dedicated", so possible we could validate that :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in new commit
## Arguments Reference | ||
|
||
The following arguments are supported: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we put name. location, worspace id first?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in new commit.
|
||
* `min_node_count` - (Required) Minimal node count. Changing this forces a new Machine Learning Compute Cluster to be created. | ||
|
||
* `node_idle_time_before_scale_down` - (Required) Node Idle Time Before Scale Down: defines the time until the compute is shutdown when it has gone into Idle state. Is defined according to W3C XML schema standard for duration. Changing this forces a new Machine Learning Compute Cluster to be created. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this make more sense as
* `node_idle_time_before_scale_down` - (Required) Node Idle Time Before Scale Down: defines the time until the compute is shutdown when it has gone into Idle state. Is defined according to W3C XML schema standard for duration. Changing this forces a new Machine Learning Compute Cluster to be created. | |
* `scale_down_nodes_after_idle_duration` - (Required) Node Idle Time Before Scale Down: defines the time until the compute is shutdown when it has gone into Idle state. Is defined according to W3C XML schema standard for duration. Changing this forces a new Machine Learning Compute Cluster to be created. |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the azure cli term used here: https://docs.azure.cn/zh-cn/cli/ext/azure-cli-ml/ml/computetarget/create?view=azure-cli-latest#ext_azure_cli_ml_az_ml_computetarget_create_amlcompute. But I agree that your proposal is more descriptive, so up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets use this more description one, we tend to change names to better match the terraform schema/provider the best UX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in newest commit
@katbyte Everything should be addressed now, could you test please, because I won't push for some hours now? I did not change the naming of |
address your comments inline above, just |
…_nodes_after_idle_duration
@katbyte I addressed your change and the tests should pass: TEST SUMMARY: === RUN TestAccComputeCluster_basic
=== PAUSE TestAccComputeCluster_basic
=== RUN TestAccComputeCluster_requiresImport
=== PAUSE TestAccComputeCluster_requiresImport
=== CONT TestAccComputeCluster_basic
=== CONT TestAccComputeCluster_requiresImport
--- PASS: TestAccComputeCluster_basic (515.41s)
--- PASS: TestAccComputeCluster_requiresImport (529.17s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/machinelearning 540.560s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @gro1m - LGTM 👍
This functionality has been released in v2.64.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! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Fixes #11254
Basic implementation for a Machine Learning Compute Cluster (without possibility to ssh into compute cluster). Unfortunately there are still some problems:
--- TEST SUMMARY ---