Skip to content

SSHD Subsystem resource doesn't create subsystem if _exist isn't specified #1471

@SteveL-MSFT

Description

@SteveL-MSFT

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest version
  • Search the existing issues.

Summary

Tried using the Microsoft.OpenSSH.SSHD/Subsystem resource to create a subsystem. No error, but also didn't update sshd_config file. The problem is that if _exist isn't specified, it's defaulting to false when it should default to true

Steps to reproduce

$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Add PS7 SSH Subsystem
  type: Microsoft.OpenSSH.SSHD/Subsystem
  properties:
    subsystem:
      name: powershell
      value: "[concat(systemRoot(), 'progra~1/powershell/7/pwsh.exe -sshs')]"

Expected behavior

subsystem created

Actual behavior

subsystem not created

Error details

Environment data

Name                           Value
----                           -----
PSVersion                      7.6.0
PSEdition                      Core
GitCommitId                    7.6.0
OS                             Microsoft Windows 10.0.26200
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.4
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Version

3.2-preview.14

Visuals

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions