» azurerm_mariadb_server
Manages a MariaDB Server.
NOTE MariaDB Server is currently in Public Preview. You can find more information, including how to register for the Public Preview here.
» Example Usage
resource "azurerm_resource_group" "test" {
name = "api-rg-pro"
location = "West Europe"
}
resource "azurerm_mariadb_server" "test" {
name = "mariadb-server-1"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
sku {
name = "B_Gen5_2"
capacity = 2
tier = "Basic"
family = "Gen5"
}
storage_profile {
storage_mb = 5120
backup_retention_days = 7
geo_redundant_backup = "Disabled"
}
administrator_login = "mariadbadmin"
administrator_login_password = "H@Sh1CoR3!"
version = "10.2"
ssl_enforcement = "Enabled"
}
» Argument Reference
The following arguments are supported:
-
name- (Required) Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. -
resource_group_name- (Required) The name of the resource group in which to create the MariaDB Server. Changing this forces a new resource to be created. -
location- (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. -
sku- (Required) Askublock as defined below. -
storage_profile- (Required) Astorage_profileblock as defined below. -
administrator_login- (Required) The Administrator Login for the MariaDB Server. Changing this forces a new resource to be created. -
administrator_login_password- (Required) The Password associated with theadministrator_loginfor the MariaDB Server. -
version- (Required) Specifies the version of MariaDB to use. The valid value is10.2. Changing this forces a new resource to be created. -
ssl_enforcement- (Required) Specifies if SSL should be enforced on connections. Possible values areEnabledandDisabled. -
tags- (Optional) A mapping of tags to assign to the resource.
A sku block supports the following:
-
name- (Required) Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows thetier+family+corespattern (e.g.B_Gen5_1,GP_Gen5_8). For more information see the product documentation. -
capacity- (Required) The scale up/out capacity, representing server's compute units. -
tier- (Required) The tier of the particular SKU. Possible values areBasic,GeneralPurpose, andMemoryOptimized. For more information see the product documentation. -
family- (Required) Thefamilyof the hardware (e.g.Gen5), before selecting yourfamilycheck the product documentation for availability in your region.
A storage_profile block supports the following:
-
storage_mb- (Required) Max storage allowed for a server. Possible values are between5120MB (5GB) and1024000MB (1TB) for the Basic SKU and between5120MB (5GB) and4096000MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. -
backup_retention_days- (Optional) Backup retention days for the server, supported values are between7and35days. -
geo_redundant_backup- (Optional) Enable Geo-redundant or not for server backup. Valid values for this property areEnabledorDisabled.
NOTE: Geo Redundant Backups cannot be configured when using the Basic tier.
» Attributes Reference
The following attributes are exported:
» Import
MariaDB Server's can be imported using the resource id, e.g.
terraform import azurerm_mariadb_server.server1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMariaDB/servers/server1