Terraform module to create an Azure MySQL Server
locals {
network = {
vnet_id = "vnet-123"
subnet_id = "subnet-456"
}
}
module "mysql_server" {
source = "blackbird-cloud/mysql-server/azurerm"
version = "~> 1"
resource_group_name = "myresourcegroup"
resource_group_location = "westeurope"
vnet_id = local.network.vnet_id
subnet_id = local.network.subnet_id
sku = "GP_Standard_D2ds_v4"
name = "mysqlserver"
maintenance_window = {
day_of_week = 0
start_hour = 8
start_minute = 0
}
storage = {
iops = 360
size_gb = 20
}
}
Name | Version |
---|---|
terraform | >= 1.2 |
azurerm | ~>3 |
random | ~>3 |
Name | Version |
---|---|
azurerm | ~>3 |
random | ~>3 |
Name | Type |
---|---|
azurerm_mysql_flexible_database.main | resource |
azurerm_mysql_flexible_server.default | resource |
azurerm_private_dns_zone.default | resource |
azurerm_private_dns_zone_virtual_network_link.default | resource |
random_password.password | resource |
random_string.name | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
high_availablity | (Optional) The high availability zone for the MySQL server. | string |
"SameZone" |
no |
maintenance_window | (Optional) The maintenance window for the MySQL server. | object({ |
{ |
no |
mysql_version | (Optional) The version of the MySQL server. | string |
"8.0.21" |
no |
name | (Optional) The name of the MySQL server. | string |
"" |
no |
resource_group_location | (Required) Location of the resource group. | string |
"westeurope" |
no |
resource_group_name | (Required) The name of the resource group in which to create the MySQL server. | string |
n/a | yes |
sku | (Optional) The SKU name for the MySQL server. | string |
"GP_Standard_D2ds_v4" |
no |
storage | (Optional) The storage configuration for the MySQL server. | object({ |
{ |
no |
subnet_id | (Required) The ID of the subnet where the MySQL server should be deployed. | string |
n/a | yes |
vnet_id | (Required)The ID of the virtual network where the MySQL server should be deployed. | string |
n/a | yes |
Name | Description |
---|---|
admin_login | The admin username for the MySQL server. |
admin_password | The admin password for the MySQL server. |
azurerm_mysql_flexible_server | The name of the MySQL Flexible Server. |
mysql_flexible_server_database_name | The name of the MySQL Flexible Server Database. |
We are Blackbird Cloud, Amsterdam based cloud consultancy, and cloud management service provider. We help companies build secure, cost efficient, and scale-able solutions.
Checkout our other 👉 terraform modules
Copyright © 2017-2024 Blackbird Cloud