Module mssql
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.
Resources
- Database
- DatabaseVulnerabilityAssessmentRuleBaseline
- ElasticPool
- Server
- ServerSecurityAlertPolicy
- ServerVulnerabilityAssessment
- VirtualMachine
Functions
Others
- DatabaseArgs
- DatabaseState
- DatabaseVulnerabilityAssessmentRuleBaselineArgs
- DatabaseVulnerabilityAssessmentRuleBaselineState
- ElasticPoolArgs
- ElasticPoolState
- GetDatabaseArgs
- GetDatabaseResult
- GetElasticPoolArgs
- GetElasticPoolResult
- ServerArgs
- ServerSecurityAlertPolicyArgs
- ServerSecurityAlertPolicyState
- ServerState
- ServerVulnerabilityAssessmentArgs
- ServerVulnerabilityAssessmentState
- VirtualMachineArgs
- VirtualMachineState
Resources
Resource Database
class Database extends CustomResourceManages a MS SQL Database.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleSqlServer = new azure.sql.SqlServer("exampleSqlServer", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
version: "12.0",
administratorLogin: "4dm1n157r470r",
administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
});
const test = new azure.mssql.Database("test", {
serverId: exampleSqlServer.id,
collation: "SQL_Latin1_General_CP1_CI_AS",
licenseType: "LicenseIncluded",
maxSizeGb: 4,
readScale: true,
skuName: "BC_Gen5_2",
zoneRedundant: true,
extended_auditing_policy: {
storageEndpoint: exampleAccount.primaryBlobEndpoint,
storageAccountAccessKey: exampleAccount.primaryAccessKey,
storageAccountAccessKeyIsSecondary: true,
retentionInDays: 6,
},
tags: {
foo: "bar",
},
});constructor
new Database(name: string, args: DatabaseArgs, opts?: pulumi.CustomResourceOptions)Create a Database resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DatabaseState, opts?: pulumi.CustomResourceOptions): DatabaseGet an existing Database resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is DatabaseReturns true if the given object is an instance of Database. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property autoPauseDelayInMinutes
public autoPauseDelayInMinutes: pulumi.Output<number>;Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.
property collation
public collation: pulumi.Output<string>;Specifies the collation of the database. Changing this forces a new resource to be created.
property createMode
public createMode: pulumi.Output<string>;The create mode of the database. Possible values are Copy, Default, OnlineSecondary, PointInTimeRestore, Restore, RestoreExternalBackup, RestoreExternalBackupSecondary, RestoreLongTermRetentionBackup and Secondary.
property creationSourceDatabaseId
public creationSourceDatabaseId: pulumi.Output<string>;The id of the source database to be referred to create the new database. This should only be used for databases with createMode values that use another database as reference. Changing this forces a new resource to be created.
property elasticPoolId
public elasticPoolId: pulumi.Output<string | undefined>;Specifies the ID of the elastic pool containing this database. Changing this forces a new resource to be created.
property extendedAuditingPolicy
public extendedAuditingPolicy: pulumi.Output<DatabaseExtendedAuditingPolicy | undefined>;A extendedAuditingPolicy block as defined below.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property licenseType
public licenseType: pulumi.Output<string>;Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice.
property maxSizeGb
public maxSizeGb: pulumi.Output<number>;The max size of the database in gigabytes.
property minCapacity
public minCapacity: pulumi.Output<number>;Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
property name
public name: pulumi.Output<string>;The name of the Ms SQL Database. Changing this forces a new resource to be created.
property readReplicaCount
public readReplicaCount: pulumi.Output<number>;The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
property readScale
public readScale: pulumi.Output<boolean>;If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
property restorePointInTime
public restorePointInTime: pulumi.Output<string>;Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for createMode= PointInTimeRestore databases.
property sampleName
public sampleName: pulumi.Output<string>;Specifies the name of the sample schema to apply when creating this database. Possible value is AdventureWorksLT.
property serverId
public serverId: pulumi.Output<string>;The id of the Ms SQL Server on which to create the database. Changing this forces a new resource to be created.
property skuName
public skuName: pulumi.Output<string>;Specifies the name of the sku used by the database. Changing this forces a new resource to be created. For example, GP_S_Gen5_2,HS_Gen4_1,BC_Gen5_2, ElasticPool, Basic,S0, P2 ,DW100c, DS100.
property tags
public tags: pulumi.Output<{[key: string]: string} | undefined>;A mapping of tags to assign to the resource.
property threatDetectionPolicy
public threatDetectionPolicy: pulumi.Output<DatabaseThreatDetectionPolicy>;Threat detection policy configuration. The threatDetectionPolicy block supports fields documented below.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property zoneRedundant
public zoneRedundant: pulumi.Output<boolean>;Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases.
Resource DatabaseVulnerabilityAssessmentRuleBaseline
class DatabaseVulnerabilityAssessmentRuleBaseline extends CustomResourceManages a Database Vulnerability Assessment Rule Baseline.
NOTE Database Vulnerability Assessment is currently only available for MS SQL databases.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West US"});
const exampleSqlServer = new azure.sql.SqlServer("exampleSqlServer", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
version: "12.0",
administratorLogin: "4dm1n157r470r",
administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "GRS",
});
const exampleContainer = new azure.storage.Container("exampleContainer", {
storageAccountName: exampleAccount.name,
containerAccessType: "private",
});
const exampleServerSecurityAlertPolicy = new azure.mssql.ServerSecurityAlertPolicy("exampleServerSecurityAlertPolicy", {
resourceGroupName: exampleResourceGroup.name,
serverName: exampleSqlServer.name,
state: "Enabled",
});
const exampleDatabase = new azure.sql.Database("exampleDatabase", {
resourceGroupName: exampleResourceGroup.name,
serverName: exampleSqlServer.name,
location: exampleResourceGroup.location,
edition: "Standard",
});
const exampleServerVulnerabilityAssessment = new azure.mssql.ServerVulnerabilityAssessment("exampleServerVulnerabilityAssessment", {
serverSecurityAlertPolicyId: exampleServerSecurityAlertPolicy.id,
storageContainerPath: pulumi.interpolate`${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}/`,
storageAccountAccessKey: exampleAccount.primaryAccessKey,
});
const exampleDatabaseVulnerabilityAssessmentRuleBaseline = new azure.mssql.DatabaseVulnerabilityAssessmentRuleBaseline("exampleDatabaseVulnerabilityAssessmentRuleBaseline", {
serverVulnerabilityAssessmentId: exampleServerVulnerabilityAssessment.id,
databaseName: exampleDatabase.name,
ruleId: "VA2065",
baselineName: "master",
baseline_result: [
{
results: [
"allowedip1",
"123.123.123.123",
"123.123.123.123",
],
},
{
results: [
"allowedip2",
"255.255.255.255",
"255.255.255.255",
],
},
],
});constructor
new DatabaseVulnerabilityAssessmentRuleBaseline(name: string, args: DatabaseVulnerabilityAssessmentRuleBaselineArgs, opts?: pulumi.CustomResourceOptions)Create a DatabaseVulnerabilityAssessmentRuleBaseline resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: DatabaseVulnerabilityAssessmentRuleBaselineState, opts?: pulumi.CustomResourceOptions): DatabaseVulnerabilityAssessmentRuleBaselineGet an existing DatabaseVulnerabilityAssessmentRuleBaseline resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is DatabaseVulnerabilityAssessmentRuleBaselineReturns true if the given object is an instance of DatabaseVulnerabilityAssessmentRuleBaseline. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property baselineName
public baselineName: pulumi.Output<string | undefined>;The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.
property baselineResults
public baselineResults: pulumi.Output<DatabaseVulnerabilityAssessmentRuleBaselineBaselineResult[]>;A baselineResult block as documented below. Multiple blocks can be defined.
property databaseName
public databaseName: pulumi.Output<string>;Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property ruleId
public ruleId: pulumi.Output<string>;The vulnerability assessment rule ID. Changing this forces a new resource to be created.
property serverVulnerabilityAssessmentId
public serverVulnerabilityAssessmentId: pulumi.Output<string>;The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ElasticPool
class ElasticPool extends CustomResourceAllows you to manage an Azure SQL Elastic Pool via the v3.0 API which allows for vCore and DTU based configurations.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "westeurope"});
const exampleSqlServer = new azure.sql.SqlServer("exampleSqlServer", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
version: "12.0",
administratorLogin: "4dm1n157r470r",
administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
});
const exampleElasticPool = new azure.mssql.ElasticPool("exampleElasticPool", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
serverName: exampleSqlServer.name,
licenseType: "LicenseIncluded",
maxSizeGb: 756,
sku: {
name: "GP_Gen5",
tier: "GeneralPurpose",
family: "Gen5",
capacity: 4,
},
per_database_settings: {
minCapacity: 0.25,
maxCapacity: 4,
},
});constructor
new ElasticPool(name: string, args: ElasticPoolArgs, opts?: pulumi.CustomResourceOptions)Create a ElasticPool resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ElasticPoolState, opts?: pulumi.CustomResourceOptions): ElasticPoolGet an existing ElasticPool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ElasticPoolReturns true if the given object is an instance of ElasticPool. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property licenseType
public licenseType: pulumi.Output<string>;Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice.
property location
public location: pulumi.Output<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property maxSizeBytes
public maxSizeBytes: pulumi.Output<number>;The max data size of the elastic pool in bytes. Conflicts with maxSizeGb.
property maxSizeGb
public maxSizeGb: pulumi.Output<number>;The max data size of the elastic pool in gigabytes. Conflicts with maxSizeBytes.
property name
public name: pulumi.Output<string>;The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.
property perDatabaseSettings
public perDatabaseSettings: pulumi.Output<ElasticPoolPerDatabaseSettings>;A perDatabaseSettings block as defined below.
property resourceGroupName
public resourceGroupName: pulumi.Output<string>;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.
property serverName
public serverName: pulumi.Output<string>;The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.
property sku
public sku: pulumi.Output<ElasticPoolSku>;A sku block as defined below.
property tags
public tags: pulumi.Output<{[key: string]: string} | undefined>;A mapping of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property zoneRedundant
public zoneRedundant: pulumi.Output<boolean | undefined>;Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. Defaults to false.
Resource Server
class Server extends CustomResourceManages a Microsoft 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.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West US"});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const exampleServer = new azure.mssql.Server("exampleServer", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
version: "12.0",
administratorLogin: "missadministrator",
administratorLoginPassword: "thisIsKat11",
azuread_administrator: {
loginUsername: "AzureAD Admin",
objectId: "00000000-0000-0000-0000-000000000000",
},
extended_auditing_policy: {
storageEndpoint: exampleAccount.primaryBlobEndpoint,
storageAccountAccessKey: exampleAccount.primaryAccessKey,
storageAccountAccessKeyIsSecondary: true,
retentionInDays: 6,
},
tags: {
environment: "production",
},
});constructor
new Server(name: string, args: ServerArgs, opts?: pulumi.CustomResourceOptions)Create a Server resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServerState, opts?: pulumi.CustomResourceOptions): ServerGet an existing Server resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ServerReturns true if the given object is an instance of Server. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property administratorLogin
public administratorLogin: pulumi.Output<string>;The administrator login name for the new server. Changing this forces a new resource to be created.
property administratorLoginPassword
public administratorLoginPassword: pulumi.Output<string>;The password associated with the administratorLogin user. Needs to comply with Azure’s Password Policy
property azureadAdministrator
public azureadAdministrator: pulumi.Output<ServerAzureadAdministrator | undefined>;An azureadAdministrator block as defined below.
property connectionPolicy
public connectionPolicy: pulumi.Output<string | undefined>;The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
property extendedAuditingPolicy
public extendedAuditingPolicy: pulumi.Output<ServerExtendedAuditingPolicy | undefined>;A extendedAuditingPolicy block as defined below.
property fullyQualifiedDomainName
public fullyQualifiedDomainName: pulumi.Output<string>;The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property identity
public identity: pulumi.Output<ServerIdentity | undefined>;An identity block as defined below.
property location
public location: pulumi.Output<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
public name: pulumi.Output<string>;The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
property publicNetworkAccessEnabled
public publicNetworkAccessEnabled: pulumi.Output<boolean | undefined>;Whether or not public network access is allowed for this server. Defaults to true.
property resourceGroupName
public resourceGroupName: pulumi.Output<string>;The name of the resource group in which to create the Microsoft SQL Server.
property tags
public tags: pulumi.Output<{[key: string]: string} | undefined>;A mapping of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property version
public version: pulumi.Output<string>;The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
Resource ServerSecurityAlertPolicy
class ServerSecurityAlertPolicy extends CustomResourceManages a Security Alert Policy for a MSSQL Server.
NOTE Security Alert Policy is currently only available for MS SQL databases.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West US"});
const exampleSqlServer = new azure.sql.SqlServer("exampleSqlServer", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
version: "12.0",
administratorLogin: "4dm1n157r470r",
administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "GRS",
});
const exampleServerSecurityAlertPolicy = new azure.mssql.ServerSecurityAlertPolicy("exampleServerSecurityAlertPolicy", {
resourceGroupName: exampleResourceGroup.name,
serverName: exampleSqlServer.name,
state: "Enabled",
storageEndpoint: exampleAccount.primaryBlobEndpoint,
storageAccountAccessKey: exampleAccount.primaryAccessKey,
disabledAlerts: [
"Sql_Injection",
"Data_Exfiltration",
],
retentionDays: 20,
});constructor
new ServerSecurityAlertPolicy(name: string, args: ServerSecurityAlertPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a ServerSecurityAlertPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServerSecurityAlertPolicyState, opts?: pulumi.CustomResourceOptions): ServerSecurityAlertPolicyGet an existing ServerSecurityAlertPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ServerSecurityAlertPolicyReturns true if the given object is an instance of ServerSecurityAlertPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property disabledAlerts
public disabledAlerts: pulumi.Output<string[] | undefined>;Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action.
property emailAccountAdmins
public emailAccountAdmins: pulumi.Output<boolean | undefined>;Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false.
property emailAddresses
public emailAddresses: pulumi.Output<string[] | undefined>;Specifies an array of e-mail addresses to which the alert is sent.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property resourceGroupName
public resourceGroupName: pulumi.Output<string>;The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
property retentionDays
public retentionDays: pulumi.Output<number | undefined>;Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0.
property serverName
public serverName: pulumi.Output<string>;Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
property state
public state: pulumi.Output<string>;Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Allowed values are: Disabled, Enabled, New.
property storageAccountAccessKey
public storageAccountAccessKey: pulumi.Output<string | undefined>;Specifies the identifier key of the Threat Detection audit storage account.
property storageEndpoint
public storageEndpoint: pulumi.Output<string | undefined>;Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource ServerVulnerabilityAssessment
class ServerVulnerabilityAssessment extends CustomResourceManages the Vulnerability Assessment for a MS SQL Server.
NOTE Vulnerability Assessment is currently only available for MS SQL databases.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West US"});
const exampleSqlServer = new azure.sql.SqlServer("exampleSqlServer", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
version: "12.0",
administratorLogin: "4dm1n157r470r",
administratorLoginPassword: "4-v3ry-53cr37-p455w0rd",
});
const exampleAccount = new azure.storage.Account("exampleAccount", {
resourceGroupName: exampleResourceGroup.name,
location: exampleResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "GRS",
});
const exampleContainer = new azure.storage.Container("exampleContainer", {
storageAccountName: exampleAccount.name,
containerAccessType: "private",
});
const exampleServerSecurityAlertPolicy = new azure.mssql.ServerSecurityAlertPolicy("exampleServerSecurityAlertPolicy", {
resourceGroupName: exampleResourceGroup.name,
serverName: exampleSqlServer.name,
state: "Enabled",
});
const exampleServerVulnerabilityAssessment = new azure.mssql.ServerVulnerabilityAssessment("exampleServerVulnerabilityAssessment", {
serverSecurityAlertPolicyId: exampleServerSecurityAlertPolicy.id,
storageContainerPath: pulumi.interpolate`${exampleAccount.primaryBlobEndpoint}${exampleContainer.name}/`,
storageAccountAccessKey: exampleAccount.primaryAccessKey,
recurring_scans: {
enabled: true,
emailSubscriptionAdmins: true,
emails: [
"email@example1.com",
"email@example2.com",
],
},
});constructor
new ServerVulnerabilityAssessment(name: string, args: ServerVulnerabilityAssessmentArgs, opts?: pulumi.CustomResourceOptions)Create a ServerVulnerabilityAssessment resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: ServerVulnerabilityAssessmentState, opts?: pulumi.CustomResourceOptions): ServerVulnerabilityAssessmentGet an existing ServerVulnerabilityAssessment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is ServerVulnerabilityAssessmentReturns true if the given object is an instance of ServerVulnerabilityAssessment. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property recurringScans
public recurringScans: pulumi.Output<ServerVulnerabilityAssessmentRecurringScans>;The recurring scans settings. The recurringScans block supports fields documented below.
property serverSecurityAlertPolicyId
public serverSecurityAlertPolicyId: pulumi.Output<string>;The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
property storageAccountAccessKey
public storageAccountAccessKey: pulumi.Output<string | undefined>;Specifies the identifier key of the storage account for vulnerability assessment scan results. If storageContainerSasKey isn’t specified, storageAccountAccessKey is required.
property storageContainerPath
public storageContainerPath: pulumi.Output<string>;A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
property storageContainerSasKey
public storageContainerSasKey: pulumi.Output<string | undefined>;A shared access signature (SAS Key) that has write access to the blob container specified in storageContainerPath parameter. If storageAccountAccessKey isn’t specified, storageContainerSasKey is required.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource VirtualMachine
class VirtualMachine extends CustomResourceManages a Microsoft SQL Virtual Machine
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const exampleVirtualMachine = azure.compute.getVirtualMachine({
name: "example-vm",
resourceGroupName: "example-resources",
});
const exampleMssql_virtualMachineVirtualMachine = new azure.mssql.VirtualMachine("exampleMssql/virtualMachineVirtualMachine", {
virtualMachineId: exampleVirtualMachine.then(exampleVirtualMachine => exampleVirtualMachine.id),
sqlLicenseType: "PAYG",
rServicesEnabled: true,
sqlConnectivityPort: 1433,
sqlConnectivityType: "PRIVATE",
sqlConnectivityUpdatePassword: "Password1234!",
sqlConnectivityUpdateUsername: "sqllogin",
auto_patching: {
dayOfWeek: "Sunday",
maintenanceWindowDurationInMinutes: 60,
maintenanceWindowStartingHour: 2,
},
});constructor
new VirtualMachine(name: string, args: VirtualMachineArgs, opts?: pulumi.CustomResourceOptions)Create a VirtualMachine resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: VirtualMachineState, opts?: pulumi.CustomResourceOptions): VirtualMachineGet an existing VirtualMachine resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is VirtualMachineReturns true if the given object is an instance of VirtualMachine. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property autoPatching
public autoPatching: pulumi.Output<VirtualMachineAutoPatching | undefined>;An autoPatching block as defined below.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property keyVaultCredential
public keyVaultCredential: pulumi.Output<VirtualMachineKeyVaultCredential | undefined>;(Optional) An keyVaultCredential block as defined below.
property rServicesEnabled
public rServicesEnabled: pulumi.Output<boolean | undefined>;Should R Services be enabled?
property sqlConnectivityPort
public sqlConnectivityPort: pulumi.Output<number | undefined>;The SQL Server port. Defaults to 1433.
property sqlConnectivityType
public sqlConnectivityType: pulumi.Output<string | undefined>;The connectivity type used for this SQL Server. Defaults to PRIVATE.
property sqlConnectivityUpdatePassword
public sqlConnectivityUpdatePassword: pulumi.Output<string | undefined>;The SQL Server sysadmin login password.
property sqlConnectivityUpdateUsername
public sqlConnectivityUpdateUsername: pulumi.Output<string | undefined>;The SQL Server sysadmin login to create.
property sqlLicenseType
public sqlLicenseType: pulumi.Output<string>;The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit) and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
property tags
public tags: pulumi.Output<{[key: string]: string} | undefined>;A mapping of tags to assign to the resource.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property virtualMachineId
public virtualMachineId: pulumi.Output<string>;The ID of the Virtual Machine. Changing this forces a new resource to be created.
Functions
Function getDatabase
getDatabase(args: GetDatabaseArgs, opts?: pulumi.InvokeOptions): Promise<GetDatabaseResult>Use this data source to access information about an existing SQL database.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.mssql.getDatabase({
name: "example-mssql-db",
serverId: "example-mssql-server-id",
});
export const databaseId = example.then(example => example.id);Function getElasticPool
getElasticPool(args: GetElasticPoolArgs, opts?: pulumi.InvokeOptions): Promise<GetElasticPoolResult>Use this data source to access information about an existing SQL elastic pool.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.mssql.getElasticPool({
name: "mssqlelasticpoolname",
resourceGroupName: "example-resources",
serverName: "example-sql-server",
});
export const elasticpoolId = example.then(example => example.id);Others
interface DatabaseArgs
interface DatabaseArgsThe set of arguments for constructing a Database resource.
property autoPauseDelayInMinutes
autoPauseDelayInMinutes?: pulumi.Input<number>;Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.
property collation
collation?: pulumi.Input<string>;Specifies the collation of the database. Changing this forces a new resource to be created.
property createMode
createMode?: pulumi.Input<string>;The create mode of the database. Possible values are Copy, Default, OnlineSecondary, PointInTimeRestore, Restore, RestoreExternalBackup, RestoreExternalBackupSecondary, RestoreLongTermRetentionBackup and Secondary.
property creationSourceDatabaseId
creationSourceDatabaseId?: pulumi.Input<string>;The id of the source database to be referred to create the new database. This should only be used for databases with createMode values that use another database as reference. Changing this forces a new resource to be created.
property elasticPoolId
elasticPoolId?: pulumi.Input<string>;Specifies the ID of the elastic pool containing this database. Changing this forces a new resource to be created.
property extendedAuditingPolicy
extendedAuditingPolicy?: pulumi.Input<DatabaseExtendedAuditingPolicy>;A extendedAuditingPolicy block as defined below.
property licenseType
licenseType?: pulumi.Input<string>;Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice.
property maxSizeGb
maxSizeGb?: pulumi.Input<number>;The max size of the database in gigabytes.
property minCapacity
minCapacity?: pulumi.Input<number>;Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
property name
name?: pulumi.Input<string>;The name of the Ms SQL Database. Changing this forces a new resource to be created.
property readReplicaCount
readReplicaCount?: pulumi.Input<number>;The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
property readScale
readScale?: pulumi.Input<boolean>;If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
property restorePointInTime
restorePointInTime?: pulumi.Input<string>;Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for createMode= PointInTimeRestore databases.
property sampleName
sampleName?: pulumi.Input<string>;Specifies the name of the sample schema to apply when creating this database. Possible value is AdventureWorksLT.
property serverId
serverId: pulumi.Input<string>;The id of the Ms SQL Server on which to create the database. Changing this forces a new resource to be created.
property skuName
skuName?: pulumi.Input<string>;Specifies the name of the sku used by the database. Changing this forces a new resource to be created. For example, GP_S_Gen5_2,HS_Gen4_1,BC_Gen5_2, ElasticPool, Basic,S0, P2 ,DW100c, DS100.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.
property threatDetectionPolicy
threatDetectionPolicy?: pulumi.Input<DatabaseThreatDetectionPolicy>;Threat detection policy configuration. The threatDetectionPolicy block supports fields documented below.
property zoneRedundant
zoneRedundant?: pulumi.Input<boolean>;Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases.
interface DatabaseState
interface DatabaseStateInput properties used for looking up and filtering Database resources.
property autoPauseDelayInMinutes
autoPauseDelayInMinutes?: pulumi.Input<number>;Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases.
property collation
collation?: pulumi.Input<string>;Specifies the collation of the database. Changing this forces a new resource to be created.
property createMode
createMode?: pulumi.Input<string>;The create mode of the database. Possible values are Copy, Default, OnlineSecondary, PointInTimeRestore, Restore, RestoreExternalBackup, RestoreExternalBackupSecondary, RestoreLongTermRetentionBackup and Secondary.
property creationSourceDatabaseId
creationSourceDatabaseId?: pulumi.Input<string>;The id of the source database to be referred to create the new database. This should only be used for databases with createMode values that use another database as reference. Changing this forces a new resource to be created.
property elasticPoolId
elasticPoolId?: pulumi.Input<string>;Specifies the ID of the elastic pool containing this database. Changing this forces a new resource to be created.
property extendedAuditingPolicy
extendedAuditingPolicy?: pulumi.Input<DatabaseExtendedAuditingPolicy>;A extendedAuditingPolicy block as defined below.
property licenseType
licenseType?: pulumi.Input<string>;Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice.
property maxSizeGb
maxSizeGb?: pulumi.Input<number>;The max size of the database in gigabytes.
property minCapacity
minCapacity?: pulumi.Input<number>;Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases.
property name
name?: pulumi.Input<string>;The name of the Ms SQL Database. Changing this forces a new resource to be created.
property readReplicaCount
readReplicaCount?: pulumi.Input<number>;The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases.
property readScale
readScale?: pulumi.Input<boolean>;If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases.
property restorePointInTime
restorePointInTime?: pulumi.Input<string>;Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for createMode= PointInTimeRestore databases.
property sampleName
sampleName?: pulumi.Input<string>;Specifies the name of the sample schema to apply when creating this database. Possible value is AdventureWorksLT.
property serverId
serverId?: pulumi.Input<string>;The id of the Ms SQL Server on which to create the database. Changing this forces a new resource to be created.
property skuName
skuName?: pulumi.Input<string>;Specifies the name of the sku used by the database. Changing this forces a new resource to be created. For example, GP_S_Gen5_2,HS_Gen4_1,BC_Gen5_2, ElasticPool, Basic,S0, P2 ,DW100c, DS100.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.
property threatDetectionPolicy
threatDetectionPolicy?: pulumi.Input<DatabaseThreatDetectionPolicy>;Threat detection policy configuration. The threatDetectionPolicy block supports fields documented below.
property zoneRedundant
zoneRedundant?: pulumi.Input<boolean>;Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases.
interface DatabaseVulnerabilityAssessmentRuleBaselineArgs
interface DatabaseVulnerabilityAssessmentRuleBaselineArgsThe set of arguments for constructing a DatabaseVulnerabilityAssessmentRuleBaseline resource.
property baselineName
baselineName?: pulumi.Input<string>;The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.
property baselineResults
baselineResults: pulumi.Input<pulumi.Input<DatabaseVulnerabilityAssessmentRuleBaselineBaselineResult>[]>;A baselineResult block as documented below. Multiple blocks can be defined.
property databaseName
databaseName: pulumi.Input<string>;Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.
property ruleId
ruleId: pulumi.Input<string>;The vulnerability assessment rule ID. Changing this forces a new resource to be created.
property serverVulnerabilityAssessmentId
serverVulnerabilityAssessmentId: pulumi.Input<string>;The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.
interface DatabaseVulnerabilityAssessmentRuleBaselineState
interface DatabaseVulnerabilityAssessmentRuleBaselineStateInput properties used for looking up and filtering DatabaseVulnerabilityAssessmentRuleBaseline resources.
property baselineName
baselineName?: pulumi.Input<string>;The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created.
property baselineResults
baselineResults?: pulumi.Input<pulumi.Input<DatabaseVulnerabilityAssessmentRuleBaselineBaselineResult>[]>;A baselineResult block as documented below. Multiple blocks can be defined.
property databaseName
databaseName?: pulumi.Input<string>;Specifies the name of the MS SQL Database. Changing this forces a new resource to be created.
property ruleId
ruleId?: pulumi.Input<string>;The vulnerability assessment rule ID. Changing this forces a new resource to be created.
property serverVulnerabilityAssessmentId
serverVulnerabilityAssessmentId?: pulumi.Input<string>;The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created.
interface ElasticPoolArgs
interface ElasticPoolArgsThe set of arguments for constructing a ElasticPool resource.
property licenseType
licenseType?: pulumi.Input<string>;Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice.
property location
location?: pulumi.Input<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property maxSizeBytes
maxSizeBytes?: pulumi.Input<number>;The max data size of the elastic pool in bytes. Conflicts with maxSizeGb.
property maxSizeGb
maxSizeGb?: pulumi.Input<number>;The max data size of the elastic pool in gigabytes. Conflicts with maxSizeBytes.
property name
name?: pulumi.Input<string>;The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.
property perDatabaseSettings
perDatabaseSettings: pulumi.Input<ElasticPoolPerDatabaseSettings>;A perDatabaseSettings block as defined below.
property resourceGroupName
resourceGroupName: pulumi.Input<string>;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.
property serverName
serverName: pulumi.Input<string>;The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.
property sku
sku: pulumi.Input<ElasticPoolSku>;A sku block as defined below.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.
property zoneRedundant
zoneRedundant?: pulumi.Input<boolean>;Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. Defaults to false.
interface ElasticPoolState
interface ElasticPoolStateInput properties used for looking up and filtering ElasticPool resources.
property licenseType
licenseType?: pulumi.Input<string>;Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice.
property location
location?: pulumi.Input<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property maxSizeBytes
maxSizeBytes?: pulumi.Input<number>;The max data size of the elastic pool in bytes. Conflicts with maxSizeGb.
property maxSizeGb
maxSizeGb?: pulumi.Input<number>;The max data size of the elastic pool in gigabytes. Conflicts with maxSizeBytes.
property name
name?: pulumi.Input<string>;The name of the elastic pool. This needs to be globally unique. Changing this forces a new resource to be created.
property perDatabaseSettings
perDatabaseSettings?: pulumi.Input<ElasticPoolPerDatabaseSettings>;A perDatabaseSettings block as defined below.
property resourceGroupName
resourceGroupName?: pulumi.Input<string>;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.
property serverName
serverName?: pulumi.Input<string>;The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created.
property sku
sku?: pulumi.Input<ElasticPoolSku>;A sku block as defined below.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.
property zoneRedundant
zoneRedundant?: pulumi.Input<boolean>;Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. Defaults to false.
interface GetDatabaseArgs
interface GetDatabaseArgsA collection of arguments for invoking getDatabase.
property name
name: string;The name of the Ms SQL Database.
property serverId
serverId: string;The id of the Ms SQL Server on which to create the database.
interface GetDatabaseResult
interface GetDatabaseResultA collection of values returned by getDatabase.
property collation
collation: string;The collation of the database.
property elasticPoolId
elasticPoolId: string;The id of the elastic pool containing this database.
property id
id: string;The provider-assigned unique ID for this managed resource.
property licenseType
licenseType: string;The license type to apply for this database.
property maxSizeGb
maxSizeGb: number;The max size of the database in gigabytes.
property name
name: string;property readReplicaCount
readReplicaCount: number;The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed.
property readScale
readScale: boolean;If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica.
property serverId
serverId: string;property skuName
skuName: string;The name of the sku of the database.
property tags
tags: {[key: string]: string};A mapping of tags to assign to the resource.
property zoneRedundant
zoneRedundant: boolean;Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
interface GetElasticPoolArgs
interface GetElasticPoolArgsA collection of arguments for invoking getElasticPool.
property name
name: string;The name of the elastic pool.
property resourceGroupName
resourceGroupName: string;The name of the resource group which contains the elastic pool.
property serverName
serverName: string;The name of the SQL Server which contains the elastic pool.
interface GetElasticPoolResult
interface GetElasticPoolResultA collection of values returned by getElasticPool.
property id
id: string;The provider-assigned unique ID for this managed resource.
property licenseType
licenseType: string;The license type to apply for this database.
property location
location: string;Specifies the supported Azure location where the resource exists.
property maxSizeBytes
maxSizeBytes: number;The max data size of the elastic pool in bytes.
property maxSizeGb
maxSizeGb: number;The max data size of the elastic pool in gigabytes.
property name
name: string;property perDbMaxCapacity
perDbMaxCapacity: number;The maximum capacity any one database can consume.
property perDbMinCapacity
perDbMinCapacity: number;The minimum capacity all databases are guaranteed.
property resourceGroupName
resourceGroupName: string;property serverName
serverName: string;property tags
tags: {[key: string]: string};A mapping of tags to assign to the resource.
property zoneRedundant
zoneRedundant: boolean;Whether or not this elastic pool is zone redundant.
interface ServerArgs
interface ServerArgsThe set of arguments for constructing a Server resource.
property administratorLogin
administratorLogin: pulumi.Input<string>;The administrator login name for the new server. Changing this forces a new resource to be created.
property administratorLoginPassword
administratorLoginPassword: pulumi.Input<string>;The password associated with the administratorLogin user. Needs to comply with Azure’s Password Policy
property azureadAdministrator
azureadAdministrator?: pulumi.Input<ServerAzureadAdministrator>;An azureadAdministrator block as defined below.
property connectionPolicy
connectionPolicy?: pulumi.Input<string>;The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
property extendedAuditingPolicy
extendedAuditingPolicy?: pulumi.Input<ServerExtendedAuditingPolicy>;A extendedAuditingPolicy block as defined below.
property identity
identity?: pulumi.Input<ServerIdentity>;An identity block as defined below.
property location
location?: pulumi.Input<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
property publicNetworkAccessEnabled
publicNetworkAccessEnabled?: pulumi.Input<boolean>;Whether or not public network access is allowed for this server. Defaults to true.
property resourceGroupName
resourceGroupName: pulumi.Input<string>;The name of the resource group in which to create the Microsoft SQL Server.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.
property version
version: pulumi.Input<string>;The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
interface ServerSecurityAlertPolicyArgs
interface ServerSecurityAlertPolicyArgsThe set of arguments for constructing a ServerSecurityAlertPolicy resource.
property disabledAlerts
disabledAlerts?: pulumi.Input<pulumi.Input<string>[]>;Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action.
property emailAccountAdmins
emailAccountAdmins?: pulumi.Input<boolean>;Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false.
property emailAddresses
emailAddresses?: pulumi.Input<pulumi.Input<string>[]>;Specifies an array of e-mail addresses to which the alert is sent.
property resourceGroupName
resourceGroupName: pulumi.Input<string>;The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
property retentionDays
retentionDays?: pulumi.Input<number>;Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0.
property serverName
serverName: pulumi.Input<string>;Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
property state
state: pulumi.Input<string>;Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Allowed values are: Disabled, Enabled, New.
property storageAccountAccessKey
storageAccountAccessKey?: pulumi.Input<string>;Specifies the identifier key of the Threat Detection audit storage account.
property storageEndpoint
storageEndpoint?: pulumi.Input<string>;Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
interface ServerSecurityAlertPolicyState
interface ServerSecurityAlertPolicyStateInput properties used for looking up and filtering ServerSecurityAlertPolicy resources.
property disabledAlerts
disabledAlerts?: pulumi.Input<pulumi.Input<string>[]>;Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action.
property emailAccountAdmins
emailAccountAdmins?: pulumi.Input<boolean>;Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false.
property emailAddresses
emailAddresses?: pulumi.Input<pulumi.Input<string>[]>;Specifies an array of e-mail addresses to which the alert is sent.
property resourceGroupName
resourceGroupName?: pulumi.Input<string>;The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created.
property retentionDays
retentionDays?: pulumi.Input<number>;Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0.
property serverName
serverName?: pulumi.Input<string>;Specifies the name of the MS SQL Server. Changing this forces a new resource to be created.
property state
state?: pulumi.Input<string>;Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Allowed values are: Disabled, Enabled, New.
property storageAccountAccessKey
storageAccountAccessKey?: pulumi.Input<string>;Specifies the identifier key of the Threat Detection audit storage account.
property storageEndpoint
storageEndpoint?: pulumi.Input<string>;Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
interface ServerState
interface ServerStateInput properties used for looking up and filtering Server resources.
property administratorLogin
administratorLogin?: pulumi.Input<string>;The administrator login name for the new server. Changing this forces a new resource to be created.
property administratorLoginPassword
administratorLoginPassword?: pulumi.Input<string>;The password associated with the administratorLogin user. Needs to comply with Azure’s Password Policy
property azureadAdministrator
azureadAdministrator?: pulumi.Input<ServerAzureadAdministrator>;An azureadAdministrator block as defined below.
property connectionPolicy
connectionPolicy?: pulumi.Input<string>;The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default.
property extendedAuditingPolicy
extendedAuditingPolicy?: pulumi.Input<ServerExtendedAuditingPolicy>;A extendedAuditingPolicy block as defined below.
property fullyQualifiedDomainName
fullyQualifiedDomainName?: pulumi.Input<string>;The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net)
property identity
identity?: pulumi.Input<ServerIdentity>;An identity block as defined below.
property location
location?: pulumi.Input<string>;Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
property name
name?: pulumi.Input<string>;The name of the Microsoft SQL Server. This needs to be globally unique within Azure.
property publicNetworkAccessEnabled
publicNetworkAccessEnabled?: pulumi.Input<boolean>;Whether or not public network access is allowed for this server. Defaults to true.
property resourceGroupName
resourceGroupName?: pulumi.Input<string>;The name of the resource group in which to create the Microsoft SQL Server.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.
property version
version?: pulumi.Input<string>;The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server).
interface ServerVulnerabilityAssessmentArgs
interface ServerVulnerabilityAssessmentArgsThe set of arguments for constructing a ServerVulnerabilityAssessment resource.
property recurringScans
recurringScans?: pulumi.Input<ServerVulnerabilityAssessmentRecurringScans>;The recurring scans settings. The recurringScans block supports fields documented below.
property serverSecurityAlertPolicyId
serverSecurityAlertPolicyId: pulumi.Input<string>;The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
property storageAccountAccessKey
storageAccountAccessKey?: pulumi.Input<string>;Specifies the identifier key of the storage account for vulnerability assessment scan results. If storageContainerSasKey isn’t specified, storageAccountAccessKey is required.
property storageContainerPath
storageContainerPath: pulumi.Input<string>;A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
property storageContainerSasKey
storageContainerSasKey?: pulumi.Input<string>;A shared access signature (SAS Key) that has write access to the blob container specified in storageContainerPath parameter. If storageAccountAccessKey isn’t specified, storageContainerSasKey is required.
interface ServerVulnerabilityAssessmentState
interface ServerVulnerabilityAssessmentStateInput properties used for looking up and filtering ServerVulnerabilityAssessment resources.
property recurringScans
recurringScans?: pulumi.Input<ServerVulnerabilityAssessmentRecurringScans>;The recurring scans settings. The recurringScans block supports fields documented below.
property serverSecurityAlertPolicyId
serverSecurityAlertPolicyId?: pulumi.Input<string>;The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created.
property storageAccountAccessKey
storageAccountAccessKey?: pulumi.Input<string>;Specifies the identifier key of the storage account for vulnerability assessment scan results. If storageContainerSasKey isn’t specified, storageAccountAccessKey is required.
property storageContainerPath
storageContainerPath?: pulumi.Input<string>;A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
property storageContainerSasKey
storageContainerSasKey?: pulumi.Input<string>;A shared access signature (SAS Key) that has write access to the blob container specified in storageContainerPath parameter. If storageAccountAccessKey isn’t specified, storageContainerSasKey is required.
interface VirtualMachineArgs
interface VirtualMachineArgsThe set of arguments for constructing a VirtualMachine resource.
property autoPatching
autoPatching?: pulumi.Input<VirtualMachineAutoPatching>;An autoPatching block as defined below.
property keyVaultCredential
keyVaultCredential?: pulumi.Input<VirtualMachineKeyVaultCredential>;(Optional) An keyVaultCredential block as defined below.
property rServicesEnabled
rServicesEnabled?: pulumi.Input<boolean>;Should R Services be enabled?
property sqlConnectivityPort
sqlConnectivityPort?: pulumi.Input<number>;The SQL Server port. Defaults to 1433.
property sqlConnectivityType
sqlConnectivityType?: pulumi.Input<string>;The connectivity type used for this SQL Server. Defaults to PRIVATE.
property sqlConnectivityUpdatePassword
sqlConnectivityUpdatePassword?: pulumi.Input<string>;The SQL Server sysadmin login password.
property sqlConnectivityUpdateUsername
sqlConnectivityUpdateUsername?: pulumi.Input<string>;The SQL Server sysadmin login to create.
property sqlLicenseType
sqlLicenseType: pulumi.Input<string>;The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit) and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.
property virtualMachineId
virtualMachineId: pulumi.Input<string>;The ID of the Virtual Machine. Changing this forces a new resource to be created.
interface VirtualMachineState
interface VirtualMachineStateInput properties used for looking up and filtering VirtualMachine resources.
property autoPatching
autoPatching?: pulumi.Input<VirtualMachineAutoPatching>;An autoPatching block as defined below.
property keyVaultCredential
keyVaultCredential?: pulumi.Input<VirtualMachineKeyVaultCredential>;(Optional) An keyVaultCredential block as defined below.
property rServicesEnabled
rServicesEnabled?: pulumi.Input<boolean>;Should R Services be enabled?
property sqlConnectivityPort
sqlConnectivityPort?: pulumi.Input<number>;The SQL Server port. Defaults to 1433.
property sqlConnectivityType
sqlConnectivityType?: pulumi.Input<string>;The connectivity type used for this SQL Server. Defaults to PRIVATE.
property sqlConnectivityUpdatePassword
sqlConnectivityUpdatePassword?: pulumi.Input<string>;The SQL Server sysadmin login password.
property sqlConnectivityUpdateUsername
sqlConnectivityUpdateUsername?: pulumi.Input<string>;The SQL Server sysadmin login to create.
property sqlLicenseType
sqlLicenseType?: pulumi.Input<string>;The SQL Server license type. Possible values are AHUB (Azure Hybrid Benefit) and PAYG (Pay-As-You-Go). Changing this forces a new resource to be created.
property tags
tags?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;A mapping of tags to assign to the resource.
property virtualMachineId
virtualMachineId?: pulumi.Input<string>;The ID of the Virtual Machine. Changing this forces a new resource to be created.