azMySqlFlexibleServer

Use the resource azMySqlFlexibleServer to deploy an Azure MySql Flexible Server to the relevant subscription. This will deploy a standard mysql server with the default schemas.

Attributes

Attribute Type Mandatory Values Default Notes
Name String Yes
ResourceGroupName String Yes
Location String Yes
AdminUsername String Yes
Password Object Yes
Storage Object No
Backup Object No
MaintenanceWindow Object No System Managed assumed if not specified
HighAvailability Object No
Diagnostic Object No
Identity Object No
Tag Object No
Lock Object No

Storage

Attribute Type Mandatory Values Default Notes
SizeGb Number Yes
Autogrow Boolean No True
Iops Number No 600 600 is free, max depends on chosen Sku Name

Backup

Attribute Type Mandatory Values Default Notes
RetentionDays Number No 7
GeoRedundant Number No False

Maintenance Window

Attribute Type Mandatory Values Default Notes
DayNumber Number No
StartHour Number No
StartMinute Number No

HighAvailability

Attribute Type Mandatory Values Default Notes
Mode String No ZoneRedundant, SameZone, Disabled Disabled
StandbyZone Number No 3

Diagnostic

Attribute Type Mandatory Values Default Notes
Name String Yes
Log Object No
Metric Object No
Target Object No

Diagnostic Log

Attribute Type Mandatory Values Default Notes
Enabled Boolean No * Defaults to true if Category is not null
Category Array No MySqlSlowLogs All
MySqlAuditLogs

Diagnostic Metric

Attribute Type Mandatory Values Default Notes
Enabled Boolean No * Defaults to true if Category is not null
Category Array No AllMetrics All

Identity

Attribute Type Mandatory Values Default Notes
Name String Yes
ResourceGroupName String No Defaults to RG of resource

Input by YAML

Object model for YAML deployment:

---
azMySqlFlexibleServer:
    # Mandatory
  - Name: 'string'
    ConnectionName: 'string'
    ResourceGroupName: 'string'
    Location: 'string'
    AdminUsername: 'string'
    AdminPassword:
      Location: 'string'
      PlainText:
        Value: 'string'

    # Optional
    Version: 'string'                                           # 5.7, 8.0.21
    Zone: number                                                # 1

    Sku:
      Name: 'string'                                            # Standard_D2ds_v4 (D)
      Tier: 'string'                                            # Burstable (D), GeneralPurpose, BusinessCritical

    HighAvailability:                                                 
      Mode: 'string'                                            # ZoneRedundant, SameZone, Disabled (D)
      StandbyZone: number                                       # 3 (D)

    Tag: 
      <keyvalue-pairs>

    Lock:
      - Name: 'string'
        Level: 'string'                                         # CanNotDelete, ReadOnly
        Notes: 'string'

    Storage:
      SizeGb: number                                            # 20
      Autogrow: boolean                                         # True (D), False
      Iops: number                                              # 600 (D) Free, max depends on chosen Sku.Name

    Backup:
      RetentionDays: number                                     # 1-35, 7(D)
      GeoRedundant: boolean                                     # True, False (D)

    Identity:
      - Name: 'string'
        ResourceGroupName: 'string'

    Diagnostic:
      - Name: 'string'
        Log:
          Enabled: boolean                                      # True (D if Category not null), False
          Category: [array]                                     # defaults to all if enabled
        Metric:
          Enabled: boolean                                      # True (D if MetricCategory not null), False
          Category: [array]                                     # defaults to all if enabled
        Target:
          Blob:
            StorageAccount: 'string'
            StorageKeyType: 'string'                            # Primary, Secondary
            RetentionInDays: number                             # 0 (D)
            ResourceGroupName: 'string'                         # Defaults to RG of resource
            SubscriptionName: 'string'                          # Defaults to subscription of resource
          EventHub:
            Name: 'string'
            Namespace: 'string'
            SharedAccessPolicy: 'string'                        # RootManageSharedAccessKey (D)
            ResourceGroupName: 'string'                         # Defaults to RG of resource
            SubscriptionName: 'string'                          # Defaults to subscription of resource
          LogAnalytics:
            Workspace: 'string'
            ResourceGroupName: 'string'                         # Defaults to RG of resource
            SubscriptionName: 'string'                          # Defaults to subscription of resource


Input by JSON

Object model for JSON deployment:

{
  "azMySqlFlexibleServer": [
    {
      "Name": "string",
      "ConnectionName": "string",
      "ResourceGroupName": "string",
      "Location": "string",
      "AdminUsername": "string",
      "AdminPassword": {
        "Location": "string",
        "PlainText": {
          "Value": "string"
        }
      },
      "Version": "string",
      "Zone": number,
      "Sku": {
        "Name": "string",
        "Tier": "string"
      },
      "HighAvailability": {
        "Mode": "string",
        "StandbyZone": number
      },
      "Tag": {
        "key": "value"
      },
      "Lock": [
        {
          "Name": "string",
          "Level": "string",
          "Notes": "string"
        }
      ],
      "Storage": {
        "SizeGb": number,
        "Autogrow": boolean,
        "Iops": number
      },
      "Backup": {
        "RetentionDays": number,
        "GeoRedundant": boolean
      },
      "Identity": [
        {
          "Name": "string",
          "ResourceGroupName": "string"
        }
      ],
      "Diagnostic": [
        {
          "Name": "string",
          "Log": {
            "Enabled": boolean,
            "Category": [array]
          },
          "Metric": {
            "Enabled": boolean,
            "Category": [array]
          },
          "Target": {
            "Blob": {
              "StorageAccount": "string",
              "StorageKeyType": "string",
              "RetentionInDays": number,
              "ResourceGroupName": "string",
              "SubscriptionName": "string"
            },
            "EventHub": {
              "Name": "string",
              "Namespace": "string",
              "SharedAccessPolicy": "string",
              "ResourceGroupName": "string",
              "SubscriptionName": "string"
            },
            "LogAnalytics": {
              "Workspace": "string",
              "ResourceGroupName": "string",
              "SubscriptionName": "string"
            }
          }
        }
      ]
    }
  ]
}