terraform-provider-vra7
terraform-provider-vra7 copied to clipboard
MODIFY resource interfaces does not work correctly.
vRA 7.x version 7.4 Terraform version v0.12.13 terraform-provider-vra7 plugin version provider.vra7 v0.5.0
Describe the bug Modification of resource configuration objects like CPU and MEMORY works prefectly fine using the VRA provider.
When I try to modification of custom network profile names does not work. The provider state shows that the profile has been changed. However, on the VRA the interface profile remains unchanged.
To Reproduce Steps to reproduce the behavior:
- Terraform config file Our environment has VMs with multiple nics, so the VRA has been configured to include multiple network groups which can then be added to VM nics as per requirement. This is how the resource configured, with "NETWOK0" nic assigned to "TEST_NET_01"
Resource state, once it's provisioned by VRA:
Now I want to test the modify feature and change the nic "NETWORK0" to be part of another net group "TEST_NET_05"
The resource config looks like this now :
The respective state file after modification looks like this ,
According to the provider, the resource has been modified, however, the VM configuration remains unchanged. On checking VRA logs, we see that the provider does send a modify request to VRA, however, the request is empty or it does not specify the modification of the nic to be performed. In case of CPU or Memory modification, the VRA logs show that a modify request to change the cpu parameters.
Expected behavior The provider should modify all parameter, as long as they are valid. Once the changes are pushed, Terraform should check the current resource state from VRA. I manually performed a refresh. However, the provider still maintains the same state which is not same as actual VM config.