dsccommunity / dsccommunity/SqlServerDsc

SqlRSVirtualDirectory: New resource proposal

Open
#2,417 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted resource proposal
Dominant language
PowerShell
Stars
385
Forks
224
PR merge metrics
No merged PRs in 30d

Description

Resource proposal

Manages virtual directories for ReportServer web service and Reports web portal applications. This resource is separated from URL reservations because changing virtual directories requires removing and re-adding URL reservations. Making this a separate resource gives more control and clearer semantics.

Parent Issue: #2415

Features
  • Configures virtual directories for ReportServerWebService and ReportServerWebApp applications
  • Supports both replacement pattern (set exact value) and include/exclude pattern (add/remove specific values)
  • Supports both SQL Server Reporting Services (SSRS) and Power BI Report Server (PBIRS)
  • SQL Server 2019+ only
Commands Used
Method Commands
Get Get-SqlDscRSConfiguration (properties: VirtualDirectoryReportServer, VirtualDirectoryReportManager)
Test Compare current virtual directory with desired
Set Set-SqlDscRSVirtualDirectory, Restart-SqlDscRSService

Proposed properties

Property Type qualifier Data type Description Default value Allowed values
InstanceName Key String The RS instance name (SSRS or PBIRS) None None
Application Key String The application to configure None ReportServerWebService, ReportServerWebApp
VirtualDirectory Write String The exact virtual directory to set (replaces existing). Mutually exclusive with ToInclude/ToExclude. None None
VirtualDirectoryToInclude Write String Virtual directory to add if not present None None
VirtualDirectoryToExclude Write String Virtual directory to remove if present None None
Lcid Write UInt32 Language code identifier None None
RestartTimeout Write UInt32 Seconds to wait after service restart None None
SuppressServiceRestart Write Boolean Suppress automatic service restart $false None

Special considerations or limitations

  1. Proposed File: source/Classes/020.SqlRSVirtualDirectory.ps1

  2. Inheritance: Inherits from ResourceBase (from DscResource.Base module), not SqlResourceBase.

  3. Mutually exclusive properties: VirtualDirectory is mutually exclusive with VirtualDirectoryToInclude and VirtualDirectoryToExclude. When using VirtualDirectory, the existing virtual directory is replaced. When using VirtualDirectoryToInclude and/or VirtualDirectoryToExclude, only the specified changes are made.

  4. URL reservation impact: Changing virtual directories may require URL reservations to be removed and re-added. Consider using SqlRSUrlReservation after this resource.

  5. Recommended usage order: This resource should be used after SqlRSSetup and before SqlRSUrlReservation.

  6. Integration tests: Should follow the patterns in Integration_Test_Commands_ReportingServices and Integration_Test_Commands_BIReportServer stages.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the proposed source file source/Classes/020.SqlRSVirtualDirectory.ps1 and the existing SqlRSSetup and SqlRSUrlReservation resources for context. Then inspect the Integration_Test_Commands_ReportingServices and Integration_Test_Commands_BIReportServer stages. Done means the resource supports the listed properties, replacement and include/exclude behavior, and integration coverage for SSRS and PBIRS.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.