|
2 | 2 |
|
3 | 3 | Azure Database for MySQL is easy to set up, manage and scale. It automates the management and maintenance of your infrastructure and database server, including routine updates, backups and security. Enjoy maximum control of database management with custom maintenance windows and multiple configuration parameters for fine grained tuning with Flexible Server (Preview). |
4 | 4 |
|
| 5 | +## Resources are supported |
| 6 | + |
| 7 | +* [MySQL Servers](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mysql_server) |
| 8 | +* [MySQL Database](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mysql_database) |
| 9 | +* [MySQL Configuration](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mysql_configuration) |
| 10 | +* [MySQL Firewall Rules](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mysql_firewall_rule) |
| 11 | +* [MySQL Active Directory Administrator](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mysql_active_directory_administrator) |
| 12 | +* [MySQL Customer Managed Key](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mysql_server_key) |
| 13 | +* [MySQL Virtual Network Rule](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/mysql_virtual_network_rule) |
| 14 | +* [MySQL Diagnostics](https://docs.microsoft.com/en-us/azure/azure-sql/database/metrics-diagnostic-telemetry-logging-streaming-export-configure?tabs=azure-portal) |
| 15 | + |
5 | 16 | ## Module Usage |
6 | 17 |
|
7 | 18 | ```hcl |
@@ -72,3 +83,64 @@ module "mssql-server" { |
72 | 83 | } |
73 | 84 | } |
74 | 85 | ``` |
| 86 | + |
| 87 | +## Requirements |
| 88 | + |
| 89 | +| Name | Version | |
| 90 | +| --------- | --------- | |
| 91 | +| terraform | >= 0.13 | |
| 92 | +| azurerm | >= 2.59.0 | |
| 93 | + |
| 94 | +## Providers |
| 95 | + |
| 96 | +| Name | Version | |
| 97 | +| ------- | --------- | |
| 98 | +| azurerm | >= 2.59.0 | |
| 99 | + |
| 100 | +## Inputs |
| 101 | + |
| 102 | +| Name | Description | Type | Default | |
| 103 | +|--|--|--|--| |
| 104 | +`create_resource_group` | Whether to create resource group and use it for all networking resources | string | `"false"` |
| 105 | +`resource_group_name` | The name of the resource group in which resources are created | string | `""` |
| 106 | +`location` | The location of the resource group in which resources are created | string | `""` |
| 107 | +`log_analytics_workspace_name`|The name of log analytics workspace name|string|`null` |
| 108 | +`random_password_length`|The desired length of random password created by this module|string|`24` |
| 109 | +`subnet_id`|The resource ID of the subnet|string|`null` |
| 110 | +`mysqlserver_name`|MySQL server Name|string|`""` |
| 111 | +`admin_username`|The username of the local administrator used for the SQL Server|string|`"sqladmin"` |
| 112 | +`admin_password`|The Password which should be used for the local-administrator on this SQL Server|string|`null` |
| 113 | +`identity`|If you want your SQL Server to have an managed identity. Defaults to false|string|`false` |
| 114 | +`mysqlserver_settings`|MySQL server settings|object({})|`{}` |
| 115 | +`storage_account_name`|The name of the storage account name|string|`null` |
| 116 | +`enable_threat_detection_policy`|Threat detection policy configuration, known in the API as Server Security Alerts Policy|string|`false` |
| 117 | +`email_addresses_for_alerts`|Account administrators email for alerts|`list(any)`|`""` |
| 118 | +`disabled_alerts`|Specifies an array of alerts that are disabled. Allowed values are: `Sql_Injection`, `Sql_Injection_Vulnerability`, `Access_Anomaly`, `Data_Exfiltration`, `Unsafe_Action`|list(any)|`[]` |
| 119 | +`log_retention_days`|Specifies the number of days to keep in the Threat Detection audit logs|number|`30` |
| 120 | +`mysql_configuration`|Sets a MySQL Configuration value on a MySQL Server|map(string)|`{}` |
| 121 | +firewall_rules|Range of IP addresses to allow firewall connections|map(object({}))|`null` |
| 122 | +`ad_admin_login_name`|The login name of the principal to set as the server administrator|string|`null` |
| 123 | +`key_vault_key_id`|The URL to a Key Vault custom managed key|string|`null` |
| 124 | +`extaudit_diag_logs`|Database Monitoring Category details for Azure Diagnostic setting|list(string)|`["MySqlSlowLogs", "MySqlAuditLogs"]` |
| 125 | +`Tags` | A map of tags to add to all resources | map | `{}` |
| 126 | + |
| 127 | +## Outputs |
| 128 | + |
| 129 | +| Name | Description | |
| 130 | +|--|--| |
| 131 | +`mysql_server_id`|The resource ID of the MySQL Server |
| 132 | +`mysql_server_fqdn`|The FQDN of the MySQL Server |
| 133 | +`mysql_database_id`|The resource ID of the MySQL Database |
| 134 | + |
| 135 | +## Resource Graph |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | +## Authors |
| 140 | + |
| 141 | +Originally created by [Kumaraswamy Vithanala](mailto:kumarvna@gmail.com) |
| 142 | + |
| 143 | +## Other resources |
| 144 | + |
| 145 | +* [Azure database for MySQL](https://docs.microsoft.com/en-us/azure/mysql/) |
| 146 | +* [Terraform AzureRM Provider Documentation](https://www.terraform.io/docs/providers/azurerm/index.html) |
0 commit comments