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

compute: Preparation for the Virtual Machine Resources #5542

Merged
merged 5 commits into from
Jan 30, 2020

Conversation

tombuildsstuff
Copy link
Contributor

@tombuildsstuff tombuildsstuff commented Jan 28, 2020

This PR introduces a few things needed for the upcoming Linux/Windows Virtual Machine resources (as outlined in #2807).

Firstly this introduces the concept of the Features block which is Optional in 1.x but will become Required in 2.0. This will be used to define the behaviour of select resources (at this time only the new Virtual Machine resource [deleting the os disk on deletion], but in time the new Virtual Machine Scale Set [rolling instances] and Key Vault resources [soft delete]). What this looks like in practice:

provider "azurerm" {
    features {      
      virtual_machine {
        delete_os_disk_on_deletion = true
      }
    }
}

(since there's no Acceptance Tests covering the Provider block directly, I've added unit tests covering the expand in this instance)

Secondly this introduces a bunch of Parsers/Validators across both Compute and Networking for resources which are required by the Virtual Machine resource - but it /intentionally/ doesn't retrofit these into other resources since that's a larger/out-of-scope task.

Finally this introduces some helper functions which are required by the upcoming Virtual Machine resources - mostly to make that PR easier to review, since it's a large resource.

Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Just one small comment on the instanceView state list as discussed. Otherwise LGTM.

switch strings.ToLower(state) {
case "deallocating":
case "deallocated":
case "stopped":
Copy link
Member

Choose a reason for hiding this comment

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

Might need/want to add stopping here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agreed - rather than pushing to this branch & rebasing #5550 I'll make this change there since it's dependent on this one

@tombuildsstuff tombuildsstuff merged commit aa6a970 into master Jan 30, 2020
@tombuildsstuff tombuildsstuff deleted the f/virtual-machine-prep branch January 30, 2020 11:05
@ghost
Copy link

ghost commented Feb 4, 2020

This has been released in version 1.43.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 = "~> 1.43.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 28, 2020

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!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
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