From 576473444ee726cb6e48f9c76d9b1999da7bc425 Mon Sep 17 00:00:00 2001 From: Nicholas Morey Date: Wed, 15 Jun 2022 10:58:36 -0400 Subject: [PATCH 1/6] docs(project_invitation): add notes on invite life cycle --- website/docs/r/project_invitation.html.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/docs/r/project_invitation.html.markdown b/website/docs/r/project_invitation.html.markdown index e913f681ae..148283d676 100644 --- a/website/docs/r/project_invitation.html.markdown +++ b/website/docs/r/project_invitation.html.markdown @@ -23,6 +23,9 @@ 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. Once the invite is accepted, the resource will be missing from the state. Unless the `resource` block is removed, Terraform will attempt to create the invite again on the next apply. + ## Example Usages ```terraform @@ -65,6 +68,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: ``` From 442d997c79dbe0d4ada142bd6af70f4422c5327a Mon Sep 17 00:00:00 2001 From: Nicholas Morey Date: Wed, 15 Jun 2022 11:03:14 -0400 Subject: [PATCH 2/6] docs(org_invitation): add notes on invite life cycle --- website/docs/r/org_invitation.html.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/docs/r/org_invitation.html.markdown b/website/docs/r/org_invitation.html.markdown index b945460567..85dd6b66a8 100644 --- a/website/docs/r/org_invitation.html.markdown +++ b/website/docs/r/org_invitation.html.markdown @@ -20,6 +20,9 @@ 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. Once the invite is accepted, the resource will be missing from the state. Unless the `resource` block is removed, Terraform will attempt to create the invite again on the next apply. + ## Example Usages ```terraform @@ -76,6 +79,9 @@ In addition to the arguments, this resource exports the following attributes: ## Import +~> **IMPORTANT:** +A project 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: From c5a2eec88a4192939cd07089cbdbdad4b3d9283f Mon Sep 17 00:00:00 2001 From: Nicholas Morey Date: Thu, 16 Jun 2022 17:34:34 -0400 Subject: [PATCH 3/6] docs(org_invitation): integrate existing note --- website/docs/r/org_invitation.html.markdown | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/website/docs/r/org_invitation.html.markdown b/website/docs/r/org_invitation.html.markdown index 85dd6b66a8..e7af32b688 100644 --- a/website/docs/r/org_invitation.html.markdown +++ b/website/docs/r/org_invitation.html.markdown @@ -21,7 +21,10 @@ The [MongoDB Documentation](https://docs.atlas.mongodb.com/reference/user-roles/ * ORG_MEMBER ~> **IMPORTANT:** -This resource is specifically to mange the invitations, not the user beyond that. Once the invite is accepted, the resource will be missing from the state. Unless the `resource` block is removed, Terraform will attempt to create the invite again on the next apply. +This resource is specifically to mange the invitations, not the user beyond that. 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. ## Example Usages @@ -72,11 +75,6 @@ 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:** From ef65289bb824cec5297df9fae32a83f9660cc2f3 Mon Sep 17 00:00:00 2001 From: Nicholas Morey Date: Thu, 16 Jun 2022 17:35:43 -0400 Subject: [PATCH 4/6] docs(project_invitation): match org invitation note --- website/docs/r/project_invitation.html.markdown | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/docs/r/project_invitation.html.markdown b/website/docs/r/project_invitation.html.markdown index 148283d676..7e097b4867 100644 --- a/website/docs/r/project_invitation.html.markdown +++ b/website/docs/r/project_invitation.html.markdown @@ -23,8 +23,10 @@ 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. Once the invite is accepted, the resource will be missing from the state. Unless the `resource` block is removed, Terraform will attempt to create the invite again on the next apply. +~> **IMPORTANT:** This resource is specifically to mange the invitations, not the user beyond that. 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 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 From e19a00ee569be587de1092e6ba9212d783e14b41 Mon Sep 17 00:00:00 2001 From: Nicholas Morey Date: Thu, 16 Jun 2022 17:38:01 -0400 Subject: [PATCH 5/6] docs(org_invitation): fix reference to project --- website/docs/r/org_invitation.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/docs/r/org_invitation.html.markdown b/website/docs/r/org_invitation.html.markdown index e7af32b688..092959cf08 100644 --- a/website/docs/r/org_invitation.html.markdown +++ b/website/docs/r/org_invitation.html.markdown @@ -78,7 +78,7 @@ In addition to the arguments, this resource exports the following attributes: ## Import ~> **IMPORTANT:** -A project invitation can **not** be imported once it has been accepted. +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: From 0cd67573dd3dbc8c8d7754ef980accb631ab82cb Mon Sep 17 00:00:00 2001 From: Nicholas Morey Date: Fri, 17 Jun 2022 07:44:06 -0400 Subject: [PATCH 6/6] doc: clarify clarification for more clarity Thanks for the suggestions! Co-authored-by: Melissa Plunkett --- website/docs/r/org_invitation.html.markdown | 3 +-- website/docs/r/project_invitation.html.markdown | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/website/docs/r/org_invitation.html.markdown b/website/docs/r/org_invitation.html.markdown index 092959cf08..0b3cc808f2 100644 --- a/website/docs/r/org_invitation.html.markdown +++ b/website/docs/r/org_invitation.html.markdown @@ -20,8 +20,7 @@ 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: +~> **IMPORTANT:** This resource is only for managing invitations, not for managing the Atlas User being invited. 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. diff --git a/website/docs/r/project_invitation.html.markdown b/website/docs/r/project_invitation.html.markdown index 7e097b4867..206aa12daf 100644 --- a/website/docs/r/project_invitation.html.markdown +++ b/website/docs/r/project_invitation.html.markdown @@ -23,7 +23,7 @@ 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: +~> **IMPORTANT:** This resource is only for managing invitations, not for managing the Atlas User being invited. 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 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.