-
Notifications
You must be signed in to change notification settings - Fork 25
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
Adds a rule to check that the name of a windows virtual machine is valid #332
Adds a rule to check that the name of a windows virtual machine is valid #332
Conversation
@wata727 could you help me with the failing check? |
CI is failing due to differences with automatically generated code. |
@wata727, got it, thanks for the hint :) |
|
||
```hcl | ||
resource "azurerm_windows_virtual_machine" "foo" { | ||
name = ... // invalid value |
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.
You are probably referring to the automatically generated rule docs, but we recommend that you write an actual value (e.g. dummy-
) if possible. Because it's easier for users to understand.
It would also be a good idea to replace "How to Fix" with the actual value.
…ide error message
e6f9d52
to
413c83e
Compare
@wata727 please take a look. I fixed the regex in the error message and updated the markdown documentation for this rule :) |
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.
Thanks!
Hi,
i added the rule
azurerm_windows_virtual_machine_invalid_name
.It checks, if the name is a valid windows server hostname, based on this documenation:
https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftcompute
Based on the terraform documentation, the check is skipped, if the
computer_name
attribute is specified. In future this rule could be expanded or a second rule specific forcomputer_name could be added
.Thank you!