Open bandarr opened 3 weeks ago
Hi @bandarr, Thank you for reaching out.
The provider internally invokes Azure REST API. Could you please check whether Azure returns the right computerName
value? You may follow the steps below:
TF_LOG
and TF_LOG_PATH
according to this documentterraform apply -refresh-only
computerName
from GET API in the generated logHi @bandarr, Thank you for reaching out. The provider internally invokes Azure REST API. Could you please check whether Azure returns the right
computerName
value? You may follow the steps below:
- enable
TF_LOG
andTF_LOG_PATH
according to this document- Rerun
terraform apply -refresh-only
- Find the
computerName
from GET API in the generated log
Set TF_LOG to "TRACE" and examined output:
computerName is set to the old computer name, whereas the Azure Portal reflects the correct, new name.
Seems the Azure Portal reflects the different value from the Azure REST API. You may create an issue with the X-Ms-Correlation-Request-Id of your GET API on azure-rest-api-specs to let Azure Service team confirm this issue.
Is there an existing issue for this?
Community Note
Terraform Version
1.9.8
AzureRM Provider Version
4.8.0
Affected Resource(s)/Data Source(s)
azurerm_windows_virtual_machine
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
terraform apply -refresh-only should indicate that the computer_name should be updated in the state when the computer_name in the state is different from the computer name in the Azure portal.
Actual Behaviour
terraform apply -refresh-only sees no changes to the configuration
Steps to Reproduce
Important Factoids
No response
References
No response