-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
azurerm_virtual_machine - add support for write_accelerator_enabled to disks #964
Conversation
0956eb2
to
2bc3bf9
Compare
moving this to the |
azurerm_virtual_machine
- add support for write_accelerator_enabled
to disks
azurerm_virtual_machine
- add support for write_accelerator_enabled
to disksazurerm_virtual_machine
- add support for write_accelerator_enabled
to disks
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.
hey @katbyte
This mostly LGTM - however the tests currently fail; I'm unsure if this is because it's still only available in some regions or because the Availability Zones aren't set - do you happen to know if this is region limited?
Thanks!
resource_group_name = "${azurerm_resource_group.test.name}" | ||
network_interface_ids = ["${azurerm_network_interface.test.id}"] | ||
|
||
vm_size = "Standard_M64s" |
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.
I'm assuming this needs a VM this large?
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.
Yep, think that is the smallest size it can be enabled upon.
@@ -81,6 +81,25 @@ func TestAccAzureRMVirtualMachine_basicLinuxMachineSSHOnly(t *testing.T) { | |||
}) | |||
} | |||
|
|||
func TestAccAzureRMVirtualMachine_basicLinuxMachine_withWriteAcceleratorEnabled(t *testing.T) { |
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.
so this test currently fails:
* azurerm_virtual_machine.test: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCode=409 -- Original Error: failed request: autorest/azure: Service returned an error. Status=<nil> Code="SkuNotAvailable" Message="The requested size for resource '/subscriptions/*******/resourceGroups/acctestRG-6429603035887554193/providers/Microsoft.Compute/virtualMachines/acctvm-6429603035887554193' is currently not available in location 'westeurope' zones '' for subscription '*******'. Please try another size or deploy to a different location or zones. See https://aka.ms/azureskunotavailable for details."
Judging by the error message - I'm wondering if a Zone needs to be set?
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.
It looks like it is only availiable in the following regions:
- West US2
- East US2
- Western Europe
- Southeast Asia
6e77e66
to
b46ab24
Compare
Waiting to have quota so we can test an verify & test this. |
b46ab24
to
89b437c
Compare
azurerm_virtual_machine
- add support for write_accelerator_enabled
to disksazurerm_virtual_machine
- add support for write_accelerator_enabled
to disks
azurerm_virtual_machine
- add support for write_accelerator_enabled
to disks
We have quota in |
tests pass:
|
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 nits but this otherwise LGTM 👍
{ | ||
Config: testAccAzureRMVirtualMachine_basicLinuxMachine_managedDisk_withWriteAcceleratorEnabled(rInt, testLocation(), "false"), | ||
Check: resource.ComposeTestCheckFunc( | ||
testCheckAzureRMVirtualMachineExists(resourceName, &vm), |
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.
it'd be good to verify this is set to false here
CheckDestroy: testCheckAzureRMVirtualMachineDestroy, | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccAzureRMVirtualMachine_basicLinuxMachine_managedDisk_withWriteAcceleratorEnabled(rInt, testLocation(), "false"), |
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 make the location here testAltLocation()
? we can then update CI to use eastus2
and we should be able to run these nightly
), | ||
}, | ||
{ | ||
Config: testAccAzureRMVirtualMachine_basicLinuxMachine_managedDisk_withWriteAcceleratorEnabled(rInt, testLocation(), "true"), |
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 make the location here testAltLocation()
? we can then update CI to use eastus2
and we should be able to run these nightly
CheckDestroy: testCheckAzureRMVirtualMachineDestroy, | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccAzureRMVirtualMachine_basicLinuxMachine_managedDisk_withWriteAcceleratorEnabled(rInt, testLocation(), "true"), |
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 make the location here testAltLocation()
? we can then update CI to use eastus2
and we should be able to run these nightly
), | ||
}, | ||
{ | ||
Config: testAccAzureRMVirtualMachine_basicLinuxMachine_managedDisk_withOsWriteAcceleratorEnabled(rInt, testLocation(), "false"), |
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 make the location here testAltLocation()
? we can then update CI to use eastus2
and we should be able to run these nightly
CheckDestroy: testCheckAzureRMVirtualMachineDestroy, | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccAzureRMVirtualMachine_basicLinuxMachine_managedDisk_withOsWriteAcceleratorEnabled(rInt, testLocation(), "true"), |
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 make the location here testAltLocation()
? we can then update CI to use eastus2
and we should be able to run these nightly
@@ -423,6 +424,7 @@ resource "azurerm_virtual_machine" "test" { | |||
* `disk_size_gb` - (Required) Specifies the size of the data disk in gigabytes. | |||
* `caching` - (Optional) Specifies the caching requirements. | |||
* `lun` - (Required) Specifies the logical unit number of the data disk. | |||
* `write_accelerator_enabled` - (Optional) Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to false. |
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.
minor can we quote false
?
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.
Hi
is this the write way to use?
write_accelerator_enabled = true
getting the following error
invalid or unknown key: write_accelerator_enabled
Please advise
@@ -412,6 +412,7 @@ resource "azurerm_virtual_machine" "test" { | |||
* `image_uri` - (Optional) Specifies the image_uri in the form publisherName:offer:skus:version. `image_uri` can also specify the [VHD uri](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-cli-deploy-templates/#create-a-custom-vm-image) of a custom VM image to clone. When cloning a custom disk image the `os_type` documented below becomes required. | |||
* `os_type` - (Optional) Specifies the operating system Type, valid values are windows, linux. | |||
* `disk_size_gb` - (Optional) Specifies the size of the os disk in gigabytes. | |||
* `write_accelerator_enabled` - (Optional) Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to false. |
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.
minor can we quote false
?
@tombuildsstuff, changes pushed |
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.
LGTM 👍
Hello @BalaAnbalagan,
This fix was only recently merged and has not been released yet. If you
would like to make use of it before we release v1.7.0, you will have to
compile your own binary version of the provider.
…On Mon, Jun 4, 2018 at 11:00 Bala Anbalagan ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In website/docs/r/virtual_machine.html.markdown
<#964 (comment)>
:
> @@ -423,6 +424,7 @@ resource "azurerm_virtual_machine" "test" {
* `disk_size_gb` - (Required) Specifies the size of the data disk in gigabytes.
* `caching` - (Optional) Specifies the caching requirements.
* `lun` - (Required) Specifies the logical unit number of the data disk.
+* `write_accelerator_enabled` - (Optional) Specifies if Write Accelerator is enabled on the disk. This can only be enabled on `Premium_LRS` managed disks with no caching and [M-Series VMs](https://docs.microsoft.com/en-us/azure/virtual-machines/workloads/sap/how-to-enable-write-accelerator). Defaults to false.
Hi
is this the write way to use?
write_accelerator_enabled = true
getting the following error
invalid or unknown key: write_accelerator_enabled
Please advise
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#964 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABkAQ6YPKObegSg4PCA9SHC1c6S_8j0kks5t5XXOgaJpZM4SmLij>
.
|
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 👉 hashibot-feedback@hashicorp.com. Thanks! |
Fixes #959.