|
| 1 | +--- |
| 2 | +page_title: "minio_notify_nats Resource - terraform-provider-minio" |
| 3 | +subcategory: "" |
| 4 | +description: |- |
| 5 | + Manages a NATS notification target for MinIO bucket event notifications. |
| 6 | +--- |
| 7 | + |
| 8 | +# minio_notify_nats (Resource) |
| 9 | + |
| 10 | +Manages a NATS notification target for MinIO bucket event notifications. |
| 11 | + |
| 12 | +**NOTE:** Creating a new notification target may require a MinIO server restart before it becomes fully active. The `restart_required` attribute indicates when this is necessary. |
| 13 | + |
| 14 | +## Example Usage |
| 15 | + |
| 16 | +```terraform |
| 17 | +resource "minio_notify_nats" "events" { |
| 18 | + name = "primary" |
| 19 | + address = "nats.example.com:4222" |
| 20 | + subject = "minio.events" |
| 21 | +
|
| 22 | + username = "minio" |
| 23 | + password = var.nats_password |
| 24 | + jetstream = true |
| 25 | +} |
| 26 | +``` |
| 27 | + |
| 28 | +<!-- schema generated by tfplugindocs --> |
| 29 | +## Schema |
| 30 | + |
| 31 | +### Required |
| 32 | + |
| 33 | +- `address` (String) NATS server address (e.g., 'nats://localhost:4222'). |
| 34 | +- `name` (String) Target name identifier. |
| 35 | +- `subject` (String) NATS subject to publish notifications to. |
| 36 | + |
| 37 | +### Optional |
| 38 | + |
| 39 | +- `cert_authority` (String) Path to the certificate authority file for TLS verification. |
| 40 | +- `client_cert` (String) Path to the client certificate for mTLS authentication. |
| 41 | +- `client_key` (String, Sensitive) Path to the client private key for mTLS authentication. MinIO does not return this value on read; Terraform keeps the value from your configuration. |
| 42 | +- `comment` (String) Comment or description for this notification target. |
| 43 | +- `enable` (Boolean) Whether this notification target is enabled. |
| 44 | +- `jetstream` (Boolean) Whether to enable JetStream support for NATS. |
| 45 | +- `password` (String, Sensitive) Password for NATS authentication. MinIO does not return this value on read; Terraform keeps the value from your configuration. |
| 46 | +- `ping_interval` (String) Duration interval between NATS ping requests (e.g., '0s'). |
| 47 | +- `queue_dir` (String) Directory path for persistent event store when the target is offline. |
| 48 | +- `queue_limit` (Number) Maximum number of undelivered messages to queue. |
| 49 | +- `streaming` (Boolean) Whether to enable NATS Streaming (STAN) mode. |
| 50 | +- `streaming_async` (Boolean) Whether to enable asynchronous publishing for NATS Streaming. |
| 51 | +- `streaming_cluster_id` (String) Cluster ID for NATS Streaming. |
| 52 | +- `streaming_max_pub_acks_in_flight` (Number) Maximum number of unacknowledged messages in flight for NATS Streaming. |
| 53 | +- `tls` (Boolean) Whether to enable TLS for the NATS connection. |
| 54 | +- `tls_skip_verify` (Boolean) Whether to skip TLS certificate verification. |
| 55 | +- `token` (String, Sensitive) Token for NATS authentication. MinIO does not return this value on read; Terraform keeps the value from your configuration. |
| 56 | +- `user_credentials` (String) Path to NATS user credentials file. |
| 57 | +- `username` (String) Username for NATS authentication. |
| 58 | + |
| 59 | +### Read-Only |
| 60 | + |
| 61 | +- `id` (String) The ID of this resource. |
| 62 | +- `restart_required` (Boolean) Indicates whether a MinIO server restart is required. |
| 63 | + |
| 64 | +## Import |
| 65 | + |
| 66 | +Import is supported using the target name: |
| 67 | + |
| 68 | +```shell |
| 69 | +terraform import minio_notify_nats.example target-name |
| 70 | +``` |
| 71 | + |
| 72 | +Note: Sensitive fields are not returned by the MinIO API. After import, these values will be empty in state until the next apply. |
0 commit comments