From 2d7e689fede1a434a71877d7735a941f1acbe43f Mon Sep 17 00:00:00 2001 From: jaime Bernabe <6184069+Monitob@users.noreply.github.com> Date: Tue, 4 Apr 2023 15:21:17 +0200 Subject: [PATCH] fix(mnq): documentation (#1875) --- docs/guides/mnq_with_nats_terraform_provider.md | 9 +++++++-- docs/resources/mnq_credential.md | 15 +++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/docs/guides/mnq_with_nats_terraform_provider.md b/docs/guides/mnq_with_nats_terraform_provider.md index 0a565a8c2..35e7087c5 100644 --- a/docs/guides/mnq_with_nats_terraform_provider.md +++ b/docs/guides/mnq_with_nats_terraform_provider.md @@ -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 = "" + # credential_data = "" + # credential_data = scaleway_mnq_credential.main.nats_credentials[0].content } ``` diff --git a/docs/resources/mnq_credential.md b/docs/resources/mnq_credential.md index fd871bc76..de47188ac 100644 --- a/docs/resources/mnq_credential.md +++ b/docs/resources/mnq_credential.md @@ -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 @@ -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. @@ -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.