-
Couldn't load subscription status.
- Fork 208
feat: Adds GCP Confluent privatelink support to streamprivatelink endpoint resource + datasource #3818
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
Open
kpatel71716
wants to merge
2
commits into
master
Choose a base branch
from
CLOUDP-350439
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: Adds GCP Confluent privatelink support to streamprivatelink endpoint resource + datasource #3818
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| ```release-note:enhancement | ||
| resource/mongodbatlas_stream_privatelink_endpoint: Adds support for GCP Confluent | ||
|
|
||
| ```release-note:enhancement | ||
| data-source/mongodbatlas_stream_privatelink_endpoint: Adds support for GCP Confluent | ||
| ``` | ||
|
|
||
| ```release-note:enhancement | ||
| data-source/mongodbatlas_stream_privatelink_endpoints: Adds support for GCP Confluent | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
examples/mongodbatlas_stream_privatelink_endpoint/gcp_confluent/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # MongoDB Atlas Provider - GCP Confluent Privatelink for Atlas Streams | ||
|
|
||
| This example shows how to use GCP Private Service Connect for Atlas Streams with Confluent Cloud. | ||
|
|
||
| You must set the following variables: | ||
|
|
||
| - `project_id`: Unique 24-hexadecimal digit string that identifies your project | ||
| - `atlas_client_id`: MongoDB Atlas Service Account Client ID | ||
| - `atlas_client_secret`: MongoDB Atlas Service Account Client Secret | ||
| - `gcp_region`: GCP region where your Confluent cluster is located | ||
| - `confluent_dns_domain`: DNS domain for your Confluent cluster | ||
| - `confluent_dns_subdomains`: List of DNS subdomains for your Confluent cluster | ||
| - `service_attachment_uris`: List of GCP service attachment URIs from your Confluent Cloud cluster |
35 changes: 35 additions & 0 deletions
35
examples/mongodbatlas_stream_privatelink_endpoint/gcp_confluent/main.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| resource "mongodbatlas_stream_privatelink_endpoint" "gcp_confluent" { | ||
| project_id = var.project_id | ||
|
|
||
| provider_name = "GCP" | ||
| vendor = "CONFLUENT" | ||
| region = var.gcp_region | ||
|
|
||
| dns_domain = var.confluent_dns_domain | ||
| dns_sub_domain = var.confluent_dns_subdomains | ||
|
|
||
| service_attachment_uris = [ | ||
| "projects/my-project/regions/us-west1/serviceAttachments/confluent-attachment-1", | ||
| "projects/my-project/regions/us-west1/serviceAttachments/confluent-attachment-2" | ||
| ] | ||
| } | ||
|
|
||
| data "mongodbatlas_stream_privatelink_endpoint" "gcp_confluent" { | ||
| project_id = var.project_id | ||
| id = mongodbatlas_stream_privatelink_endpoint.gcp_confluent.id | ||
| } | ||
|
|
||
| output "privatelink_endpoint_id" { | ||
| description = "The ID of the MongoDB Atlas Stream Private Link Endpoint" | ||
| value = mongodbatlas_stream_privatelink_endpoint.gcp_confluent.id | ||
| } | ||
|
|
||
| output "privatelink_endpoint_state" { | ||
| description = "The state of the MongoDB Atlas Stream Private Link Endpoint" | ||
| value = data.mongodbatlas_stream_privatelink_endpoint.gcp_confluent.state | ||
| } | ||
|
|
||
| output "service_attachment_uris" { | ||
| description = "The GCP service attachment URIs used for the private link" | ||
| value = mongodbatlas_stream_privatelink_endpoint.gcp_confluent.service_attachment_uris | ||
| } |
22 changes: 22 additions & 0 deletions
22
examples/mongodbatlas_stream_privatelink_endpoint/gcp_confluent/variables.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| variable "project_id" { | ||
| description = "The MongoDB Atlas project ID" | ||
| type = string | ||
| } | ||
|
|
||
| variable "gcp_region" { | ||
| description = "The GCP region where resources will be created" | ||
| type = string | ||
| default = "us-west1" | ||
| } | ||
|
|
||
| variable "confluent_dns_domain" { | ||
| description = "The DNS domain for the Confluent cluster" | ||
| type = string | ||
| default = "example.confluent.cloud" | ||
| } | ||
|
|
||
| variable "confluent_dns_subdomains" { | ||
| description = "List of DNS subdomains for the Confluent cluster" | ||
| type = list(string) | ||
| default = ["subdomain1", "subdomain2"] | ||
| } |
9 changes: 9 additions & 0 deletions
9
examples/mongodbatlas_stream_privatelink_endpoint/gcp_confluent/versions.tf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| terraform { | ||
| required_version = ">= 1.0" | ||
| required_providers { | ||
| mongodbatlas = { | ||
| source = "mongodb/mongodbatlas" | ||
| version = "~> 2.1" | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.