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

azurerm_windows_virtual_machine and timezone #16848

Closed
1 task done
L-u-k-e-GIT opened this issue May 18, 2022 · 3 comments · Fixed by #16866
Closed
1 task done

azurerm_windows_virtual_machine and timezone #16848

L-u-k-e-GIT opened this issue May 18, 2022 · 3 comments · Fixed by #16866

Comments

@L-u-k-e-GIT
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v1.1.7

AzureRM Provider Version

v3.3.0

Affected Resource(s)/Data Source(s)

azurerm_windows_virtual_machine

Terraform Configuration Files

Hi I add timezone to an existing tf project.
During the plan terraform recognize the resource change but actually does not change the time zone inside a server.

Running following terraform plan it always try to reapply it.

Debug Output/Panic Output

no specif error

Expected Behaviour

The timezone of the vm is changed.

Actual Behaviour

The time zone is not changed (if the vm already exits)

Steps to Reproduce

Resource "azurerm_windows_virtual_machine" "vm" {

for_each = var.VM_DEF
name = "${var.VM_NAME_PREFIX}${var.PROJECT_NAME}-${each.value.name}-${var.VM_ENV}"
resource_group_name = azurerm_resource_group.rg.name
location = var.LOCATION
license_type = var.WINDOWS_LICENSE_TYPE
size = each.value.size
admin_username = var.ADMIN_USERNAME
admin_password = var.ADMIN_PASSWORD
timezone = "W. Europe Standard Time"
boot_diagnostics {
storage_account_uri = module.vm_ext_storage.MD_OUT_ST_URI
}
network_interface_ids = [
azurerm_network_interface.vm_nic1[each.key].id,
]

os_disk {
name = "${var.DISKOS_PREFIX}-${var.PROJECT_NAME}-${var.SUBSCRIPTION_PREFIX}-${var.REGION_PREFIX}-${each.value.name}"
caching = "ReadWrite"
disk_size_gb = each.value.diskosize
storage_account_type = each.value.disk

}

Important Factoids

No response

References

No response

@myc2h6o
Copy link
Contributor

myc2h6o commented May 19, 2022

Hi @L-u-k-e-GIT Thanks for opening the issue! timezone cannot be changed, and there seems to be a bug in the provider where ForceNew flag is missing, I've created a pr to fix it. To workaround it before the fix is merged, you can Force-Recreate the resource

@github-actions
Copy link

This functionality has been released in v3.8.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 issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, 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 Jun 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants