Onboard MongoDB Flex user (#88)

* Onboard user

* Add examples and generate docs

* Adjustments after review
This commit is contained in:
João Palet 2023-10-17 15:09:02 +02:00 committed by GitHub
parent 2ddeb17d8a
commit 20f3496242
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 1672 additions and 1 deletions

View file

@ -0,0 +1,68 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_mongodbflex_instance Data Source - stackit"
subcategory: ""
description: |-
MongoDB Flex instance data source schema.
---
# stackit_mongodbflex_instance (Data Source)
MongoDB Flex instance data source schema.
## Example Usage
```terraform
data "stackit_mongodbflex_instance" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
user_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `instance_id` (String) ID of the MongoDB Flex instance.
- `project_id` (String) STACKIT project ID to which the instance is associated.
### Read-Only
- `acl` (List of String) The Access Control List (ACL) for the MongoDB Flex instance.
- `backup_schedule` (String)
- `flavor` (Attributes) (see [below for nested schema](#nestedatt--flavor))
- `id` (String) Terraform's internal data source. ID. It is structured as "`project_id`,`instance_id`".
- `name` (String) Instance name.
- `options` (Attributes) (see [below for nested schema](#nestedatt--options))
- `replicas` (Number)
- `storage` (Attributes) (see [below for nested schema](#nestedatt--storage))
- `version` (String)
<a id="nestedatt--flavor"></a>
### Nested Schema for `flavor`
Read-Only:
- `cpu` (Number)
- `description` (String)
- `id` (String)
- `ram` (Number)
<a id="nestedatt--options"></a>
### Nested Schema for `options`
Read-Only:
- `type` (String)
<a id="nestedatt--storage"></a>
### Nested Schema for `storage`
Read-Only:
- `class` (String)
- `size` (Number)

View file

@ -0,0 +1,38 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_mongodbflex_user Data Source - stackit"
subcategory: ""
description: |-
PostgresFlex user data source schema.
---
# stackit_mongodbflex_user (Data Source)
PostgresFlex user data source schema.
## Example Usage
```terraform
data "stackit_mongodbflex_instance" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `instance_id` (String) ID of the PostgresFlex instance.
- `project_id` (String) STACKIT project ID to which the instance is associated.
- `user_id` (String) User ID.
### Read-Only
- `database` (String)
- `host` (String)
- `id` (String) Terraform's internal data source. ID. It is structured as "`project_id`,`instance_id`,`user_id`".
- `port` (Number)
- `roles` (Set of String)
- `username` (String)

View file

@ -120,6 +120,7 @@ Using this flow is less secure since the token is long-lived. You can provide th
- `jwks_custom_endpoint` (String) Custom endpoint for the jwks API, which is used to get the json web key sets (jwks) to validate tokens when using the key flow
- `logme_custom_endpoint` (String) Custom endpoint for the LogMe service
- `mariadb_custom_endpoint` (String) Custom endpoint for the MariaDB service
- `mongodbflex_custom_endpoint` (String) Custom endpoint for the MongoDB Flex service
- `objectstorage_custom_endpoint` (String) Custom endpoint for the Object Storage service
- `opensearch_custom_endpoint` (String) Custom endpoint for the OpenSearch service
- `postgresflex_custom_endpoint` (String) Custom endpoint for the PostgresFlex service
@ -130,6 +131,7 @@ Using this flow is less secure since the token is long-lived. You can provide th
- `redis_custom_endpoint` (String)
- `region` (String) Region will be used as the default location for regional services. Not all services require a region, some are global
- `resourcemanager_custom_endpoint` (String) Custom endpoint for the Resource Manager service
- `secretsmanager_custom_endpoint` (String) Custom endpoint for the Secrets Manager service
- `service_account_email` (String) Service account email. It can also be set using the environment variable STACKIT_SERVICE_ACCOUNT_EMAIL
- `service_account_key` (String) Service account key used for authentication. If set alongside private key, the key flow will be used to authenticate all operations.
- `service_account_key_path` (String) Path for the service account key used for authentication. If set alongside the private key, the key flow will be used to authenticate all operations.

View file

@ -0,0 +1,84 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_mongodbflex_instance Resource - stackit"
subcategory: ""
description: |-
MongoDB Flex instance resource schema.
---
# stackit_mongodbflex_instance (Resource)
MongoDB Flex instance resource schema.
## Example Usage
```terraform
resource "stackit_mongodbflex_instance" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-instance"
acl = ["XXX.XXX.XXX.X/XX", "XX.XXX.XX.X/XX"]
flavor = {
cpu = 1
ram = 8
}
replicas = 1
storage = {
class = "class"
size = 10
}
version = "5.0"
options = {
type = "Single"
}
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `acl` (List of String) The Access Control List (ACL) for the MongoDB Flex instance.
- `flavor` (Attributes) (see [below for nested schema](#nestedatt--flavor))
- `name` (String) Instance name.
- `options` (Attributes) (see [below for nested schema](#nestedatt--options))
- `project_id` (String) STACKIT project ID to which the instance is associated.
- `replicas` (Number)
- `storage` (Attributes) (see [below for nested schema](#nestedatt--storage))
- `version` (String)
### Read-Only
- `backup_schedule` (String)
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`instance_id`".
- `instance_id` (String) ID of the MongoDB Flex instance.
<a id="nestedatt--flavor"></a>
### Nested Schema for `flavor`
Required:
- `cpu` (Number)
- `ram` (Number)
Read-Only:
- `description` (String)
- `id` (String)
<a id="nestedatt--options"></a>
### Nested Schema for `options`
Required:
- `type` (String)
<a id="nestedatt--storage"></a>
### Nested Schema for `storage`
Required:
- `class` (String)
- `size` (Number)

View file

@ -0,0 +1,45 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_mongodbflex_user Resource - stackit"
subcategory: ""
description: |-
MongoDB Flex user resource schema.
---
# stackit_mongodbflex_user (Resource)
MongoDB Flex user resource schema.
## Example Usage
```terraform
resource "stackit_mongodbflex_user" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
instance_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
username = "username"
roles = ["role"]
database = "database"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `database` (String)
- `instance_id` (String) ID of the MongoDB Flex instance.
- `project_id` (String) STACKIT project ID to which the instance is associated.
- `roles` (Set of String) Database access levels for the user.
### Optional
- `username` (String)
### Read-Only
- `host` (String)
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`instance_id`,`user_id`".
- `password` (String, Sensitive)
- `port` (Number)
- `user_id` (String) User ID.