[英]How to register resource providers using Azure fluent resource management?
[英]How to create azure machine learning resource using terraform resource providers?
我想使用 terraform 脚本创建 azure 机器学习工作区。是否有任何 terraform 提供程序可以实现这一点。
虽然 Charles 对此做了一些有效的工作,但我正在为 terraform-provider-azurerm 创建那些与机器学习相关的资源。 请查看此 PR: https : //github.com/terraform-providers/terraform-provider-azurerm/pull/5696
一旦此 PR 获得批准、合并和发布,您将能够使用 terraform 本机创建 ML 工作区。 其他与机器学习相关的资源也在如期进行。
与此同时,微软在 Azure Provider 中为 ML Workspace 添加了 Terraform 资源。 这应该会使任何自定义脚本过时。
https://www.terraform.io/docs/providers/azurerm/r/machine_learning_workspace.html
resource "azurerm_machine_learning_workspace" "example" {
name = "example-workspace"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
application_insights_id = azurerm_application_insights.example.id
key_vault_id = azurerm_key_vault.example.id
storage_account_id = azurerm_storage_account.example.id
identity {
type = "SystemAssigned"
}
}
据我所知,Terraform 没有在 Azure 提供商中提供 API 来创建 Azure 机器学习。
因此,根据我的经验,您只能借助Azure 模板和 Azure 工具(例如 Terraform 脚本中的Azure CLI)来实现您的目的。
如果使用 Azure 模板,则可以使用模型azurerm_template_deployment
执行模板以创建 ML。
如果要使用 Azure CLI,则可以使用模型null_resource
在本地执行 CLI 命令。 您可以按照此处的步骤操作。 这里也是 Terraform 的示例:
resource "null_resource" "cluster" {
provisioner "local-exec" {
# here is your CLI command to create the ML
command = ""
}
}
检查这个 - https://www.terraform.io/docs/providers/azurerm/r/cognitive_account.html
但我认为那里没有直接模块,您可以查看官方 terraform 文档 - https://www.terraform.io/docs/providers/azurerm/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.