Skip to content

Commit 51abddd

Browse files
Refactor by comments
1 parent c58e049 commit 51abddd

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

.changelog/3680.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
```release-note:enhancement
2-
resource/mongodbatlas_stream_connection: Add new authentication mechanism(OIDC) to the Kafka connection
2+
resource/mongodbatlas_stream_connection: Adds new authentication mechanism(OIDC) to the Kafka connection
3+
```
4+
5+
```release-note:enhancement
6+
data-source/mongodbatlas_stream_connection: Adds new authentication mechanism(OIDC) to the Kafka connection
7+
```
8+
9+
```release-note:enhancement
10+
data-source/mongodbatlas_stream_connections: Adds new authentication mechanism(OIDC) to the Kafka connection
311
```

docs/resources/stream_connection.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,12 @@ If `type` is of value `Https` the following additional attributes are defined:
180180
* `mechanism` - Style of authentication. Can be one of `PLAIN`, `SCRAM-256`, or `SCRAM-512`.
181181
* `username` - Username of the account to connect to the Kafka cluster.
182182
* `password` - Password of the account to connect to the Kafka cluster.
183+
* `token_endpoint_url` - OAUTH issuer(IdP provider) token endpoint HTTP(S) URI used to retrieve the token.
184+
* `client_id` - Public identifier for the Kafka client.
185+
* `client_secret` - Secret known only to the Kafka client and the authorization server.
186+
* `scope` - Kafka clients use this to specify the scope of the access request to the broker.
187+
* `sasl_oauthbearer_extensions` - Additional information to be provided to the Kafka broker.
188+
* `https_ca_pem` - The CA certificates as a PEM string.
183189

184190
### Security
185191

internal/service/streamconnection/resource_stream_connection_test.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,18 +108,13 @@ func testCaseKafkaPlaintext(t *testing.T, nameSuffix string) *resource.TestCase
108108
}
109109

110110
func TestAccStreamRSStreamConnection_kafkaOAuthBearer(t *testing.T) {
111-
testCase := testCaseKafkaOAuthBearer(t, "")
112-
resource.ParallelTest(t, *testCase)
113-
}
114-
115-
func testCaseKafkaOAuthBearer(t *testing.T, nameSuffix string) *resource.TestCase {
116111
t.Helper()
117112
var (
118113
projectID, instanceName = acc.ProjectIDExecutionWithStreamInstance(t)
119-
connectionName = "kafka-conn-oauthbearer" + nameSuffix
114+
connectionName = "kafka-conn-oauthbearer"
120115
)
121116

122-
return &resource.TestCase{
117+
testCase := &resource.TestCase{
123118
PreCheck: func() { acc.PreCheckBasic(t) },
124119
ProtoV6ProviderFactories: acc.TestAccProviderV6Factories,
125120
CheckDestroy: CheckDestroyStreamConnection,
@@ -149,6 +144,7 @@ func testCaseKafkaOAuthBearer(t *testing.T, nameSuffix string) *resource.TestCas
149144
},
150145
},
151146
}
147+
resource.ParallelTest(t, *testCase)
152148
}
153149

154150
func TestAccStreamRSStreamConnection_kafkaNetworkingVPC(t *testing.T) {

0 commit comments

Comments
 (0)