Skip to content

directory_services_v2 creates directory if terraform apply is re run plugin crashes #747

@jasonchittenden

Description

@jasonchittenden

Nutanix Cluster Information

Terraform Version

  • nutanix_directory_services_v2

Terraform Configuration Files

terraform {
  required_providers {
    nutanix = {
      source  = "nutanix/nutanix"
      version = "2.0.0"
    }
  }
}

#defining nutanix configuration
provider "nutanix" {
  username = var.nutanix_username
  password = var.nutanix_password
  endpoint = var.nutanix_endpoint
  port     = 9440
  insecure = true
}




# Add Directory Service .
resource "nutanix_directory_services_v2" "ig-directory" {
  name           = "OUR_DIRECTORY_NAME"
  url            = "ldaps://ldap.ourladpserver:636"
  directory_type = "ACTIVE_DIRECTORY"
  domain_name    = "our.domain"
  group_search_type = "NON_RECURSIVE"
  service_account {
    username = var.service_account_username
    password = var.service_account_password
  }
}

Debug Output

Panic Output

https://gist.github.com/jasonchittenden/8a781a40791301c242e18df21c61ab3c

Expected Behavior

I expected the terraform apply to complete making no changes or code below outputs etc to be shown

Actual Behavior

Crashes running terraform apply after directory has already been created by terraform

Steps to Reproduce

  1. terraform apply to create terraform appy after caused crash

Important Factors

  • #0000 <!---Github Issue number --->

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions