12 changed files
samples/db/mssql-simple | ||
mssql.tf | ||
readme.md | ||
services/db/mssql/database | ||
base | ||
alerts.tf | ||
main.tf | ||
readme.md | ||
variables.tf | ||
provisioned | ||
main.tf | ||
readme.md | ||
variables.tf | ||
serverless | ||
main.tf | ||
readme.md | ||
variables.tf | ||
Add comment 1 Minus
Add comment 2 1 resource "random_string" "password" {
Add comment 3 2 length = 16
Add comment 4 3 special = true
Add comment 25 24 context = module.resource_group.context
Add comment 26 25 observability_settings = module.logging.primary
Add comment 27 26
Add comment 28 Minus name = "${var.application_name}-${var.environment_name}-${random_string.random.result}-base"
Add comment 29 Minus server_id = module.mssql_server.id
Add comment 30 Minus capacity = 10
Add comment 31 Minus sku = "GP_S_Gen5_2"
Add comment 27 Plus name = "${var.application_name}-${var.environment_name}-${random_string.random.result}-base"
Add comment 28 Plus server_id = module.mssql_server.id
Add comment 29 Plus capacity = 4
Add comment 30 Plus sku = "S0"
Add comment 31 Plus minimum_vcores = 1
Add comment 32 Plus
Add comment 33 Plus short_term_retention_policy = {
Add comment 34 Plus retention_days = 35
Add comment 35 Plus }
Add comment 36 Plus
Add comment 37 Plus long_term_retention_policy = {
Add comment 38 Plus weekly_retention = "P6W"
Add comment 39 Plus monthly_retention = "P1M"
Add comment 40 Plus yearly_retention = "P0Y"
Add comment 41 Plus week_of_year = 1
Add comment 42 Plus }
Add comment 32 43
Add comment 33 44 }
Add comment 34 45
Add comment 39 50 context = module.resource_group.context
Add comment 40 51 observability_settings = module.logging.primary
Add comment 41 52
Add comment 42 Minus name = "${var.application_name}-${var.environment_name}-${random_string.random.result}-provisioned"
Add comment 43 Minus server_id = module.mssql_server.id
Add comment 44 Minus capacity = 10
Add comment 45 Minus
Add comment 53 Plus name = "${var.application_name}-${var.environment_name}-${random_string.random.result}-provisioned"
Add comment 54 Plus server_id = module.mssql_server.id
Add comment 55 Plus capacity = 4
Add comment 46 56 service_tier = "GP"
Add comment 47 57 compute_generation = 5
Add comment 48 58 maximum_vcores = 2
Add comment 56 66 context = module.resource_group.context
Add comment 57 67 observability_settings = module.logging.primary
Add comment 58 68
Add comment 59 Minus name = "${var.application_name}-${var.environment_name}-${random_string.random.result}-serverless"
Add comment 60 Minus server_id = module.mssql_server.id
Add comment 61 Minus capacity = 10
Add comment 62 Minus
Add comment 69 Plus name = "${var.application_name}-${var.environment_name}-${random_string.random.result}-serverless"
Add comment 70 Plus server_id = module.mssql_server.id
Add comment 71 Plus capacity = 4
Add comment 63 72 maximum_vcores = 2
Add comment 64 73
Add comment 65 74 }
Add comment 36
Add comment 37 | Name | Version |
Add comment 38 |------|---------|
Add comment 39 Minus | random | ~> 3.0.1 |
Add comment 40 Minus | time | ~> 0.7.2 |
Add comment 39 Plus | random | 3.0.1 |
Add comment 40 Plus | time | 0.7.2 |
Add comment 41
Add comment 42 ## Modules
Add comment 43
alerts.tf
/services/db/mssql/database/base/alerts.tf-1+1/services/db/mssql/database/base/alerts.tf
Add comment 52 count = var.alerts ? 1 : 0
Add comment 53
Add comment 54 context = var.context
Add comment 55 Minus name = "update-mssql-database"
Add comment 55 Plus name = "${var.name}-update-mssql-database"
Add comment 56 description = "Fire an alert whenever the Mssql database is updated"
Add comment 57 scope = azurerm_mssql_database.main.id
Add comment 58 operation_name = "Microsoft.Sql/servers/databases/write"
Add comment 36 | collation | Specifies the collation of the database | `string` | `"SQL_Latin1_General_CP1_CI_AS"` | no |
Add comment 37 | context | The context object provides important details about the environment that this resource will be deployed into | <pre>object({<br><br> application_name = string<br> environment_name = string<br> resource_group_name = string<br><br> location = object({<br> name = string<br> suffix = string<br> number = number<br> })<br><br> tags = map(string)<br><br> })</pre> | n/a | yes |
Add comment 38 | license\_type | Specifies the license type applied to this database | `string` | `"LicenseIncluded"` | no |
Add comment 39 Plus | long\_term\_retention\_policy | Configuration for long term retention policy | <pre>object({<br> weekly_retention = string<br> monthly_retention = string<br> yearly_retention = string<br> week_of_year = number<br> })</pre> | `null` | no |
Add comment 39 40 | minimum\_vcores | Minimal capacity that database will always have allocated, if not paused | `number` | `null` | no |
Add comment 40 41 | name | The name of the Ms SQL Database | `string` | n/a | yes |
Add comment 41 42 | observability\_settings | The observability settings object provides basic configuration that can be used to configure Azure Diagnostic Settings and Azure Monitor Alerts for resources within a module. | <pre>object({<br><br> app_insights = object({<br> instrumentation_key = string<br> })<br> log_analytics_workspace = object({<br> id = string<br> workspace_id = string<br> key = string<br> })<br> storage_account = object({<br> id = string<br> name = string<br> key = string<br> })<br><br> retention_policy = object({<br><br> short_term = number<br> long_term = number<br><br> })<br><br> action_groups = object({<br><br> critical = list(string)<br> high = list(string)<br> moderate = list(string)<br><br> })<br><br> })</pre> | n/a | yes |
Add comment 42 43 | read\_scale | If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica | `bool` | `null` | no |
Add comment 43 44 | server\_id | The id of the Ms SQL Server on which to create the database | `string` | n/a | yes |
Add comment 45 Plus | short\_term\_retention\_policy | Configuration for short term retention policy | <pre>object({<br> retention_days = number<br> })</pre> | `null` | no |
Add comment 44 46 | sku | Specifies the name of the SKU used by the database | `string` | n/a | yes |
Add comment 45 47 | zone\_redundant | 'true' is only for Premium and Business Critical databases | `bool` | `null` | no |
Add comment 46 48
variables.tf
/services/db/mssql/database/base/variables.tf/services/db/mssql/database/base/variables.tf
main.tf
/services/db/mssql/database/provisioned/main.tf/services/db/mssql/database/provisioned/main.tf
readme.md
/services/db/mssql/database/provisioned/readme.md/services/db/mssql/database/provisioned/readme.md
variables.tf
/services/db/mssql/database/provisioned/variables.tf/services/db/mssql/database/provisioned/variables.tf
main.tf
/services/db/mssql/database/serverless/main.tf/services/db/mssql/database/serverless/main.tf
readme.md
/services/db/mssql/database/serverless/readme.md/services/db/mssql/database/serverless/readme.md
variables.tf
/services/db/mssql/database/serverless/variables.tf/services/db/mssql/database/serverless/variables.tf