Skip to content

Commit

Permalink
updated sql-database
Browse files Browse the repository at this point in the history
  • Loading branch information
EronWright committed Dec 11, 2024
1 parent 2511282 commit 6c932dc
Show file tree
Hide file tree
Showing 3 changed files with 276 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ runtime: yaml
description: |
Upgrade test for SQL Server, Database, and related network objects, based on:
https://learn.microsoft.com/en-us/azure/azure-sql/database/single-database-create-arm-template-quickstart?view=azuresql
With network access controls based on:
https://learn.microsoft.com/en-us/azure/azure-sql/database/network-access-controls-overview?view=azuresql
resources:
rg:
Expand All @@ -19,6 +21,22 @@ resources:
special: true
length: 12

vnet:
type: azure-native:network:VirtualNetwork
properties:
resourceGroupName: ${rg.name}
addressSpace:
addressPrefixes: ["10.1.0.0/16"]

subnet:
type: azure-native:network:Subnet
properties:
resourceGroupName: ${rg.name}
virtualNetworkName: ${vnet.name}
addressPrefix: "10.1.0.0/24"
serviceEndpoints:
- service: Microsoft.Sql

server:
type: azure-native:sql:Server
properties:
Expand All @@ -39,6 +57,7 @@ resources:
name: "Standard"
tier: "Standard"

# Firewall rule for external connectivity
firewallRuleCorp:
type: azure-native:sql:FirewallRule
properties:
Expand All @@ -48,6 +67,7 @@ resources:
startIpAddress: "192.0.2.0"
endIpAddress: "192.0.2.255"

# Firewall rule for Azure services
firewallRuleAllowAzure:
type: azure-native:sql:FirewallRule
properties:
Expand All @@ -57,3 +77,12 @@ resources:
startIpAddress: "0.0.0.0"
endIpAddress: "0.0.0.0"

# Firewall rule for a particular virtual network subnet
virtualNetworkRule:
type: azure-native:sql:VirtualNetworkRule
properties:
resourceGroupName: ${rg.name}
serverName: ${server.name}
virtualNetworkRuleName: "myvnetrule"
virtualNetworkSubnetId: ${subnet.id}
ignoreMissingVnetServiceEndpoint: false
Loading

0 comments on commit 6c932dc

Please sign in to comment.