Skip to content

Commit 8d8fdcb

Browse files
committed
Merge branch 'master' into CLOUDP-320243-dev-2.0.0
2 parents 1ebf074 + 86d712e commit 8d8fdcb

File tree

81 files changed

+2037
-326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2037
-326
lines changed

.changelog/3461.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
```release-note:new-resource
2+
resource/mongodbatlas_api_key_project_assignment
3+
```
4+
5+
```release-note:new-datasource
6+
data-source/mongodbatlas_api_key_project_assignment
7+
```
8+
9+
```release-note:new-datasource
10+
data-source/mongodbatlas_api_key_project_assignments
11+
```

.changelog/3475.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/mongodbatlas_organization: Adds import support
3+
```

.changelog/3476.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```release-note:note
2+
data-source/mongodbatlas_stream_connections: Deprecates the `id` attribute as it is a random assigned value which should not be used
3+
```
4+
5+
```release-note:note
6+
data-source/mongodbatlas_stream_instances: Deprecates the `id` attribute as it is a random assigned value which should not be used
7+
```

.github/workflows/acceptance-tests-runner.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ jobs:
307307
- 'internal/config/*.go'
308308
- 'internal/service/alertconfiguration/*.go'
309309
- 'internal/service/apikey/*.go'
310+
- 'internal/service/apikeyprojectassignment/*.go'
310311
- 'internal/service/atlasuser/*.go'
311312
- 'internal/service/cloudprovideraccess/*.go'
312313
- 'internal/service/customdbrole/*.go'
@@ -674,6 +675,7 @@ jobs:
674675
./internal/service/organization
675676
./internal/service/orginvitation
676677
./internal/service/projectapikey
678+
./internal/service/apikeyprojectassignment
677679
./internal/service/apikey
678680
./internal/service/rolesorgid
679681
./internal/service/team

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ bin
44
.idea
55
.vscode
66
.windsurf
7+
CLAUDE.md
8+
.claude
79
*.env
810
*.bak
911
*.log

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
## (Unreleased)
22

3+
## 1.38.0 (July 10, 2025)
4+
5+
NOTES:
6+
7+
* data-source/mongodbatlas_stream_connections: Deprecates the `id` attribute as it is a random assigned value which should not be used ([#3476](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3476))
8+
* data-source/mongodbatlas_stream_instances: Deprecates the `id` attribute as it is a random assigned value which should not be used ([#3476](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3476))
9+
10+
FEATURES:
11+
12+
* **New Data Source:** `data-source/mongodbatlas_api_key_project_assignment` ([#3461](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3461))
13+
* **New Data Source:** `data-source/mongodbatlas_api_key_project_assignments` ([#3461](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3461))
14+
* **New Resource:** `resource/mongodbatlas_api_key_project_assignment` ([#3461](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3461))
15+
316
ENHANCEMENTS:
417

518
* data-source/mongodbatlas_third_party_integration Adds `send_user_provided_resource_tags` attribute to support sending $querystats to DataDog ([#3454](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3454))
619
* data-source/mongodbatlas_third_party_integrations Adds `send_user_provided_resource_tags` attribute to support sending $querystats to DataDog ([#3454](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3454))
20+
* resource/mongodbatlas_organization: Adds import support ([#3475](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3475))
721
* resource/mongodbatlas_third_party_integration Adds `send_user_provided_resource_tags` attribute to support sending $querystats to DataDog ([#3454](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3454))
822

923
BUG FIXES:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
SSDLC Compliance Report: Terraform Provider MongoDB Atlas 1.38.0
2+
=================================================================
3+
4+
- Release Creator: EspenAlbert
5+
- Created On: 2025-07-10
6+
7+
Overview:
8+
9+
- **Product and Release Name**
10+
- Terraform Provider MongoDB Atlas 1.38.0, 2025-07-10.
11+
12+
- **Process Document**
13+
- https://www.mongodb.com/blog/post/how-mongodb-protects-against-supply-chain-vulnerabilities
14+
15+
- **Tool used to track third party vulnerabilities**
16+
- [Kondukto](https://arcticglow.kondukto.io/)
17+
18+
- **Dependency Information**
19+
- See SBOM Lite manifests (CycloneDX in JSON format):
20+
- https://github.com/mongodb/terraform-provider-mongodbatlas/releases/download/v1.38.0/sbom.json
21+
22+
- **Security Testing Report**
23+
- Available as needed from Cloud Security.
24+
25+
- **Security Assessment Report**
26+
- Available as needed from Cloud Security.
27+
28+
Assumptions and attestations:
29+
30+
- Internal processes are used to ensure CVEs are identified and mitigated within SLAs.

contributing/development-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- Fork the repository.
1818
- Clone your forked repository locally.
1919
- We use Go Modules to manage dependencies, so you can develop outside your `$GOPATH`.
20-
- We use [golangci-lint](https://github.com/golangci/golangci-lint) to lint our code, you can install it locally via `make setup`.
20+
- We use [golangci-lint](https://github.com/golangci/golangci-lint) to lint our code, you can install it locally via `make tools`.
2121
### Building
2222
- Enter the provider directory
2323
- Run `make tools` to install the needed tools for the provider
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Data Source: mongodbatlas_api_key_project_assignment
2+
3+
`mongodbatlas_api_key_project_assignment` describes an API Key Project Assignment.
4+
5+
## Example Usages
6+
7+
```terraform
8+
resource "mongodbatlas_api_key" "this" {
9+
org_id = var.org_id
10+
description = "Test API Key"
11+
role_names = ["ORG_READ_ONLY"]
12+
}
13+
14+
resource "mongodbatlas_project" "first_project" {
15+
name = "First Project"
16+
org_id = var.org_id
17+
}
18+
19+
resource "mongodbatlas_project" "second_project" {
20+
name = "Second Project"
21+
org_id = var.org_id
22+
}
23+
24+
resource "mongodbatlas_api_key_project_assignment" "first_assignment" {
25+
project_id = mongodbatlas_project.first_project.id
26+
api_key_id = mongodbatlas_api_key.this.api_key_id
27+
roles = ["GROUP_OWNER"]
28+
}
29+
30+
resource "mongodbatlas_api_key_project_assignment" "second_assignment" {
31+
project_id = mongodbatlas_project.second_project.id
32+
api_key_id = mongodbatlas_api_key.this.api_key_id
33+
roles = ["GROUP_OWNER"]
34+
}
35+
36+
# Add IP Access List Entry to Programmatic API Key
37+
resource "mongodbatlas_access_list_api_key" "this" {
38+
org_id = var.org_id
39+
cidr_block = "0.0.0.0/1"
40+
api_key_id = mongodbatlas_api_key.this.api_key_id
41+
}
42+
```
43+
44+
<!-- schema generated by tfplugindocs -->
45+
## Schema
46+
47+
### Required
48+
49+
- `api_key_id` (String) Unique 24-hexadecimal digit string that identifies this organization API key that you want to assign to one project.
50+
- `project_id` (String) Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.
51+
52+
**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
53+
54+
### Read-Only
55+
56+
- `roles` (Set of String) Human-readable label that identifies the collection of privileges that MongoDB Cloud grants a specific API key, MongoDB Cloud user, or MongoDB Cloud team. These roles include only the specific project-level roles.
57+
58+
For more information see: [MongoDB Atlas API - Programmatic API Keys Project Assignment](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-programmatic-api-keys) Documentation.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Data Source: mongodbatlas_api_key_project_assignments
2+
3+
`mongodbatlas_api_key_project_assignments` provides an API Key Project Assignments data source. The data source lets you list all API key project assignments for an organization.
4+
5+
## Example Usages
6+
7+
```terraform
8+
resource "mongodbatlas_api_key" "this" {
9+
org_id = var.org_id
10+
description = "Test API Key"
11+
role_names = ["ORG_READ_ONLY"]
12+
}
13+
14+
resource "mongodbatlas_project" "first_project" {
15+
name = "First Project"
16+
org_id = var.org_id
17+
}
18+
19+
resource "mongodbatlas_project" "second_project" {
20+
name = "Second Project"
21+
org_id = var.org_id
22+
}
23+
24+
resource "mongodbatlas_api_key_project_assignment" "first_assignment" {
25+
project_id = mongodbatlas_project.first_project.id
26+
api_key_id = mongodbatlas_api_key.this.api_key_id
27+
roles = ["GROUP_OWNER"]
28+
}
29+
30+
resource "mongodbatlas_api_key_project_assignment" "second_assignment" {
31+
project_id = mongodbatlas_project.second_project.id
32+
api_key_id = mongodbatlas_api_key.this.api_key_id
33+
roles = ["GROUP_OWNER"]
34+
}
35+
36+
# Add IP Access List Entry to Programmatic API Key
37+
resource "mongodbatlas_access_list_api_key" "this" {
38+
org_id = var.org_id
39+
cidr_block = "0.0.0.0/1"
40+
api_key_id = mongodbatlas_api_key.this.api_key_id
41+
}
42+
```
43+
44+
<!-- schema generated by tfplugindocs -->
45+
## Schema
46+
47+
### Required
48+
49+
- `project_id` (String) Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.
50+
51+
**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
52+
53+
### Read-Only
54+
55+
- `results` (Attributes List) List of documents that MongoDB Cloud returns for this request. (see [below for nested schema](#nestedatt--results))
56+
57+
<a id="nestedatt--results"></a>
58+
### Nested Schema for `results`
59+
60+
Read-Only:
61+
62+
- `api_key_id` (String) Unique 24-hexadecimal digit string that identifies this organization API key that you want to assign to one project.
63+
- `project_id` (String) Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access.
64+
65+
**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
66+
- `roles` (Set of String) Human-readable label that identifies the collection of privileges that MongoDB Cloud grants a specific API key, MongoDB Cloud user, or MongoDB Cloud team. These roles include only the specific project-level roles.
67+
68+
For more information see: [MongoDB Atlas API - Programmatic API Keys Project Assignment](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/group/endpoint-programmatic-api-keys) Documentation.

0 commit comments

Comments
 (0)