This page documents the language specification for the azure package. If you're looking for help working with the inputs, outputs, or functions of azure resources in a Pulumi program, please see the resource documentation for examples and API reference.
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
import pulumi import pulumi_azure as azure current = azure.core.get_client_config() example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US") example_sql_server = azure.sql.SqlServer("exampleSqlServer", resource_group_name=example_resource_group.name, location=example_resource_group.location, version="12.0", administrator_login="4dm1n157r470r", administrator_login_password="4-v3ry-53cr37-p455w0rd") example_active_directory_administrator = azure.sql.ActiveDirectoryAdministrator("exampleActiveDirectoryAdministrator", server_name=example_sql_server.name, resource_group_name=example_resource_group.name, login="sqladmin", tenant_id=current.tenant_id, object_id=current.object_id)
- 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: pulumi.Output[str] = None¶The login name of the principal to set as the server administrator
object_id: pulumi.Output[str] = None¶The ID of the principal to set as the server administrator
resource_group_name: pulumi.Output[str] = None¶The name of the resource group for the SQL server. Changing this forces a new resource to be created.
server_name: pulumi.Output[str] = None¶The name of the SQL Server on which to set the administrator. Changing this forces a new resource to be created.
tenant_id: pulumi.Output[str] = 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, id=None, location=None, name=None, read_scale=None, resource_group_name=None, server_name=None, tags=None)¶
- class
pulumi_azure.sql.AwaitableGetServerResult(administrator_login=None, fqdn=None, id=None, identities=None, location=None, name=None, resource_group_name=None, tags=None, version=None)¶
- class
pulumi_azure.sql.Database(resource_name, opts=None, collation=None, create_mode=None, edition=None, elastic_pool_name=None, extended_auditing_policy=None, import_=None, location=None, max_size_bytes=None, max_size_gb=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, zone_redundant=None, __props__=None, __name__=None, __opts__=None)¶ Allows you to manage an Azure SQL Database
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US") example_sql_server = azure.sql.SqlServer("exampleSqlServer", resource_group_name=example_resource_group.name, location="West US", version="12.0", administrator_login="4dm1n157r470r", administrator_login_password="4-v3ry-53cr37-p455w0rd", tags={ "environment": "production", }) example_account = azure.storage.Account("exampleAccount", resource_group_name=example_resource_group.name, location=example_resource_group.location, account_tier="Standard", account_replication_type="LRS") example_database = azure.sql.Database("exampleDatabase", resource_group_name=example_resource_group.name, location="West US", server_name=example_sql_server.name, extended_auditing_policy={ "storage_endpoint": example_account.primary_blob_endpoint, "storage_account_access_key": example_account.primary_access_key, "storageAccountAccessKeyIsSecondary": True, "retention_in_days": 6, }, tags={ "environment": "production", })
- 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_modeisDefault. Azure default isSQL_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. Valid values are:
Default,Copy,OnlineSecondary,NonReadableSecondary,PointInTimeRestore,Recovery,RestoreorRestoreLongTermRetentionBackup. Must beDefaultto create a new database. Defaults toDefault. Please see Azure SQL Database REST APIedition (pulumi.Input[str]) – The edition of the database to be created. Applies only if
create_modeisDefault. Valid values are:Basic,Standard,Premium,DataWarehouse,Business,BusinessCritical,Free,GeneralPurpose,Hyperscale,Premium,PremiumRS,Standard,Stretch,System,System2, orWeb. Please see Azure SQL Database Service Tiers.elastic_pool_name (pulumi.Input[str]) – The name of the elastic database pool.
extended_auditing_policy (pulumi.Input[dict]) – A
extended_auditing_policyblock as defined below.import (pulumi.Input[dict]) – A Database Import block as documented below.
create_modemust be set toDefault.location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
max_size_bytes (pulumi.Input[str]) –
The maximum size that the database can grow to. Applies only if
create_modeisDefault. Please see Azure SQL Database Service Tiers.name (pulumi.Input[str]) – The name of the database.
read_scale (pulumi.Input[bool]) – 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 (pulumi.Input[str]) – A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .
requested_service_objective_name (pulumi.Input[str]) – The service objective name for the database. Valid values depend on edition and location and may include
S0,S1,S2,S3,P1,P2,P4,P6,P11andElasticPool. You can list the available names with the cli:shell az sql db list-editions -l westus --edition Standard -o table. For further information please see Azure CLI - az sql db.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_modeisPointInTimeRestoree.g. 2013-11-08T22:00:40Zserver_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_modeisPointInTimeRestore.source_database_id (pulumi.Input[str]) – The URI of the source database if
create_modevalue is notDefault.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_policyblock supports fields documented below.zone_redundant (pulumi.Input[bool]) – Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
The extended_auditing_policy object supports the following:
retention_in_days(pulumi.Input[float]) - Specifies the number of days to retain logs for in the storage account.storage_account_access_key(pulumi.Input[str]) - Specifies the access key to use for the auditing storage account.storageAccountAccessKeyIsSecondary(pulumi.Input[bool]) - Specifies whetherstorage_account_access_keyvalue is the storage’s secondary key.storage_endpoint(pulumi.Input[str]) - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).
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 areSQLorADPassword.operationMode(pulumi.Input[str]) - Specifies the type of import operation being performed. The only allowable value isImport.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 areStorageAccessKeyorSharedAccessKey.storageUri(pulumi.Input[str]) - Specifies the blob URI of the .bacpac file.
The threat_detection_policy object supports the following:
disabled_alerts(pulumi.Input[list]) - Specifies a list of alerts which should be disabled. Possible values includeAccess_Anomaly,Sql_InjectionandSql_Injection_Vulnerability.email_account_admins(pulumi.Input[str]) - Should the account administrators be emailed when this alert is triggered?email_addresses(pulumi.Input[list]) - A list of email addresses which alerts should be sent to.retention_days(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 areEnabled,DisabledorNew.storage_account_access_key(pulumi.Input[str]) - Specifies the identifier key of the Threat Detection audit storage account. Required ifstateisEnabled.storage_endpoint(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 ifstateisEnabled.useServerDefault(pulumi.Input[str]) - Should the default server policy be used? Defaults toDisabled.
collation: pulumi.Output[str] = None¶The name of the collation. Applies only if
create_modeisDefault. Azure default isSQL_LATIN1_GENERAL_CP1_CI_AS. Changing this forces a new resource to be created.
create_mode: pulumi.Output[str] = None¶Specifies how to create the database. Valid values are:
Default,Copy,OnlineSecondary,NonReadableSecondary,PointInTimeRestore,Recovery,RestoreorRestoreLongTermRetentionBackup. Must beDefaultto create a new database. Defaults toDefault. Please see Azure SQL Database REST API
creation_date: pulumi.Output[str] = None¶The creation date of the SQL Database.
default_secondary_location: pulumi.Output[str] = None¶The default secondary location of the SQL Database.
edition: pulumi.Output[str] = None¶The edition of the database to be created. Applies only if
create_modeisDefault. Valid values are:Basic,Standard,Premium,DataWarehouse,Business,BusinessCritical,Free,GeneralPurpose,Hyperscale,Premium,PremiumRS,Standard,Stretch,System,System2, orWeb. Please see Azure SQL Database Service Tiers.
elastic_pool_name: pulumi.Output[str] = None¶The name of the elastic database pool.
extended_auditing_policy: pulumi.Output[dict] = None¶A
extended_auditing_policyblock as defined below.retention_in_days(float) - Specifies the number of days to retain logs for in the storage account.storage_account_access_key(str) - Specifies the access key to use for the auditing storage account.storageAccountAccessKeyIsSecondary(bool) - Specifies whetherstorage_account_access_keyvalue is the storage’s secondary key.storage_endpoint(str) - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).
import_: pulumi.Output[dict] = None¶A Database Import block as documented below.
create_modemust be set toDefault.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 areSQLorADPassword.operationMode(str) - Specifies the type of import operation being performed. The only allowable value isImport.storageKey(str) - Specifies the access key for the storage account.storageKeyType(str) - Specifies the type of access key for the storage account. Valid values areStorageAccessKeyorSharedAccessKey.storageUri(str) - Specifies the blob URI of the .bacpac file.
location: pulumi.Output[str] = None¶Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
max_size_bytes: pulumi.Output[str] = None¶The maximum size that the database can grow to. Applies only if
create_modeisDefault. Please see Azure SQL Database Service Tiers.
name: pulumi.Output[str] = None¶The name of the database.
read_scale: pulumi.Output[bool] = 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: pulumi.Output[str] = None¶A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .
requested_service_objective_name: pulumi.Output[str] = None¶The service objective name for the database. Valid values depend on edition and location and may include
S0,S1,S2,S3,P1,P2,P4,P6,P11andElasticPool. You can list the available names with the cli:shell az sql db list-editions -l westus --edition Standard -o table. For further information please see Azure CLI - az sql db.
resource_group_name: pulumi.Output[str] = 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: pulumi.Output[str] = None¶The point in time for the restore. Only applies if
create_modeisPointInTimeRestoree.g. 2013-11-08T22:00:40Z
server_name: pulumi.Output[str] = None¶The name of the SQL Server on which to create the database.
source_database_deletion_date: pulumi.Output[str] = None¶The deletion date time of the source database. Only applies to deleted databases where
create_modeisPointInTimeRestore.
source_database_id: pulumi.Output[str] = None¶The URI of the source database if
create_modevalue is notDefault.
A mapping of tags to assign to the resource.
threat_detection_policy: pulumi.Output[dict] = None¶Threat detection policy configuration. The
threat_detection_policyblock supports fields documented below.disabled_alerts(list) - Specifies a list of alerts which should be disabled. Possible values includeAccess_Anomaly,Sql_InjectionandSql_Injection_Vulnerability.email_account_admins(str) - Should the account administrators be emailed when this alert is triggered?email_addresses(list) - A list of email addresses which alerts should be sent to.retention_days(float) - Specifies the number of days to keep in the Threat Detection audit logs.state(str) - The State of the Policy. Possible values areEnabled,DisabledorNew.storage_account_access_key(str) - Specifies the identifier key of the Threat Detection audit storage account. Required ifstateisEnabled.storage_endpoint(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 ifstateisEnabled.useServerDefault(str) - Should the default server policy be used? Defaults toDisabled.
zone_redundant: pulumi.Output[bool] = None¶Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
- 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, extended_auditing_policy=None, import_=None, location=None, max_size_bytes=None, max_size_gb=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, zone_redundant=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_modeisDefault. Azure default isSQL_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. Valid values are:
Default,Copy,OnlineSecondary,NonReadableSecondary,PointInTimeRestore,Recovery,RestoreorRestoreLongTermRetentionBackup. Must beDefaultto create a new database. Defaults toDefault. Please see Azure SQL Database REST APIcreation_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_modeisDefault. Valid values are:Basic,Standard,Premium,DataWarehouse,Business,BusinessCritical,Free,GeneralPurpose,Hyperscale,Premium,PremiumRS,Standard,Stretch,System,System2, orWeb. Please see Azure SQL Database Service Tiers.elastic_pool_name (pulumi.Input[str]) – The name of the elastic database pool.
extended_auditing_policy (pulumi.Input[dict]) – A
extended_auditing_policyblock as defined below.import (pulumi.Input[dict]) – A Database Import block as documented below.
create_modemust be set toDefault.location (pulumi.Input[str]) – Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
max_size_bytes (pulumi.Input[str]) –
The maximum size that the database can grow to. Applies only if
create_modeisDefault. Please see Azure SQL Database Service Tiers.name (pulumi.Input[str]) – The name of the database.
read_scale (pulumi.Input[bool]) –
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 (pulumi.Input[str]) – A GUID/UUID corresponding to a configured Service Level Objective for the Azure SQL database which can be used to configure a performance level. .
requested_service_objective_name (pulumi.Input[str]) –
The service objective name for the database. Valid values depend on edition and location and may include
S0,S1,S2,S3,P1,P2,P4,P6,P11andElasticPool. You can list the available names with the cli:shell az sql db list-editions -l westus --edition Standard -o table. For further information please see Azure CLI - az sql db.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_modeisPointInTimeRestoree.g. 2013-11-08T22:00:40Zserver_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_modeisPointInTimeRestore.source_database_id (pulumi.Input[str]) – The URI of the source database if
create_modevalue is notDefault.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_policyblock supports fields documented below.zone_redundant (pulumi.Input[bool]) – Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
The extended_auditing_policy object supports the following:
retention_in_days(pulumi.Input[float]) - Specifies the number of days to retain logs for in the storage account.storage_account_access_key(pulumi.Input[str]) - Specifies the access key to use for the auditing storage account.storageAccountAccessKeyIsSecondary(pulumi.Input[bool]) - Specifies whetherstorage_account_access_keyvalue is the storage’s secondary key.storage_endpoint(pulumi.Input[str]) - Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).
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 areSQLorADPassword.operationMode(pulumi.Input[str]) - Specifies the type of import operation being performed. The only allowable value isImport.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 areStorageAccessKeyorSharedAccessKey.storageUri(pulumi.Input[str]) - Specifies the blob URI of the .bacpac file.
The threat_detection_policy object supports the following:
disabled_alerts(pulumi.Input[list]) - Specifies a list of alerts which should be disabled. Possible values includeAccess_Anomaly,Sql_InjectionandSql_Injection_Vulnerability.email_account_admins(pulumi.Input[str]) - Should the account administrators be emailed when this alert is triggered?email_addresses(pulumi.Input[list]) - A list of email addresses which alerts should be sent to.retention_days(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 areEnabled,DisabledorNew.storage_account_access_key(pulumi.Input[str]) - Specifies the identifier key of the Threat Detection audit storage account. Required ifstateisEnabled.storage_endpoint(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 ifstateisEnabled.useServerDefault(pulumi.Input[str]) - Should the default server policy be used? Defaults toDisabled.
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
Elasticpoolresource is being deprecated and should no longer be used. Please use the mssql.ElasticPool version instead.import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US") example_sql_server = azure.sql.SqlServer("exampleSqlServer", resource_group_name=example_resource_group.name, location=example_resource_group.location, version="12.0", administrator_login="4dm1n157r470r", administrator_login_password="4-v3ry-53cr37-p455w0rd") example_elastic_pool = azure.sql.ElasticPool("exampleElasticPool", resource_group_name=example_resource_group.name, location=example_resource_group.location, server_name=example_sql_server.name, edition="Basic", dtu=50, db_dtu_min=0, db_dtu_max=5, pool_size=5000)
- 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
editionwhich 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, andPremium. 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
editionanddtuand 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 byeditionanddtu.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: pulumi.Output[str] = None¶The creation date of the SQL Elastic Pool.
db_dtu_max: pulumi.Output[float] = None¶The maximum DTU which will be guaranteed to all databases in the elastic pool to be created.
db_dtu_min: pulumi.Output[float] = None¶The minimum DTU which will be guaranteed to all databases in the elastic pool to be created.
dtu: pulumi.Output[float] = None¶The total shared DTU for the elastic pool. Valid values depend on the
editionwhich has been defined. Refer to Azure SQL Database Service Tiers for valid combinations.
edition: pulumi.Output[str] = None¶The edition of the elastic pool to be created. Valid values are
Basic,Standard, andPremium. Refer to Azure SQL Database Service Tiers for details. Changing this forces a new resource to be created.
location: pulumi.Output[str] = None¶Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
name: pulumi.Output[str] = None¶The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.
pool_size: pulumi.Output[float] = 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
editionanddtuand 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 byeditionanddtu.
resource_group_name: pulumi.Output[str] = 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: pulumi.Output[str] = None¶The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.
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
editionwhich 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, andPremium. 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
editionanddtuand 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 byeditionanddtu.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.
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="uksouth") primary = azure.sql.SqlServer("primary", resource_group_name=example_resource_group.name, location=example_resource_group.location, version="12.0", administrator_login="sqladmin", administrator_login_password="pa$$w0rd") secondary = azure.sql.SqlServer("secondary", resource_group_name=example_resource_group.name, location="northeurope", version="12.0", administrator_login="sqladmin", administrator_login_password="pa$$w0rd") db1 = azure.sql.Database("db1", resource_group_name=primary.resource_group_name, location=primary.location, server_name=primary.name) example_failover_group = azure.sql.FailoverGroup("exampleFailoverGroup", resource_group_name=primary.resource_group_name, server_name=primary.name, databases=[db1.id], partner_servers=[{ "id": secondary.id, }], read_write_endpoint_failover_policy={ "mode": "Automatic", "graceMinutes": 60, })
- 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 IDlocation(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 ifmodeisAutomatic. The grace period in minutes before failover with data loss is attemptedmode(pulumi.Input[str]) - the failover mode. Possible values areManual,Automatic
The readonly_endpoint_failover_policy object supports the following:
mode(pulumi.Input[str]) - Failover policy for the read-only endpoint. Possible values areEnabled, andDisabled
databases: pulumi.Output[list] = None¶A list of database ids to add to the failover group
location: pulumi.Output[str] = None¶the location of the failover group.
name: pulumi.Output[str] = None¶The name of the failover group. Changing this forces a new resource to be created.
partner_servers: pulumi.Output[list] = None¶A list of secondary servers as documented below
id(str) - the SQL server IDlocation(str) - the location of the failover group.role(str) - local replication role of the failover group instance.
read_write_endpoint_failover_policy: pulumi.Output[dict] = None¶A read/write policy as documented below
graceMinutes(float) - Applies only ifmodeisAutomatic. The grace period in minutes before failover with data loss is attemptedmode(str) - the failover mode. Possible values areManual,Automatic
readonly_endpoint_failover_policy: pulumi.Output[dict] = None¶a read-only policy as documented below
mode(str) - Failover policy for the read-only endpoint. Possible values areEnabled, andDisabled
resource_group_name: pulumi.Output[str] = None¶The name of the resource group containing the SQL server
role: pulumi.Output[str] = None¶local replication role of the failover group instance.
server_name: pulumi.Output[str] = None¶The name of the primary SQL server. Changing this forces a new resource to be created.
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 IDlocation(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 ifmodeisAutomatic. The grace period in minutes before failover with data loss is attemptedmode(pulumi.Input[str]) - the failover mode. Possible values areManual,Automatic
The readonly_endpoint_failover_policy object supports the following:
mode(pulumi.Input[str]) - Failover policy for the read-only endpoint. Possible values areEnabled, andDisabled
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
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US") example_sql_server = azure.sql.SqlServer("exampleSqlServer", resource_group_name=example_resource_group.name, location="West US", version="12.0", administrator_login="4dm1n157r470r", administrator_login_password="4-v3ry-53cr37-p455w0rd") example_firewall_rule = azure.sql.FirewallRule("exampleFirewallRule", resource_group_name=example_resource_group.name, server_name=example_sql_server.name, start_ip_address="10.0.17.62", end_ip_address="10.0.17.62")
- 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: pulumi.Output[str] = None¶The ending IP address to allow through the firewall for this rule.
name: pulumi.Output[str] = None¶The name of the firewall rule.
resource_group_name: pulumi.Output[str] = None¶The name of the resource group in which to create the sql server.
server_name: pulumi.Output[str] = None¶The name of the SQL Server on which to create the Firewall Rule.
start_ip_address: pulumi.Output[str] = 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, id=None, location=None, name=None, read_scale=None, resource_group_name=None, server_name=None, tags=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.
id= None¶The provider-assigned unique ID for this managed resource.
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.
A mapping of tags assigned to the resource.
- class
pulumi_azure.sql.GetServerResult(administrator_login=None, fqdn=None, id=None, identities=None, location=None, name=None, resource_group_name=None, tags=None, version=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.
id= None¶The provider-assigned unique ID for this managed resource.
identities= None¶An
identityblock as defined below.
location= None¶The location of the Resource Group in which the SQL Server exists.
A mapping of tags assigned to the resource.
version= None¶The version of the SQL Server.
- class
pulumi_azure.sql.SqlServer(resource_name, opts=None, administrator_login=None, administrator_login_password=None, connection_policy=None, extended_auditing_policy=None, identity=None, location=None, name=None, resource_group_name=None, tags=None, version=None, __props__=None, __name__=None, __opts__=None)¶ Manages a Microsoft SQL Azure Database Server.
import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West US") example_account = azure.storage.Account("exampleAccount", resource_group_name=example_resource_group.name, location=example_resource_group.location, account_tier="Standard", account_replication_type="LRS") example_sql_server = azure.sql.SqlServer("exampleSqlServer", resource_group_name=example_resource_group.name, location=example_resource_group.location, version="12.0", administrator_login="mradministrator", administrator_login_password="thisIsDog11", extended_auditing_policy={ "storage_endpoint": example_account.primary_blob_endpoint, "storage_account_access_key": example_account.primary_access_key, "storageAccountAccessKeyIsSecondary": True, "retention_in_days": 6, }, tags={ "environment": "production", })
- 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_loginuser. Needs to comply with Azure’s Password Policyconnection_policy (pulumi.Input[str]) – The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault.extended_auditing_policy (pulumi.Input[dict]) – A
extended_auditing_policyblock as defined below.identity (pulumi.Input[dict]) – An
identityblock as defined below.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 Microsoft 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 Microsoft 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).
The extended_auditing_policy object supports the following:
retention_in_days(pulumi.Input[float]) - (Optional) Specifies the number of days to retain logs for in the storage account.storage_account_access_key(pulumi.Input[str]) - (Required) Specifies the access key to use for the auditing storage account.storageAccountAccessKeyIsSecondary(pulumi.Input[bool]) - (Optional) Specifies whetherstorage_account_access_keyvalue is the storage’s secondary key.storage_endpoint(pulumi.Input[str]) - (Required) Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).
The identity object supports the following:
principal_id(pulumi.Input[str]) - The Principal ID for the Service Principal associated with the Identity of this SQL Server.tenant_id(pulumi.Input[str]) - The Tenant ID for the Service Principal associated with the Identity of this SQL Server.type(pulumi.Input[str]) - Specifies the identity type of the Microsoft SQL Server. At this time the only allowed value isSystemAssigned.
administrator_login: pulumi.Output[str] = None¶The administrator login name for the new server. Changing this forces a new resource to be created.
administrator_login_password: pulumi.Output[str] = None¶The password associated with the
administrator_loginuser. Needs to comply with Azure’s Password Policy
connection_policy: pulumi.Output[str] = None¶The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault.
extended_auditing_policy: pulumi.Output[dict] = None¶A
extended_auditing_policyblock as defined below.retention_in_days(float) - (Optional) Specifies the number of days to retain logs for in the storage account.storage_account_access_key(str) - (Required) Specifies the access key to use for the auditing storage account.storageAccountAccessKeyIsSecondary(bool) - (Optional) Specifies whetherstorage_account_access_keyvalue is the storage’s secondary key.storage_endpoint(str) - (Required) Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).
fully_qualified_domain_name: pulumi.Output[str] = None¶The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
identity: pulumi.Output[dict] = None¶An
identityblock as defined below.principal_id(str) - The Principal ID for the Service Principal associated with the Identity of this SQL Server.tenant_id(str) - The Tenant ID for the Service Principal associated with the Identity of this SQL Server.type(str) - Specifies the identity type of the Microsoft SQL Server. At this time the only allowed value isSystemAssigned.
location: pulumi.Output[str] = None¶Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
name: pulumi.Output[str] = None¶The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
resource_group_name: pulumi.Output[str] = None¶The name of the resource group in which to create the Microsoft SQL Server.
A mapping of tags to assign to the resource.
version: pulumi.Output[str] = 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, connection_policy=None, extended_auditing_policy=None, fully_qualified_domain_name=None, identity=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_loginuser. Needs to comply with Azure’s Password Policyconnection_policy (pulumi.Input[str]) – The connection policy the server will use. Possible values are
Default,Proxy, andRedirect. Defaults toDefault.extended_auditing_policy (pulumi.Input[dict]) – A
extended_auditing_policyblock as defined below.fully_qualified_domain_name (pulumi.Input[str]) – The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
identity (pulumi.Input[dict]) – An
identityblock as defined below.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 Microsoft 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 Microsoft 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).
The extended_auditing_policy object supports the following:
retention_in_days(pulumi.Input[float]) - (Optional) Specifies the number of days to retain logs for in the storage account.storage_account_access_key(pulumi.Input[str]) - (Required) Specifies the access key to use for the auditing storage account.storageAccountAccessKeyIsSecondary(pulumi.Input[bool]) - (Optional) Specifies whetherstorage_account_access_keyvalue is the storage’s secondary key.storage_endpoint(pulumi.Input[str]) - (Required) Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net).
The identity object supports the following:
principal_id(pulumi.Input[str]) - The Principal ID for the Service Principal associated with the Identity of this SQL Server.tenant_id(pulumi.Input[str]) - The Tenant ID for the Service Principal associated with the Identity of this SQL Server.type(pulumi.Input[str]) - Specifies the identity type of the Microsoft SQL Server. At this time the only allowed value isSystemAssigned.
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.
import pulumi import pulumi_azure as azure example = azure.core.ResourceGroup("example", location="West US") vnet = azure.network.VirtualNetwork("vnet", address_spaces=["10.7.29.0/29"], location=example.location, resource_group_name=example.name) subnet = azure.network.Subnet("subnet", resource_group_name=example.name, virtual_network_name=vnet.name, address_prefix="10.7.29.0/29", service_endpoints=["Microsoft.Sql"]) sqlserver = azure.sql.SqlServer("sqlserver", resource_group_name=example.name, location=example.location, version="12.0", administrator_login="4dm1n157r470r", administrator_login_password="4-v3ry-53cr37-p455w0rd") sqlvnetrule = azure.sql.VirtualNetworkRule("sqlvnetrule", resource_group_name=example.name, server_name=sqlserver.name, subnet_id=subnet.id)
- 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: pulumi.Output[bool] = None¶Create the virtual network rule before the subnet has the virtual network service endpoint enabled. The default value is false.
name: pulumi.Output[str] = 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: pulumi.Output[str] = None¶The name of the resource group where the SQL server resides. Changing this forces a new resource to be created.
server_name: pulumi.Output[str] = 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: pulumi.Output[str] = 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.
import pulumi import pulumi_azure as azure example = azure.sql.get_database(name="example_db", server_name="example_db_server", resource_group_name="example-resources") pulumi.export("sqlDatabaseId", example.id)
- 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.
tags (dict) – A mapping of tags assigned to the resource.
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.
import pulumi import pulumi_azure as azure example = azure.sql.get_server(name="examplesqlservername", resource_group_name="example-resources") pulumi.export("sqlServerId", example.id)
- 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.