Skip to content

Commit

Permalink
precommit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
juniocezar committed Jan 29, 2024
1 parent 1c88fa8 commit 982edc7
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions docs/resources/repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -83,6 +84,7 @@ resource "cyral_repository" "multi_node_mongo_repo" {
```

<!-- schema generated by tfplugindocs -->

## Schema

### Required
Expand Down Expand Up @@ -116,54 +118,60 @@ resource "cyral_repository" "multi_node_mongo_repo" {
- `id` (String) ID of this resource in Cyral environment.

<a id="nestedblock--repo_node"></a>

### 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).
- `host` (String) Repo node host (ex: `somerepo.cyral.com`). Can be empty if node is dynamic.
- `name` (String) Name of the repo node.
- `port` (Number) Repository access port (ex: `3306`). Can be empty if node is dynamic.


<a id="nestedblock--connection_draining"></a>

### Nested Schema for `connection_draining`

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.


<a id="nestedblock--mongodb_settings"></a>

### 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".

0 comments on commit 982edc7

Please sign in to comment.