parent
b32087dbf6
commit
8dca60b848
@ -51,7 +51,7 @@ resource "azurerm_subnet" "default" {
|
|||||||
name = "fs"
|
name = "fs"
|
||||||
|
|
||||||
service_delegation {
|
service_delegation {
|
||||||
name = "Microsoft.DBforMySQL/flexibleServers"
|
name = "Microsoft.DBforMySQL/flexibleServers"
|
||||||
actions = [
|
actions = [
|
||||||
"Microsoft.Network/virtualNetworks/subnets/join/action",
|
"Microsoft.Network/virtualNetworks/subnets/join/action",
|
||||||
]
|
]
|
||||||
@ -103,4 +103,4 @@ resource "azurerm_mysql_flexible_server" "default" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
depends_on = [azurerm_private_dns_zone_virtual_network_link.default]
|
depends_on = [azurerm_private_dns_zone_virtual_network_link.default]
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
# Manages the MySQL Flexible Server Database
|
# Manages the MySQL Flexible Server Database
|
||||||
resource "azurerm_mysql_flexible_database" "default" {
|
resource "azurerm_mysql_flexible_database" "main" {
|
||||||
charset = "utf8"
|
charset = "utf8mb4"
|
||||||
collation = "utf8_unicode_ci"
|
collation = "utf8mb4_unicode_ci"
|
||||||
name = "mysqlfsdb_${random_string.name.result}"
|
name = "mysqlfsdb_${random_string.name.result}"
|
||||||
resource_group_name = azurerm_resource_group.rg.name
|
resource_group_name = azurerm_resource_group.rg.name
|
||||||
server_name = azurerm_mysql_flexible_server.default.name
|
server_name = azurerm_mysql_flexible_server.default.name
|
||||||
}
|
}
|
@ -2,8 +2,17 @@ output "azurerm_mysql_flexible_server" {
|
|||||||
value = azurerm_mysql_flexible_server.default.name
|
value = azurerm_mysql_flexible_server.default.name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output "admin_login" {
|
||||||
|
value = azurerm_mysql_flexible_server.default.administrator_login
|
||||||
|
}
|
||||||
|
|
||||||
|
output "admin_password" {
|
||||||
|
sensitive = true
|
||||||
|
value = azurerm_mysql_flexible_server.default.administrator_password
|
||||||
|
}
|
||||||
|
|
||||||
output "mysql_flexible_server_database_name" {
|
output "mysql_flexible_server_database_name" {
|
||||||
value = azurerm_mysql_flexible_database.default.name
|
value = azurerm_mysql_flexible_database.main.name
|
||||||
}
|
}
|
||||||
|
|
||||||
output "resource_group_name" {
|
output "resource_group_name" {
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
variable "resource_group_location" {
|
variable "resource_group_location" {
|
||||||
|
type = string
|
||||||
default = "eastus"
|
default = "eastus"
|
||||||
description = "Location of the resource group."
|
description = "Location of the resource group."
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "resource_group_name_prefix" {
|
variable "resource_group_name_prefix" {
|
||||||
default = "rg"
|
type = string
|
||||||
|
default = "mysql-fs-db-rg"
|
||||||
description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
|
description = "Prefix of the resource group name that's combined with a random ID so name is unique in your Azure subscription."
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user