diff --git a/README.md b/README.md new file mode 100644 index 0000000..cb60511 --- /dev/null +++ b/README.md @@ -0,0 +1,49 @@ +## Requirements + +| Name | Version | +|------|---------| +| [terraform](#requirement\_terraform) | >= 1.6.3 | +| [azurerm](#requirement\_azurerm) | 4.14.0 | + +## Providers + +| Name | Version | +|------|---------| +| [azurerm](#provider\_azurerm) | 4.14.0 | + +## Modules + +No modules. + +## Resources + +| Name | Type | +|------|------| +| [azurerm_cosmosdb_sql_container.main](https://registry.terraform.io/providers/hashicorp/azurerm/4.14.0/docs/resources/cosmosdb_sql_container) | resource | +| [azurerm_client_config.current](https://registry.terraform.io/providers/hashicorp/azurerm/4.14.0/docs/data-sources/client_config) | data source | +| [azurerm_cosmosdb_account.main](https://registry.terraform.io/providers/hashicorp/azurerm/4.14.0/docs/data-sources/cosmosdb_account) | data source | +| [azurerm_resource_group.rg](https://registry.terraform.io/providers/hashicorp/azurerm/4.14.0/docs/data-sources/resource_group) | data source | + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| [conflict\_resolution\_policy](#input\_conflict\_resolution\_policy) | The conflict resolution policy for the Cosmos DB SQL container, which determines how conflicting changes are resolved. |
object({
mode = string # E.g., 'LastWriterWins' or 'Custom'.
conflict_resolution_path = string # Path used for resolving conflicts, applicable for 'LastWriterWins' mode.
}) | `null` | no |
+| [cosmosdb\_account\_name](#input\_cosmosdb\_account\_name) | The name of the Cosmos DB account. Changing this value forces the creation of a new resource. | `string` | n/a | yes |
+| [cosmosdb\_sql\_database\_container\_name](#input\_cosmosdb\_sql\_database\_container\_name) | The name of the Cosmos DB SQL container to be created. | `string` | n/a | yes |
+| [cosmosdb\_sql\_database\_container\_partition\_key\_paths](#input\_cosmosdb\_sql\_database\_container\_partition\_key\_paths) | A list of partition key paths for the Cosmos DB SQL container. Partition keys are essential for scalable performance in Cosmos DB. | `list(string)` | [| no | +| [cosmosdb\_sql\_database\_container\_partition\_key\_version](#input\_cosmosdb\_sql\_database\_container\_partition\_key\_version) | The version of the partition key for the Cosmos DB SQL container. Defaults to 1. | `number` | `1` | no | +| [cosmosdb\_sql\_database\_name](#input\_cosmosdb\_sql\_database\_name) | The name of the Cosmos DB SQL database. Changing this value forces the creation of a new resource. | `string` | n/a | yes | +| [default\_ttl](#input\_default\_ttl) | Default time-to-live (TTL) for the Cosmos DB SQL container, specified in seconds. If null, TTL is not configured. | `number` | `null` | no | +| [environment](#input\_environment) | The environment name used for backend container naming (e.g., dev, staging, prod). | `string` | `"dev"` | no | +| [indexing\_policy](#input\_indexing\_policy) | The indexing policy for the Cosmos DB SQL container, which specifies how items are indexed for queries. |
"/myPartitionKey"
]
object({
indexing_mode = string # Either 'consistent' or 'none'.
included_paths = list(object({
path = string # Paths explicitly included in the index.
}))
excluded_paths = list(object({
path = string # Paths explicitly excluded from the index.
}))
}) | `null` | no |
+| [resource\_group\_location](#input\_resource\_group\_location) | The Azure location where the resource group is created. Changing this value forces the creation of a new resource. | `string` | `"West Europe"` | no |
+| [resource\_group\_name](#input\_resource\_group\_name) | The name of the resource group in which to create the Cosmos DB SQL container. Changing this value forces the creation of a new resource. | `string` | n/a | yes |
+| [sql\_database\_container\_paths](#input\_sql\_database\_container\_paths) | List of Cosmos DB SQL containers to create. Some parameters are inherited from the Cosmos DB account. | `string` | n/a | yes |
+| [unique\_keys](#input\_unique\_keys) | A list of unique keys for the Cosmos DB SQL container to ensure uniqueness of specified paths. | list(object({
paths = list(string) # Paths defining the unique key constraints.
})) | `null` | no |
+
+## Outputs
+
+| Name | Description |
+|------|-------------|
+| [id](#output\_id) | The CosmosDB Database container ID. |
diff --git a/backend.tf b/backend.tf
index d0252b1..ebee60c 100644
--- a/backend.tf
+++ b/backend.tf
@@ -2,7 +2,7 @@ terraform {
required_providers {
azurerm = {
source = "hashicorp/azurerm"
- version = "4.12.0"
+ version = "4.14.0"
}
}
required_version = ">= 1.6.3"