-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
New Resources: azurerm_linux_virtual_machine
& azurerm_windows_virtual_machine
#5550
Conversation
a76505e
to
9afbda6
Compare
c5d5971
to
7ed59b7
Compare
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.
A few minor comments that should possibly be addressed (nothing blocking / critical IMO). Otherwise LGTM 👍
azurerm/internal/services/compute/linux_virtual_machine_resource.go
Outdated
Show resolved
Hide resolved
@@ -53,7 +53,7 @@ func validateName(maxLength int) func(i interface{}, k string) (warnings []strin | |||
|
|||
// The value must be between 1 and 64 (Linux) or 16 (Windows) characters long. |
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.
Not part of the PR, but worth noting that Linux max hostname length is 63, not 64.
azurerm/internal/services/compute/windows_virtual_machine_resource.go
Outdated
Show resolved
Hide resolved
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.
Aside from a few minor comments LGTM 👍
azurerm/internal/services/compute/windows_virtual_machine_resource.go
Outdated
Show resolved
Hide resolved
…urce.go Co-Authored-By: kt <[email protected]>
8ee9da9
to
15eead6
Compare
Also ensuring the machine is started if it's already running
6ecae08
to
b0df5b9
Compare
This has been released in version 2.0.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.0.0"
}
# ... other configuration ... |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
This Pull Request introduces two new resources previously outlined in #2807:
azurerm_linux_virtual_machine
azurerm_windows_virtual_machine
As detailed in #2807 - the
azurerm_virtual_machine
resource was first added to Terraform in 2006 when Azure Resource Manager was in Beta. Over time both the behaviour and capabilities of the Virtual Machine API have diverged sufficiently that whilst the existing resource captures most of the use-cases - it's fallen out of sync.Whilst it's potentially possible to fix some of these issues with the
azurerm_virtual_machine
resource - in practice some of these are larger design issues where the Azure API is now sufficiently generic it's hard to provide useful validation.As such this PR introduces two resources (one for Linux/Windows) for managing Virtual Machines allowing us to provide more granular validation and the new features.
At this time there's a couple of known issues/failing tests which we'll fix prior to GA:
public_ip_address
andpublic_ip_addresses
fields aren't correctly populated when using a Dynamic Public IPThere's Acceptance Tests covering both of these issues, but these are acceptable limitations for the Beta.
Examples for both the new Virtual Machine & VM Scale Set resources will be added in a subsequent PR since this won't go live until the Beta / is out of scope for this PR.
Acceptance Tests for the VM resources:
Acceptance Tests for the VM Scale set resources:
(these are also expected/will be fixed by other open PR's)
Depends on #5542
Fixes #148
Fixes #184
Fixes #486
Fixes #603
Fixes #956
Fixes #1013
Fixes #1170
Fixes #1279
Fixes #1433
Fixes #1670
Fixes #2298
Fixes #3592
Fixes #4750
Fixes #4749
Fixes #5068
Fixes #5447
Fixes #5482