试图在terraform中的Azure ML工作室中创建一个数据存储:
resource "azureml_datastore" "output_datastore" {
resource_group_name = var.resource_group_name
workspace_name = azurerm_machine_learning_workspace.AML.name
name = "outputdatastore"
storage_type = "AzureBlob"
storage_account_name = "bapstorageaccount945"
storage_container_name = "predictioncontainer"
auth {
credentials_type = "AccountKey"
account_key = "storage account primary key"
}
}它抛出以下错误:
Tenant_id错误:缺少必需的参数││参数“│”是必需的,但没有设置。Client_id错误:缺少必需的参数││参数“╵╷│”是必需的,但没有设置。Client_secret错误:缺少必需的参数││参数“╵╷│”是必需的,但没有设置。Subscription_id错误:缺少必需的参数││参数“╵╷│”是必需的,但没有设置。
当我添加上述属性时:
resource "azureml_datastore" "output_datastore" {
resource_group_name = var.resource_group_name
workspace_name = azurerm_machine_learning_workspace.AML.name
name = "outputdatastore"
storage_type = "AzureBlob"
storage_account_name = "bapstorageaccount945"
storage_container_name = "predictioncontainer"
auth {
credentials_type = "AccountKey"
tenant_id = "XXXX"
client_id = "Storage Account ID"
client_secret = "storage account primary key"
subscription_id = "XXXX"
account_key = "storage account primary key"
} 我得到以下错误:
│ Error: Unsupported argument
│
│ on MLStudio\main.tf line 74, in resource "azureml_datastore" "output_datastore":
│ 74: subscription_id = "XXXX"
│
│ An argument named "subscription_id" is not expected here.有人能帮我吗?
发布于 2022-09-12 18:52:28
缺少的参数错误用于provider块,而不是资源块:
provider "azureml" {
client_id = "Storage Account ID"
client_secret = "storage account primary key"
tenant_id = "XXXX"
subscription_id = "XXXX"
}您可以查看文档以获得更多信息。
https://stackoverflow.com/questions/73693359
复制相似问题