Skip to content

Fix private networking deployment by dropping defaultOutboundAccess - #2259

Open
Roland Krummenacher (RolandKrummenacher) wants to merge 1 commit into
devfrom
RolandKrummenacher/fix-private-networking-deployment
Open

Fix private networking deployment by dropping defaultOutboundAccess#2259
Roland Krummenacher (RolandKrummenacher) wants to merge 1 commit into
devfrom
RolandKrummenacher/fix-private-networking-deployment

Conversation

@RolandKrummenacher

Copy link
Copy Markdown
Collaborator

Fixes #2258

🐛 Problem

Deploying with enablePublicAccess = false fails on dev at the first deployment script:

DeploymentScriptStorageAccountWithServiceEndpointEnabled
Storage account '<script storage>' has firewall settings enabled which are not supported for
deployment scripts.

The shipped v14 template deploys the same scenario successfully, so this is a regression in the current cycle. Both private network modes are affected, since privateRouting is !enablePublicAccess.

The error message is misleading. The script storage account it names is configured identically in the working v14 deployment:

v14  (deploys)   publicNetworkAccess=Enabled  defaultAction=Deny  bypass=AzureServices  vnetRules=[script-subnet]
dev  (fails)     publicNetworkAccess=Enabled  defaultAction=Deny  bypass=AzureServices  vnetRules=[script-subnet]

🔍 Cause

defaultOutboundAccess is now set explicitly on all three subnets. Setting it — at any value, on any subnet in the virtual network — makes the Deployment Scripts service reject the script storage account.

🔧 Solution

Drop the property from the three subnet definitions. Attaching the NAT Gateway is what routes outbound traffic, so the explicit setting is redundant and the feature is unaffected.

A comment above the NAT Gateway block records why the property must not come back, including the fact that the Azure error points at the storage account rather than the subnet.

🧪 Validation

Nine deployments on a test subscription (storage-only, same region):

# Template / mode property set NAT Gateway Result
1 dev, private yes (all) yes
2 dev, vnet yes (all) no
3 v14 shipped no no
4 dev, same params as #3 yes (all) no
5 dev, property removed no no
6 dev, removed on script subnet only yes (2) yes
7 dev, script subnet untouched yes (2) yes
8 repeat of #5 no no
9 dev, property removed, NAT on no yes

Failure occurs exactly when the property is set, without exception. #3 vs #4 differ in nothing else. #5/#8 show the successes reproduce. #6/#7 rule out a script-subnet-only explanation. #9 was run as a falsifiable prediction and cleared the NAT Gateway.

This branch: rebuilt from source and deployed with enableNatGateway: true and enablePublicAccess: false — succeeded in 18 minutes, all 7 deployment scripts ran, NAT Gateway attached to the script and Data Explorer subnets, property absent everywhere.

Single-file template change; no PowerShell, workbook or query code is touched.

🤖 Generated with Claude Code

Deploying with enablePublicAccess = false currently fails on dev at the first
deployment script:

  DeploymentScriptStorageAccountWithServiceEndpointEnabled
  Storage account '<script storage>' has firewall settings enabled which are not
  supported for deployment scripts.

The shipped v14 template deploys the same scenario successfully, so this is a
regression in the current cycle. The error message is misleading: the script
storage account is configured identically in the working v14 deployment
(publicNetworkAccess Enabled, defaultAction Deny, bypass AzureServices, one
virtual network rule). The firewall is not the cause.

The cause is defaultOutboundAccess being set explicitly on the subnets. Setting
it -- at any value, on any subnet in the virtual network -- makes the Deployment
Scripts service reject the script storage account.

Isolated over nine deployments (storage-only, same region, same subscription):
failure occurs exactly when the property is set, without exception. Two runs
differing in nothing but this property gave opposite results; the successes
reproduce; removing the property only from the script subnet, or leaving that
subnet untouched entirely, still fails while other subnets carry it. A final run
with the NAT Gateway attached and the property removed everywhere succeeds,
which clears the NAT Gateway.

Attaching the NAT Gateway is what routes outbound traffic, so the property is
redundant. The feature is unaffected.

Verified: rebuilt from source and deployed with enableNatGateway = true and
enablePublicAccess = false -- deployment succeeds and all 7 deployment scripts
run.

Fixes #2258

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a regression in the FinOps hub private networking deployment (when enablePublicAccess = false) by removing an Azure subnet property that causes Deployment Scripts to fail even though the script storage account configuration is unchanged.

Changes:

  • Removed defaultOutboundAccess from all three subnet definitions to prevent Deployment Scripts from rejecting the script storage account.
  • Updated the NAT Gateway section comment to document the deployment-script failure mode and why defaultOutboundAccess must not be reintroduced.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Review 👀 PR that is ready to be reviewed Skill: Deployment Resource deployment automation via bicep or terraform Tool: FinOps hubs Data pipeline solution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Hubs] Private networking deployment fails — defaultOutboundAccess breaks deployment scripts (regression)

6 participants