Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

FileContent - new data input other there string

オープン
#1,731 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
powershell, yaml
領域
cli

調査の方向性

Look at the FileContent resource implementation in the DSC v3 codebase, likely under a resources or providers directory. Understand how content is currently parsed and stored as a string. The goal is to allow a YAML multiline string (using '|') as input instead of requiring a single escaped string. Check existing tests for FileContent to see the expected format and add a test for the new input style.

索引モデルが issue の本文から書いたものです。

説明

Issue-Enhancement Needs Triage
Summary of the new feature / enhancement

Hi as Operation I like to use this resource to create web.config or CA.inf

Now when we have file that looks like this:


  [Version]
  Signature="$Windows NT$"

  [PolicyStatementExtension]
  Policies=InternalPolicy

  [InternalPolicy]
  OID=1.2.3.4.1455.67.89.5
  Notice="Legal Policy Statement"
  URL=https://pki.corp.contoso.com/pki/cps.txt

  [Certsrv_Server]
  RenewalKeyLength=2048
  RenewalValidityPeriod=Years
  RenewalValidityPeriodUnits=5
  CRLPeriod=Weeks
  CRLPeriodUnits=1
  LoadDefaultTemplates=0
  AlternateSignatureAlgorithm=1

  [CRLDistributionPoint]
  URL=http://pki.corp.contoso.com/cdp/WingtipToysRootCA.crl

  [AuthorityInformationAccess]
  URL=http://pki.corp.contoso.com/Public/myCA.crt

When I like to pass this to DSC v3 I nedd to convert this to string


$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json

resources:

- name: Test File
  type: Microsoft.Filesystem.File/Content
  properties:
    _exist: true
    path: C:\dsc\config\file-content\New\CAPolicy.inf
    content: "[string('[Version]\r\nSignature=\"$Windows NT$\"\r\n\r\n[PolicyStatementExtension]\r\nPolicies=InternalPolicy\r\n\r\n[InternalPolicy]\r\nOID=1.2.3.4.1455.67.89.5\r\nNotice=\"Legal Policy Statement\"\r\nURL=https://pki.corp.contoso.com/pki/cps.txt\r\n\r\n[Certsrv_Server]\r\nRenewalKeyLength=2048\r\nRenewalValidityPeriod=Years\r\nRenewalValidityPeriodUnits=5\r\nCRLPeriod=Weeks\r\nCRLPeriodUnits=1\r\nLoadDefaultTemplates=0\r\nAlternateSignatureAlgorithm=1\r\n\r\n[CRLDistributionPoint]\r\nURL=http://pki.corp.contoso.com/cdp/WingtipToysRootCA.crl\r\n\r\n[AuthorityInformationAccess]\r\nURL=http://pki.corp.contoso.com/Public/myCA.crt')]"

Proposed technical implementation details (optional)

Suggestion mayby how this can look like

$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
  - name: ConfigureCertPolicy
    type: Microsoft.Windows/FileContent  # or Microsoft.DSC.Transitional/PowerShellScript
    properties:
      path: 'C:\Windows\CAPolicy.inf'
      content: |
        [Version]
        Signature="$Windows NT$"

        [PolicyStatementExtension]
        Policies=InternalPolicy

        [InternalPolicy]
        OID=1.2.3.4.1455.67.89.5
        Notice="Legal Policy Statement"
        URL=https://pki.corp.contoso.com/pki/cps.txt

        [Certsrv_Server]
        RenewalKeyLength=2048
        RenewalValidityPeriod=Years
        RenewalValidityPeriodUnits=5
        CRLPeriod=Weeks
        CRLPeriodUnits=1
        LoadDefaultTemplates=0
        AlternateSignatureAlgorithm=1

        [CRLDistributionPoint]
        URL=http://pki.corp.contoso.com/cdp/WingtipToysRootCA.crl

        [AuthorityInformationAccess]
        URL=http://pki.corp.contoso.com/Public/myCA.crt

主要言語
Rust
スター
526
フォーク
76
平均マージ
4日 22時間
マージ済み PR(30日)
25

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PowerShell/DSC のほかの issue

PowerShell/DSC の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。