Skip to content

Conversation

@Gijsreyn
Copy link
Contributor

PR Summary

This pull request implements support for evaluating expressions in resource properties during copy operations. Previously, while copy count could use expressions, properties within copied resources were not evaluated per iteration, preventing users from using functions like copyIndex() within property values.

PR Context

Fix #1179.

Users can now use:

resources:
- name: "[format('Server-{0}', copyIndex())]"
  copy:
    name: testLoop
    count: 3
  type: Microsoft.DSC.Debug/Echo
  properties:
    output: "[format('Port-{0}', copyIndex())]"

@SteveL-MSFT SteveL-MSFT added this pull request to the merge queue Oct 28, 2025
Merged via the queue into PowerShell:main with commit bc5639b Oct 28, 2025
19 checks passed
@Gijsreyn Gijsreyn deleted the gh-1177/main/add-copy-property-support branch October 28, 2025 03:13
Copy link

@emelybeaute-ops emelybeaute-ops left a comment

Choose a reason for hiding this comment

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants