Skip to content

Commit 6a13f33

Browse files
authored
chore: Deprecates User and Invitations resources, data sources and attributes (#3613)
1 parent e2b1793 commit 6a13f33

23 files changed

+155
-29
lines changed

.changelog/3613.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
```release-note:note
2+
data-source/mongodbatlas_atlas_user: Deprecates the data source
3+
```
4+
5+
```release-note:note
6+
data-source/mongodbatlas_atlas_users: Deprecates the data source
7+
```
8+
9+
```release-note:note
10+
data-source/mongodbatlas_atlas_user: Deprecates `email_address` attribute
11+
```
12+
13+
```release-note:note
14+
data-source/mongodbatlas_atlas_users: Deprecates `results.email_address` attribute
15+
```
16+
17+
```release-note:note
18+
resource/mongodbatlas_org_invitation: Deprecates the resource
19+
```
20+
21+
```release-note:note
22+
data-source/mongodbatlas_org_invitation: Deprecates the data source
23+
```
24+
25+
```release-note:note
26+
resource/mongodbatlas_project_invitation: Deprecates the resource
27+
```
28+
29+
```release-note:note
30+
data-source/mongodbatlas_project_invitation: Deprecates the data source
31+
```
32+
33+
```release-note:note
34+
resource/mongodbatlas_project: Deprecates `teams` attribute
35+
```
36+
37+
```release-note:note
38+
data-source/mongodbatlas_project: Deprecates `teams` attribute
39+
```
40+
41+
```release-note:note
42+
data-source/mongodbatlas_projects: Deprecates `results.teams` attribute
43+
```

docs/data-sources/atlas_user.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
subcategory: "Deprecated"
3+
---
4+
15
# Data Source: mongodbatlas_atlas_user
26

37
`mongodbatlas_atlas_user` Provides a MongoDB Atlas User.
@@ -34,7 +38,7 @@ data "mongodbatlas_atlas_user" "test" {
3438
In addition to all arguments above, the following attributes are exported:
3539
* `country` - Two alphabet characters that identifies MongoDB Atlas user's geographic location. This parameter uses the ISO 3166-1a2 code format.
3640
* `created_at` - Date and time when the current account is created. This value is in the ISO 8601 timestamp format in UTC.
37-
* `email_address` - Email address that belongs to the MongoDB Atlas user.
41+
* `email_address` - **(DEPRECATED)** Email address that belongs to the MongoDB Atlas user.
3842
* `first_name` - First or given name that belongs to the MongoDB Atlas user.
3943
* `last_auth` - Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
4044
* `last_name` - Last name, family name, or surname that belongs to the MongoDB Atlas user.

docs/data-sources/atlas_users.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
subcategory: "Deprecated"
3+
---
4+
15
# Data Source: atlas_users
26

37
`atlas_users` provides Atlas Users associated with a specified Organization, Project, or Team.
@@ -56,7 +60,7 @@ In addition to all arguments above, the following attributes are exported:
5660
* `username` - Email address that belongs to the MongoDB Atlas user account. You cannot modify this address after creating the user.
5761
* `country` - Two alphabet characters that identifies MongoDB Cloud user's geographic location. This parameter uses the ISO 3166-1a2 code format.
5862
* `created_at` - Date and time when the current account is created. This value is in the ISO 8601 timestamp format in UTC.
59-
* `email_address` - Email address that belongs to the MongoDB Atlas user.
63+
* `email_address` - **(DEPRECATED)** Email address that belongs to the MongoDB Atlas user.
6064
* `first_name` - First or given name that belongs to the MongoDB Atlas user.
6165
* `last_auth` - Date and time when the current account last authenticated. This value is in the ISO 8601 timestamp format in UTC.
6266
* `last_name` - Last name, family name, or surname that belongs to the MongoDB Atlas user.

docs/data-sources/org_invitation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
subcategory: "Deprecated"
3+
---
4+
15
# Data Source: mongodbatlas_org_invitation
26

37
`mongodbatlas_org_invitation` describes an invitation for a user to join an Atlas organization.

docs/data-sources/project.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ In addition to all arguments above, the following attributes are exported:
7979
* `cluster_count` - The number of Atlas clusters deployed in the project.
8080
* `created` - The ISO-8601-formatted timestamp of when Atlas created the project.
8181
* `tags` - Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the project. To learn more, see [Resource Tags](https://www.mongodb.com/docs/atlas/tags/)
82-
* `teams` - Returns all teams to which the authenticated user has access in the project. See [Teams](#teams).
82+
* `teams` - **(DEPRECATED)** Returns all teams to which the authenticated user has access in the project. See [Teams](#teams).
8383
* `limits` - The limits for the specified project. See [Limits](#limits).
8484
* `ip_addresses` - IP addresses in a project categorized by services. See [IP Addresses](#ip-addresses). **WARNING:** This attribute is deprecated, use the `mongodbatlas_project_ip_addresses` data source instead.
8585
* `users` - Returns list of all pending and active MongoDB Cloud users associated with the specified project.
@@ -94,6 +94,8 @@ In addition to all arguments above, the following attributes are exported:
9494

9595
### Teams
9696

97+
~> **DEPRECATION:** This attribute is deprecated and will be removed in the next major release. Please transition to `mongodbatlas_team_project_assignment`. For more details, see [Migration Guide: Project Teams Attribute to Team Project Assignment Resource](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/team_project_assignment_migration_guide).
98+
9799
* `team_id` - The unique identifier of the team you want to associate with the project. The team and project must share the same parent organization.
98100
* `role_names` - Each string in the array represents a project role assigned to the team. Every user associated with the team inherits these roles. The [MongoDB Documentation](https://www.mongodb.com/docs/atlas/reference/user-roles/#organization-roles) describes the roles a user can have.
99101

docs/data-sources/project_invitation.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
subcategory: "Deprecated"
3+
---
14
# Data Source: mongodbatlas_project_invitation
25

36
`mongodbatlas_project_invitation` describes an invitation to a user to join an Atlas project.

docs/data-sources/projects.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ data "mongodbatlas_projects" "test" {
5555
* `cluster_count` - The number of Atlas clusters deployed in the project.
5656
* `created` - The ISO-8601-formatted timestamp of when Atlas created the project.
5757
* `tags` - Map that contains key-value pairs between 1 to 255 characters in length for tagging and categorizing the project. To learn more, see [Resource Tags](https://www.mongodb.com/docs/atlas/tags/)
58-
* `teams` - Returns all teams to which the authenticated user has access in the project. See [Teams](#teams).
58+
* `teams` - **(DEPRECATED)** Returns all teams to which the authenticated user has access in the project. See [Teams](#teams).
5959
* `limits` - The limits for the specified project. See [Limits](#limits).
6060
* `ip_addresses` - IP addresses in a project categorized by services. See [IP Addresses](#ip-addresses). **WARNING:** This attribute is deprecated, use the `mongodbatlas_project_ip_addresses` data source instead.
6161
* `users` - Returns list of all pending and active MongoDB Cloud users associated with the specified project.
@@ -70,6 +70,8 @@ data "mongodbatlas_projects" "test" {
7070

7171
### Teams
7272

73+
~> **DEPRECATION:** This attribute is deprecated and will be removed in the next major release. Please transition to `mongodbatlas_team_project_assignment`. For more details, see [Migration Guide: Project Teams Attribute to Team Project Assignment Resource](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/team_project_assignment_migration_guide).
74+
7375
* `team_id` - The unique identifier of the team you want to associate with the project. The team and project must share the same parent organization.
7476
* `role_names` - Each string in the array represents a project role assigned to the team. Every user associated with the team inherits these roles. The [MongoDB Documentation](https://www.mongodb.com/docs/atlas/reference/user-roles/#organization-roles) describes the roles a user can have.
7577

docs/data-sources/team.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ In addition to all arguments above, the following attributes are exported:
5050
* `id` - Terraform's unique identifier used internally for state management.
5151
* `team_id` - The unique identifier for the team.
5252
* `name` - The name of the team you want to create.
53-
* `usernames` - The users who are part of the team.
53+
* `usernames` - **(DEPRECATED)** The users who are part of the team. This attribute is deprecated and will be removed in the next major release. Please transition to `data.mongodbatlas_team.users`. For more details, see [Migration Guide: Team Usernames Attribute to Cloud User Team Assignment](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/cloud_user_team_assignment_migration_guide.md).
5454
* `users`- Returns a list of all pending and active MongoDB Cloud users associated with the specified team.
5555

5656
### Users

docs/guides/2.0.0-upgrade-guide.md

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ MongoDB Atlas Provider 2.0.0: Upgrade and Information Guide
88

99
# MongoDB Atlas Provider 2.0.0: Upgrade and Information Guide
1010

11-
The Terraform MongoDB Atlas Provider version 2.0.0 has the following new features and breaking changes:
11+
The Terraform MongoDB Atlas Provider version 2.0.0 introduces new features, breaking changes, and resource deprecations/removals.
12+
13+
Use this guide to understand what’s new, what requires migration, and how to update your configurations.
1214

1315
## New Resources, Data Sources, and Features
1416

15-
- **New `delete_on_create_timeout` attribute**: Multiple resources now support a `delete_on_create_timeout` boolean attribute that controls cleanup behavior when resource creation times out. When set to `true` (default), the provider will delete the underlying resource if the create operation times out, helping to avoid orphaned resources. This attribute is available in the following resources:
17+
### New `delete_on_create_timeout` attribute
18+
19+
Multiple resources now support a `delete_on_create_timeout` boolean attribute that controls cleanup behavior when resource creation times out. When set to `true` (default), the provider will delete the underlying resource if the create operation times out, helping to avoid orphaned resources. This attribute is available in the following resources:
1620
- `mongodbatlas_advanced_cluster`
1721
- `mongodbatlas_cloud_backup_snapshot`
1822
- `mongodbatlas_cluster_outage_simulation`
@@ -26,6 +30,14 @@ The Terraform MongoDB Atlas Provider version 2.0.0 has the following new feature
2630
- `mongodbatlas_search_deployment`
2731
- `mongodbatlas_stream_processor`
2832

33+
### New Cloud User Assignment Resources
34+
35+
New user and team management resources that replace deprecated invitation-based workflow:
36+
- `mongodbatlas_cloud_user_org_assignment` resource and data source: Manages user membership in organizations with structured roles and support for both pending and active memberships.
37+
- `mongodbatlas_cloud_user_project_assignment` resource and data source: Manages user membership in projects with automatic invitation handling based on organization membership status.
38+
- `mongodbatlas_cloud_user_team_assignment` resource and data source: Manages user membership in teams with support for both username and user ID.
39+
- `mongodbatlas_team_project_assignment` resource and data source: Manages team assignments to projects.
40+
2941
## Breaking Changes
3042

3143
### `mongodbatlas_cloud_backup_schedule`
@@ -57,22 +69,46 @@ Data source:
5769
## Removed resources & data sources
5870

5971
- `mongodbatlas_cloud_provider_snapshot`
60-
This deprecated resource & data source(s) have been removed. Please use `mongodbatlas_cloud_backup_snapshot` instead
72+
This deprecated resource & data source(s) have been removed. Please use `mongodbatlas_cloud_backup_snapshot` instead.
6173

6274
- `mongodbatlas_cloud_provider_snapshot_backup_policy`
63-
This deprecated resource & data source(s) have been removed. Please use `mongodbatlas_cloud_backup_schedule` instead
75+
This deprecated resource & data source(s) have been removed. Please use `mongodbatlas_cloud_backup_schedule` instead.
6476

6577
- `mongodbatlas_cloud_provider_snapshot_restore_job`
66-
This deprecated resource & data source(s) have been removed. Please use `mongodbatlas_cloud_backup_snapshot_restore_job` instead
78+
This deprecated resource & data source(s) have been removed. Please use `mongodbatlas_cloud_backup_snapshot_restore_job` instead.
6779

6880
- `mongodbatlas_privatelink_endpoint_serverless`
69-
This deprecated resource & data source(s) have been removed. For more details, see [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide)
81+
This deprecated resource & data source(s) have been removed. For more details, see [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide).
7082

7183
- `mongodbatlas_privatelink_endpoint_service_serverless`
72-
This deprecated resource & data source(s) have been removed. For more details, see [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide)
84+
This deprecated resource & data source(s) have been removed. For more details, see [Migration Guide: Transition out of Serverless Instances and Shared-tier clusters](https://registry.terraform.io/providers/mongodb/mongodbatlas/latest/docs/guides/serverless-shared-migration-guide).
7385

7486
- `mongodbatlas_teams`
75-
This deprecated resource & data source(s) have been removed. Please use `mongodbatlas_team` instead
87+
This deprecated resource & data source(s) have been removed. Please use `mongodbatlas_team` instead.
88+
89+
## Deprecations
90+
91+
Version 2.0.0 introduces several deprecations as part of modernizing the provider's user and invitation management. These deprecated resources and attributes **will be removed in a future major version release**. Migration guides are available to help transition to the recommended replacements:
92+
93+
### Resources and Data sources
94+
95+
- **`mongodbatlas_cluster` resource and data sources**: Deprecated. Use `mongodbatlas_advanced_cluster` resource and data sources instead. See [the Cluster to Advanced Cluster Migration Guide](../guides/cluster-to-advanced-cluster-migration-guide).
96+
97+
- **`mongodbatlas_org_invitation` resource and data source**: Deprecated. Use `mongodbatlas_cloud_user_org_assignment` resource instead. See the [Org Invitation to Cloud User Org Assignment Migration Guide](../guides/org-invitation-to-cloud-user-org-assignment-migration-guide.md) for migration steps.
98+
99+
- **`mongodbatlas_project_invitation` resource and data source**: Deprecated. Use `mongodbatlas_cloud_user_project_assignment` resource instead. See the [Project Invitation to Cloud User Project Assignment Migration Guide](../guides/project-invitation-to-cloud-user-project-assignment-migration-guide.md) for migration steps.
100+
101+
- **`mongodbatlas_atlas_user` data source**: Deprecated. Use `mongodbatlas_cloud_user_org_assignment` data source instead. See the [Migration Guide: Migrate off deprecated `mongodbatlas_atlas_user` and `mongodbatlas_atlas_users`](../guides/atlas-user-migration-guide.md) for migration steps.
102+
103+
- **`mongodbatlas_atlas_users` data source**: Deprecated. Use the `users` attribute on `mongodbatlas_organization`, `mongodbatlas_project`, or `mongodbatlas_team` data sources respectively. See the [Migration Guide: Migrate off deprecated `mongodbatlas_atlas_user` and `mongodbatlas_atlas_users`](../guides/atlas-user-migration-guide.md) for migration steps.
104+
105+
### Attributes
106+
107+
- **`teams` attribute in `mongodbatlas_project` resource and data source**: Deprecated. Use `mongodbatlas_team_project_assignment` resource and data source to manage team membership to projects. See [Project Teams Attribute to Team Project Assignment Resource Migration Guide](../guides/team_project_assignment_migration_guide) for migration steps.
108+
109+
- **`email_address` attribute in `mongodbatlas_atlas_user` and `mongodbatlas_atlas_users` data sources**: Deprecated. See the [Migration Guide: Migrate off deprecated `mongodbatlas_atlas_user` and `mongodbatlas_atlas_users`](../guides/atlas-user-migration-guide.md) for migration steps.
110+
111+
- **`usernames` attribute in `mongodbatlas_team` resource and data source**: Deprecated. Use `mongodbatlas_cloud_user_team_assignment` resource to manage team membership per user and team. See the [Team Usernames Attribute to Cloud User Team Assignment Migration guide](../guides/cloud_user_team_assignment_migration_guide.md) for migration steps.
76112

77113
2.0.0 also includes general improvements, bug fixes, and several key documentation updates. See the [CHANGELOG](https://github.com/mongodb/terraform-provider-mongodbatlas/blob/master/CHANGELOG.md) for more specific information.
78114

docs/resources/org_invitation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
subcategory: "Deprecated"
3+
---
4+
15
# Resource: mongodbatlas_org_invitation
26

37
`mongodbatlas_org_invitation` invites a user to join an Atlas organization.

0 commit comments

Comments
 (0)