Skip to content

Commit 6eeaeb0

Browse files
committed
Merge branch 'master' into CLOUDP-320243-dev-2.0.0
2 parents ba78a8b + 8dcf547 commit 6eeaeb0

File tree

23 files changed

+471
-71
lines changed

23 files changed

+471
-71
lines changed

.changelog/3554.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
```release-note:enhancement
2+
resource/mongodbatlas_stream_privatelink_endpoint: Support S3 PrivateLink Endpoints for Atlas Stream Processing
3+
```
4+
5+
```release-note:enhancement
6+
data-source/mongodbatlas_stream_privatelink_endpoint: Support S3 PrivateLink Endpoints for Atlas Stream Processing
7+
```

.github/workflows/issues.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
ISSUE_NUMBER=${{ github.event.issue.number }}
8080
JIRA_API_TOKEN=${{ secrets.JIRA_API_TOKEN }}
8181
82-
JIRA_QUERY="project = CLOUDP AND issuetype = Story AND resolution = Declined AND text ~ \"TF HELP: GitHub Issue n. $ISSUE_NUMBER\""
82+
JIRA_QUERY="project = CLOUDP AND issuetype in (Story,Bug,Investigation) AND resolution = Declined AND text ~ \"TF HELP: GitHub Issue n. $ISSUE_NUMBER\""
8383
8484
# URL encode the query
8585
JIRA_URL=$(echo "$JIRA_QUERY" | jq -s -R -r @uri)
@@ -129,7 +129,7 @@
129129
ISSUE_NUMBER=${{ github.event.issue.number }}
130130
JIRA_API_TOKEN=${{ secrets.JIRA_API_TOKEN }}
131131
132-
JIRA_QUERY="project = CLOUDP AND issuetype = Story AND resolution = Unresolved AND text ~ \"TF HELP: GitHub Issue n. $ISSUE_NUMBER\""
132+
JIRA_QUERY="project = CLOUDP AND issuetype in (Story,Bug,Investigation) AND resolution = Unresolved AND text ~ \"TF HELP: GitHub Issue n. $ISSUE_NUMBER\""
133133
134134
# URL encode the query
135135
JIRA_URL=$(echo "$JIRA_QUERY" | jq -s -R -r @uri)

CHANGELOG.md

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

3+
ENHANCEMENTS:
4+
5+
* data-source/mongodbatlas_stream_privatelink_endpoint: Support S3 PrivateLink Endpoints for Atlas Stream Processing ([#3554](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3554))
6+
* resource/mongodbatlas_stream_privatelink_endpoint: Support S3 PrivateLink Endpoints for Atlas Stream Processing ([#3554](https://github.com/mongodb/terraform-provider-mongodbatlas/pull/3554))
7+
38
## 1.39.0 (July 24, 2025)
49

510
NOTES:

docs/data-sources/stream_privatelink_endpoint.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,48 @@ output "privatelink_endpoint_id" {
207207
}
208208
```
209209

210+
### AWS S3 Privatelink
211+
```terraform
212+
# S3 bucket for stream data
213+
resource "aws_s3_bucket" "stream_bucket" {
214+
provider = aws.s3_region
215+
bucket = var.s3_bucket_name
216+
force_destroy = true
217+
}
218+
219+
resource "aws_s3_bucket_versioning" "stream_bucket_versioning" {
220+
provider = aws.s3_region
221+
bucket = aws_s3_bucket.stream_bucket.id
222+
versioning_configuration {
223+
status = "Enabled"
224+
}
225+
}
226+
227+
resource "aws_s3_bucket_server_side_encryption_configuration" "stream_bucket_encryption" {
228+
provider = aws.s3_region
229+
bucket = aws_s3_bucket.stream_bucket.id
230+
231+
rule {
232+
apply_server_side_encryption_by_default {
233+
sse_algorithm = "AES256"
234+
}
235+
}
236+
}
237+
238+
# PrivateLink for S3
239+
resource "mongodbatlas_stream_privatelink_endpoint" "this" {
240+
project_id = var.project_id
241+
provider_name = "AWS"
242+
vendor = "S3"
243+
region = var.region
244+
service_endpoint_id = var.service_endpoint_id
245+
}
246+
247+
output "privatelink_endpoint_id" {
248+
value = mongodbatlas_stream_privatelink_endpoint.this.id
249+
}
250+
```
251+
210252
<!-- schema generated by tfplugindocs -->
211253
## Schema
212254

@@ -218,16 +260,24 @@ output "privatelink_endpoint_id" {
218260
### Read-Only
219261

220262
- `arn` (String) Amazon Resource Name (ARN). Required for AWS Provider and MSK vendor.
221-
- `dns_domain` (String) The domain hostname. Required for the following provider and vendor combinations:<br>- AWS provider with CONFLUENT vendor.<br>- AZURE provider with EVENTHUB or CONFLUENT vendor.
263+
- `dns_domain` (String) The domain hostname. Required for the following provider and vendor combinations:
264+
265+
* AWS provider with CONFLUENT vendor.
266+
267+
* AZURE provider with EVENTHUB or CONFLUENT vendor.
222268
- `dns_sub_domain` (List of String) Sub-Domain name of Confluent cluster. These are typically your availability zones. Required for AWS Provider and CONFLUENT vendor. If your AWS CONFLUENT cluster doesn't use subdomains, you must set this to the empty array [].
223269
- `error_message` (String) Error message if the connection is in a failed state.
224270
- `interface_endpoint_id` (String) Interface endpoint ID that is created from the specified service endpoint ID.
225271
- `interface_endpoint_name` (String) Name of interface endpoint that is created from the specified service endpoint ID.
226272
- `provider_account_id` (String) Account ID from the cloud provider.
227-
- `provider_name` (String) Provider where the Kafka cluster is deployed. Valid values are AWS and AZURE.
273+
- `provider_name` (String) Provider where the endpoint is deployed. Valid values are AWS and AZURE.
228274
- `region` (String) The region of the Provider’s cluster. See [AZURE](https://www.mongodb.com/docs/atlas/reference/microsoft-azure/#stream-processing-instances) and [AWS](https://www.mongodb.com/docs/atlas/reference/amazon-aws/#stream-processing-instances) supported regions. When the vendor is `CONFLUENT`, this is the domain name of Confluent cluster. When the vendor is `MSK`, this is computed by the API from the provided `arn`.
229275
- `service_endpoint_id` (String) For AZURE EVENTHUB, this is the [namespace endpoint ID](https://learn.microsoft.com/en-us/rest/api/eventhub/namespaces/get). For AWS CONFLUENT cluster, this is the [VPC Endpoint service name](https://docs.confluent.io/cloud/current/networking/private-links/aws-privatelink.html).
230276
- `state` (String) Status of the connection.
231-
- `vendor` (String) Vendor that manages the Kafka cluster. The following are the vendor values per provider:<br>- MSK and CONFLUENT for the AWS provider.<br>- EVENTHUB and CONFLUENT for the AZURE provider.
277+
- `vendor` (String) Vendor that manages the endpoint. The following are the vendor values per provider:
278+
279+
* **AWS**: MSK, CONFLUENT, and S3
280+
281+
* **Azure**: EVENTHUB and CONFLUENT
232282

233283
For more information see: [MongoDB Atlas API - Streams Privatelink](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-createprivatelinkconnection) Documentation.

docs/data-sources/stream_privatelink_endpoints.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,48 @@ output "privatelink_endpoint_id" {
207207
}
208208
```
209209

210+
### AWS S3 Privatelink
211+
```terraform
212+
# S3 bucket for stream data
213+
resource "aws_s3_bucket" "stream_bucket" {
214+
provider = aws.s3_region
215+
bucket = var.s3_bucket_name
216+
force_destroy = true
217+
}
218+
219+
resource "aws_s3_bucket_versioning" "stream_bucket_versioning" {
220+
provider = aws.s3_region
221+
bucket = aws_s3_bucket.stream_bucket.id
222+
versioning_configuration {
223+
status = "Enabled"
224+
}
225+
}
226+
227+
resource "aws_s3_bucket_server_side_encryption_configuration" "stream_bucket_encryption" {
228+
provider = aws.s3_region
229+
bucket = aws_s3_bucket.stream_bucket.id
230+
231+
rule {
232+
apply_server_side_encryption_by_default {
233+
sse_algorithm = "AES256"
234+
}
235+
}
236+
}
237+
238+
# PrivateLink for S3
239+
resource "mongodbatlas_stream_privatelink_endpoint" "this" {
240+
project_id = var.project_id
241+
provider_name = "AWS"
242+
vendor = "S3"
243+
region = var.region
244+
service_endpoint_id = var.service_endpoint_id
245+
}
246+
247+
output "privatelink_endpoint_id" {
248+
value = mongodbatlas_stream_privatelink_endpoint.this.id
249+
}
250+
```
251+
210252
<!-- schema generated by tfplugindocs -->
211253
## Schema
212254

@@ -224,18 +266,26 @@ output "privatelink_endpoint_id" {
224266
Read-Only:
225267

226268
- `arn` (String) Amazon Resource Name (ARN). Required for AWS Provider and MSK vendor.
227-
- `dns_domain` (String) The domain hostname. Required for the following provider and vendor combinations:<br>- AWS provider with CONFLUENT vendor.<br>- AZURE provider with EVENTHUB or CONFLUENT vendor.
269+
- `dns_domain` (String) The domain hostname. Required for the following provider and vendor combinations:
270+
271+
* AWS provider with CONFLUENT vendor.
272+
273+
* AZURE provider with EVENTHUB or CONFLUENT vendor.
228274
- `dns_sub_domain` (List of String) Sub-Domain name of Confluent cluster. These are typically your availability zones. Required for AWS Provider and CONFLUENT vendor. If your AWS CONFLUENT cluster doesn't use subdomains, you must set this to the empty array [].
229275
- `error_message` (String) Error message if the connection is in a failed state.
230276
- `id` (String) The ID of the Private Link connection.
231277
- `interface_endpoint_id` (String) Interface endpoint ID that is created from the specified service endpoint ID.
232278
- `interface_endpoint_name` (String) Name of interface endpoint that is created from the specified service endpoint ID.
233279
- `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.<br>**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group or project id remains the same. The resource and corresponding endpoints use the term groups.
234280
- `provider_account_id` (String) Account ID from the cloud provider.
235-
- `provider_name` (String) Provider where the Kafka cluster is deployed. Valid values are AWS and AZURE.
281+
- `provider_name` (String) Provider where the endpoint is deployed. Valid values are AWS and AZURE.
236282
- `region` (String) The region of the Provider’s cluster. See [AZURE](https://www.mongodb.com/docs/atlas/reference/microsoft-azure/#stream-processing-instances) and [AWS](https://www.mongodb.com/docs/atlas/reference/amazon-aws/#stream-processing-instances) supported regions. When the vendor is `CONFLUENT`, this is the domain name of Confluent cluster. When the vendor is `MSK`, this is computed by the API from the provided `arn`.
237283
- `service_endpoint_id` (String) For AZURE EVENTHUB, this is the [namespace endpoint ID](https://learn.microsoft.com/en-us/rest/api/eventhub/namespaces/get). For AWS CONFLUENT cluster, this is the [VPC Endpoint service name](https://docs.confluent.io/cloud/current/networking/private-links/aws-privatelink.html).
238284
- `state` (String) Status of the connection.
239-
- `vendor` (String) Vendor that manages the Kafka cluster. The following are the vendor values per provider:<br>- MSK and CONFLUENT for the AWS provider.<br>- EVENTHUB and CONFLUENT for the AZURE provider.
285+
- `vendor` (String) Vendor that manages the endpoint. The following are the vendor values per provider:
286+
287+
* **AWS**: MSK, CONFLUENT, and S3
288+
289+
* **Azure**: EVENTHUB and CONFLUENT
240290

241291
For more information see: [MongoDB Atlas API - Streams Privatelink](https://www.mongodb.com/docs/api/doc/atlas-admin-api-v2/operation/operation-createprivatelinkconnection) Documentation.

docs/resources/stream_privatelink_endpoint.md

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,19 +207,69 @@ output "privatelink_endpoint_id" {
207207
}
208208
```
209209

210+
### AWS S3 Privatelink
211+
```terraform
212+
# S3 bucket for stream data
213+
resource "aws_s3_bucket" "stream_bucket" {
214+
provider = aws.s3_region
215+
bucket = var.s3_bucket_name
216+
force_destroy = true
217+
}
218+
219+
resource "aws_s3_bucket_versioning" "stream_bucket_versioning" {
220+
provider = aws.s3_region
221+
bucket = aws_s3_bucket.stream_bucket.id
222+
versioning_configuration {
223+
status = "Enabled"
224+
}
225+
}
226+
227+
resource "aws_s3_bucket_server_side_encryption_configuration" "stream_bucket_encryption" {
228+
provider = aws.s3_region
229+
bucket = aws_s3_bucket.stream_bucket.id
230+
231+
rule {
232+
apply_server_side_encryption_by_default {
233+
sse_algorithm = "AES256"
234+
}
235+
}
236+
}
237+
238+
# PrivateLink for S3
239+
resource "mongodbatlas_stream_privatelink_endpoint" "this" {
240+
project_id = var.project_id
241+
provider_name = "AWS"
242+
vendor = "S3"
243+
region = var.region
244+
service_endpoint_id = var.service_endpoint_id
245+
}
246+
247+
output "privatelink_endpoint_id" {
248+
value = mongodbatlas_stream_privatelink_endpoint.this.id
249+
}
250+
```
251+
210252
<!-- schema generated by tfplugindocs -->
211253
## Schema
212254

213255
### Required
214256

215257
- `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.<br>**NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group or project id remains the same. The resource and corresponding endpoints use the term groups.
216-
- `provider_name` (String) Provider where the Kafka cluster is deployed. Valid values are AWS and AZURE.
217-
- `vendor` (String) Vendor that manages the Kafka cluster. The following are the vendor values per provider:<br>- MSK and CONFLUENT for the AWS provider.<br>- EVENTHUB and CONFLUENT for the AZURE provider.
258+
- `provider_name` (String) Provider where the endpoint is deployed. Valid values are AWS and AZURE.
259+
- `vendor` (String) Vendor that manages the endpoint. The following are the vendor values per provider:
260+
261+
* **AWS**: MSK, CONFLUENT, and S3
262+
263+
* **Azure**: EVENTHUB and CONFLUENT
218264

219265
### Optional
220266

221267
- `arn` (String) Amazon Resource Name (ARN). Required for AWS Provider and MSK vendor.
222-
- `dns_domain` (String) The domain hostname. Required for the following provider and vendor combinations:<br>- AWS provider with CONFLUENT vendor.<br>- AZURE provider with EVENTHUB or CONFLUENT vendor.
268+
- `dns_domain` (String) The domain hostname. Required for the following provider and vendor combinations:
269+
270+
* AWS provider with CONFLUENT vendor.
271+
272+
* AZURE provider with EVENTHUB or CONFLUENT vendor.
223273
- `dns_sub_domain` (List of String) Sub-Domain name of Confluent cluster. These are typically your availability zones. Required for AWS Provider and CONFLUENT vendor. If your AWS CONFLUENT cluster doesn't use subdomains, you must set this to the empty array [].
224274
- `region` (String) The region of the Provider’s cluster. See [AZURE](https://www.mongodb.com/docs/atlas/reference/microsoft-azure/#stream-processing-instances) and [AWS](https://www.mongodb.com/docs/atlas/reference/amazon-aws/#stream-processing-instances) supported regions. When the vendor is `CONFLUENT`, this is the domain name of Confluent cluster. When the vendor is `MSK`, this is computed by the API from the provided `arn`.
225275
- `service_endpoint_id` (String) For AZURE EVENTHUB, this is the [namespace endpoint ID](https://learn.microsoft.com/en-us/rest/api/eventhub/namespaces/get). For AWS CONFLUENT cluster, this is the [VPC Endpoint service name](https://docs.confluent.io/cloud/current/networking/private-links/aws-privatelink.html).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# MongoDB Atlas Provider - AWS S3 Privatelink for Atlas Streams
2+
3+
This example shows how to use AWS Privatelink for Atlas Streams with an AWS S3 bucket.
4+
5+
You must set the following variables:
6+
7+
- `project_id`: Unique 24-hexadecimal digit string that identifies your project
8+
- `public_key`: Public API key to authenticate to Atlas
9+
- `private_key`: Private API key to authenticate to Atlas
10+
- `region`: Region where the S3 bucket is located
11+
- `service_endpoint_id`: Service endpoint ID (should follow the format `com.amazonaws.<region>.s3`)
12+
- `s3_bucket_name`: Name of the S3 bucket for stream data
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# S3 bucket for stream data
2+
resource "aws_s3_bucket" "stream_bucket" {
3+
provider = aws.s3_region
4+
bucket = var.s3_bucket_name
5+
force_destroy = true
6+
}
7+
8+
resource "aws_s3_bucket_versioning" "stream_bucket_versioning" {
9+
provider = aws.s3_region
10+
bucket = aws_s3_bucket.stream_bucket.id
11+
versioning_configuration {
12+
status = "Enabled"
13+
}
14+
}
15+
16+
resource "aws_s3_bucket_server_side_encryption_configuration" "stream_bucket_encryption" {
17+
provider = aws.s3_region
18+
bucket = aws_s3_bucket.stream_bucket.id
19+
20+
rule {
21+
apply_server_side_encryption_by_default {
22+
sse_algorithm = "AES256"
23+
}
24+
}
25+
}
26+
27+
# PrivateLink for S3
28+
resource "mongodbatlas_stream_privatelink_endpoint" "this" {
29+
project_id = var.project_id
30+
provider_name = "AWS"
31+
vendor = "S3"
32+
region = var.region
33+
service_endpoint_id = var.service_endpoint_id
34+
}
35+
36+
output "privatelink_endpoint_id" {
37+
value = mongodbatlas_stream_privatelink_endpoint.this.id
38+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
provider "mongodbatlas" {
2+
public_key = var.public_key
3+
private_key = var.private_key
4+
}
5+
6+
provider "aws" {
7+
alias = "s3_region"
8+
region = var.region
9+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
variable "project_id" {
2+
description = "Unique 24-hexadecimal digit string that identifies your project"
3+
type = string
4+
}
5+
6+
variable "public_key" {
7+
description = "Public API key to authenticate to Atlas"
8+
type = string
9+
}
10+
11+
variable "private_key" {
12+
description = "Private API key to authenticate to Atlas"
13+
type = string
14+
}
15+
16+
variable "region" {
17+
description = "AWS region where the S3 bucket is located"
18+
type = string
19+
}
20+
21+
variable "service_endpoint_id" {
22+
description = "service_endpoint_id should follow the format 'com.amazonaws.<region>.s3', for example 'com.amazonaws.us-east-1.s3'"
23+
type = string
24+
}
25+
26+
variable "s3_bucket_name" {
27+
description = "Name of the S3 bucket for stream data"
28+
type = string
29+
default = "mongodbatlas-stream-data"
30+
}

0 commit comments

Comments
 (0)