Skip to content

EnergiMidt/terraform-azurerm-cosmosdbsqldatabase

Repository files navigation

Manages a SQL Database within a Cosmos DB Account.

Getting Started

  • Format and validate Terraform code before commit.
terraform init -upgrade \
    && terraform init -reconfigure -upgrade \
    && terraform fmt -recursive . \
    && terraform fmt -check \
    && terraform validate .
  • Always fetch latest changes from upstream and rebase from it. Terraform documentation will always be updated with GitHub Actions. See also .github/workflows/terraform.yml GitHub Actions workflow.
git fetch --all --tags --prune --prune-tags \
  && git pull --rebase --all --prune --tags

Requirements

Name Version
terraform >= 1.3.1
azurerm >= 3.33.0, < 4.0.0

Providers

Name Version
azurerm 3.37.0

Modules

No modules.

Resources

Name Type
azurerm_cosmosdb_sql_database.cosmosdb_sql_database resource

Inputs

Name Description Type Default Required
autoscale_settings_max_throughput (Optional) The maximum throughput of the SQL database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. number "1000" no
cosmosdb_account (Required) The CosmosDB (formally DocumentDB) Account. any n/a yes
enable_autoscale_settings (Optional) Enable autoscale settings. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply. bool false no
environment (Required) The name of the environment. string n/a yes
override_name (Optional) Override the name of the resource. Under normal circumstances, it should not be used. string null no
resource_group (Required) The resource group in which to create the resource. any n/a yes
system_name (Required) The systen name which should be used for this resource. Changing this forces a new resource to be created. string n/a yes
throughput (Optional) The throughput of SQL database (RU/s). Must be set in increments of 100. The minimum value is 400. This must be set upon database creation otherwise it cannot be updated without a manual terraform destroy-apply. Do not set when azurerm_cosmosdb_account is configured with EnableServerless capability. Throughput has a maximum value of 1000000 unless a higher limit is requested via Azure Support. number 400 no

Outputs

Name Description
cosmosdb_sql_database The Azure CosmosDB SQL Database resource.