-
Notifications
You must be signed in to change notification settings - Fork 4k
Fix Az.PrivateDNS Syntax Errors #17749
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following comments apply to not only the places I marked, but many more, so please go through the PR and fix the same issues.
@@ -142,13 +142,13 @@ This example adds a CNAME record to an existing record set. | |||
|
|||
### Example 4: Add a MX record to a record set | |||
```powershell | |||
$RecordSet = Get-AzPrivateDnsRecordSet -Name @ -RecordType MX -ResourceGroupName MyResourceGroup -ZoneName myzone.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"@" is a valid name. It just needs to be quoted though "@"
$Zone = Get-AzPrivateDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup" | ||
$RecordSets = Get-AzPrivateDnsRecordSet -Zone $Zone | ||
$Zone = Get-AzPrivateDnsZone -Name "myzone.com" -ResourceGroupName "MyResourceGroup" | ||
$RecordSets = Get-AzPrivateDnsRecordSet -Zone $Zone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If an example has output, it should not assign the result to a variable, because by assigning the value there will be no output.
$RecordSets = Get-AzPrivateDnsRecordSet -Zone $Zone | |
Get-AzPrivateDnsRecordSet -Zone $Zone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we detect this issue automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our current code can not detect this problem.
Description
Checklist
CONTRIBUTING.md
ChangeLog.md
file(s) has been updated:ChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header -- no new version header should be added