1. Packages
  2. Azure Classic
  3. API Docs
  4. mysql
  5. Server

We recommend using Azure Native.

Azure Classic v5.67.1 published on Tuesday, Feb 27, 2024 by Pulumi

azure.mysql.Server

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.67.1 published on Tuesday, Feb 27, 2024 by Pulumi

    Manages a MySQL Server.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleServer = new Azure.MySql.Server("example", new()
        {
            Name = "example-mysqlserver",
            Location = example.Location,
            ResourceGroupName = example.Name,
            AdministratorLogin = "mysqladminun",
            AdministratorLoginPassword = "H@Sh1CoR3!",
            SkuName = "B_Gen5_2",
            StorageMb = 5120,
            Version = "5.7",
            AutoGrowEnabled = true,
            BackupRetentionDays = 7,
            GeoRedundantBackupEnabled = false,
            InfrastructureEncryptionEnabled = false,
            PublicNetworkAccessEnabled = true,
            SslEnforcementEnabled = true,
            SslMinimalTlsVersionEnforced = "TLS1_2",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mysql"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = mysql.NewServer(ctx, "example", &mysql.ServerArgs{
    			Name:                            pulumi.String("example-mysqlserver"),
    			Location:                        example.Location,
    			ResourceGroupName:               example.Name,
    			AdministratorLogin:              pulumi.String("mysqladminun"),
    			AdministratorLoginPassword:      pulumi.String("H@Sh1CoR3!"),
    			SkuName:                         pulumi.String("B_Gen5_2"),
    			StorageMb:                       pulumi.Int(5120),
    			Version:                         pulumi.String("5.7"),
    			AutoGrowEnabled:                 pulumi.Bool(true),
    			BackupRetentionDays:             pulumi.Int(7),
    			GeoRedundantBackupEnabled:       pulumi.Bool(false),
    			InfrastructureEncryptionEnabled: pulumi.Bool(false),
    			PublicNetworkAccessEnabled:      pulumi.Bool(true),
    			SslEnforcementEnabled:           pulumi.Bool(true),
    			SslMinimalTlsVersionEnforced:    pulumi.String("TLS1_2"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.mysql.Server;
    import com.pulumi.azure.mysql.ServerArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleServer = new Server("exampleServer", ServerArgs.builder()        
                .name("example-mysqlserver")
                .location(example.location())
                .resourceGroupName(example.name())
                .administratorLogin("mysqladminun")
                .administratorLoginPassword("H@Sh1CoR3!")
                .skuName("B_Gen5_2")
                .storageMb(5120)
                .version("5.7")
                .autoGrowEnabled(true)
                .backupRetentionDays(7)
                .geoRedundantBackupEnabled(false)
                .infrastructureEncryptionEnabled(false)
                .publicNetworkAccessEnabled(true)
                .sslEnforcementEnabled(true)
                .sslMinimalTlsVersionEnforced("TLS1_2")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_server = azure.mysql.Server("example",
        name="example-mysqlserver",
        location=example.location,
        resource_group_name=example.name,
        administrator_login="mysqladminun",
        administrator_login_password="H@Sh1CoR3!",
        sku_name="B_Gen5_2",
        storage_mb=5120,
        version="5.7",
        auto_grow_enabled=True,
        backup_retention_days=7,
        geo_redundant_backup_enabled=False,
        infrastructure_encryption_enabled=False,
        public_network_access_enabled=True,
        ssl_enforcement_enabled=True,
        ssl_minimal_tls_version_enforced="TLS1_2")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleServer = new azure.mysql.Server("example", {
        name: "example-mysqlserver",
        location: example.location,
        resourceGroupName: example.name,
        administratorLogin: "mysqladminun",
        administratorLoginPassword: "H@Sh1CoR3!",
        skuName: "B_Gen5_2",
        storageMb: 5120,
        version: "5.7",
        autoGrowEnabled: true,
        backupRetentionDays: 7,
        geoRedundantBackupEnabled: false,
        infrastructureEncryptionEnabled: false,
        publicNetworkAccessEnabled: true,
        sslEnforcementEnabled: true,
        sslMinimalTlsVersionEnforced: "TLS1_2",
    });
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleServer:
        type: azure:mysql:Server
        name: example
        properties:
          name: example-mysqlserver
          location: ${example.location}
          resourceGroupName: ${example.name}
          administratorLogin: mysqladminun
          administratorLoginPassword: H@Sh1CoR3!
          skuName: B_Gen5_2
          storageMb: 5120
          version: '5.7'
          autoGrowEnabled: true
          backupRetentionDays: 7
          geoRedundantBackupEnabled: false
          infrastructureEncryptionEnabled: false
          publicNetworkAccessEnabled: true
          sslEnforcementEnabled: true
          sslMinimalTlsVersionEnforced: TLS1_2
    

    Create Server Resource

    new Server(name: string, args: ServerArgs, opts?: CustomResourceOptions);
    @overload
    def Server(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               administrator_login: Optional[str] = None,
               administrator_login_password: Optional[str] = None,
               auto_grow_enabled: Optional[bool] = None,
               backup_retention_days: Optional[int] = None,
               create_mode: Optional[str] = None,
               creation_source_server_id: Optional[str] = None,
               geo_redundant_backup_enabled: Optional[bool] = None,
               identity: Optional[ServerIdentityArgs] = None,
               infrastructure_encryption_enabled: Optional[bool] = None,
               location: Optional[str] = None,
               name: Optional[str] = None,
               public_network_access_enabled: Optional[bool] = None,
               resource_group_name: Optional[str] = None,
               restore_point_in_time: Optional[str] = None,
               sku_name: Optional[str] = None,
               ssl_enforcement_enabled: Optional[bool] = None,
               ssl_minimal_tls_version_enforced: Optional[str] = None,
               storage_mb: Optional[int] = None,
               tags: Optional[Mapping[str, str]] = None,
               threat_detection_policy: Optional[ServerThreatDetectionPolicyArgs] = None,
               version: Optional[str] = None)
    @overload
    def Server(resource_name: str,
               args: ServerArgs,
               opts: Optional[ResourceOptions] = None)
    func NewServer(ctx *Context, name string, args ServerArgs, opts ...ResourceOption) (*Server, error)
    public Server(string name, ServerArgs args, CustomResourceOptions? opts = null)
    public Server(String name, ServerArgs args)
    public Server(String name, ServerArgs args, CustomResourceOptions options)
    
    type: azure:mysql:Server
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ServerArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ServerArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServerArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServerArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Server Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Server resource accepts the following input properties:

    ResourceGroupName string
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    SkuName string
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    SslEnforcementEnabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    Version string
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.
    AdministratorLogin string
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    AutoGrowEnabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    BackupRetentionDays int
    Backup retention days for the server, supported values are between 7 and 35 days.
    CreateMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    CreationSourceServerId string
    For creation modes other than Default, the source server ID to use.
    GeoRedundantBackupEnabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    Identity ServerIdentity
    An identity block as defined below.
    InfrastructureEncryptionEnabled bool
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    RestorePointInTime string
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    SslMinimalTlsVersionEnforced string
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    StorageMb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    ResourceGroupName string
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    SkuName string
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    SslEnforcementEnabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    Version string
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.
    AdministratorLogin string
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    AutoGrowEnabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    BackupRetentionDays int
    Backup retention days for the server, supported values are between 7 and 35 days.
    CreateMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    CreationSourceServerId string
    For creation modes other than Default, the source server ID to use.
    GeoRedundantBackupEnabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    Identity ServerIdentityArgs
    An identity block as defined below.
    InfrastructureEncryptionEnabled bool
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    RestorePointInTime string
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    SslMinimalTlsVersionEnforced string
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    StorageMb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy ServerThreatDetectionPolicyArgs
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    resourceGroupName String
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    skuName String
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    sslEnforcementEnabled Boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    version String
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.
    administratorLogin String
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    autoGrowEnabled Boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    backupRetentionDays Integer
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode String
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId String
    For creation modes other than Default, the source server ID to use.
    geoRedundantBackupEnabled Boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    identity ServerIdentity
    An identity block as defined below.
    infrastructureEncryptionEnabled Boolean
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    restorePointInTime String
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    sslMinimalTlsVersionEnforced String
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    storageMb Integer
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    resourceGroupName string
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    skuName string
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    sslEnforcementEnabled boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    version string
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.
    administratorLogin string
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword string
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    autoGrowEnabled boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    backupRetentionDays number
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId string
    For creation modes other than Default, the source server ID to use.
    geoRedundantBackupEnabled boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    identity ServerIdentity
    An identity block as defined below.
    infrastructureEncryptionEnabled boolean
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    publicNetworkAccessEnabled boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    restorePointInTime string
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    sslMinimalTlsVersionEnforced string
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    storageMb number
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    threatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    resource_group_name str
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    sku_name str
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    ssl_enforcement_enabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    version str
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.
    administrator_login str
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administrator_login_password str
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    auto_grow_enabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    backup_retention_days int
    Backup retention days for the server, supported values are between 7 and 35 days.
    create_mode str
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creation_source_server_id str
    For creation modes other than Default, the source server ID to use.
    geo_redundant_backup_enabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    identity ServerIdentityArgs
    An identity block as defined below.
    infrastructure_encryption_enabled bool
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    public_network_access_enabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    restore_point_in_time str
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    ssl_minimal_tls_version_enforced str
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    storage_mb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    threat_detection_policy ServerThreatDetectionPolicyArgs
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    resourceGroupName String
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    skuName String
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    sslEnforcementEnabled Boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    version String
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.
    administratorLogin String
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    autoGrowEnabled Boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    backupRetentionDays Number
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode String
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId String
    For creation modes other than Default, the source server ID to use.
    geoRedundantBackupEnabled Boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    identity Property Map
    An identity block as defined below.
    infrastructureEncryptionEnabled Boolean
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    restorePointInTime String
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    sslMinimalTlsVersionEnforced String
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    storageMb Number
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    tags Map<String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy Property Map
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Server resource produces the following output properties:

    Fqdn string
    The FQDN of the MySQL Server.
    Id string
    The provider-assigned unique ID for this managed resource.
    Fqdn string
    The FQDN of the MySQL Server.
    Id string
    The provider-assigned unique ID for this managed resource.
    fqdn String
    The FQDN of the MySQL Server.
    id String
    The provider-assigned unique ID for this managed resource.
    fqdn string
    The FQDN of the MySQL Server.
    id string
    The provider-assigned unique ID for this managed resource.
    fqdn str
    The FQDN of the MySQL Server.
    id str
    The provider-assigned unique ID for this managed resource.
    fqdn String
    The FQDN of the MySQL Server.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Server Resource

    Get an existing Server resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ServerState, opts?: CustomResourceOptions): Server
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            administrator_login: Optional[str] = None,
            administrator_login_password: Optional[str] = None,
            auto_grow_enabled: Optional[bool] = None,
            backup_retention_days: Optional[int] = None,
            create_mode: Optional[str] = None,
            creation_source_server_id: Optional[str] = None,
            fqdn: Optional[str] = None,
            geo_redundant_backup_enabled: Optional[bool] = None,
            identity: Optional[ServerIdentityArgs] = None,
            infrastructure_encryption_enabled: Optional[bool] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            public_network_access_enabled: Optional[bool] = None,
            resource_group_name: Optional[str] = None,
            restore_point_in_time: Optional[str] = None,
            sku_name: Optional[str] = None,
            ssl_enforcement_enabled: Optional[bool] = None,
            ssl_minimal_tls_version_enforced: Optional[str] = None,
            storage_mb: Optional[int] = None,
            tags: Optional[Mapping[str, str]] = None,
            threat_detection_policy: Optional[ServerThreatDetectionPolicyArgs] = None,
            version: Optional[str] = None) -> Server
    func GetServer(ctx *Context, name string, id IDInput, state *ServerState, opts ...ResourceOption) (*Server, error)
    public static Server Get(string name, Input<string> id, ServerState? state, CustomResourceOptions? opts = null)
    public static Server get(String name, Output<String> id, ServerState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AdministratorLogin string
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    AutoGrowEnabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    BackupRetentionDays int
    Backup retention days for the server, supported values are between 7 and 35 days.
    CreateMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    CreationSourceServerId string
    For creation modes other than Default, the source server ID to use.
    Fqdn string
    The FQDN of the MySQL Server.
    GeoRedundantBackupEnabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    Identity ServerIdentity
    An identity block as defined below.
    InfrastructureEncryptionEnabled bool
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    ResourceGroupName string
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    RestorePointInTime string
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    SkuName string
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    SslEnforcementEnabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    SslMinimalTlsVersionEnforced string
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    StorageMb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    Tags Dictionary<string, string>
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    Version string
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.
    AdministratorLogin string
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    AdministratorLoginPassword string
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    AutoGrowEnabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    BackupRetentionDays int
    Backup retention days for the server, supported values are between 7 and 35 days.
    CreateMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    CreationSourceServerId string
    For creation modes other than Default, the source server ID to use.
    Fqdn string
    The FQDN of the MySQL Server.
    GeoRedundantBackupEnabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    Identity ServerIdentityArgs
    An identity block as defined below.
    InfrastructureEncryptionEnabled bool
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    Location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    Name string
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    PublicNetworkAccessEnabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    ResourceGroupName string
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    RestorePointInTime string
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    SkuName string
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    SslEnforcementEnabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    SslMinimalTlsVersionEnforced string
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    StorageMb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    Tags map[string]string
    A mapping of tags to assign to the resource.
    ThreatDetectionPolicy ServerThreatDetectionPolicyArgs
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    Version string
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.
    administratorLogin String
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    autoGrowEnabled Boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    backupRetentionDays Integer
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode String
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId String
    For creation modes other than Default, the source server ID to use.
    fqdn String
    The FQDN of the MySQL Server.
    geoRedundantBackupEnabled Boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    identity ServerIdentity
    An identity block as defined below.
    infrastructureEncryptionEnabled Boolean
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    resourceGroupName String
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    restorePointInTime String
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    skuName String
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    sslEnforcementEnabled Boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    sslMinimalTlsVersionEnforced String
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    storageMb Integer
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    tags Map<String,String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    version String
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.
    administratorLogin string
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword string
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    autoGrowEnabled boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    backupRetentionDays number
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode string
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId string
    For creation modes other than Default, the source server ID to use.
    fqdn string
    The FQDN of the MySQL Server.
    geoRedundantBackupEnabled boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    identity ServerIdentity
    An identity block as defined below.
    infrastructureEncryptionEnabled boolean
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    location string
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name string
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    publicNetworkAccessEnabled boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    resourceGroupName string
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    restorePointInTime string
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    skuName string
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    sslEnforcementEnabled boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    sslMinimalTlsVersionEnforced string
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    storageMb number
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    tags {[key: string]: string}
    A mapping of tags to assign to the resource.
    threatDetectionPolicy ServerThreatDetectionPolicy
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    version string
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.
    administrator_login str
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administrator_login_password str
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    auto_grow_enabled bool
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    backup_retention_days int
    Backup retention days for the server, supported values are between 7 and 35 days.
    create_mode str
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creation_source_server_id str
    For creation modes other than Default, the source server ID to use.
    fqdn str
    The FQDN of the MySQL Server.
    geo_redundant_backup_enabled bool
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    identity ServerIdentityArgs
    An identity block as defined below.
    infrastructure_encryption_enabled bool
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    location str
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name str
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    public_network_access_enabled bool
    Whether or not public network access is allowed for this server. Defaults to true.
    resource_group_name str
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    restore_point_in_time str
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    sku_name str
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    ssl_enforcement_enabled bool
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    ssl_minimal_tls_version_enforced str
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    storage_mb int
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    tags Mapping[str, str]
    A mapping of tags to assign to the resource.
    threat_detection_policy ServerThreatDetectionPolicyArgs
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    version str
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.
    administratorLogin String
    The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created.
    administratorLoginPassword String
    The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default.
    autoGrowEnabled Boolean
    Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. Defaults to true.
    backupRetentionDays Number
    Backup retention days for the server, supported values are between 7 and 35 days.
    createMode String
    The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default.
    creationSourceServerId String
    For creation modes other than Default, the source server ID to use.
    fqdn String
    The FQDN of the MySQL Server.
    geoRedundantBackupEnabled Boolean
    Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier.
    identity Property Map
    An identity block as defined below.
    infrastructureEncryptionEnabled Boolean
    Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created.
    location String
    Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
    name String
    Specifies the name of the MySQL Server. Changing this forces a new resource to be created. This needs to be globally unique within Azure.
    publicNetworkAccessEnabled Boolean
    Whether or not public network access is allowed for this server. Defaults to true.
    resourceGroupName String
    The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created.
    restorePointInTime String
    When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z.
    skuName String
    Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32.
    sslEnforcementEnabled Boolean
    Specifies if SSL should be enforced on connections. Possible values are true and false.
    sslMinimalTlsVersionEnforced String
    The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2.
    storageMb Number
    Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation.
    tags Map<String>
    A mapping of tags to assign to the resource.
    threatDetectionPolicy Property Map
    Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below.
    version String
    Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created.

    Supporting Types

    ServerIdentity, ServerIdentityArgs

    Type string
    Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned.
    PrincipalId string
    The Principal ID associated with this Managed Service Identity.
    TenantId string
    The Tenant ID associated with this Managed Service Identity.
    Type string
    Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned.
    PrincipalId string
    The Principal ID associated with this Managed Service Identity.
    TenantId string
    The Tenant ID associated with this Managed Service Identity.
    type String
    Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned.
    principalId String
    The Principal ID associated with this Managed Service Identity.
    tenantId String
    The Tenant ID associated with this Managed Service Identity.
    type string
    Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned.
    principalId string
    The Principal ID associated with this Managed Service Identity.
    tenantId string
    The Tenant ID associated with this Managed Service Identity.
    type str
    Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned.
    principal_id str
    The Principal ID associated with this Managed Service Identity.
    tenant_id str
    The Tenant ID associated with this Managed Service Identity.
    type String
    Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned.
    principalId String
    The Principal ID associated with this Managed Service Identity.
    tenantId String
    The Tenant ID associated with this Managed Service Identity.

    ServerThreatDetectionPolicy, ServerThreatDetectionPolicyArgs

    DisabledAlerts List<string>
    Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action.
    EmailAccountAdmins bool
    Should the account administrators be emailed when this alert is triggered?
    EmailAddresses List<string>
    A list of email addresses which alerts should be sent to.
    Enabled bool
    Is the policy enabled?
    RetentionDays int
    Specifies the number of days to keep in the Threat Detection audit logs.
    StorageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account.
    StorageEndpoint string
    Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
    DisabledAlerts []string
    Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action.
    EmailAccountAdmins bool
    Should the account administrators be emailed when this alert is triggered?
    EmailAddresses []string
    A list of email addresses which alerts should be sent to.
    Enabled bool
    Is the policy enabled?
    RetentionDays int
    Specifies the number of days to keep in the Threat Detection audit logs.
    StorageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account.
    StorageEndpoint string
    Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
    disabledAlerts List<String>
    Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action.
    emailAccountAdmins Boolean
    Should the account administrators be emailed when this alert is triggered?
    emailAddresses List<String>
    A list of email addresses which alerts should be sent to.
    enabled Boolean
    Is the policy enabled?
    retentionDays Integer
    Specifies the number of days to keep in the Threat Detection audit logs.
    storageAccountAccessKey String
    Specifies the identifier key of the Threat Detection audit storage account.
    storageEndpoint String
    Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
    disabledAlerts string[]
    Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action.
    emailAccountAdmins boolean
    Should the account administrators be emailed when this alert is triggered?
    emailAddresses string[]
    A list of email addresses which alerts should be sent to.
    enabled boolean
    Is the policy enabled?
    retentionDays number
    Specifies the number of days to keep in the Threat Detection audit logs.
    storageAccountAccessKey string
    Specifies the identifier key of the Threat Detection audit storage account.
    storageEndpoint string
    Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
    disabled_alerts Sequence[str]
    Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action.
    email_account_admins bool
    Should the account administrators be emailed when this alert is triggered?
    email_addresses Sequence[str]
    A list of email addresses which alerts should be sent to.
    enabled bool
    Is the policy enabled?
    retention_days int
    Specifies the number of days to keep in the Threat Detection audit logs.
    storage_account_access_key str
    Specifies the identifier key of the Threat Detection audit storage account.
    storage_endpoint str
    Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
    disabledAlerts List<String>
    Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action.
    emailAccountAdmins Boolean
    Should the account administrators be emailed when this alert is triggered?
    emailAddresses List<String>
    A list of email addresses which alerts should be sent to.
    enabled Boolean
    Is the policy enabled?
    retentionDays Number
    Specifies the number of days to keep in the Threat Detection audit logs.
    storageAccountAccessKey String
    Specifies the identifier key of the Threat Detection audit storage account.
    storageEndpoint String
    Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.

    Import

    MySQL Server’s can be imported using the resource id, e.g.

    $ pulumi import azure:mysql/server:Server server1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.DBforMySQL/servers/server1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.67.1 published on Tuesday, Feb 27, 2024 by Pulumi