Skip to content

Commit 2d7e689

Browse files
authored
fix(mnq): documentation (#1875)
1 parent 5e3657c commit 2d7e689

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

docs/guides/mnq_with_nats_terraform_provider.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,14 @@ NATS Configuration Context "example"
114114
NATS [JetStream Provider](https://registry.terraform.io/providers/nats-io/jetstream/latest/docs):
115115

116116
```hcl
117+
resource "scaleway_mnq_credential" "main" {
118+
# Your config
119+
}
120+
117121
provider "jetstream" {
118-
servers = scaleway_mnq_namespace.manin.endpoint
122+
servers = scaleway_mnq_namespace.main.endpoint
119123
credentials = "path/ngs_stream_admin.creds"
120-
# credential_data = "<SCW_CREDENTIAL_AS_STRING>"
124+
# credential_data = "<SCW_CREDENTIAL_AS_STRING>"
125+
# credential_data = scaleway_mnq_credential.main.nats_credentials[0].content
121126
}
122127
```

docs/resources/mnq_credential.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: |-
44
Manages Scaleway Messaging and Queuing Credential.
55
---
66

7-
# scaleway_mnq_namespace
7+
# scaleway_mnq_credential
88

99
This Terraform configuration creates and manage a Scaleway MNQ credential associated with a namespace.
1010
For additional details, kindly refer to our [website](https://www.scaleway.com/en/docs/serverless/messaging/) and
@@ -53,10 +53,7 @@ The following arguments are supported:
5353

5454
- `name` - (Optional) The credential name..
5555
- `namespace_id` - (Required) The namespace containing the Credential.
56-
- `nats_credentials` - Credentials file used to connect to the NATS service. Only one of `nats_credentials` and `sqs_sns_credentials` may be set.
57-
- `content` - Raw content of the NATS credentials file.
58-
- `sqs_sns_credentials` - Credential used to connect to the SQS/SNS service. Only one of `nats_credentials`
59-
and `sqs_sns_credentials` may be set.
56+
- `sqs_sns_credentials` - Credential used to connect to the SQS/SNS service.
6057
- `permissions` List of permissions associated to this Credential. Only one of permissions may be set.
6158
- `can_publish` - (Optional). Defines if user can publish messages to the service.
6259
- `can_receive` - (Optional). Defines if user can receive messages from the service.
@@ -67,16 +64,18 @@ The following arguments are supported:
6764
In addition to all arguments above, the following attributes are exported:
6865

6966
- `id` - The credential ID.
70-
71-
~> **Important:** Messaging and Queuing credentials' IDs are [regional](../guides/regions_and_zones.md#resource-ids), which means they are of the form `{region}/{id}`, e.g. `fr-par/11111111-1111-1111-1111-111111111111`
72-
7367
- `protocol` - The protocol associated to the Credential. Possible values are `nats` and `sqs_sns`.
7468
- `sqs_sns_credentials` - The credential used to connect to the SQS/SNS service.
7569
- `access_key` - The ID of the key.
7670
- `secret_key` - The Secret value of the key.
71+
- `nats_credentials` - Credentials file used to connect to the NATS service.
72+
- `content` - Raw content of the NATS credentials file.
7773
- `region` - (Defaults to [provider](../index.md#region) `region`). The [region](../guides/regions_and_zones.md#regions)
7874
in which the namespace should be created.
7975

76+
~> **Important:** Messaging and Queuing credentials' IDs are [regional](../guides/regions_and_zones.md#resource-ids),
77+
which means they are of the form `{region}/{id}`, e.g. `fr-par/11111111-1111-1111-1111-111111111111`
78+
8079
## Import
8180

8281
Credential can be imported using the `{region}/{id}`, e.g.

0 commit comments

Comments
 (0)