This topic provides reference information about the Azure MySQL service (csb-azure-mysql). It details the plans, configuration parameters, and binding credentials.
For more information about Azure MySQL, see the Microsoft documentation.
The following table lists the default plans for the csb-azure-mysql service:
Plan | CPUs | Storage Size |
---|---|---|
small | 2 | 5 GB |
medium | 4 | 10 GB |
large | 8 | 20 GB |
When configuring Cloud Service Broker for Azure you can add additional plans. For how to configure plans, see Configure Services with Cloud Service Broker for Azure.
The following table lists parameters which can only be added at the plan level.
Parameter Name | Values | Default |
---|---|---|
name * |
The plan name. | n/a |
id * |
A unique GUID. | n/a |
description * |
Description of the new plan. | n/a |
display_name |
Name to use when displaying plan in marketplace. | n/a |
use_tls |
Use TLS for connection. | true |
tls_min_version |
Minimum enforced TLS version. Possible values are TLSEnforcementDisabled , TLS1_0 , TLS1_1 , and TLS1_2 . |
TLS1_1 |
enable_threat_detection_policy |
Set to true to enable the threat Detection Policy. |
false |
threat_detection_policy_emails |
A list of email addresses which alerts should be sent to. For example, ["[email protected]", "[email protected]"] . |
n/a |
email_account_admins |
Account administrators emailed when threat alert triggered | false |
firewall_rules |
Array of firewall rule start/end IP pairs. | [] |
private_endpoint_subnet_id |
The ID of the Subnet within which the Private Endpoint is created. | "" |
private_dns_zone_ids |
An array of Private DNS Zone IDs to create private DNS zone groups for when using Private Endpoints. | [] |
* Required
You can also add any of the configuration parameters listed in the parameters section to your plan.
Note: If you set a parameter at plan level, developers cannot change the value when creating or updating service instances.
You can provision a service by running:
cf create-service csb-azure-mysql PLAN-NAME SERVICE-INSTANCE-NAME -c '{"PARAMETER-NAME": "PARAMETER-VALUE"}'
For example:
$ cf create-service csb-azure-mysql small mysql-dev -c '{"instance_name": "mysql-dev"}'
You can update the plan or configuration parameters for a service instance by running:
cf update-service SERVICE-INSTANCE-NAME [-p NEW-PLAN] -c '{"PARAMETER-NAME": "PARAMETER-VALUE"}'
The following table lists the parameters that you can configure, using the -c
flag, when provisioning or updating a csb-azure-mysql service:
Parameter Name | Type | Description | Default | Operation |
---|---|---|---|---|
cores |
integer | Number vcores for the instance (upto the maximum allowed for the service tier). This parameter has the following constraints:
|
2 |
provision and update |
storage_gb |
integer | Storage allocated to the database instance in gigabytes. This parameter has the following constraints:
|
5 |
provision and update |
mysql_version |
string | The version for the MySQL instance. After being set, this cannot be updated. The available versions are: "5.6" , "5.7" , and "8.0" . |
"5.7" |
provision |
instance_name |
string | Name for your MySQL instance. This parameter has the following constraints:
|
csb-mysql-INSTANCE-ID |
provision and update |
resource_group |
string | The name of the resource group for this instance. After being set, this cannot be updated. This parameter has the following constraints:
|
rg-INSTANCE-NAME |
provision |
db_name |
string | The name for your database. This parameter has the following constraint: maxLength: 64. | csb-db |
provision and update |
authorized_network |
string | The subnet ID of the Azure Virtual Network (VNet) that is attached to this instance. | default |
provision and update |
authorized_networks |
array | The subnet IDs of the Azure Virtual Network (VNet) that is attached to this instance. | default |
provision and update |
location |
string | The location of the MySQL instance. After being set, this cannot be updated. For available locations, see the Microsoft documentation. |
westus |
provision |
azure_tenant_id |
string | The ID of the Azure tenant for the instance. | The value the operator entered for Tenant ID in Ops Manager | provision and update |
azure_subscription_id |
string | The ID of the Azure subscription for the instance. | The value the operator entered for Subscription ID in Ops Manager | provision and update |
azure_client_id |
string | The ID of the Azure service principal to authenticate for service instance creation. | The value the operator entered for Client ID in Ops Manager | provision and update |
azure_client_secret |
string | The secret (password) for the Azure service principal to authenticate for service instance creation. | The value the operator entered for Client Secret in Ops Manager. | provision and update |
skip_provider_registration |
boolean | Set to true to skip automatic Azure provider registration. Set if the service principal being used does not have the rights to register providers. |
false |
provision and update |
sku_name |
string | The Azure stock-keeping unit (SKU). For more information about configuring this parameter, see SKUs section. After being set, this cannot be updated. | "" |
provision |
backup_retention_days |
integer | The number of backup retention days for the server. Supported values are between 7 and 35 days. |
7 |
provision and update |
Stock-keeping units (SKU) are usually formatted as TIER_FAMILY_NUMBER-OF-CORES
. Where:
TIER
are GP\_S
, GP
, and HS
FAMILY
are Gen4
and Gen5
GP\_S\_Gen4\_1
and
GP\_Gen5\_8
.
For information about the Azure MySQL pricing tiers, see the Microsoft documentation.
If you do not define a SKU using the sku_name
parameter, the SKU is computed from the number of cores in your plan. See Plans above.
Note: When updating a service instance, the SKU for the updated service instance must remain in the same tier (GP_S
, GP
, or HS
). If you update to a different tier, Azure refuses the update request.
You can bind a service to an app by running:
cf bind-service APP-NAME SERVICE-INSTANCE --binding-name BINDING-NAME
The format for binding credentials made available to the app is as follows:
{
"name" : "DATABASE-NAME",
"hostname" : "DATABASE-SERVER-HOST",
"port" : "DATABASE-SERVER-PORT",
"username" : "AUTHENTICATION-USERNAME",
"password" : "AUTHENTICATION-PASSWORD",
"uri" : "DATABASE-CONNECTION-URI",
"jdbcUrl" : "JDBC-FORMAT-CONNECTION-URI",
"use_tls": true
}
Where:
DATABASE-NAME
is the database name.DATABASE-SERVER-HOST
is the database server host name.PORT
is the database server port.AUTHENTICATION-USERNAME
is the username to authenticate to the database instance.AUTHENTICATION-PASSWORD
is the password to authenticate to the database instance.DATABASE-CONNECTION-URI
is the URI to connect to the database instance and database.JDBC-FORMAT-CONNECTION-URI
is the Java Database Connectivity (JDBC) URL to connect to the database instance and database.