pulumi-kafka 3.11.0a1753397760__tar.gz → 3.12.0a1753509641__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/PKG-INFO +1 -1
  2. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/__init__.py +2 -0
  3. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/acl.py +230 -2
  4. pulumi_kafka-3.12.0a1753509641/pulumi_kafka/get_topics.py +85 -0
  5. pulumi_kafka-3.12.0a1753509641/pulumi_kafka/outputs.py +71 -0
  6. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/pulumi-plugin.json +1 -1
  7. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/quota.py +244 -2
  8. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/topic.py +224 -2
  9. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/user_scram_credential.py +85 -25
  10. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka.egg-info/PKG-INFO +1 -1
  11. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka.egg-info/SOURCES.txt +2 -0
  12. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pyproject.toml +1 -1
  13. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/README.md +0 -0
  14. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/_utilities.py +0 -0
  15. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/config/__init__.py +0 -0
  16. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/config/__init__.pyi +0 -0
  17. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/config/vars.py +0 -0
  18. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/get_topic.py +0 -0
  19. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/provider.py +0 -0
  20. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka/py.typed +0 -0
  21. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka.egg-info/dependency_links.txt +0 -0
  22. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka.egg-info/requires.txt +0 -0
  23. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/pulumi_kafka.egg-info/top_level.txt +0 -0
  24. {pulumi_kafka-3.11.0a1753397760 → pulumi_kafka-3.12.0a1753509641}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pulumi_kafka
3
- Version: 3.11.0a1753397760
3
+ Version: 3.12.0a1753509641
4
4
  Summary: A Pulumi package for creating and managing Kafka.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://pulumi.io
@@ -8,10 +8,12 @@ import typing
8
8
  # Export this package's modules as members:
9
9
  from .acl import *
10
10
  from .get_topic import *
11
+ from .get_topics import *
11
12
  from .provider import *
12
13
  from .quota import *
13
14
  from .topic import *
14
15
  from .user_scram_credential import *
16
+ from . import outputs
15
17
 
16
18
  # Make subpackages available:
17
19
  if typing.TYPE_CHECKING:
@@ -217,7 +217,121 @@ class Acl(pulumi.CustomResource):
217
217
  resource_pattern_type_filter: Optional[pulumi.Input[_builtins.str]] = None,
218
218
  __props__=None):
219
219
  """
220
- Create a Acl resource with the given unique name, props, and options.
220
+ The `Acl` resource manages Apache Kafka Access Control Lists (ACLs). ACLs control access to Kafka resources like topics, consumer groups, and clusters by defining which principals (users or services) can perform specific operations on these resources.
221
+
222
+ ## Example Usage
223
+
224
+ ### Allow Producer Access to Topic
225
+
226
+ ```python
227
+ import pulumi
228
+ import pulumi_kafka as kafka
229
+
230
+ producer = kafka.Acl("producer",
231
+ acl_resource_name="orders",
232
+ acl_resource_type="Topic",
233
+ acl_principal="User:producer-service",
234
+ acl_host="*",
235
+ acl_operation="Write",
236
+ acl_permission_type="Allow")
237
+ # Also grant describe permission for producers
238
+ producer_describe = kafka.Acl("producer_describe",
239
+ acl_resource_name="orders",
240
+ acl_resource_type="Topic",
241
+ acl_principal="User:producer-service",
242
+ acl_host="*",
243
+ acl_operation="Describe",
244
+ acl_permission_type="Allow")
245
+ ```
246
+
247
+ ### Allow Consumer Group Access
248
+
249
+ ```python
250
+ import pulumi
251
+ import pulumi_kafka as kafka
252
+
253
+ # Allow read access to topic
254
+ consumer_read = kafka.Acl("consumer_read",
255
+ acl_resource_name="orders",
256
+ acl_resource_type="Topic",
257
+ acl_principal="User:consumer-service",
258
+ acl_host="*",
259
+ acl_operation="Read",
260
+ acl_permission_type="Allow")
261
+ # Allow access to consumer group
262
+ consumer_group = kafka.Acl("consumer_group",
263
+ acl_resource_name="order-processors",
264
+ acl_resource_type="Group",
265
+ acl_principal="User:consumer-service",
266
+ acl_host="*",
267
+ acl_operation="Read",
268
+ acl_permission_type="Allow")
269
+ ```
270
+
271
+ ### Prefix-Based Access Control
272
+
273
+ ```python
274
+ import pulumi
275
+ import pulumi_kafka as kafka
276
+
277
+ # Grant access to all topics with prefix "logs-"
278
+ logs_access = kafka.Acl("logs_access",
279
+ acl_resource_name="logs-",
280
+ acl_resource_type="Topic",
281
+ resource_pattern_type_filter="Prefixed",
282
+ acl_principal="User:log-aggregator",
283
+ acl_host="*",
284
+ acl_operation="Read",
285
+ acl_permission_type="Allow")
286
+ ```
287
+
288
+ ### Admin User with Full Access
289
+
290
+ ```python
291
+ import pulumi
292
+ import pulumi_kafka as kafka
293
+
294
+ # Grant cluster-level admin access
295
+ admin_cluster = kafka.Acl("admin_cluster",
296
+ acl_resource_name="kafka-cluster",
297
+ acl_resource_type="Cluster",
298
+ acl_principal="User:admin",
299
+ acl_host="*",
300
+ acl_operation="All",
301
+ acl_permission_type="Allow")
302
+ ```
303
+
304
+ ## Common ACL Patterns
305
+
306
+ ### Producer ACLs
307
+ Producers typically need:
308
+ - `Write` and `Describe` on topics
309
+ - `Write` on `TransactionalID` (for transactional producers)
310
+ - `IdempotentWrite` on `Cluster` (for idempotent producers)
311
+
312
+ ### Consumer ACLs
313
+ Consumers typically need:
314
+ - `Read` on topics
315
+ - `Read` on consumer groups
316
+ - `Describe` on topics (optional, for metadata)
317
+
318
+ ### Admin ACLs
319
+ Administrators typically need:
320
+ - `All` on `Cluster`
321
+ - Or specific operations like `Alter`, `AlterConfigs`, `Create`, `Delete`
322
+
323
+ > **Warning:** Be cautious with `Deny` ACLs as they take precedence over `Allow` ACLs. A deny rule will block access even if an allow rule exists.
324
+
325
+ ## Import
326
+
327
+ Kafka ACLs can be imported using a pipe-delimited string containing all ACL properties:
328
+
329
+ Format: ${acl_principal}|${acl_host}|${acl_operation}|${acl_permission_type}|${resource_type}|${resource_name}|${resource_pattern_type_filter}
330
+
331
+ ```sh
332
+ $ pulumi import kafka:index/acl:Acl example 'User:producer|*|Write|Allow|Topic|orders|Literal'
333
+ ```
334
+
221
335
  :param str resource_name: The name of the resource.
222
336
  :param pulumi.ResourceOptions opts: Options for the resource.
223
337
  :param pulumi.Input[_builtins.str] acl_resource_name: The name of the resource
@@ -229,7 +343,121 @@ class Acl(pulumi.CustomResource):
229
343
  args: AclArgs,
230
344
  opts: Optional[pulumi.ResourceOptions] = None):
231
345
  """
232
- Create a Acl resource with the given unique name, props, and options.
346
+ The `Acl` resource manages Apache Kafka Access Control Lists (ACLs). ACLs control access to Kafka resources like topics, consumer groups, and clusters by defining which principals (users or services) can perform specific operations on these resources.
347
+
348
+ ## Example Usage
349
+
350
+ ### Allow Producer Access to Topic
351
+
352
+ ```python
353
+ import pulumi
354
+ import pulumi_kafka as kafka
355
+
356
+ producer = kafka.Acl("producer",
357
+ acl_resource_name="orders",
358
+ acl_resource_type="Topic",
359
+ acl_principal="User:producer-service",
360
+ acl_host="*",
361
+ acl_operation="Write",
362
+ acl_permission_type="Allow")
363
+ # Also grant describe permission for producers
364
+ producer_describe = kafka.Acl("producer_describe",
365
+ acl_resource_name="orders",
366
+ acl_resource_type="Topic",
367
+ acl_principal="User:producer-service",
368
+ acl_host="*",
369
+ acl_operation="Describe",
370
+ acl_permission_type="Allow")
371
+ ```
372
+
373
+ ### Allow Consumer Group Access
374
+
375
+ ```python
376
+ import pulumi
377
+ import pulumi_kafka as kafka
378
+
379
+ # Allow read access to topic
380
+ consumer_read = kafka.Acl("consumer_read",
381
+ acl_resource_name="orders",
382
+ acl_resource_type="Topic",
383
+ acl_principal="User:consumer-service",
384
+ acl_host="*",
385
+ acl_operation="Read",
386
+ acl_permission_type="Allow")
387
+ # Allow access to consumer group
388
+ consumer_group = kafka.Acl("consumer_group",
389
+ acl_resource_name="order-processors",
390
+ acl_resource_type="Group",
391
+ acl_principal="User:consumer-service",
392
+ acl_host="*",
393
+ acl_operation="Read",
394
+ acl_permission_type="Allow")
395
+ ```
396
+
397
+ ### Prefix-Based Access Control
398
+
399
+ ```python
400
+ import pulumi
401
+ import pulumi_kafka as kafka
402
+
403
+ # Grant access to all topics with prefix "logs-"
404
+ logs_access = kafka.Acl("logs_access",
405
+ acl_resource_name="logs-",
406
+ acl_resource_type="Topic",
407
+ resource_pattern_type_filter="Prefixed",
408
+ acl_principal="User:log-aggregator",
409
+ acl_host="*",
410
+ acl_operation="Read",
411
+ acl_permission_type="Allow")
412
+ ```
413
+
414
+ ### Admin User with Full Access
415
+
416
+ ```python
417
+ import pulumi
418
+ import pulumi_kafka as kafka
419
+
420
+ # Grant cluster-level admin access
421
+ admin_cluster = kafka.Acl("admin_cluster",
422
+ acl_resource_name="kafka-cluster",
423
+ acl_resource_type="Cluster",
424
+ acl_principal="User:admin",
425
+ acl_host="*",
426
+ acl_operation="All",
427
+ acl_permission_type="Allow")
428
+ ```
429
+
430
+ ## Common ACL Patterns
431
+
432
+ ### Producer ACLs
433
+ Producers typically need:
434
+ - `Write` and `Describe` on topics
435
+ - `Write` on `TransactionalID` (for transactional producers)
436
+ - `IdempotentWrite` on `Cluster` (for idempotent producers)
437
+
438
+ ### Consumer ACLs
439
+ Consumers typically need:
440
+ - `Read` on topics
441
+ - `Read` on consumer groups
442
+ - `Describe` on topics (optional, for metadata)
443
+
444
+ ### Admin ACLs
445
+ Administrators typically need:
446
+ - `All` on `Cluster`
447
+ - Or specific operations like `Alter`, `AlterConfigs`, `Create`, `Delete`
448
+
449
+ > **Warning:** Be cautious with `Deny` ACLs as they take precedence over `Allow` ACLs. A deny rule will block access even if an allow rule exists.
450
+
451
+ ## Import
452
+
453
+ Kafka ACLs can be imported using a pipe-delimited string containing all ACL properties:
454
+
455
+ Format: ${acl_principal}|${acl_host}|${acl_operation}|${acl_permission_type}|${resource_type}|${resource_name}|${resource_pattern_type_filter}
456
+
457
+ ```sh
458
+ $ pulumi import kafka:index/acl:Acl example 'User:producer|*|Write|Allow|Topic|orders|Literal'
459
+ ```
460
+
233
461
  :param str resource_name: The name of the resource.
234
462
  :param AclArgs args: The arguments to use to populate this resource's properties.
235
463
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -0,0 +1,85 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins as _builtins
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from . import _utilities
16
+ from . import outputs
17
+
18
+ __all__ = [
19
+ 'GetTopicsResult',
20
+ 'AwaitableGetTopicsResult',
21
+ 'get_topics',
22
+ 'get_topics_output',
23
+ ]
24
+
25
+ @pulumi.output_type
26
+ class GetTopicsResult:
27
+ """
28
+ A collection of values returned by getTopics.
29
+ """
30
+ def __init__(__self__, id=None, lists=None):
31
+ if id and not isinstance(id, str):
32
+ raise TypeError("Expected argument 'id' to be a str")
33
+ pulumi.set(__self__, "id", id)
34
+ if lists and not isinstance(lists, list):
35
+ raise TypeError("Expected argument 'lists' to be a list")
36
+ pulumi.set(__self__, "lists", lists)
37
+
38
+ @_builtins.property
39
+ @pulumi.getter
40
+ def id(self) -> _builtins.str:
41
+ """
42
+ The provider-assigned unique ID for this managed resource.
43
+ """
44
+ return pulumi.get(self, "id")
45
+
46
+ @_builtins.property
47
+ @pulumi.getter
48
+ def lists(self) -> Sequence['outputs.GetTopicsListResult']:
49
+ """
50
+ A list containing all the topics.
51
+ """
52
+ return pulumi.get(self, "lists")
53
+
54
+
55
+ class AwaitableGetTopicsResult(GetTopicsResult):
56
+ # pylint: disable=using-constant-test
57
+ def __await__(self):
58
+ if False:
59
+ yield self
60
+ return GetTopicsResult(
61
+ id=self.id,
62
+ lists=self.lists)
63
+
64
+
65
+ def get_topics(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetTopicsResult:
66
+ """
67
+ Use this data source to access information about an existing resource.
68
+ """
69
+ __args__ = dict()
70
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
71
+ __ret__ = pulumi.runtime.invoke('kafka:index:getTopics', __args__, opts=opts, typ=GetTopicsResult).value
72
+
73
+ return AwaitableGetTopicsResult(
74
+ id=pulumi.get(__ret__, 'id'),
75
+ lists=pulumi.get(__ret__, 'lists'))
76
+ def get_topics_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetTopicsResult]:
77
+ """
78
+ Use this data source to access information about an existing resource.
79
+ """
80
+ __args__ = dict()
81
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
82
+ __ret__ = pulumi.runtime.invoke_output('kafka:index:getTopics', __args__, opts=opts, typ=GetTopicsResult)
83
+ return __ret__.apply(lambda __response__: GetTopicsResult(
84
+ id=pulumi.get(__response__, 'id'),
85
+ lists=pulumi.get(__response__, 'lists')))
@@ -0,0 +1,71 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins as _builtins
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from . import _utilities
16
+
17
+ __all__ = [
18
+ 'GetTopicsListResult',
19
+ ]
20
+
21
+ @pulumi.output_type
22
+ class GetTopicsListResult(dict):
23
+ def __init__(__self__, *,
24
+ config: Mapping[str, _builtins.str],
25
+ partitions: _builtins.int,
26
+ replication_factor: _builtins.int,
27
+ topic_name: _builtins.str):
28
+ """
29
+ :param Mapping[str, _builtins.str] config: A map of string k/v attributes.
30
+ :param _builtins.int partitions: Number of partitions.
31
+ :param _builtins.int replication_factor: Number of replicas.
32
+ :param _builtins.str topic_name: The name of the topic.
33
+ """
34
+ pulumi.set(__self__, "config", config)
35
+ pulumi.set(__self__, "partitions", partitions)
36
+ pulumi.set(__self__, "replication_factor", replication_factor)
37
+ pulumi.set(__self__, "topic_name", topic_name)
38
+
39
+ @_builtins.property
40
+ @pulumi.getter
41
+ def config(self) -> Mapping[str, _builtins.str]:
42
+ """
43
+ A map of string k/v attributes.
44
+ """
45
+ return pulumi.get(self, "config")
46
+
47
+ @_builtins.property
48
+ @pulumi.getter
49
+ def partitions(self) -> _builtins.int:
50
+ """
51
+ Number of partitions.
52
+ """
53
+ return pulumi.get(self, "partitions")
54
+
55
+ @_builtins.property
56
+ @pulumi.getter(name="replicationFactor")
57
+ def replication_factor(self) -> _builtins.int:
58
+ """
59
+ Number of replicas.
60
+ """
61
+ return pulumi.get(self, "replication_factor")
62
+
63
+ @_builtins.property
64
+ @pulumi.getter(name="topicName")
65
+ def topic_name(self) -> _builtins.str:
66
+ """
67
+ The name of the topic.
68
+ """
69
+ return pulumi.get(self, "topic_name")
70
+
71
+
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "resource": true,
3
3
  "name": "kafka",
4
- "version": "3.11.0-alpha.1753397760"
4
+ "version": "3.12.0-alpha.1753509641"
5
5
  }
@@ -138,7 +138,128 @@ class Quota(pulumi.CustomResource):
138
138
  entity_type: Optional[pulumi.Input[_builtins.str]] = None,
139
139
  __props__=None):
140
140
  """
141
- Create a Quota resource with the given unique name, props, and options.
141
+ The `Quota` resource manages Kafka quotas, which are used to limit resource usage and prevent any single client from monopolizing broker resources. Quotas can be applied to clients, users, or IP addresses to control bandwidth and request rates.
142
+
143
+ ## Example Usage
144
+
145
+ ### Client ID Quota
146
+
147
+ ```python
148
+ import pulumi
149
+ import pulumi_kafka as kafka
150
+
151
+ # Limit a specific client's bandwidth
152
+ mobile_app = kafka.Quota("mobile_app",
153
+ entity_name="mobile-app-v1",
154
+ entity_type="client-id",
155
+ config={
156
+ "consumer_byte_rate": "5000000",
157
+ "producer_byte_rate": "2500000",
158
+ "request_percentage": "200",
159
+ })
160
+ ```
161
+
162
+ ### User Quota
163
+
164
+ ```python
165
+ import pulumi
166
+ import pulumi_kafka as kafka
167
+
168
+ # Set quotas for a specific user
169
+ service_account = kafka.Quota("service_account",
170
+ entity_name="payment-service",
171
+ entity_type="user",
172
+ config={
173
+ "consumer_byte_rate": "10000000",
174
+ "producer_byte_rate": "10000000",
175
+ "request_percentage": "400",
176
+ })
177
+ ```
178
+
179
+ ### Default User Quota
180
+
181
+ ```python
182
+ import pulumi
183
+ import pulumi_kafka as kafka
184
+
185
+ # Set default quotas for all users (when entity_name is omitted)
186
+ default_user = kafka.Quota("default_user",
187
+ entity_type="user",
188
+ config={
189
+ "consumer_byte_rate": "2000000",
190
+ "producer_byte_rate": "1000000",
191
+ "request_percentage": "100",
192
+ })
193
+ ```
194
+
195
+ ### IP Address Quota
196
+
197
+ ```python
198
+ import pulumi
199
+ import pulumi_kafka as kafka
200
+
201
+ # Rate limit connections from a specific IP
202
+ external_ip = kafka.Quota("external_ip",
203
+ entity_name="203.0.113.0",
204
+ entity_type="ip",
205
+ config={
206
+ "connection_creation_rate": "10",
207
+ })
208
+ ```
209
+
210
+ ## Quota Configuration Options
211
+
212
+ ### Bandwidth Quotas
213
+ - `producer_byte_rate` - The maximum bytes per second that can be produced by the entity
214
+ - `consumer_byte_rate` - The maximum bytes per second that can be consumed by the entity
215
+
216
+ ### Request Rate Quotas
217
+ - `request_percentage` - The percentage of CPU time on each broker that the entity can use for requests. Values > 100% indicate multiple CPUs (e.g., 200% = 2 CPUs)
218
+
219
+ ### Connection Quotas (IP-based only)
220
+ - `connection_creation_rate` - The maximum rate of new connections per second from the IP address
221
+
222
+ ## Quota Precedence
223
+
224
+ When multiple quotas apply to a request, Kafka uses the most specific quota:
225
+
226
+ 1. `/config/users/<user>/clients/<client-id>` (most specific)
227
+ 2. `/config/users/<user>/clients/<default>`
228
+ 3. `/config/users/<user>`
229
+ 4. `/config/users/<default>/clients/<client-id>`
230
+ 5. `/config/users/<default>/clients/<default>`
231
+ 6. `/config/users/<default>` (least specific)
232
+
233
+ ## Best Practices
234
+
235
+ 1. **Start with Conservative Defaults**: Set reasonable default quotas for all users/clients and then create specific quotas for services that need higher limits.
236
+
237
+ 2. **Monitor Quota Usage**: Use Kafka metrics to monitor quota utilization and adjust as needed. Look for throttling metrics to identify when quotas are being hit.
238
+
239
+ 3. **Use Request Percentage Carefully**: The `request_percentage` quota affects CPU usage. Values over 100% mean the client can use more than one CPU core.
240
+
241
+ 4. **Plan for Growth**: Set quotas with some headroom to accommodate traffic growth, but not so high that a misbehaving client can impact the cluster.
242
+
243
+ 5. **Different Quotas for Different Environments**: Use stricter quotas in development/staging environments compared to production.
244
+
245
+ > **Note:** Quotas are applied immediately but may take a few seconds to propagate across all brokers.
246
+
247
+ ## Import
248
+
249
+ Kafka quotas can be imported using the entity type and name:
250
+
251
+ For named entities
252
+
253
+ ```sh
254
+ $ pulumi import kafka:index/quota:Quota example client-id:my-client
255
+ ```
256
+
257
+ For default quotas (no entity name)
258
+
259
+ ```sh
260
+ $ pulumi import kafka:index/quota:Quota default_user user:
261
+ ```
262
+
142
263
  :param str resource_name: The name of the resource.
143
264
  :param pulumi.ResourceOptions opts: Options for the resource.
144
265
  :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] config: A map of string k/v properties.
@@ -152,7 +273,128 @@ class Quota(pulumi.CustomResource):
152
273
  args: QuotaArgs,
153
274
  opts: Optional[pulumi.ResourceOptions] = None):
154
275
  """
155
- Create a Quota resource with the given unique name, props, and options.
276
+ The `Quota` resource manages Kafka quotas, which are used to limit resource usage and prevent any single client from monopolizing broker resources. Quotas can be applied to clients, users, or IP addresses to control bandwidth and request rates.
277
+
278
+ ## Example Usage
279
+
280
+ ### Client ID Quota
281
+
282
+ ```python
283
+ import pulumi
284
+ import pulumi_kafka as kafka
285
+
286
+ # Limit a specific client's bandwidth
287
+ mobile_app = kafka.Quota("mobile_app",
288
+ entity_name="mobile-app-v1",
289
+ entity_type="client-id",
290
+ config={
291
+ "consumer_byte_rate": "5000000",
292
+ "producer_byte_rate": "2500000",
293
+ "request_percentage": "200",
294
+ })
295
+ ```
296
+
297
+ ### User Quota
298
+
299
+ ```python
300
+ import pulumi
301
+ import pulumi_kafka as kafka
302
+
303
+ # Set quotas for a specific user
304
+ service_account = kafka.Quota("service_account",
305
+ entity_name="payment-service",
306
+ entity_type="user",
307
+ config={
308
+ "consumer_byte_rate": "10000000",
309
+ "producer_byte_rate": "10000000",
310
+ "request_percentage": "400",
311
+ })
312
+ ```
313
+
314
+ ### Default User Quota
315
+
316
+ ```python
317
+ import pulumi
318
+ import pulumi_kafka as kafka
319
+
320
+ # Set default quotas for all users (when entity_name is omitted)
321
+ default_user = kafka.Quota("default_user",
322
+ entity_type="user",
323
+ config={
324
+ "consumer_byte_rate": "2000000",
325
+ "producer_byte_rate": "1000000",
326
+ "request_percentage": "100",
327
+ })
328
+ ```
329
+
330
+ ### IP Address Quota
331
+
332
+ ```python
333
+ import pulumi
334
+ import pulumi_kafka as kafka
335
+
336
+ # Rate limit connections from a specific IP
337
+ external_ip = kafka.Quota("external_ip",
338
+ entity_name="203.0.113.0",
339
+ entity_type="ip",
340
+ config={
341
+ "connection_creation_rate": "10",
342
+ })
343
+ ```
344
+
345
+ ## Quota Configuration Options
346
+
347
+ ### Bandwidth Quotas
348
+ - `producer_byte_rate` - The maximum bytes per second that can be produced by the entity
349
+ - `consumer_byte_rate` - The maximum bytes per second that can be consumed by the entity
350
+
351
+ ### Request Rate Quotas
352
+ - `request_percentage` - The percentage of CPU time on each broker that the entity can use for requests. Values > 100% indicate multiple CPUs (e.g., 200% = 2 CPUs)
353
+
354
+ ### Connection Quotas (IP-based only)
355
+ - `connection_creation_rate` - The maximum rate of new connections per second from the IP address
356
+
357
+ ## Quota Precedence
358
+
359
+ When multiple quotas apply to a request, Kafka uses the most specific quota:
360
+
361
+ 1. `/config/users/<user>/clients/<client-id>` (most specific)
362
+ 2. `/config/users/<user>/clients/<default>`
363
+ 3. `/config/users/<user>`
364
+ 4. `/config/users/<default>/clients/<client-id>`
365
+ 5. `/config/users/<default>/clients/<default>`
366
+ 6. `/config/users/<default>` (least specific)
367
+
368
+ ## Best Practices
369
+
370
+ 1. **Start with Conservative Defaults**: Set reasonable default quotas for all users/clients and then create specific quotas for services that need higher limits.
371
+
372
+ 2. **Monitor Quota Usage**: Use Kafka metrics to monitor quota utilization and adjust as needed. Look for throttling metrics to identify when quotas are being hit.
373
+
374
+ 3. **Use Request Percentage Carefully**: The `request_percentage` quota affects CPU usage. Values over 100% mean the client can use more than one CPU core.
375
+
376
+ 4. **Plan for Growth**: Set quotas with some headroom to accommodate traffic growth, but not so high that a misbehaving client can impact the cluster.
377
+
378
+ 5. **Different Quotas for Different Environments**: Use stricter quotas in development/staging environments compared to production.
379
+
380
+ > **Note:** Quotas are applied immediately but may take a few seconds to propagate across all brokers.
381
+
382
+ ## Import
383
+
384
+ Kafka quotas can be imported using the entity type and name:
385
+
386
+ For named entities
387
+
388
+ ```sh
389
+ $ pulumi import kafka:index/quota:Quota example client-id:my-client
390
+ ```
391
+
392
+ For default quotas (no entity name)
393
+
394
+ ```sh
395
+ $ pulumi import kafka:index/quota:Quota default_user user:
396
+ ```
397
+
156
398
  :param str resource_name: The name of the resource.
157
399
  :param QuotaArgs args: The arguments to use to populate this resource's properties.
158
400
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -170,7 +170,118 @@ class Topic(pulumi.CustomResource):
170
170
  replication_factor: Optional[pulumi.Input[_builtins.int]] = None,
171
171
  __props__=None):
172
172
  """
173
- Create a Topic resource with the given unique name, props, and options.
173
+ The `Topic` resource manages Apache Kafka topics, including their partition count, replication factor, and various configuration parameters. This resource supports non-destructive partition count increases.
174
+
175
+ ## Example Usage
176
+
177
+ ### Basic Topic
178
+
179
+ ```python
180
+ import pulumi
181
+ import pulumi_kafka as kafka
182
+
183
+ example = kafka.Topic("example",
184
+ name="example-topic",
185
+ replication_factor=3,
186
+ partitions=10)
187
+ ```
188
+
189
+ ### Topic with Common Configurations
190
+
191
+ ```python
192
+ import pulumi
193
+ import pulumi_kafka as kafka
194
+
195
+ logs = kafka.Topic("logs",
196
+ name="application-logs",
197
+ replication_factor=3,
198
+ partitions=50,
199
+ config={
200
+ "retention.ms": "604800000",
201
+ "segment.ms": "86400000",
202
+ "cleanup.policy": "delete",
203
+ "compression.type": "gzip",
204
+ })
205
+ ```
206
+
207
+ ### Compacted Topic for Event Sourcing
208
+
209
+ ```python
210
+ import pulumi
211
+ import pulumi_kafka as kafka
212
+
213
+ events = kafka.Topic("events",
214
+ name="user-events",
215
+ replication_factor=3,
216
+ partitions=100,
217
+ config={
218
+ "cleanup.policy": "compact",
219
+ "retention.ms": "-1",
220
+ "min.compaction.lag.ms": "3600000",
221
+ "delete.retention.ms": "86400000",
222
+ "compression.type": "lz4",
223
+ "segment.bytes": "1073741824",
224
+ })
225
+ ```
226
+
227
+ ### High-Throughput Topic
228
+
229
+ ```python
230
+ import pulumi
231
+ import pulumi_kafka as kafka
232
+
233
+ metrics = kafka.Topic("metrics",
234
+ name="system-metrics",
235
+ replication_factor=2,
236
+ partitions=200,
237
+ config={
238
+ "retention.ms": "86400000",
239
+ "segment.ms": "3600000",
240
+ "compression.type": "lz4",
241
+ "max.message.bytes": "1048576",
242
+ "min.insync.replicas": "2",
243
+ "unclean.leader.election.enable": "false",
244
+ })
245
+ ```
246
+
247
+ ## Configuration Parameters
248
+
249
+ The `config` map supports all Kafka topic-level configurations. Common configurations include:
250
+
251
+ ### Retention Settings
252
+ - `retention.ms` - How long to retain messages (in milliseconds). Default: 604800000 (7 days)
253
+ - `retention.bytes` - Maximum size of the log before deleting old segments. Default: -1 (no limit)
254
+ - `segment.ms` - Time after which a log segment should be rotated. Default: 604800000 (7 days)
255
+ - `segment.bytes` - Maximum size of a single log segment file. Default: 1073741824 (1GB)
256
+
257
+ ### Cleanup and Compaction
258
+ - `cleanup.policy` - Either "delete" or "compact" or both "compact,delete". Default: "delete"
259
+ - `min.compaction.lag.ms` - Minimum time a message will remain uncompacted. Default: 0
260
+ - `delete.retention.ms` - How long to retain delete tombstone markers for compacted topics. Default: 86400000 (1 day)
261
+
262
+ ### Compression
263
+ - `compression.type` - Compression codec: "uncompressed", "zstd", "lz4", "snappy", "gzip", "producer". Default: "producer"
264
+
265
+ ### Replication and Durability
266
+ - `min.insync.replicas` - Minimum number of replicas that must acknowledge a write. Default: 1
267
+ - `unclean.leader.election.enable` - Whether to allow replicas not in ISR to be elected leader. Default: false
268
+
269
+ ### Message Size
270
+ - `max.message.bytes` - Maximum size of a message. Default: 1048588 (~1MB)
271
+ - `message.timestamp.type` - Whether to use CreateTime or LogAppendTime. Default: "CreateTime"
272
+
273
+ For a complete list of configurations, refer to the [Kafka documentation](https://kafka.apache.org/documentation/#topicconfigs).
274
+
275
+ > **Note:** Increasing the partition count is supported without recreating the topic. However, decreasing partitions requires topic recreation.
276
+
277
+ ## Import
278
+
279
+ Existing Kafka topics can be imported using the topic name:
280
+
281
+ ```sh
282
+ $ pulumi import kafka:index/topic:Topic example example-topic
283
+ ```
284
+
174
285
  :param str resource_name: The name of the resource.
175
286
  :param pulumi.ResourceOptions opts: Options for the resource.
176
287
  :param pulumi.Input[Mapping[str, pulumi.Input[_builtins.str]]] config: A map of string k/v attributes.
@@ -185,7 +296,118 @@ class Topic(pulumi.CustomResource):
185
296
  args: TopicArgs,
186
297
  opts: Optional[pulumi.ResourceOptions] = None):
187
298
  """
188
- Create a Topic resource with the given unique name, props, and options.
299
+ The `Topic` resource manages Apache Kafka topics, including their partition count, replication factor, and various configuration parameters. This resource supports non-destructive partition count increases.
300
+
301
+ ## Example Usage
302
+
303
+ ### Basic Topic
304
+
305
+ ```python
306
+ import pulumi
307
+ import pulumi_kafka as kafka
308
+
309
+ example = kafka.Topic("example",
310
+ name="example-topic",
311
+ replication_factor=3,
312
+ partitions=10)
313
+ ```
314
+
315
+ ### Topic with Common Configurations
316
+
317
+ ```python
318
+ import pulumi
319
+ import pulumi_kafka as kafka
320
+
321
+ logs = kafka.Topic("logs",
322
+ name="application-logs",
323
+ replication_factor=3,
324
+ partitions=50,
325
+ config={
326
+ "retention.ms": "604800000",
327
+ "segment.ms": "86400000",
328
+ "cleanup.policy": "delete",
329
+ "compression.type": "gzip",
330
+ })
331
+ ```
332
+
333
+ ### Compacted Topic for Event Sourcing
334
+
335
+ ```python
336
+ import pulumi
337
+ import pulumi_kafka as kafka
338
+
339
+ events = kafka.Topic("events",
340
+ name="user-events",
341
+ replication_factor=3,
342
+ partitions=100,
343
+ config={
344
+ "cleanup.policy": "compact",
345
+ "retention.ms": "-1",
346
+ "min.compaction.lag.ms": "3600000",
347
+ "delete.retention.ms": "86400000",
348
+ "compression.type": "lz4",
349
+ "segment.bytes": "1073741824",
350
+ })
351
+ ```
352
+
353
+ ### High-Throughput Topic
354
+
355
+ ```python
356
+ import pulumi
357
+ import pulumi_kafka as kafka
358
+
359
+ metrics = kafka.Topic("metrics",
360
+ name="system-metrics",
361
+ replication_factor=2,
362
+ partitions=200,
363
+ config={
364
+ "retention.ms": "86400000",
365
+ "segment.ms": "3600000",
366
+ "compression.type": "lz4",
367
+ "max.message.bytes": "1048576",
368
+ "min.insync.replicas": "2",
369
+ "unclean.leader.election.enable": "false",
370
+ })
371
+ ```
372
+
373
+ ## Configuration Parameters
374
+
375
+ The `config` map supports all Kafka topic-level configurations. Common configurations include:
376
+
377
+ ### Retention Settings
378
+ - `retention.ms` - How long to retain messages (in milliseconds). Default: 604800000 (7 days)
379
+ - `retention.bytes` - Maximum size of the log before deleting old segments. Default: -1 (no limit)
380
+ - `segment.ms` - Time after which a log segment should be rotated. Default: 604800000 (7 days)
381
+ - `segment.bytes` - Maximum size of a single log segment file. Default: 1073741824 (1GB)
382
+
383
+ ### Cleanup and Compaction
384
+ - `cleanup.policy` - Either "delete" or "compact" or both "compact,delete". Default: "delete"
385
+ - `min.compaction.lag.ms` - Minimum time a message will remain uncompacted. Default: 0
386
+ - `delete.retention.ms` - How long to retain delete tombstone markers for compacted topics. Default: 86400000 (1 day)
387
+
388
+ ### Compression
389
+ - `compression.type` - Compression codec: "uncompressed", "zstd", "lz4", "snappy", "gzip", "producer". Default: "producer"
390
+
391
+ ### Replication and Durability
392
+ - `min.insync.replicas` - Minimum number of replicas that must acknowledge a write. Default: 1
393
+ - `unclean.leader.election.enable` - Whether to allow replicas not in ISR to be elected leader. Default: false
394
+
395
+ ### Message Size
396
+ - `max.message.bytes` - Maximum size of a message. Default: 1048588 (~1MB)
397
+ - `message.timestamp.type` - Whether to use CreateTime or LogAppendTime. Default: "CreateTime"
398
+
399
+ For a complete list of configurations, refer to the [Kafka documentation](https://kafka.apache.org/documentation/#topicconfigs).
400
+
401
+ > **Note:** Increasing the partition count is supported without recreating the topic. However, decreasing partitions requires topic recreation.
402
+
403
+ ## Import
404
+
405
+ Existing Kafka topics can be imported using the topic name:
406
+
407
+ ```sh
408
+ $ pulumi import kafka:index/topic:Topic example example-topic
409
+ ```
410
+
189
411
  :param str resource_name: The name of the resource.
190
412
  :param TopicArgs args: The arguments to use to populate this resource's properties.
191
413
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -19,35 +19,28 @@ __all__ = ['UserScramCredentialArgs', 'UserScramCredential']
19
19
  @pulumi.input_type
20
20
  class UserScramCredentialArgs:
21
21
  def __init__(__self__, *,
22
- password: pulumi.Input[_builtins.str],
23
22
  scram_mechanism: pulumi.Input[_builtins.str],
24
23
  username: pulumi.Input[_builtins.str],
24
+ password: Optional[pulumi.Input[_builtins.str]] = None,
25
+ password_wo_version: Optional[pulumi.Input[_builtins.str]] = None,
25
26
  scram_iterations: Optional[pulumi.Input[_builtins.int]] = None):
26
27
  """
27
28
  The set of arguments for constructing a UserScramCredential resource.
28
- :param pulumi.Input[_builtins.str] password: The password of the credential
29
29
  :param pulumi.Input[_builtins.str] scram_mechanism: The SCRAM mechanism used to generate the credential (SCRAM-SHA-256, SCRAM-SHA-512)
30
30
  :param pulumi.Input[_builtins.str] username: The name of the credential
31
+ :param pulumi.Input[_builtins.str] password: The password of the credential (deprecated, use password_wo instead)
32
+ :param pulumi.Input[_builtins.str] password_wo_version: Version identifier for the write-only password to track changes
31
33
  :param pulumi.Input[_builtins.int] scram_iterations: The number of SCRAM iterations used when generating the credential
32
34
  """
33
- pulumi.set(__self__, "password", password)
34
35
  pulumi.set(__self__, "scram_mechanism", scram_mechanism)
35
36
  pulumi.set(__self__, "username", username)
37
+ if password is not None:
38
+ pulumi.set(__self__, "password", password)
39
+ if password_wo_version is not None:
40
+ pulumi.set(__self__, "password_wo_version", password_wo_version)
36
41
  if scram_iterations is not None:
37
42
  pulumi.set(__self__, "scram_iterations", scram_iterations)
38
43
 
39
- @_builtins.property
40
- @pulumi.getter
41
- def password(self) -> pulumi.Input[_builtins.str]:
42
- """
43
- The password of the credential
44
- """
45
- return pulumi.get(self, "password")
46
-
47
- @password.setter
48
- def password(self, value: pulumi.Input[_builtins.str]):
49
- pulumi.set(self, "password", value)
50
-
51
44
  @_builtins.property
52
45
  @pulumi.getter(name="scramMechanism")
53
46
  def scram_mechanism(self) -> pulumi.Input[_builtins.str]:
@@ -72,6 +65,30 @@ class UserScramCredentialArgs:
72
65
  def username(self, value: pulumi.Input[_builtins.str]):
73
66
  pulumi.set(self, "username", value)
74
67
 
68
+ @_builtins.property
69
+ @pulumi.getter
70
+ def password(self) -> Optional[pulumi.Input[_builtins.str]]:
71
+ """
72
+ The password of the credential (deprecated, use password_wo instead)
73
+ """
74
+ return pulumi.get(self, "password")
75
+
76
+ @password.setter
77
+ def password(self, value: Optional[pulumi.Input[_builtins.str]]):
78
+ pulumi.set(self, "password", value)
79
+
80
+ @_builtins.property
81
+ @pulumi.getter(name="passwordWoVersion")
82
+ def password_wo_version(self) -> Optional[pulumi.Input[_builtins.str]]:
83
+ """
84
+ Version identifier for the write-only password to track changes
85
+ """
86
+ return pulumi.get(self, "password_wo_version")
87
+
88
+ @password_wo_version.setter
89
+ def password_wo_version(self, value: Optional[pulumi.Input[_builtins.str]]):
90
+ pulumi.set(self, "password_wo_version", value)
91
+
75
92
  @_builtins.property
76
93
  @pulumi.getter(name="scramIterations")
77
94
  def scram_iterations(self) -> Optional[pulumi.Input[_builtins.int]]:
@@ -89,18 +106,22 @@ class UserScramCredentialArgs:
89
106
  class _UserScramCredentialState:
90
107
  def __init__(__self__, *,
91
108
  password: Optional[pulumi.Input[_builtins.str]] = None,
109
+ password_wo_version: Optional[pulumi.Input[_builtins.str]] = None,
92
110
  scram_iterations: Optional[pulumi.Input[_builtins.int]] = None,
93
111
  scram_mechanism: Optional[pulumi.Input[_builtins.str]] = None,
94
112
  username: Optional[pulumi.Input[_builtins.str]] = None):
95
113
  """
96
114
  Input properties used for looking up and filtering UserScramCredential resources.
97
- :param pulumi.Input[_builtins.str] password: The password of the credential
115
+ :param pulumi.Input[_builtins.str] password: The password of the credential (deprecated, use password_wo instead)
116
+ :param pulumi.Input[_builtins.str] password_wo_version: Version identifier for the write-only password to track changes
98
117
  :param pulumi.Input[_builtins.int] scram_iterations: The number of SCRAM iterations used when generating the credential
99
118
  :param pulumi.Input[_builtins.str] scram_mechanism: The SCRAM mechanism used to generate the credential (SCRAM-SHA-256, SCRAM-SHA-512)
100
119
  :param pulumi.Input[_builtins.str] username: The name of the credential
101
120
  """
102
121
  if password is not None:
103
122
  pulumi.set(__self__, "password", password)
123
+ if password_wo_version is not None:
124
+ pulumi.set(__self__, "password_wo_version", password_wo_version)
104
125
  if scram_iterations is not None:
105
126
  pulumi.set(__self__, "scram_iterations", scram_iterations)
106
127
  if scram_mechanism is not None:
@@ -112,7 +133,7 @@ class _UserScramCredentialState:
112
133
  @pulumi.getter
113
134
  def password(self) -> Optional[pulumi.Input[_builtins.str]]:
114
135
  """
115
- The password of the credential
136
+ The password of the credential (deprecated, use password_wo instead)
116
137
  """
117
138
  return pulumi.get(self, "password")
118
139
 
@@ -120,6 +141,18 @@ class _UserScramCredentialState:
120
141
  def password(self, value: Optional[pulumi.Input[_builtins.str]]):
121
142
  pulumi.set(self, "password", value)
122
143
 
144
+ @_builtins.property
145
+ @pulumi.getter(name="passwordWoVersion")
146
+ def password_wo_version(self) -> Optional[pulumi.Input[_builtins.str]]:
147
+ """
148
+ Version identifier for the write-only password to track changes
149
+ """
150
+ return pulumi.get(self, "password_wo_version")
151
+
152
+ @password_wo_version.setter
153
+ def password_wo_version(self, value: Optional[pulumi.Input[_builtins.str]]):
154
+ pulumi.set(self, "password_wo_version", value)
155
+
123
156
  @_builtins.property
124
157
  @pulumi.getter(name="scramIterations")
125
158
  def scram_iterations(self) -> Optional[pulumi.Input[_builtins.int]]:
@@ -164,15 +197,24 @@ class UserScramCredential(pulumi.CustomResource):
164
197
  resource_name: str,
165
198
  opts: Optional[pulumi.ResourceOptions] = None,
166
199
  password: Optional[pulumi.Input[_builtins.str]] = None,
200
+ password_wo_version: Optional[pulumi.Input[_builtins.str]] = None,
167
201
  scram_iterations: Optional[pulumi.Input[_builtins.int]] = None,
168
202
  scram_mechanism: Optional[pulumi.Input[_builtins.str]] = None,
169
203
  username: Optional[pulumi.Input[_builtins.str]] = None,
170
204
  __props__=None):
171
205
  """
172
- Create a UserScramCredential resource with the given unique name, props, and options.
206
+ ## Import
207
+
208
+ SCRAM credentials can be imported using the format `username|scram_mechanism|password`:
209
+
210
+ ```sh
211
+ $ pulumi import kafka:index/userScramCredential:UserScramCredential example 'my-user|SCRAM-SHA-256|my-password'
212
+ ```
213
+
173
214
  :param str resource_name: The name of the resource.
174
215
  :param pulumi.ResourceOptions opts: Options for the resource.
175
- :param pulumi.Input[_builtins.str] password: The password of the credential
216
+ :param pulumi.Input[_builtins.str] password: The password of the credential (deprecated, use password_wo instead)
217
+ :param pulumi.Input[_builtins.str] password_wo_version: Version identifier for the write-only password to track changes
176
218
  :param pulumi.Input[_builtins.int] scram_iterations: The number of SCRAM iterations used when generating the credential
177
219
  :param pulumi.Input[_builtins.str] scram_mechanism: The SCRAM mechanism used to generate the credential (SCRAM-SHA-256, SCRAM-SHA-512)
178
220
  :param pulumi.Input[_builtins.str] username: The name of the credential
@@ -184,7 +226,14 @@ class UserScramCredential(pulumi.CustomResource):
184
226
  args: UserScramCredentialArgs,
185
227
  opts: Optional[pulumi.ResourceOptions] = None):
186
228
  """
187
- Create a UserScramCredential resource with the given unique name, props, and options.
229
+ ## Import
230
+
231
+ SCRAM credentials can be imported using the format `username|scram_mechanism|password`:
232
+
233
+ ```sh
234
+ $ pulumi import kafka:index/userScramCredential:UserScramCredential example 'my-user|SCRAM-SHA-256|my-password'
235
+ ```
236
+
188
237
  :param str resource_name: The name of the resource.
189
238
  :param UserScramCredentialArgs args: The arguments to use to populate this resource's properties.
190
239
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -201,6 +250,7 @@ class UserScramCredential(pulumi.CustomResource):
201
250
  resource_name: str,
202
251
  opts: Optional[pulumi.ResourceOptions] = None,
203
252
  password: Optional[pulumi.Input[_builtins.str]] = None,
253
+ password_wo_version: Optional[pulumi.Input[_builtins.str]] = None,
204
254
  scram_iterations: Optional[pulumi.Input[_builtins.int]] = None,
205
255
  scram_mechanism: Optional[pulumi.Input[_builtins.str]] = None,
206
256
  username: Optional[pulumi.Input[_builtins.str]] = None,
@@ -213,9 +263,8 @@ class UserScramCredential(pulumi.CustomResource):
213
263
  raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
214
264
  __props__ = UserScramCredentialArgs.__new__(UserScramCredentialArgs)
215
265
 
216
- if password is None and not opts.urn:
217
- raise TypeError("Missing required property 'password'")
218
266
  __props__.__dict__["password"] = None if password is None else pulumi.Output.secret(password)
267
+ __props__.__dict__["password_wo_version"] = password_wo_version
219
268
  __props__.__dict__["scram_iterations"] = scram_iterations
220
269
  if scram_mechanism is None and not opts.urn:
221
270
  raise TypeError("Missing required property 'scram_mechanism'")
@@ -236,6 +285,7 @@ class UserScramCredential(pulumi.CustomResource):
236
285
  id: pulumi.Input[str],
237
286
  opts: Optional[pulumi.ResourceOptions] = None,
238
287
  password: Optional[pulumi.Input[_builtins.str]] = None,
288
+ password_wo_version: Optional[pulumi.Input[_builtins.str]] = None,
239
289
  scram_iterations: Optional[pulumi.Input[_builtins.int]] = None,
240
290
  scram_mechanism: Optional[pulumi.Input[_builtins.str]] = None,
241
291
  username: Optional[pulumi.Input[_builtins.str]] = None) -> 'UserScramCredential':
@@ -246,7 +296,8 @@ class UserScramCredential(pulumi.CustomResource):
246
296
  :param str resource_name: The unique name of the resulting resource.
247
297
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
248
298
  :param pulumi.ResourceOptions opts: Options for the resource.
249
- :param pulumi.Input[_builtins.str] password: The password of the credential
299
+ :param pulumi.Input[_builtins.str] password: The password of the credential (deprecated, use password_wo instead)
300
+ :param pulumi.Input[_builtins.str] password_wo_version: Version identifier for the write-only password to track changes
250
301
  :param pulumi.Input[_builtins.int] scram_iterations: The number of SCRAM iterations used when generating the credential
251
302
  :param pulumi.Input[_builtins.str] scram_mechanism: The SCRAM mechanism used to generate the credential (SCRAM-SHA-256, SCRAM-SHA-512)
252
303
  :param pulumi.Input[_builtins.str] username: The name of the credential
@@ -256,6 +307,7 @@ class UserScramCredential(pulumi.CustomResource):
256
307
  __props__ = _UserScramCredentialState.__new__(_UserScramCredentialState)
257
308
 
258
309
  __props__.__dict__["password"] = password
310
+ __props__.__dict__["password_wo_version"] = password_wo_version
259
311
  __props__.__dict__["scram_iterations"] = scram_iterations
260
312
  __props__.__dict__["scram_mechanism"] = scram_mechanism
261
313
  __props__.__dict__["username"] = username
@@ -263,12 +315,20 @@ class UserScramCredential(pulumi.CustomResource):
263
315
 
264
316
  @_builtins.property
265
317
  @pulumi.getter
266
- def password(self) -> pulumi.Output[_builtins.str]:
318
+ def password(self) -> pulumi.Output[Optional[_builtins.str]]:
267
319
  """
268
- The password of the credential
320
+ The password of the credential (deprecated, use password_wo instead)
269
321
  """
270
322
  return pulumi.get(self, "password")
271
323
 
324
+ @_builtins.property
325
+ @pulumi.getter(name="passwordWoVersion")
326
+ def password_wo_version(self) -> pulumi.Output[Optional[_builtins.str]]:
327
+ """
328
+ Version identifier for the write-only password to track changes
329
+ """
330
+ return pulumi.get(self, "password_wo_version")
331
+
272
332
  @_builtins.property
273
333
  @pulumi.getter(name="scramIterations")
274
334
  def scram_iterations(self) -> pulumi.Output[Optional[_builtins.int]]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pulumi_kafka
3
- Version: 3.11.0a1753397760
3
+ Version: 3.12.0a1753509641
4
4
  Summary: A Pulumi package for creating and managing Kafka.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://pulumi.io
@@ -4,6 +4,8 @@ pulumi_kafka/__init__.py
4
4
  pulumi_kafka/_utilities.py
5
5
  pulumi_kafka/acl.py
6
6
  pulumi_kafka/get_topic.py
7
+ pulumi_kafka/get_topics.py
8
+ pulumi_kafka/outputs.py
7
9
  pulumi_kafka/provider.py
8
10
  pulumi_kafka/pulumi-plugin.json
9
11
  pulumi_kafka/py.typed
@@ -5,7 +5,7 @@
5
5
  keywords = ["pulumi", "kafka"]
6
6
  readme = "README.md"
7
7
  requires-python = ">=3.9"
8
- version = "3.11.0a1753397760"
8
+ version = "3.12.0a1753509641"
9
9
  [project.license]
10
10
  text = "Apache-2.0"
11
11
  [project.urls]