You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: new mongodbatlas_stream_connection resource (#1736)
* feat: new mongodbatlas_stream_connection resource
* define dummy ca cert in external file and embed into variable for testing
* fix content of id
* refactor: avoid depending on existing project for CI tests in search index and stream connection resources (#1737)
* refactor: common cluster config funtion avoids depending on existing project
* define return value as struct and unify comments
* doc: `mongodbatlas_stream_connection` resource docs, examples, and general Atlas Streams guide (#1752)
* docs: stream connection resource docs and examples
* addressing doc review comments
* fix yaml formatting in header + examples mentioning limitations
# MongoDB Atlas Provider - Atlas Streams with Terraform
2
+
3
+
Atlas Stream Processing is composed of multiple components, and users can leverage Terraform to define a subset of these. To obtain more details on each of the components please refer to the [Atlas Stream Processing Documentation](https://www.mongodb.com/docs/atlas/atlas-sp/overview/#atlas-stream-processing-overview).
4
+
5
+
### Resources supported by Terraform
6
+
7
+
-`mongodbatlas_stream_instance`: Enables creating, modifying, and deleting Stream Instances. as part of this resource, a computed `hostnames` attribute is available for connecting to the created instance.
8
+
-`mongodbatlas_stream_connection`: Enables creating, modifying, and deleting Stream Instance Connections, which serve as data sources and sinks for your instance.
9
+
10
+
**NOTE**: To leverage these resources you'll need to set the environment variable `MONGODB_ATLAS_ENABLE_BETA=true` as this functionality is currently in preview. Also see [Limitations](https://www.mongodb.com/docs/atlas/atlas-sp/limitations/#std-label-atlas-sp-limitations) of Atlas Streams during this preview period.
11
+
12
+
### Managing Stream Processors
13
+
14
+
Once a stream instance and its connections have been defined, `Stream Processors` can be created to define how your data will be processed in your instance. There are currently no resources defined in Terraform to provide this configuration. To obtain information on how this can be configured refer to [Manage Stream Processors](https://www.mongodb.com/docs/atlas/atlas-sp/manage-stream-processor/#manage-stream-processors).
15
+
16
+
Connect to your stream instance defined in terraform using the following code block:
17
+
```
18
+
output "stream_instance_hostname" {
19
+
value = mongodbatlas_stream_instance.test.hostnames
20
+
}
21
+
```
22
+
23
+
This value can then be used to connect to the stream instance using `mongosh`, as described in the [Get Started Tutorial](https://www.mongodb.com/docs/atlas/atlas-sp/tutorial/).
# MongoDB Atlas Provider - Atlas Stream Instance defined in a Project
2
+
3
+
This example shows how to create Atlas Stream Connections in Terraform. It also creates a stream instance, which is a prerequisite. Both Kafka and Cluster connections types are defined to showcase their usage.
4
+
5
+
You must set the following variables:
6
+
7
+
-`public_key`: Atlas public key
8
+
-`private_key`: Atlas private key
9
+
-`project_id`: Unique 24-hexadecimal digit string that identifies the project where the stream instance will be created.
10
+
-`kafka_username`: Username used for connecting to your external Kafka Cluster.
11
+
-`kafka_password`: Password used for connecting to your external Kafka Cluster.
12
+
-`kafka_ssl_cert`: String value of public x509 certificate for connecting to Kafka over SSL.
13
+
-`cluster_name`: Name of Cluster that will be used for creating a connection.
14
+
15
+
To learn more, see the [Stream Instance Connection Registry Documentation](https://www.mongodb.com/docs/atlas/atlas-sp/manage-processing-instance/#view-connections-in-the-connection-registry).
0 commit comments