Skip to content

Commit 31304ee

Browse files
committed
doc: update stream_connection docs for workspace_name nomenclature
1 parent baa3e21 commit 31304ee

File tree

4 files changed

+44
-25
lines changed

4 files changed

+44
-25
lines changed

docs/data-sources/stream_connection.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,30 @@ subcategory: "Streams"
1111
```terraform
1212
data "mongodbatlas_stream_connection" "example" {
1313
project_id = "<PROJECT_ID>"
14-
instance_name = "<INSTANCE_NAME>"
14+
workspace_name = "<WORKSPACE_NAME>"
15+
connection_name = "<CONNECTION_NAME>"
16+
}
17+
```
18+
19+
### Example using workspace_name
20+
21+
```terraform
22+
data "mongodbatlas_stream_connection" "example" {
23+
project_id = "<PROJECT_ID>"
24+
workspace_name = "<WORKSPACE_NAME>"
1525
connection_name = "<CONNECTION_NAME>"
1626
}
1727
```
1828

1929
## Argument Reference
2030

2131
* `project_id` - (Required) Unique 24-hexadecimal digit string that identifies your project.
22-
* `instance_name` - (Required) Human-readable label that identifies the stream instance.
32+
* `instance_name` - (Deprecated) Human-readable label that identifies the stream instance. Attribute is deprecated and will be removed in version 3.0.0 in favor of `workspace_name`.
33+
* `workspace_name` - (Optional) Human-readable label that identifies the stream instance. Conflicts with `workspace_name`.
2334
* `connection_name` - (Required) Human-readable label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
2435

36+
~> **NOTE:** Either `workspace_name` or `workspace_name` must be provided, but not both. These fields are functionally identical and `workspace_name` is an alias for `workspace_name`. `workspace_name` should be used instead of `workspace_name`.
37+
2538
## Attributes Reference
2639

2740
* `type` - Type of connection. Can be `AWSLambda`, `Cluster`, `Https`, `Kafka` or `Sample`.

docs/data-sources/stream_connections.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ subcategory: "Streams"
1111
```terraform
1212
data "mongodbatlas_stream_connections" "test" {
1313
project_id = "<PROJECT_ID>"
14-
instance_name = "<INSTANCE_NAME>"
14+
workspace_name = "<WORKSPACE_NAME>"
1515
}
1616
```
1717

1818
## Argument Reference
1919

2020
* `project_id` - (Required) Unique 24-hexadecimal digit string that identifies your project.
21-
* `instance_name` - (Required) Human-readable label that identifies the stream instance.
21+
* `instance_name` - (Deprecated) Human-readable label that identifies the stream instance. Attribute is deprecated and will be removed in version 3.0.0 in favor of `workspace_name`.
22+
* `workspace_name` - (Optional) Human-readable label that identifies the stream instance. Conflicts with `instance_name`.
23+
24+
~> **NOTE:** Either `instance_name` or `workspace_name` must be provided, but not both. These fields are functionally identical and `workspace_name` is an alias for `instance_name`. `workspace_name` should be used instead of `instance_name`.
2225

2326
* `page_num` - (Optional) Number of the page that displays the current set of the total objects that the response returns. Defaults to `1`.
2427
* `items_per_page` - (Optional) Number of items that the response returns per page, up to a maximum of `500`. Defaults to `100`.
@@ -34,7 +37,7 @@ In addition to all arguments above, it also exports the following attributes:
3437
### Stream Connection
3538

3639
* `project_id` - Unique 24-hexadecimal digit string that identifies your project.
37-
* `instance_name` - Human-readable label that identifies the stream instance.
40+
* `workspace_name` - Human-readable label that identifies the stream instance.
3841
* `connection_name` - Human-readable label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
3942
* `type` - Type of connection. `AWSLambda`, `Cluster`, `Https`, `Kafka` or `Sample`.
4043

docs/resources/stream_connection.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ subcategory: "Streams"
1616
```terraform
1717
resource "mongodbatlas_stream_connection" "test" {
1818
project_id = var.project_id
19-
instance_name = "InstanceName"
19+
workspace_name = "WorkspaceName"
2020
connection_name = "ConnectionName"
2121
type = "Cluster"
2222
cluster_name = "Cluster0"
@@ -31,7 +31,7 @@ resource "mongodbatlas_stream_connection" "test" {
3131
```terraform
3232
resource "mongodbatlas_stream_connection" "test" {
3333
project_id = var.project_id
34-
instance_name = "InstanceName"
34+
workspace_name = "WorskpaceName"
3535
connection_name = "ConnectionName"
3636
type = "Cluster"
3737
cluster_name = "OtherCluster"
@@ -44,7 +44,7 @@ resource "mongodbatlas_stream_connection" "test" {
4444
```terraform
4545
resource "mongodbatlas_stream_connection" "test" {
4646
project_id = var.project_id
47-
instance_name = "NewInstance"
47+
workspace_name = "NewWorkspace"
4848
connection_name = "KafkaConnection"
4949
type = "Kafka"
5050
authentication = {
@@ -67,7 +67,7 @@ resource "mongodbatlas_stream_connection" "test" {
6767
```terraform
6868
resource "mongodbatlas_stream_connection" "example-kafka-oauthbearer" {
6969
project_id = var.project_id
70-
instance_name = mongodbatlas_stream_instance.example.instance_name
70+
workspace_name = mongodbatlas_stream_instance.example.instance_name
7171
connection_name = "KafkaOAuthbearerConnection"
7272
type = "Kafka"
7373
authentication = {
@@ -99,7 +99,7 @@ resource "mongodbatlas_stream_connection" "example-kafka-oauthbearer" {
9999
```terraform
100100
resource "mongodbatlas_stream_connection" "test" {
101101
project_id = var.project_id
102-
instance_name = "NewInstance"
102+
workspace_name = "NewWorkspace"
103103
connection_name = "KafkaConnection"
104104
type = "Kafka"
105105
authentication = {
@@ -123,7 +123,7 @@ resource "mongodbatlas_stream_connection" "test" {
123123
```terraform
124124
resource "mongodbatlas_stream_connection" "test" {
125125
project_id = var.project_id
126-
instance_name = "NewInstance"
126+
workspace_name = "NewWorkspace"
127127
connection_name = "AWSLambdaConnection"
128128
type = "AWSLambda"
129129
aws = {
@@ -138,7 +138,7 @@ resource "mongodbatlas_stream_connection" "test" {
138138
```terraform
139139
resource "mongodbatlas_stream_connection" "example-https" {
140140
project_id = var.project_id
141-
instance_name = mongodbatlas_stream_instance.example.instance_name
141+
workspace_name = mongodbatlas_stream_instance.example.instance_name
142142
connection_name = "https_connection_tf_new"
143143
type = "Https"
144144
url = "https://example.com"
@@ -152,10 +152,13 @@ resource "mongodbatlas_stream_connection" "example-https" {
152152
## Argument Reference
153153

154154
* `project_id` - (Required) Unique 24-hexadecimal digit string that identifies your project.
155-
* `instance_name` - (Required) Human-readable label that identifies the stream instance.
155+
* `instance_name` - (Deprecated) Human-readable label that identifies the stream instance. Attribute is deprecated and will be removed in version 3.0.0 in favor of `workspace_name`.
156+
* `workspace_name` - (Optional) Human-readable label that identifies the stream instance. Conflicts with `instance_name`.
156157
* `connection_name` - (Required) Human-readable label that identifies the stream connection. In the case of the Sample type, this is the name of the sample source.
157158
* `type` - (Required) Type of connection. Can be `AWSLambda`, `Cluster`, `Https`, `Kafka` or `Sample`.
158159

160+
~> **NOTE:** Either `instance_name` or `workspace_name` must be provided, but not both. These fields are functionally identical and `workspace_name` is an alias for `instance_name`. `workspace_name` should be used instead of `instance_name`.
161+
159162
If `type` is of value `Cluster` the following additional arguments are defined:
160163
* `cluster_name` - Name of the cluster configured for this connection.
161164
* `db_role_to_execute` - The name of a Built in or Custom DB Role to connect to an Atlas Cluster. See [DBRoleToExecute](#DBRoleToExecute).
@@ -209,7 +212,7 @@ If `type` is of value `Https` the following additional attributes are defined:
209212

210213
## Import
211214

212-
You can import a stream connection resource using the instance name, project ID, and connection name. The format must be `INSTANCE_NAME-PROJECT_ID-CONNECTION_NAME`. For example:
215+
You can import a stream connection resource using the workspace name, project ID, and connection name. The format must be `WORKSPACE_NAME-PROJECT_ID-CONNECTION_NAME`. For example:
213216

214217
```
215218
$ terraform import mongodbatlas_stream_connection.test "DefaultInstance-12251446ae5f3f6ec7968b13-NewConnection"

examples/mongodbatlas_stream_connection/main.tf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
resource "mongodbatlas_stream_instance" "example" {
22
project_id = var.project_id
3-
instance_name = "InstanceName"
3+
workspace_name = "WorkspaceName"
44
data_process_region = {
55
region = "VIRGINIA_USA"
66
cloud_provider = "AWS"
@@ -9,7 +9,7 @@ resource "mongodbatlas_stream_instance" "example" {
99

1010
resource "mongodbatlas_stream_connection" "example-cluster" {
1111
project_id = var.project_id
12-
instance_name = mongodbatlas_stream_instance.example.instance_name
12+
workspace_name = mongodbatlas_stream_instance.example.instance_name
1313
connection_name = "ClusterConnection"
1414
type = "Cluster"
1515
cluster_name = var.cluster_name
@@ -21,7 +21,7 @@ resource "mongodbatlas_stream_connection" "example-cluster" {
2121

2222
resource "mongodbatlas_stream_connection" "example-cross-project-cluster" {
2323
project_id = var.project_id
24-
instance_name = mongodbatlas_stream_instance.example.instance_name
24+
workspace_name = mongodbatlas_stream_instance.example.instance_name
2525
connection_name = "ClusterCrossProjectConnection"
2626
type = "Cluster"
2727
cluster_name = var.other_cluster
@@ -34,7 +34,7 @@ resource "mongodbatlas_stream_connection" "example-cross-project-cluster" {
3434

3535
resource "mongodbatlas_stream_connection" "example-kafka-plaintext" {
3636
project_id = var.project_id
37-
instance_name = mongodbatlas_stream_instance.example.instance_name
37+
workspace_name = mongodbatlas_stream_instance.example.instance_name
3838
connection_name = "KafkaPlaintextConnection"
3939
type = "Kafka"
4040
authentication = {
@@ -58,7 +58,7 @@ resource "mongodbatlas_stream_connection" "example-kafka-plaintext" {
5858

5959
resource "mongodbatlas_stream_connection" "example-kafka-oauthbearer" {
6060
project_id = var.project_id
61-
instance_name = mongodbatlas_stream_instance.example.instance_name
61+
workspace_name = mongodbatlas_stream_instance.example.instance_name
6262
connection_name = "KafkaOAuthbearerConnection"
6363
type = "Kafka"
6464
authentication = {
@@ -86,7 +86,7 @@ resource "mongodbatlas_stream_connection" "example-kafka-oauthbearer" {
8686

8787
resource "mongodbatlas_stream_connection" "example-kafka-ssl" {
8888
project_id = var.project_id
89-
instance_name = mongodbatlas_stream_instance.example.instance_name
89+
workspace_name = mongodbatlas_stream_instance.example.instance_name
9090
connection_name = "KafkaSSLConnection"
9191
type = "Kafka"
9292
authentication = {
@@ -106,14 +106,14 @@ resource "mongodbatlas_stream_connection" "example-kafka-ssl" {
106106

107107
resource "mongodbatlas_stream_connection" "example-sample" {
108108
project_id = var.project_id
109-
instance_name = mongodbatlas_stream_instance.example.instance_name
109+
workspace_name = mongodbatlas_stream_instance.example.instance_name
110110
connection_name = "sample_stream_solar"
111111
type = "Sample"
112112
}
113113

114114
resource "mongodbatlas_stream_connection" "example-aws-lambda" {
115115
project_id = var.project_id
116-
instance_name = mongodbatlas_stream_instance.example.instance_name
116+
workspace_name = mongodbatlas_stream_instance.example.instance_name
117117
connection_name = "AWSLambdaConnection"
118118
type = "AWSLambda"
119119
aws = {
@@ -123,7 +123,7 @@ resource "mongodbatlas_stream_connection" "example-aws-lambda" {
123123

124124
resource "mongodbatlas_stream_connection" "example-https" {
125125
project_id = var.project_id
126-
instance_name = mongodbatlas_stream_instance.example.instance_name
126+
workspace_name = mongodbatlas_stream_instance.example.instance_name
127127
connection_name = "HttpsConnection"
128128
type = "Https"
129129
url = "https://example.com"
@@ -135,13 +135,13 @@ resource "mongodbatlas_stream_connection" "example-https" {
135135

136136
data "mongodbatlas_stream_connection" "example-kafka-ssl" {
137137
project_id = var.project_id
138-
instance_name = mongodbatlas_stream_instance.example.instance_name
138+
workspace_name = mongodbatlas_stream_instance.example.instance_name
139139
connection_name = mongodbatlas_stream_connection.example-kafka-ssl.connection_name
140140
}
141141

142142
data "mongodbatlas_stream_connections" "example" {
143143
project_id = var.project_id
144-
instance_name = mongodbatlas_stream_instance.example.instance_name
144+
workspace_name = mongodbatlas_stream_instance.example.instance_name
145145
}
146146

147147
# example making use of data sources

0 commit comments

Comments
 (0)