How do I use Azure MSSQL with proximity placement groups?
In this guide, we will deploy an Azure MSSQL database and configure it to use a proximity placement group to ensure low-latency performance. Proximity placement groups are used to co-locate Azure resources within the same data center to minimize network latency.
Key Points
- We will create a resource group.
- We will create a proximity placement group.
- We will deploy an Azure SQL Server.
- We will create an Azure SQL Database within the server.
import * as pulumi from "@pulumi/pulumi";
import * as azureNative from "@pulumi/azure-native";
// Create a resource group
const resourceGroup = new azureNative.resources.ResourceGroup("resourceGroup", {
location: "WestUS",
});
// Create a proximity placement group
const proximityPlacementGroup = new azureNative.compute.ProximityPlacementGroup("proximityPlacementGroup", {
location: resourceGroup.location,
proximityPlacementGroupType: "Standard",
resourceGroupName: resourceGroup.name,
});
// Create an Azure SQL Server
const sqlServer = new azureNative.sql.Server("sqlServer", {
resourceGroupName: resourceGroup.name,
location: resourceGroup.location,
administratorLogin: "sqladmin",
administratorLoginPassword: "P@ssword1234",
version: "12.0",
tags: {
"ProximityPlacementGroup": proximityPlacementGroup.name,
},
});
// Create an Azure SQL Database
const sqlDatabase = new azureNative.sql.Database("sqlDatabase", {
resourceGroupName: resourceGroup.name,
serverName: sqlServer.name,
location: resourceGroup.location,
sku: {
name: "S1",
tier: "Standard",
},
});
export const sqlServerName = sqlServer.name;
export const sqlDatabaseName = sqlDatabase.name;
export const resourceGroupName = resourceGroup.name;
export const proximityPlacementGroupName = proximityPlacementGroup.name;
Summary
In this example, we created a resource group and a proximity placement group in Azure. We then deployed an Azure SQL Server and an Azure SQL Database within the server, ensuring that they are co-located within the same data center to minimize network latency. This setup optimizes the performance of your Azure MSSQL deployment by utilizing proximity placement groups.
Deploy this code
Want to deploy this code? Sign up for a free Pulumi account to deploy in a few clicks.
Sign upNew to Pulumi?
Want to deploy this code? Sign up with Pulumi to deploy in a few clicks.
Sign upThank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.