sql

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-azure repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-azurerm repo.

class pulumi_azure.sql.ActiveDirectoryAdministrator(resource_name, opts=None, login=None, object_id=None, resource_group_name=None, server_name=None, tenant_id=None, __props__=None, __name__=None, __opts__=None)

Allows you to set a user or group as the AD administrator for an Azure SQL server

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • login (pulumi.Input[str]) – The login name of the principal to set as the server administrator

  • object_id (pulumi.Input[str]) – The ID of the principal to set as the server administrator

  • resource_group_name (pulumi.Input[str]) – The name of the resource group for the SQL server. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to set the administrator. Changing this forces a new resource to be created.

  • tenant_id (pulumi.Input[str]) – The Azure Tenant ID

login = None

The login name of the principal to set as the server administrator

object_id = None

The ID of the principal to set as the server administrator

resource_group_name = None

The name of the resource group for the SQL server. Changing this forces a new resource to be created.

server_name = None

The name of the SQL Server on which to set the administrator. Changing this forces a new resource to be created.

tenant_id = None

The Azure Tenant ID

static get(resource_name, id, opts=None, login=None, object_id=None, resource_group_name=None, server_name=None, tenant_id=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • login (pulumi.Input[str]) – The login name of the principal to set as the server administrator

  • object_id (pulumi.Input[str]) – The ID of the principal to set as the server administrator

  • resource_group_name (pulumi.Input[str]) – The name of the resource group for the SQL server. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to set the administrator. Changing this forces a new resource to be created.

  • tenant_id (pulumi.Input[str]) – The Azure Tenant ID

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.sql.AwaitableGetDatabaseResult(collation=None, default_secondary_location=None, edition=None, elastic_pool_name=None, failover_group_id=None, location=None, name=None, read_scale=None, resource_group_name=None, server_name=None, tags=None, id=None)
class pulumi_azure.sql.AwaitableGetServerResult(administrator_login=None, fqdn=None, location=None, name=None, resource_group_name=None, tags=None, version=None, id=None)
class pulumi_azure.sql.Database(resource_name, opts=None, collation=None, create_mode=None, edition=None, elastic_pool_name=None, import_=None, location=None, max_size_bytes=None, name=None, read_scale=None, requested_service_objective_id=None, requested_service_objective_name=None, resource_group_name=None, restore_point_in_time=None, server_name=None, source_database_deletion_date=None, source_database_id=None, tags=None, threat_detection_policy=None, __props__=None, __name__=None, __opts__=None)

Allows you to manage an Azure SQL Database

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • collation (pulumi.Input[str]) – The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

  • create_mode (pulumi.Input[str]) – Specifies how to create the database. Must be either Default to create a new database or PointInTimeRestore to restore from a snapshot. Defaults to Default.

  • edition (pulumi.Input[str]) – The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL Database Service Tiers.

  • elastic_pool*name (pulumi.Input[str]) –

    The name of the elastic database pool.

:param pulumi.Input[dict] import*: A Database Import block as documented below. create_mode must be set to Default. :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] max_size_bytes: The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL Database Service Tiers. :param pulumi.Input[str] name: The name of the database. :param pulumi.Input[bool] read_scale: Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads. :param pulumi.Input[str] requested_service_objective_id: Use requested_service_objective_id or requested_service_objective_name to set the performance level for the database.

Parameters
  • requested_service_objective_name (pulumi.Input[str]) –

    Use requested_service_objective_name or requested_service_objective_id to set the performance level for the database. Valid values are: S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. Please see Azure SQL Database Service Tiers.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.

  • restore_point_in_time (pulumi.Input[str]) – The point in time for the restore. Only applies if create_mode is PointInTimeRestore e.g. 2013-11-08T22:00:40Z

  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to create the database.

  • source_database_deletion_date (pulumi.Input[str]) – The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

  • source_database_id (pulumi.Input[str]) – The URI of the source database if create_mode value is not Default.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • threat_detection_policy (pulumi.Input[dict]) – Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

The import_ object supports the following:

  • administrator_login (pulumi.Input[str]) - Specifies the name of the SQL administrator.

  • administrator_login_password (pulumi.Input[str]) - Specifies the password of the SQL administrator.

  • authenticationType (pulumi.Input[str]) - Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword.

  • operationMode (pulumi.Input[str]) - Specifies the type of import operation being performed. The only allowable value is Import.

  • storageKey (pulumi.Input[str]) - Specifies the access key for the storage account.

  • storageKeyType (pulumi.Input[str]) - Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey.

  • storageUri (pulumi.Input[str]) - Specifies the blob URI of the .bacpac file.

The threat_detection_policy object supports the following:

  • disabledAlerts (pulumi.Input[list]) - Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.

  • emailAccountAdmins (pulumi.Input[str]) - Should the account administrators be emailed when this alert is triggered?

  • emailAddresses (pulumi.Input[list]) - A list of email addresses which alerts should be sent to.

  • retentionDays (pulumi.Input[float]) - Specifies the number of days to keep in the Threat Detection audit logs.

  • state (pulumi.Input[str]) - The State of the Policy. Possible values are Enabled, Disabled or New.

  • storageAccountAccessKey (pulumi.Input[str]) - Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.

  • storageEndpoint (pulumi.Input[str]) - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled.

  • useServerDefault (pulumi.Input[str]) - Should the default server policy be used? Defaults to Disabled.

collation = None

The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

create_mode = None

Specifies how to create the database. Must be either Default to create a new database or PointInTimeRestore to restore from a snapshot. Defaults to Default.

creation_date = None

The creation date of the SQL Database.

default_secondary_location = None

The default secondary location of the SQL Database.

edition = None

The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL Database Service Tiers.

elastic_pool_name = None

The name of the elastic database pool.

import_ = None

A Database Import block as documented below. create_mode must be set to Default.

  • administrator_login (str) - Specifies the name of the SQL administrator.

  • administrator_login_password (str) - Specifies the password of the SQL administrator.

  • authenticationType (str) - Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword.

  • operationMode (str) - Specifies the type of import operation being performed. The only allowable value is Import.

  • storageKey (str) - Specifies the access key for the storage account.

  • storageKeyType (str) - Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey.

  • storageUri (str) - Specifies the blob URI of the .bacpac file.

location = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

max_size_bytes = None

The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL Database Service Tiers.

name = None

The name of the database.

read_scale = None

Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads.

requested_service_objective_id = None

Use requested_service_objective_id or requested_service_objective_name to set the performance level for the database. Please see Azure SQL Database Service Tiers.

requested_service_objective_name = None

Use requested_service_objective_name or requested_service_objective_id to set the performance level for the database. Valid values are: S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. Please see Azure SQL Database Service Tiers.

resource_group_name = None

The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.

restore_point_in_time = None

The point in time for the restore. Only applies if create_mode is PointInTimeRestore e.g. 2013-11-08T22:00:40Z

server_name = None

The name of the SQL Server on which to create the database.

source_database_deletion_date = None

The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

source_database_id = None

The URI of the source database if create_mode value is not Default.

tags = None

A mapping of tags to assign to the resource.

threat_detection_policy = None

Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

  • disabledAlerts (list) - Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.

  • emailAccountAdmins (str) - Should the account administrators be emailed when this alert is triggered?

  • emailAddresses (list) - A list of email addresses which alerts should be sent to.

  • retentionDays (float) - Specifies the number of days to keep in the Threat Detection audit logs.

  • state (str) - The State of the Policy. Possible values are Enabled, Disabled or New.

  • storageAccountAccessKey (str) - Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.

  • storageEndpoint (str) - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled.

  • useServerDefault (str) - Should the default server policy be used? Defaults to Disabled.

static get(resource_name, id, opts=None, collation=None, create_mode=None, creation_date=None, default_secondary_location=None, edition=None, elastic_pool_name=None, encryption=None, import_=None, location=None, max_size_bytes=None, name=None, read_scale=None, requested_service_objective_id=None, requested_service_objective_name=None, resource_group_name=None, restore_point_in_time=None, server_name=None, source_database_deletion_date=None, source_database_id=None, tags=None, threat_detection_policy=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • collation (pulumi.Input[str]) – The name of the collation. Applies only if create_mode is Default. Azure default is SQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.

  • create_mode (pulumi.Input[str]) – Specifies how to create the database. Must be either Default to create a new database or PointInTimeRestore to restore from a snapshot. Defaults to Default.

  • creation_date (pulumi.Input[str]) – The creation date of the SQL Database.

  • default_secondary_location (pulumi.Input[str]) – The default secondary location of the SQL Database.

  • edition (pulumi.Input[str]) –

    The edition of the database to be created. Applies only if create_mode is Default. Valid values are: Basic, Standard, Premium, DataWarehouse, Business, BusinessCritical, Free, GeneralPurpose, Hyperscale, Premium, PremiumRS, Standard, Stretch, System, System2, or Web. Please see Azure SQL Database Service Tiers.

  • elastic_pool*name (pulumi.Input[str]) –

    The name of the elastic database pool.

:param pulumi.Input[dict] import*: A Database Import block as documented below. create_mode must be set to Default. :param pulumi.Input[str] location: Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. :param pulumi.Input[str] max_size_bytes: The maximum size that the database can grow to. Applies only if create_mode is Default. Please see Azure SQL Database Service Tiers. :param pulumi.Input[str] name: The name of the database. :param pulumi.Input[bool] read_scale: Read-only connections will be redirected to a high-available replica. Please see Use read-only replicas to load-balance read-only query workloads. :param pulumi.Input[str] requested_service_objective_id: Use requested_service_objective_id or requested_service_objective_name to set the performance level for the database.

Parameters
  • requested_service_objective_name (pulumi.Input[str]) –

    Use requested_service_objective_name or requested_service_objective_id to set the performance level for the database. Valid values are: S0, S1, S2, S3, P1, P2, P4, P6, P11 and ElasticPool. Please see Azure SQL Database Service Tiers.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the database. This must be the same as Database Server resource group currently.

  • restore_point_in_time (pulumi.Input[str]) – The point in time for the restore. Only applies if create_mode is PointInTimeRestore e.g. 2013-11-08T22:00:40Z

  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to create the database.

  • source_database_deletion_date (pulumi.Input[str]) – The deletion date time of the source database. Only applies to deleted databases where create_mode is PointInTimeRestore.

  • source_database_id (pulumi.Input[str]) – The URI of the source database if create_mode value is not Default.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • threat_detection_policy (pulumi.Input[dict]) – Threat detection policy configuration. The threat_detection_policy block supports fields documented below.

The import_ object supports the following:

  • administrator_login (pulumi.Input[str]) - Specifies the name of the SQL administrator.

  • administrator_login_password (pulumi.Input[str]) - Specifies the password of the SQL administrator.

  • authenticationType (pulumi.Input[str]) - Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword.

  • operationMode (pulumi.Input[str]) - Specifies the type of import operation being performed. The only allowable value is Import.

  • storageKey (pulumi.Input[str]) - Specifies the access key for the storage account.

  • storageKeyType (pulumi.Input[str]) - Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey.

  • storageUri (pulumi.Input[str]) - Specifies the blob URI of the .bacpac file.

The threat_detection_policy object supports the following:

  • disabledAlerts (pulumi.Input[list]) - Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability.

  • emailAccountAdmins (pulumi.Input[str]) - Should the account administrators be emailed when this alert is triggered?

  • emailAddresses (pulumi.Input[list]) - A list of email addresses which alerts should be sent to.

  • retentionDays (pulumi.Input[float]) - Specifies the number of days to keep in the Threat Detection audit logs.

  • state (pulumi.Input[str]) - The State of the Policy. Possible values are Enabled, Disabled or New.

  • storageAccountAccessKey (pulumi.Input[str]) - Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled.

  • storageEndpoint (pulumi.Input[str]) - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled.

  • useServerDefault (pulumi.Input[str]) - Should the default server policy be used? Defaults to Disabled.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.sql.ElasticPool(resource_name, opts=None, db_dtu_max=None, db_dtu_min=None, dtu=None, edition=None, location=None, name=None, pool_size=None, resource_group_name=None, server_name=None, tags=None, __props__=None, __name__=None, __opts__=None)

Allows you to manage an Azure SQL Elastic Pool.

NOTE: - This version of the Elasticpool resource is being deprecated and should no longer be used. Please use the mssql.ElasticPool version instead.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • db_dtu_max (pulumi.Input[float]) – The maximum DTU which will be guaranteed to all databases in the elastic pool to be created.

  • db_dtu_min (pulumi.Input[float]) – The minimum DTU which will be guaranteed to all databases in the elastic pool to be created.

  • dtu (pulumi.Input[float]) –

    The total shared DTU for the elastic pool. Valid values depend on the edition which has been defined. Refer to Azure SQL Database Service Tiers for valid combinations.

  • edition (pulumi.Input[str]) –

    The edition of the elastic pool to be created. Valid values are Basic, Standard, and Premium. Refer to Azure SQL Database Service Tiers for details. Changing this forces a new resource to be created.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.

  • pool_size (pulumi.Input[float]) –

    The maximum size in MB that all databases in the elastic pool can grow to. The maximum size must be consistent with combination of edition and dtu and the limits documented in Azure SQL Database Service Tiers. If not defined when creating an elastic pool, the value is set to the size implied by edition and dtu.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server.

  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

creation_date = None

The creation date of the SQL Elastic Pool.

db_dtu_max = None

The maximum DTU which will be guaranteed to all databases in the elastic pool to be created.

db_dtu_min = None

The minimum DTU which will be guaranteed to all databases in the elastic pool to be created.

dtu = None

The total shared DTU for the elastic pool. Valid values depend on the edition which has been defined. Refer to Azure SQL Database Service Tiers for valid combinations.

edition = None

The edition of the elastic pool to be created. Valid values are Basic, Standard, and Premium. Refer to Azure SQL Database Service Tiers for details. Changing this forces a new resource to be created.

location = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name = None

The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.

pool_size = None

The maximum size in MB that all databases in the elastic pool can grow to. The maximum size must be consistent with combination of edition and dtu and the limits documented in Azure SQL Database Service Tiers. If not defined when creating an elastic pool, the value is set to the size implied by edition and dtu.

resource_group_name = None

The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server.

server_name = None

The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.

tags = None

A mapping of tags to assign to the resource.

static get(resource_name, id, opts=None, creation_date=None, db_dtu_max=None, db_dtu_min=None, dtu=None, edition=None, location=None, name=None, pool_size=None, resource_group_name=None, server_name=None, tags=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • creation_date (pulumi.Input[str]) – The creation date of the SQL Elastic Pool.

  • db_dtu_max (pulumi.Input[float]) – The maximum DTU which will be guaranteed to all databases in the elastic pool to be created.

  • db_dtu_min (pulumi.Input[float]) – The minimum DTU which will be guaranteed to all databases in the elastic pool to be created.

  • dtu (pulumi.Input[float]) –

    The total shared DTU for the elastic pool. Valid values depend on the edition which has been defined. Refer to Azure SQL Database Service Tiers for valid combinations.

  • edition (pulumi.Input[str]) –

    The edition of the elastic pool to be created. Valid values are Basic, Standard, and Premium. Refer to Azure SQL Database Service Tiers for details. Changing this forces a new resource to be created.

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.

  • pool_size (pulumi.Input[float]) –

    The maximum size in MB that all databases in the elastic pool can grow to. The maximum size must be consistent with combination of edition and dtu and the limits documented in Azure SQL Database Service Tiers. If not defined when creating an elastic pool, the value is set to the size implied by edition and dtu.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server.

  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.sql.FailoverGroup(resource_name, opts=None, databases=None, name=None, partner_servers=None, read_write_endpoint_failover_policy=None, readonly_endpoint_failover_policy=None, resource_group_name=None, server_name=None, tags=None, __props__=None, __name__=None, __opts__=None)

Create a failover group of databases on a collection of Azure SQL servers.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • databases (pulumi.Input[list]) – A list of database ids to add to the failover group

  • name (pulumi.Input[str]) – The name of the failover group. Changing this forces a new resource to be created.

  • partner_servers (pulumi.Input[list]) – A list of secondary servers as documented below

  • read_write_endpoint_failover_policy (pulumi.Input[dict]) – A read/write policy as documented below

  • readonly_endpoint_failover_policy (pulumi.Input[dict]) – a read-only policy as documented below

  • resource_group_name (pulumi.Input[str]) – The name of the resource group containing the SQL server

  • server_name (pulumi.Input[str]) – The name of the primary SQL server. Changing this forces a new resource to be created.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

The partner_servers object supports the following:

  • id (pulumi.Input[str]) - the SQL server ID

  • location (pulumi.Input[str]) - the location of the failover group.

  • role (pulumi.Input[str]) - local replication role of the failover group instance.

The read_write_endpoint_failover_policy object supports the following:

  • graceMinutes (pulumi.Input[float]) - Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted

  • mode (pulumi.Input[str]) - Failover policy for the read-only endpoint. Possible values are Enabled, and Disabled

The readonly_endpoint_failover_policy object supports the following:

  • mode (pulumi.Input[str]) - Failover policy for the read-only endpoint. Possible values are Enabled, and Disabled

databases = None

A list of database ids to add to the failover group

location = None

the location of the failover group.

name = None

The name of the failover group. Changing this forces a new resource to be created.

partner_servers = None

A list of secondary servers as documented below

  • id (str) - the SQL server ID

  • location (str) - the location of the failover group.

  • role (str) - local replication role of the failover group instance.

read_write_endpoint_failover_policy = None

A read/write policy as documented below

  • graceMinutes (float) - Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted

  • mode (str) - Failover policy for the read-only endpoint. Possible values are Enabled, and Disabled

readonly_endpoint_failover_policy = None

a read-only policy as documented below

  • mode (str) - Failover policy for the read-only endpoint. Possible values are Enabled, and Disabled

resource_group_name = None

The name of the resource group containing the SQL server

role = None

local replication role of the failover group instance.

server_name = None

The name of the primary SQL server. Changing this forces a new resource to be created.

tags = None

A mapping of tags to assign to the resource.

static get(resource_name, id, opts=None, databases=None, location=None, name=None, partner_servers=None, read_write_endpoint_failover_policy=None, readonly_endpoint_failover_policy=None, resource_group_name=None, role=None, server_name=None, tags=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • databases (pulumi.Input[list]) – A list of database ids to add to the failover group

  • location (pulumi.Input[str]) – the location of the failover group.

  • name (pulumi.Input[str]) – The name of the failover group. Changing this forces a new resource to be created.

  • partner_servers (pulumi.Input[list]) – A list of secondary servers as documented below

  • read_write_endpoint_failover_policy (pulumi.Input[dict]) – A read/write policy as documented below

  • readonly_endpoint_failover_policy (pulumi.Input[dict]) – a read-only policy as documented below

  • resource_group_name (pulumi.Input[str]) – The name of the resource group containing the SQL server

  • role (pulumi.Input[str]) – local replication role of the failover group instance.

  • server_name (pulumi.Input[str]) – The name of the primary SQL server. Changing this forces a new resource to be created.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

The partner_servers object supports the following:

  • id (pulumi.Input[str]) - the SQL server ID

  • location (pulumi.Input[str]) - the location of the failover group.

  • role (pulumi.Input[str]) - local replication role of the failover group instance.

The read_write_endpoint_failover_policy object supports the following:

  • graceMinutes (pulumi.Input[float]) - Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted

  • mode (pulumi.Input[str]) - Failover policy for the read-only endpoint. Possible values are Enabled, and Disabled

The readonly_endpoint_failover_policy object supports the following:

  • mode (pulumi.Input[str]) - Failover policy for the read-only endpoint. Possible values are Enabled, and Disabled

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.sql.FirewallRule(resource_name, opts=None, end_ip_address=None, name=None, resource_group_name=None, server_name=None, start_ip_address=None, __props__=None, __name__=None, __opts__=None)

Allows you to manage an Azure SQL Firewall Rule

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • end_ip_address (pulumi.Input[str]) – The ending IP address to allow through the firewall for this rule.

  • name (pulumi.Input[str]) – The name of the firewall rule.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the sql server.

  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to create the Firewall Rule.

  • start_ip_address (pulumi.Input[str]) – The starting IP address to allow through the firewall for this rule.

end_ip_address = None

The ending IP address to allow through the firewall for this rule.

name = None

The name of the firewall rule.

resource_group_name = None

The name of the resource group in which to create the sql server.

server_name = None

The name of the SQL Server on which to create the Firewall Rule.

start_ip_address = None

The starting IP address to allow through the firewall for this rule.

static get(resource_name, id, opts=None, end_ip_address=None, name=None, resource_group_name=None, server_name=None, start_ip_address=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • end_ip_address (pulumi.Input[str]) – The ending IP address to allow through the firewall for this rule.

  • name (pulumi.Input[str]) – The name of the firewall rule.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the sql server.

  • server_name (pulumi.Input[str]) – The name of the SQL Server on which to create the Firewall Rule.

  • start_ip_address (pulumi.Input[str]) – The starting IP address to allow through the firewall for this rule.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.sql.GetDatabaseResult(collation=None, default_secondary_location=None, edition=None, elastic_pool_name=None, failover_group_id=None, location=None, name=None, read_scale=None, resource_group_name=None, server_name=None, tags=None, id=None)

A collection of values returned by getDatabase.

collation = None

The name of the collation.

default_secondary_location = None

The default secondary location of the SQL Database.

edition = None

The edition of the database.

elastic_pool_name = None

The name of the elastic database pool the database belongs to.

failover_group_id = None

The ID of the failover group the database belongs to.

location = None

The location of the Resource Group in which the SQL Server exists.

name = None

The name of the database.

read_scale = None

Indicate if read-only connections will be redirected to a high-available replica.

resource_group_name = None

The name of the resource group in which the database resides. This will always be the same resource group as the Database Server.

server_name = None

The name of the SQL Server on which to create the database.

tags = None

A mapping of tags assigned to the resource.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_azure.sql.GetServerResult(administrator_login=None, fqdn=None, location=None, name=None, resource_group_name=None, tags=None, version=None, id=None)

A collection of values returned by getServer.

administrator_login = None

The administrator username of the SQL Server.

fqdn = None

The fully qualified domain name of the SQL Server.

location = None

The location of the Resource Group in which the SQL Server exists.

tags = None

A mapping of tags assigned to the resource.

version = None

The version of the SQL Server.

id = None

id is the provider-assigned unique ID for this managed resource.

class pulumi_azure.sql.SqlServer(resource_name, opts=None, administrator_login=None, administrator_login_password=None, location=None, name=None, resource_group_name=None, tags=None, version=None, __props__=None, __name__=None, __opts__=None)

Manages a SQL Azure Database Server.

Note: All arguments including the administrator login and password will be stored in the raw state as plain-text. Read more about sensitive data in state.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • administrator_login (pulumi.Input[str]) – The administrator login name for the new server. Changing this forces a new resource to be created.

  • administrator_login_password (pulumi.Input[str]) – The password associated with the administrator_login user. Needs to comply with Azure’s Password Policy

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – The name of the SQL Server. This needs to be globally unique within Azure.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the SQL Server.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • version (pulumi.Input[str]) – The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).

administrator_login = None

The administrator login name for the new server. Changing this forces a new resource to be created.

administrator_login_password = None

The password associated with the administrator_login user. Needs to comply with Azure’s Password Policy

fully_qualified_domain_name = None

The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)

location = None

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

name = None

The name of the SQL Server. This needs to be globally unique within Azure.

resource_group_name = None

The name of the resource group in which to create the SQL Server.

tags = None

A mapping of tags to assign to the resource.

version = None

The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).

static get(resource_name, id, opts=None, administrator_login=None, administrator_login_password=None, fully_qualified_domain_name=None, location=None, name=None, resource_group_name=None, tags=None, version=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • administrator_login (pulumi.Input[str]) – The administrator login name for the new server. Changing this forces a new resource to be created.

  • administrator_login_password (pulumi.Input[str]) –

    The password associated with the administrator_login user. Needs to comply with Azure’s Password Policy

  • fully_qualified_domain_name (pulumi.Input[str]) – The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)

  • location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

  • name (pulumi.Input[str]) – The name of the SQL Server. This needs to be globally unique within Azure.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group in which to create the SQL Server.

  • tags (pulumi.Input[dict]) – A mapping of tags to assign to the resource.

  • version (pulumi.Input[str]) – The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_azure.sql.VirtualNetworkRule(resource_name, opts=None, ignore_missing_vnet_service_endpoint=None, name=None, resource_group_name=None, server_name=None, subnet_id=None, __props__=None, __name__=None, __opts__=None)

Allows you to add, update, or remove an Azure SQL server to a subnet of a virtual network.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • ignore_missing_vnet_service_endpoint (pulumi.Input[bool]) – Create the virtual network rule before the subnet has the virtual network service endpoint enabled. The default value is false.

  • name (pulumi.Input[str]) – The name of the SQL virtual network rule. Changing this forces a new resource to be created. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group where the SQL server resides. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – The name of the SQL Server to which this SQL virtual network rule will be applied to. Changing this forces a new resource to be created.

  • subnet_id (pulumi.Input[str]) – The ID of the subnet that the SQL server will be connected to.

ignore_missing_vnet_service_endpoint = None

Create the virtual network rule before the subnet has the virtual network service endpoint enabled. The default value is false.

name = None

The name of the SQL virtual network rule. Changing this forces a new resource to be created. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen.

resource_group_name = None

The name of the resource group where the SQL server resides. Changing this forces a new resource to be created.

server_name = None

The name of the SQL Server to which this SQL virtual network rule will be applied to. Changing this forces a new resource to be created.

subnet_id = None

The ID of the subnet that the SQL server will be connected to.

static get(resource_name, id, opts=None, ignore_missing_vnet_service_endpoint=None, name=None, resource_group_name=None, server_name=None, subnet_id=None)

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

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • ignore_missing_vnet_service_endpoint (pulumi.Input[bool]) – Create the virtual network rule before the subnet has the virtual network service endpoint enabled. The default value is false.

  • name (pulumi.Input[str]) – The name of the SQL virtual network rule. Changing this forces a new resource to be created. Cannot be empty and must only contain alphanumeric characters and hyphens. Cannot start with a number, and cannot start or end with a hyphen.

  • resource_group_name (pulumi.Input[str]) – The name of the resource group where the SQL server resides. Changing this forces a new resource to be created.

  • server_name (pulumi.Input[str]) – The name of the SQL Server to which this SQL virtual network rule will be applied to. Changing this forces a new resource to be created.

  • subnet_id (pulumi.Input[str]) – The ID of the subnet that the SQL server will be connected to.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_azure.sql.get_database(name=None, resource_group_name=None, server_name=None, tags=None, opts=None)

Use this data source to access information about an existing SQL Azure Database.

Parameters
  • name (str) – The name of the SQL Database.

  • resource_group_name (str) – Specifies the name of the Resource Group where the Azure SQL Database exists.

  • server_name (str) – The name of the SQL Server.

pulumi_azure.sql.get_server(name=None, resource_group_name=None, opts=None)

Use this data source to access information about an existing SQL Azure Database Server.

Parameters
  • name (str) – The name of the SQL Server.

  • resource_group_name (str) – Specifies the name of the Resource Group where the SQL Server exists.