【问题标题】:Assign global permission on VCenter with Terraform vSphere provider使用 Terraform vSphere 提供程序在 vCenter 上分配全局权限
【发布时间】:2020-12-13 06:55:11
【问题描述】:

我正在尝试弄清楚如何使用 terraform 和 vsphere 提供程序在 vCenter 中分配全局权限。

到目前为止我有:

//== VSphere ==//
provider "vsphere" {
  user           = var.vsphere_username
  password       = var.vsphere_password
  vsphere_server = var.vsphere_server

  # If you have a self-signed cert
  allow_unverified_ssl = true
}

//== Example Role ==//
resource vsphere_role "example" {
  name = "Example Read"
  role_privileges = [
    "Datastore.Browse", 
    "Global.GlobalTag", 
    "Performance.ModifyIntervals"
  ]
}

//Taking syntax from terrafrom docs:
resource "vsphere_entity_permissions" p1 {

  # Is there a way to say "root/global" permission here?
  entity_id = data.vsphere_virtual_machine.vm1.id
  entity_type = "VirtualMachine"

  permissions {
    user_or_group = "mydomain\\my-group"
    propagate = true
    is_group = true
    role_id = vsphere_role.example.id
  }
}

目前有没有办法做到这一点? 谢谢!

【问题讨论】:

    标签: terraform vsphere vcenter


    【解决方案1】:

    不,今天不可用。

    全局权限通常由单独的基于 SSO 的 API 服务和 SDK 管理,与属于 vSphere Web 服务 API 的标准单一 vCenter 权限 API 服务不同。不幸的是,Terraform 和 vSphere 提供程序无法在幕后使用该单独的 SDK。

    【讨论】:

      猜你喜欢
      • 2020-10-17
      • 2021-07-07
      • 1970-01-01
      • 2018-08-03
      • 2020-07-21
      • 2021-05-29
      • 1970-01-01
      • 2021-08-04
      • 2020-08-31
      相关资源
      最近更新 更多