Skip to content

resource_space_users

ArthurHlt edited this page Aug 31, 2020 · 3 revisions

cloudfoundry_space_users

Provides a Cloud Foundry resource for managing Cloud Foundry space members.

~> NOTE: This resource requires the provider to be authenticated with an account granted at least with OrgManager permission. ~> NOTE: Only modify users managed in the resource, and ignore any existing other users provisioned elsewhere if not using force attribute.

Example Usage

The following example creates an org with a specific org-wide quota.

resource "cloudfoundry_space_users" "su1" {
    space    = "space-id"
    managers = [
        data.cloudfoundry_user.tl.id
    ]
    developers = [
        data.cloudfoundry_user.tl.id,
        data.cloudfoundry_user.dev1.id,
        data.cloudfoundry_user.dev2.id
    ]
    auditors = [
        data.cloudfoundry_user.adr.id,
        data.cloudfoundry_user.dev3.id
    ]
}

Argument Reference

The following arguments are supported:

  • space - (Required) Space associated guid.
  • managers - (Optional) List of users to assign SpaceManager role to. Defaults to empty list.
  • developers - (Optional) List of users to assign SpaceDeveloper role to. Defaults to empty list.
  • auditors - (Optional) List of users to assign SpaceAuditor role to. Defaults to empty list.
  • force - (Optional, Boolean) Set to true to enforce that users defined here will be only theses users defined (remove users roles from external modification).

Import

An existing Users list can be imported using its space guid, e.g.

$ terraform import cloudfoundry_space_users.su1 space-guid
Clone this wiki locally