Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaultValue - empty #129

Open
nicwillemse opened this issue Sep 29, 2022 · 1 comment
Open

defaultValue - empty #129

nicwillemse opened this issue Sep 29, 2022 · 1 comment

Comments

@nicwillemse
Copy link

I cannot find a way to extract a template without the defaultValue for connections, is there a way to do this?

@rille111
Copy link

rille111 commented Sep 30, 2022

Just did this manually yesterday. Here´s a powershell snippet. It leaves [resourceGroup(..)] references alone.

$fileName = "path to the ARM template json file"
$regexPatternForRemoval = '"defaultValue": "(?![\[]).*"|"defaultValue": ([0-9]+)'
(Get-Content $fileName) -replace $regexPatternForRemoval, '"defaultValue": ""' | Set-Content $fileName

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

No branches or pull requests

2 participants