201-mysql-fs-db patch (#182)

* fix example

* fix example

* fix example
This commit is contained in:
Dingjia Chen 2023-03-01 20:54:49 -06:00 committed by GitHub
parent b32087dbf6
commit 8dca60b848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 8 deletions

View File

@ -1,7 +1,7 @@
# 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

View File

@ -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" {

View File

@ -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."
} }