我是新来的。
我在网上寻找例如在Terraform(提供商“hashicorp/azurerm”)为创建一个链接的服务在突触链接到:
Azure SQL Server 2016
我的代码不起作用...
> resource "azurerm_synapse_linked_service"
> "synapse_linked_service_datalake" {
> depends_on = [module.add_synapse_firewall_rule0, azurerm_storage_data_lake_gen2_filesystem.datalake_fs,
> data.azurerm_storage_account.datalake, module.set_role_storage]
> name = "linked-service-to_${data.azurerm_storage_account.datalake.name}"
> synapse_workspace_id = azurerm_synapse_workspace.synapse.id
> type = "AzureBlobFS"
> type_properties_json = <<JSON
> {
> "connectionString": "DefaultEndpointsProtocol=https;AccountName=${data.azurerm_storage_account.datalake.name};AccountKey=${data.azurerm_storage_account.datalake.primary_access_key};EndpointSuffix=core.windows.net"
> }
> JSON }
字符串
我得到的错误…
2023-07-15T12:55:58.2894784Z [31m│[0m [0m "Name": "linked-service-to_XXXXXXXXX",
2023-07-15T12:55:58.2895043Z [31m│[0m [0m "Properties": {
2023-07-15T12:55:58.2895237Z [31m│[0m [0m "type": "AzureBlobFS",
2023-07-15T12:55:58.2895441Z [31m│[0m [0m "typeProperties": {}
2023-07-15T12:55:58.2895614Z [31m│[0m [0m }
2023-07-15T12:55:58.2895910Z [31m│[0m [0m} and error is Invalid linked service payload, the 'typeProperties' nested in payload is
型
空..
我在网上发现了这个,需要修改为阿兹存储帐户。
举个例子
resource "azurerm_synapse_linked_service" "cosmos" {
name = "synsv-powerbi-uksouth"
synapse_workspace_id = azurerm_synapse_workspace.synapse.id
type = "Azure Cosmos DB (SQL API)"
type_properties_json = <<JSON
{
"connectionString": "${azurerm_cosmosdb_account.cosmos.connection_strings[0]}Database=${azurerm_cosmosdb_sql_database.cosmos.name}"
}
JSON
depends_on = [
azurerm_synapse_firewall_rule.synapse
]
}
型
根据Terraform日志,下面的TF工作了,尽管我在Azure Synapse Studio中看不到新创建的Synapse“链接服务”...
resource "azurerm_synapse_linked_service" "synapse_linked_service_datalake" {
depends_on = [module.add_synapse_firewall_rule0, azurerm_storage_data_lake_gen2_filesystem.datalake_fs, data.azurerm_storage_account.datalake, module.set_role_storage]
name = "linked-service-to_${data.azurerm_storage_account.datalake.name}"
synapse_workspace_id = azurerm_synapse_workspace.synapse.id
type = "AzureBlobStorage"
type_properties_json = <<JSON
{
"connectionString": "DefaultEndpointsProtocol=https;AccountName=${data.azurerm_storage_account.datalake.name};AccountKey=${data.azurerm_storage_account.datalake.primary_access_key};EndpointSuffix=core.windows.net"
}
JSON
/* integration_runtime {
name = azurerm_synapse_integration_runtime_azure.synapse_integration_runtime.name
} */
}
型
2条答案
按热度按时间dbf7pr2w1#
它可能是这样的:
字符串
}
您还可以查看Terraform Registry上的官方文档,了解有关如何使用此提供程序的更多信息:
如果接受答案会有帮助的话告诉我。
5cnsuln72#
Terraform for Azure storage account(datalake)using 'default integration runtime'...
字符串
}