Skip to content

Commit ce06112

Browse files
committed
adding documentation
1 parent b10c8ed commit ce06112

File tree

3 files changed

+43
-18
lines changed

3 files changed

+43
-18
lines changed

README.md

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ module "mssql-server" {
7070
# Allows you to set a user or group as the AD administrator for an Azure SQL server
7171
ad_admin_login_name = "firstname.lastname@example.com"
7272
73-
74-
7573
# (Optional) To enable Azure Monitoring for Azure MySQL database
7674
# (Optional) Specify `storage_account_name` to save monitoring logs to storage.
7775
log_analytics_workspace_name = "loganalytics-we-sharedtest2"
@@ -108,9 +106,9 @@ This object helps you setup desired MySQL server and support following arguments
108106
|--|--|
109107
`sku_name`|Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. `B_Gen4_1`, `GP_Gen5_8`). Valid values are `B_Gen4_1`, `B_Gen4_2`, `B_Gen5_1`, `B_Gen5_2`, `GP_Gen4_2`, `GP_Gen4_4`, `GP_Gen4_8`, `GP_Gen4_16`, `GP_Gen4_32`, `GP_Gen5_2`, `GP_Gen5_4`, `GP_Gen5_8`, `GP_Gen5_16`, `GP_Gen5_32`, `GP_Gen5_64`, `MO_Gen5_2`, `MO_Gen5_4`, `MO_Gen5_8`, `MO_Gen5_16`, `MO_Gen5_32`.
110108
`storage_mb`|Max storage allowed for a server. Possible values are between `5120` MB(5GB) and `1048576` MB(1TB) for the Basic SKU and between `5120` MB(5GB) and `4194304` MB(4TB) for General Purpose/Memory Optimized SKUs.
111-
`version`|Specifies the version of MySQL to use. Valid values are `5.6`, `5.7`, and `8.0`.
112-
`database_name`|Specifies the name of the MySQL Database, which needs [to be a valid MySQL identifier](https://dev.mysql.com/doc/refman/5.7/en/identifiers.html).
113-
`charset`|Specifies the Charset for the MySQL Database, which needs [to be a valid MySQL Charset](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html).
109+
`version`|Specifies the version of MySQL to use. Valid values are `5.6`, `5.7`, and `8.0`.
110+
`database_name`|Specifies the name of the MySQL Database, which needs [to be a valid MySQL identifier](https://dev.mysql.com/doc/refman/5.7/en/identifiers.html).
111+
`charset`|Specifies the Charset for the MySQL Database, which needs [to be a valid MySQL Charset](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html).
114112
`collation`|Specifies the Collation for the MySQL Database, which needs [to be a valid MySQL Collation](https://dev.mysql.com/doc/refman/5.7/en/charset-mysql.html).
115113
`administrator_login`|The Administrator Login for the MySQL Server. Required when `create_mode` is `Default`.
116114
`auto_grow_enabled`|Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is `true`
@@ -125,7 +123,7 @@ This object helps you setup desired MySQL server and support following arguments
125123

126124
The MySQL server maintains many system variables that configure its operation. Each system variable has a default value. System variables can be set at server startup using options on the command line or in an option file. Most of them can be changed dynamically at runtime using the SET statement, which enables you to modify operation of the server without having to stop and restart it. You can also use system variable values in expressions.
127125

128-
A few Supported parameters are here for your reference. you can find all these `Server Paramter` section in MySQL server. Also check [MySQL website](https://dev.mysql.com/doc/refman/8.0/en/server-options.html) for more details.
126+
A few Supported parameters are here for your reference. you can find all these `Server Paramter` section in MySQL server. Also check [MySQL website](https://dev.mysql.com/doc/refman/8.0/en/server-options.html) for more details.
129127

130128
| Parameter name | Description | Parameter Type |Default Value
131129
|--|--|--|--|
@@ -136,19 +134,50 @@ A few Supported parameters are here for your reference. you can find all these `
136134
`lock_wait_timeout`|This variable specifies the timeout in seconds for attempts to acquire metadata locks. Allowed value should be: `1`-`31536000`|Dynamic|`31536000`
137135
`max_connections`|The maximum permitted number of simultaneous client connections. Allowed value should be: `10`-`5000`|Dynamic|`2500`
138136
`time_zone`|The server time zone.|Dynamic|`SYSTEM`
137+
| terraform | >= 0.13 |
138+
| azurerm | >= 2.59.0 |
139139

140-
### Virtual Network service endpoints and rules
140+
### MySQL Virtual Network Rule
141141

142-
Virtual network rules are one firewall security feature that controls whether your Azure Database for MySQL server accepts communications that are sent from particular subnets in virtual networks.
142+
A virtual network rule for your Azure Database for MySQL server is a subnet that is listed in the access control list (ACL) of your Azure Database for MySQL server. To be in the ACL for your Azure Database for MySQL server, the subnet must contain the **`Microsoft.Sql`** type name. To enable this feature, add a `subnet_id` with valid resource id.
143143

144+
### Data Encryption with a Customer-managed Key
144145

146+
Data encryption with customer-managed keys for Azure Database for MySQL enables you to bring your own key (BYOK) for data protection at rest. It also allows organizations to implement separation of duties in the management of keys and data.
145147

146-
## Requirements
148+
Data encryption is set at the server-level. The customer-managed key is an asymmetric key stored in a customer-owned and customer-managed Azure `Key Vault` instance. To add you own key from key valut use variable `key_vault_key_id` with valid key URL.
147149

148-
| Name | Version |
149-
| --------- | --------- |
150-
| terraform | >= 0.13 |
151-
| azurerm | >= 2.59.0 |
150+
### Server Firewall Rules
151+
152+
Firewalls prevent all access to your database server until you specify which computers have permission. To configure a firewall, create firewall rules that specify ranges of acceptable IP addresses. You can create firewall rules at the server level with variable `firewall_rules` with valid IP addresses.
153+
154+
### Active Directory Administrator
155+
156+
This module supports for Azure Active Directory (Azure AD) integration for Azure Database for MySQL. This integration allows you to securely sign in to their database by using Azure Active Directory and to manage credentials in a central place. For consistent role management, manage database access using Active Directory groups. You can add AD user/group using `ad_admin_login_name` variable.
157+
158+
> Azure Active Directory authentication is only available for MySQL 5.7 and newer. Only one Azure AD administrator can be configured for a Azure Database for MySQL server at any time. Only an Azure AD administrator for MySQL can initially connect to the Azure Database for MySQL using an Azure Active Directory account.
159+
160+
### Threat detection policy AKA Server Security Alerts Policy
161+
162+
Advanced Threat Detection for Azure Database for MySQL server detects anomalous activities indicating unusual and potentially harmful attempts to access or exploit databases and it can trigger the following alerts:
163+
164+
* Access from unusual location
165+
* Access from unusual Azure data center
166+
* Access from unfamiliar principal
167+
* Access from a potentially harmful application
168+
* Brute force login credentials
169+
170+
Enable threat detection policy setting up the variables `enable_threat_detection_policy`, `log_retention_days` and `email_addresses_for_alerts` with valid values.
171+
172+
## Recommended naming and tagging conventions
173+
174+
Applying tags to your Azure resources, resource groups, and subscriptions to logically organize them into a taxonomy. Each tag consists of a name and a value pair. For example, you can apply the name `Environment` and the value `Production` to all the resources in production.
175+
For recommendations on how to implement a tagging strategy, see Resource naming and tagging decision guide.
176+
177+
> **Important** :
178+
Tag names are case-insensitive for operations. A tag with a tag name, regardless of the casing, is updated or retrieved. However, the resource provider might keep the casing you provide for the tag name. You'll see that casing in cost reports. **Tag values are case-sensitive.**
179+
180+
An effective naming convention assembles resource names by using important resource information as parts of a resource's name. For example, using these [recommended naming conventions](https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging#example-names), a public IP resource for a production SharePoint workload is named like this: `pip-sharepoint-prod-westus-001`.
152181

153182
## Providers
154183

example/complete/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ module "mssql-server" {
5959
# Allows you to set a user or group as the AD administrator for an Azure SQL server
6060
ad_admin_login_name = "firstname.lastname@example.com"
6161
62-
63-
6462
# (Optional) To enable Azure Monitoring for Azure MySQL database
6563
# (Optional) Specify `storage_account_name` to save monitoring logs to storage.
6664
log_analytics_workspace_name = "loganalytics-we-sharedtest2"

example/complete/main.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,10 @@ module "mssql-server" {
4848
log_retention_days = 30
4949
email_addresses_for_alerts = ["user@example.com", "firstname.lastname@example.com"]
5050

51-
# AD administrator for an Azure SQL server
51+
# AD administrator for an Azure MySQL server
5252
# Allows you to set a user or group as the AD administrator for an Azure SQL server
5353
ad_admin_login_name = "firstname.lastname@example.com"
5454

55-
56-
5755
# (Optional) To enable Azure Monitoring for Azure MySQL database
5856
# (Optional) Specify `storage_account_name` to save monitoring logs to storage.
5957
log_analytics_workspace_name = "loganalytics-we-sharedtest2"

0 commit comments

Comments
 (0)