terraform-provider-avi
terraform-provider-avi copied to clipboard
Failure to create avi_useraccount resource
Describe the bug
Terraform produces following error in create user function │ Error: Provider produced inconsistent result after apply │ │ When applying changes to avi_useraccount.avi_user, provider "provider["registry.terraform.io/vmware/avi"]" produced an unexpected new value: Root resource │ was present, but now absent. │ │ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Reproduction steps
1. Deploy 3 VMs from template
2. Use following snippet
terraform {
required_providers {
vsphere = {
source = "hashicorp/vsphere"
version = "~> 2.0.0"
}
avi = {
source = "vmware/avi"
version = "~> 21.1.1"
}
}
}
provider "avi" {
avi_username = var.avi_username
avi_password = var.avi_password #even tried with var.avi_new_password
avi_controller = vsphere_virtual_machine.controller[0].default_ip_address
avi_tenant = "admin"
}
resource "avi_useraccount" "avi_user" {
username = var.avi_username
old_password = var.avi_password
password = var.avi_new_password
}
3. Username tried was both "admin" and non-admin.
Expected behavior
User account would be created
Additional context
No response