Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: *_invitation life cycle clarification #756

Merged
merged 6 commits into from
Jun 17, 2022
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions website/docs/r/org_invitation.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ The [MongoDB Documentation](https://docs.atlas.mongodb.com/reference/user-roles/
* ORG_READ_ONLY
* ORG_MEMBER

~> **IMPORTANT:**
This resource is specifically to mange the invitations, not the user beyond that. Possible provider behavior depending on the invitee's action:
morey-tech marked this conversation as resolved.
Show resolved Hide resolved
* If the user has not yet accepted the invitation, the provider leaves the invitation as is.
* If the user has accepted the invitation and is now an organization member, the provider will remove the invitation from the Terraform state. The invitation must then be removed from the Terraform resource configuration.
* If the user accepts the invitation and then leaves the organization, the provider will re-add the invitation if the resource definition is not removed from the Terraform configuration.

## Example Usages

```terraform
Expand Down Expand Up @@ -69,13 +75,11 @@ In addition to the arguments, this resource exports the following attributes:
* `invitation_id` - Unique 24-hexadecimal digit string that identifies the invitation in Atlas.
* `inviter_username` - Atlas user who invited `username` to the organization.

> **NOTE**: Possible provider behavior depending on the invitee's action:
>* If the user has not yet accepted the invitation, the provider leaves the invitation as is.
>* If the user has accepted the invitation and is now an organization member, the provider will remove the invitation from the Terraform state. The invitation must then be removed from the Terraform resource configuration.
>* If the user accepts the invitation and then leaves the organization, the provider will re-add the invitation if the resource definition is not removed from the Terraform configuration.

## Import

~> **IMPORTANT:**
An organization invitation can **not** be imported once it has been accepted.

Import a user's invitation to an organization by separating the `org_id` and the `username` with a hyphen:


Expand Down
8 changes: 8 additions & 0 deletions website/docs/r/project_invitation.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ The [MongoDB Documentation](https://docs.atlas.mongodb.com/reference/user-roles/

-> **NOTE:** Groups and projects are synonymous terms. You may find GROUP-ID in the official documentation.

~> **IMPORTANT:** This resource is specifically to mange the invitations, not the user beyond that. Possible provider behavior depending on the invitee's action:
morey-tech marked this conversation as resolved.
Show resolved Hide resolved
* If the user has not yet accepted the invitation, the provider leaves the invitation as is.
* If the user has accepted the invitation and is now a project member, the provider will remove the invitation from the Terraform state. The invitation must then be removed from the Terraform resource configuration.
* If the user accepts the invitation and then leaves the project, the provider will re-add the invitation if the resource definition is not removed from the Terraform configuration.

## Example Usages

```terraform
Expand Down Expand Up @@ -65,6 +70,9 @@ In addition to all arguments above, the following attributes are exported:

## Import

~> **IMPORTANT:**
A project invitation can **not** be imported once it has been accepted.

Import a user's invitation to a project by separating the `project_id` and the `username` with a hyphen:

```
Expand Down