From 982edc7bdf1cfada5284646c845244ae84f72375 Mon Sep 17 00:00:00 2001 From: Junio Cezar Date: Mon, 29 Jan 2024 18:30:51 -0300 Subject: [PATCH] precommit changes --- docs/resources/repository.md | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/docs/resources/repository.md b/docs/resources/repository.md index c65564dd..a1cbf55f 100644 --- a/docs/resources/repository.md +++ b/docs/resources/repository.md @@ -10,8 +10,9 @@ This module provides the repository configuration options as shown in Cyral UI. ## Example Usage More complex examples using `cyral_repository` resource are available in the `Guides` section: -* [Create an AWS EC2 sidecar to protect PostgreSQL and MySQL databases](https://registry.terraform.io/providers/cyralinc/cyral/latest/docs/guides/setup_cp_and_deploy_sidecar) -* [Setup SSO access to MongoDB cluster using Okta IdP](https://registry.terraform.io/providers/cyralinc/cyral/latest/docs/guides/mongodb_cluster_okta_idp) + +- [Create an AWS EC2 sidecar to protect PostgreSQL and MySQL databases](https://registry.terraform.io/providers/cyralinc/cyral/latest/docs/guides/setup_cp_and_deploy_sidecar) +- [Setup SSO access to MongoDB cluster using Okta IdP](https://registry.terraform.io/providers/cyralinc/cyral/latest/docs/guides/mongodb_cluster_okta_idp) ```terraform ### Minimal Repository @@ -83,6 +84,7 @@ resource "cyral_repository" "multi_node_mongo_repo" { ``` + ## Schema ### Required @@ -116,13 +118,14 @@ resource "cyral_repository" "multi_node_mongo_repo" { - `id` (String) ID of this resource in Cyral environment. + ### Nested Schema for `repo_node` Optional: -- `dynamic` (Boolean) *Only supported for MongoDB in cluster configurations.* -Indicates if the node is dynamically discovered, meaning that the sidecar will query the cluster to get the topology information and discover the addresses of the dynamic nodes. If set to `true`, `host` and `port` must be empty. A node with value of this field as false considered `static`. -The following conditions apply: +- `dynamic` (Boolean) _Only supported for MongoDB in cluster configurations._ + Indicates if the node is dynamically discovered, meaning that the sidecar will query the cluster to get the topology information and discover the addresses of the dynamic nodes. If set to `true`, `host` and `port` must be empty. A node with value of this field as false considered `static`. + The following conditions apply: - The total number of declared `repo_node` blocks must match the actual number of nodes in the cluster. - If there are static nodes in the configuration, they must be declared before all dynamic nodes. - See the MongoDB-specific configuration in the [mongodb_settings](#nested-schema-for-mongodb_settings). @@ -130,8 +133,8 @@ The following conditions apply: - `name` (String) Name of the repo node. - `port` (Number) Repository access port (ex: `3306`). Can be empty if node is dynamic. - + ### Nested Schema for `connection_draining` Optional: @@ -139,31 +142,36 @@ Optional: - `auto` (Boolean) Whether connections should be drained automatically after a listener dies. - `wait_time` (Number) Seconds to wait to let connections drain before starting to kill all the connections, if auto is set to true. - + ### Nested Schema for `mongodb_settings` Required: -- `server_type` (String) Type of the MongoDB server. Allowed values: +- `server_type` (String) Type of the MongoDB server. Allowed values: + - `replicaset` - `standalone` - `sharded` The following conditions apply: - - If `sharded` and `srv_record_name` *not* provided, then all `repo_node` blocks must be static (see [`dynamic`](#dynamic)). + + - If `sharded` and `srv_record_name` _not_ provided, then all `repo_node` blocks must be static (see [`dynamic`](#dynamic)). - If `sharded` and `srv_record_name` provided, then all `repo_node` blocks must be dynamic (see [`dynamic`](#dynamic)). - If `standalone`, then only one `repo_node` block can be declared and it must be static (see [`dynamic`](#dynamic)). The `srv_record_name` is not supported in this configuration. - - If `replicaset` and `srv_record_name` *not* provided, then `repo_node` blocks may mix dynamic and static nodes (see [`dynamic`](#dynamic)). + - If `replicaset` and `srv_record_name` _not_ provided, then `repo_node` blocks may mix dynamic and static nodes (see [`dynamic`](#dynamic)). - If `replicaset` and `srv_record_name` provided, then `repo_node` blocks must be dynamic (see [`dynamic`](#dynamic)). Optional: -- `flavor` (String) The flavor of the MongoDB deployment. Allowed values: +- `flavor` (String) The flavor of the MongoDB deployment. Allowed values: + - `mongodb` - `documentdb` The following conditions apply: + - The `documentdb` flavor cannot be combined with the MongoDB Server type `sharded`. + - `replica_set_name` (String) Name of the replica set, if applicable. - `srv_record_name` (String) Name of a DNS SRV record which contains cluster topology details. If specified, then all `repo_node` blocks must be declared dynamic (see [`dynamic`](#dynamic)). Only supported for `server_type="sharded"` or `server_type="replicaset".