-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Unable to create private endpoints in CLI using bash terminal #13687
Comments
hi @myronfanqiu, could you pls have a look? |
add to S170 |
@lchave Hi, Are you targeting at Private Link Service? --group-id is not needed for private link service. Or do you have any name containing |
@myronfanqiu The group-id is just passing a variable defined in a previous step. When i run the |
@lchave I see. Thanks for such useful information. @jiasli @zhoxing-ms Any idea? |
Related issue: #13573 |
@lchave This problem seems to be related to Windows style newline characters, this can be caused by editing a file in Windows and trying to run it on a non-Windows system. Bash expects that end-of-line in a script is always and only a newline |
Hello @lchave,
|
@jiasli I've tried on WSL, Bash & Git Bash terminals from Visual Studio on Windows. As per the code, if you can share your MS email I can send the code to reproduce it. @zhoxing-ms this looks accurate, however, this command runs on files and I'm just trying to pass this variable within my code to complete deployments. |
@lchave Hi, please send them to jiasli@microsoft.com and Zhou.Xing@microsoft.com, thanks~ |
I have reproduced this problem in the WSL environment and identified the root cause: For example:
group_name=$(az group show -n zhoxing-test --query name)
echo $group_name
az group create -l westus --debug -n $group_name
root@DESKTOP-S8GCCTE:/mnt/c/Users/zhoxing.FAREAST/Desktop# file test.sh
test.sh: ASCII text, with CRLF line terminators
root@DESKTOP-S8GCCTE:/mnt/c/Users/zhoxing.FAREAST/Desktop# bash test.sh
"zhoxing-test"
Command arguments: ['group', 'create', '-l', 'westus', '--debug', '-n', '"zhoxing-test"\r\r'] At this point, the value of
root@DESKTOP-S8GCCTE:/mnt/c/Users/zhoxing.FAREAST/Desktop# dos2unix test.sh
dos2unix: converting file test.sh to Unix format...
root@DESKTOP-S8GCCTE:/mnt/c/Users/zhoxing.FAREAST/Desktop# file test.sh
test.sh: ASCII text
root@DESKTOP-S8GCCTE:/mnt/c/Users/zhoxing.FAREAST/Desktop# bash test.sh
"zhoxing-test"
Command arguments: ['group', 'create', '-l', 'westus', '--debug', '-n', '"zhoxing-test"'] Problem solving after the file format becomes @lchave The same is true even if the value of the variable is not written directly in the file but is returned from a query (as the example I provided). So when using For more information, please refer to: click |
Because there is no reply to this question for a long time, I will close it temporarily. If you have any questions, please feel free to let us know. |
This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az network private-endpoint create
Errors:
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az network private-endpoint create --name {} --resource-group {} --vnet-name {} --subnet {} --location {} --private-connection-resource-id {} --group-id {} --connection-name {} --tags {}
Expected Behavior
Environment Summary
Additional Context
The text was updated successfully, but these errors were encountered: