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

Linux and windows virtual machine admin password validations #20558

Merged
merged 4 commits into from
Feb 20, 2023
Merged

Linux and windows virtual machine admin password validations #20558

merged 4 commits into from
Feb 20, 2023

Conversation

juanjojulian
Copy link
Contributor

Related to #20400

Adding validations for azurerm_linux_virtual_machine and azurerm_windows_virtual_machine admin_password to fulfil Azure API requirements in https://learn.microsoft.com/en-us/rest/api/compute/virtual-machines/create-or-update?tabs=HTTP#osprofile

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks for this PR @juanjojulian. The conditions for both linux and windows admin passwords look to be identical, so could we consolidate the validation logic into one file called admin_password.go and have both resources reference it?

@juanjojulian
Copy link
Contributor Author

Thanks for this PR @juanjojulian. The conditions for both linux and windows admin passwords look to be identical, so could we consolidate the validation logic into one file called admin_password.go and have both resources reference it?

Hi @stephybun both conditions are very similar but Windows and Linux admin passwords have different length requirements, you probably got confused by a typo in one of the comments in the code, sorry, already corrected it.

Windows:
// adminPassword Min-length is 8 characters and Max-length is 123 characters.

Linux:
// adminPassword Min-length is 6 characters and Max-length is 72 characters.

Copy link
Member

@stephybun stephybun left a comment

Choose a reason for hiding this comment

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

Thanks for this @juanjojulian LGTM 👍

@github-actions
Copy link

This functionality has been released in v3.45.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants