Add or remove a user from an organization.
Basic usage:
resource "tfe_organization_membership" "test" {
organization = "my-org-name"
email = "user@company.com"
}
The following arguments are supported:
organization
- (Optional) Name of the organization. If omitted, organization must be defined in the provider config.email
- (Required) Email of the user to add.In addition to all arguments above, the following attributes are exported:
id
- The organization membership ID.user_id
- The ID of the user associated with the organization membership.username
- The username of the user associated with the organization membership.Organization memberships can be imported using <ORGANIZATION>/<USER EMAIL>
or <ORGANIZATION MEMBERSHIP ID>
as the import ID. For
example:
terraform import tfe_organization_membership.test my-org-name/user@example.com
terraform import tfe_organization_membership.test ou-wAs3zYmWAhYK7peR