Skip to content

Commit

Permalink
fix(mnq): documentation (#1875)
Browse files Browse the repository at this point in the history
  • Loading branch information
Monitob authored Apr 4, 2023
1 parent 5e3657c commit 2d7e689
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
9 changes: 7 additions & 2 deletions docs/guides/mnq_with_nats_terraform_provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,14 @@ NATS Configuration Context "example"
NATS [JetStream Provider](https://registry.terraform.io/providers/nats-io/jetstream/latest/docs):

```hcl
resource "scaleway_mnq_credential" "main" {
# Your config
}
provider "jetstream" {
servers = scaleway_mnq_namespace.manin.endpoint
servers = scaleway_mnq_namespace.main.endpoint
credentials = "path/ngs_stream_admin.creds"
# credential_data = "<SCW_CREDENTIAL_AS_STRING>"
# credential_data = "<SCW_CREDENTIAL_AS_STRING>"
# credential_data = scaleway_mnq_credential.main.nats_credentials[0].content
}
```
15 changes: 7 additions & 8 deletions docs/resources/mnq_credential.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: |-
Manages Scaleway Messaging and Queuing Credential.
---

# scaleway_mnq_namespace
# scaleway_mnq_credential

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

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

- `id` - The credential ID.

~> **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`

- `protocol` - The protocol associated to the Credential. Possible values are `nats` and `sqs_sns`.
- `sqs_sns_credentials` - The credential used to connect to the SQS/SNS service.
- `access_key` - The ID of the key.
- `secret_key` - The Secret value of the key.
- `nats_credentials` - Credentials file used to connect to the NATS service.
- `content` - Raw content of the NATS credentials file.
- `region` - (Defaults to [provider](../index.md#region) `region`). The [region](../guides/regions_and_zones.md#regions)
in which the namespace should be created.

~> **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`

## Import

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

0 comments on commit 2d7e689

Please sign in to comment.