CiscoISE / terraform-provider-ciscoise

Terraform Provider for Cisco ISE
https://registry.terraform.io/providers/CiscoISE/ciscoise/latest/docs
MIT License
10 stars 4 forks source link

Resource ciscoise_active_directory_join_domain throws error i.e. Failure when executing JoinDomain #78

Closed prerna-prernas closed 1 year ago

prerna-prernas commented 1 year ago

Prerequisites

Describe the bug Resource ciscoise_active_directory_join_domain is not getting created and error out when performing JoinDomain operation. Observed that same operation is also not working using API.

Screenshot 2023-01-25 at 10 46 03 AM
## Create Active Directory Join Point

resource "ciscoise_active_directory" "test_ad" {
  provider = ciscoise
  parameters {
    ad_scopes_names = "Default_Scope"
    adgroups {}
    description = "testing-tf"
    domain      = "${local.domain}"
    name        = "tf-test-ad"
  }
}

## Join the node to the AD Domain

resource "ciscoise_active_directory_join_domain" "test_join" {
  provider = ciscoise
  lifecycle {
    create_before_destroy = true
  }
  parameters {
    id = ciscoise_active_directory.test_ad.parameters[0].id
    additional_data {
      name  = "username"
      value = "${local.ad_username}"
    }
    additional_data {
      name  = "password"
      value = "${local.ad_password}"
    }
    additional_data {
      name  = "node"
      value = "${local.node}"
    }
    additional_data {
      name  = "orgunit"
      value = "${local.org_unit}"
    }
  }
}

Expected behavior Expecting to spin the resource and perform the mapped operation i.e. to join AD with node specified in additional_data parameter defined in resource.

Screenshots NA

Environment (please complete the following information):

Additional context NA

prerna-prernas commented 1 year ago

Additionally observed that the same resource works fine if don't supply "orgunit" as a parameter. But then if as per requirement if we need to supply it then how to achieve the same ?

resource "ciscoise_active_directory" "test_ad" {
  provider = ciscoise
  parameters {
    ad_scopes_names = "Default_Scope"
    adgroups {}
    description = "testing-tf"
    domain      = "${local.domain}"
    name        = "tf-test-ad"
  }
}

resource "ciscoise_active_directory_join_domain" "test_join" {
  provider = ciscoise
  lifecycle {
    create_before_destroy = true
  }
  parameters {
    id = ciscoise_active_directory.test_ad.parameters[0].id
    additional_data {
      name  = "username"
      value = "${local.ad_username}"
    }
    additional_data {
      name  = "password"
      value = "${local.ad_password}"
    }
    additional_data {
      name  = "node"
      value = "${local.node}"
    }
  }
}
grg1bbs commented 1 year ago

This is related to the following open bug for the API: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCwe13780

fmunozmiranda commented 1 year ago

Hey @1homas, do you have more info about this issue?

grg1bbs commented 1 year ago

This API bug is currently expected to be fixed in ISE 3.1 patch 7 (possibly May timeframe, but could change without notice)

grg1bbs commented 1 year ago

@fmunozmiranda, I believe you can close this issue. The API bug has been fixed in 3.1 patch 7 and 3.2 patch 2