-
Notifications
You must be signed in to change notification settings - Fork 87
resource_user
ArthurHlt edited this page Dec 11, 2019
·
2 revisions
Provides a Cloud Foundry resource for registering users. This resource provides extended functionality to attach additional UAA roles to the user.
~> NOTE: This resource requires the provider to be authenticated with an account granted admin permissions and UAA admin client. See related uaa documentation ~> NOTE: Create an existing user will not trigger any errors and will lead to retrieve id of existing user and update it.
The following example creates a user and attaches additional UAA roles to grant administrator rights to that user.
resource "cloudfoundry_user" "admin-service-user" {
name = "cf-admin"
password = "Passw0rd"
given_name = "John"
family_name = "Doe"
groups = [ "cloud_controller.admin", "scim.read", "scim.write" ]
}
The following arguments are supported:
-
name
- (Required) The name of the user. This will also be the users login name -
password
- (Optional) The user's password -
origin
- (Optional) The user authentcation origin. By default this will beUAA
. For users authenticated by LDAP this should beldap
-
given_name
- (Optional) The given name of the user -
family_name
- (Optional) The family name of the user -
email
- (Optional) The email address of the user. When not provided, name is used as email. -
groups
- (Optional) Any UAAgroups
/roles
to associated the user with
The following attributes are exported:
-
id
- The GUID of the User -
email
- If not provided this attributed will be assigned the same value as thename
, assuming that the username is the user's email address
An existing User can be imported using its guid, e.g.
$ terraform import cloudfoundry_user.admin-service-user a-guid
- cloudfoundry_app
- cloudfoundry_asg
- cloudfoundry_domain
- cloudfoundry_info
- cloudfoundry_isolation_segment
- cloudfoundry_org
- cloudfoundry_org_quota
- cloudfoundry_route
- cloudfoundry_router_group
- cloudfoundry_service
- cloudfoundry_service_instance
- cloudfoundry_service_key
- cloudfoundry_space
- cloudfoundry_space_quota
- cloudfoundry_stack
- cloudfoundry_user
- cloudfoundry_user_provided_service
- cloudfoundry_app
- cloudfoundry_asg
- cloudfoundry_buildpack
- cloudfoundry_default_asg
- cloudfoundry_domain
- cloudfoundry_evg
- cloudfoundry_feature_flag
- cloudfoundry_isolation_segment
- cloudfoundry_isolation_segment_entitlement
- cloudfoundry_network_policy
- cloudfoundry_org
- cloudfoundry_org_quota
- cloudfoundry_org_users
- cloudfoundry_private_domain_access
- cloudfoundry_route
- cloudfoundry_route_service_binding
- cloudfoundry_service_broker
- cloudfoundry_service_instance
- cloudfoundry_service_key
- cloudfoundry_service_plan_access
- cloudfoundry_space
- cloudfoundry_space_quota
- cloudfoundry_space_users
- cloudfoundry_user
- cloudfoundry_user_provided_service