【问题标题】:How to create multiple azure RDS tenant using ARM template or terraform?如何使用 ARM 模板或 terraform 创建多个 Azure RDS 租户?
【发布时间】:2020-05-15 17:49:23
【问题描述】:

我找到了一种使用 terraform 创建一个 RDS 租户的方法:

resource "null_resource" "createTenant" {
  provisioner "local-exec" {
   command = <<EOT
    Add-RdsAccount -DeploymentUrl https://rdbroker.wvd.microsoft.com
    New-RdsTenant -Name ${var.tenant_name} -AadTenantId ${var.aad_tenant_id} -AzureSubscriptionId  ${var.subscription_id}
    New-RdsRoleAssignment -RoleDefinitionName "RDS Owner" -ApplicationId ${azuread_application.wvd_app.application_id} -TenantName ${var.tenant_name}
    New-RdsHostPool -TenantName ${var.tenant_name} -Name ${var.host_pool_name}
  EOT
interpreter = ["PowerShell", "-Command"]
  }
}

但在这种情况下,“terraform state”不会跟踪资源更改
所以这不是实现租户资源创建的可靠方法,也没有办法使用这个来实现或创建多个租户......

我们有任何 ARM 模板参考或资源吗????

【问题讨论】:

标签: azure terraform azure-resource-manager terraform-provider-azure azure-rm


【解决方案1】:

由于 terraform azurerm 提供程序中没有这方面的资源,因此无法在您所指的传统生命周期内轻松管理。

Microsoft 有一个专门用于远程桌面服务模板的存储库,位于:https://github.com/Azure/RDS-Templates

您可以将它包装在 PowerShell 中,以可重复的方式构建它的多个实例。

或者您可以考虑贡献azurerm 提供程序。如果您有兴趣这样做,这里有很好的文档:https://www.terraform.io/docs/extend/community/contributing.html

您还可以向azurerm 提供者提出问题以请求创建新资源:https://github.com/terraform-providers/terraform-provider-azurerm/issues

希望这会有所帮助!

【讨论】:

  • 谢谢@Lachie White 的帮助。这意味着我们目前没有任何针对 RDS-tenant 的自定义解决方案,因为它缺乏 terraform azurerm 提供者的资源,所以我们必须等待直到他们将其添加为新资源..所以现在没有解决方案
猜你喜欢
  • 1970-01-01
  • 2021-04-18
  • 2021-12-10
  • 2019-07-23
  • 2018-08-20
  • 1970-01-01
  • 2019-06-03
  • 1970-01-01
  • 2021-11-05
相关资源
最近更新 更多