Azure Database for MySQLをTerraformで作りました。
main.tf
provider "azurerm" {
subscription_id=""
features {}
}
resource "azurerm_resource_group" "example" {
name = "example-resource-group"
location = "Japan East"
}
resource "azurerm_mysql_flexible_server" "example" {
name = "example-mysql-server"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
administrator_login = "your_admin_user"
administrator_password = "MyStr0ngP@ssw0rd123"
sku_name = "GP_Standard_D2ds_v4"
backup_retention_days = 7
version = "8.0.21"
}
sku_nameに悩みましたが、これでいけました。