Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting expected error with provider field in ldap setting. #892

Closed
railoni opened this issue Feb 27, 2024 · 2 comments
Closed

Getting expected error with provider field in ldap setting. #892

railoni opened this issue Feb 27, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@railoni
Copy link

railoni commented Feb 27, 2024

For all other resources provider field is working as expected but only in ldap setting and ldap group we are getting below error.

artifactory = {
      source  = "jfrog/artifactory"
      version = "10.1.2"
    }
    project = {
      source  = "jfrog/project"
      version = "1.3.4"
    }
    xray = {
      source  = "jfrog/xray"
      version = "2.1.1"
    }
    random = {
      source = "hashicorp/random"
      version = "3.5.1"
    }

provider "artifactory" {
  url          = var.artifactory-ha1_url
  access_token = var.artifactory-ha1_token
  check_license = false
}
# Configure Artifactory LDAP setting
resource "artifactory_ldap_setting" "ldap_name" {
  provider                      = artifactory.ha1
  key                           = "ldap_name"
  enabled                       = true
  ldap_url                      = "ldap://ldap_server_url"
  user_dn_pattern               = "uid={0},ou=People"
  email_attribute               = "mail"
  auto_create_user              = true
  ldap_poisoning_protection     = true
  allow_user_to_access_profile  = false
  paging_support_enabled        = false
  search_filter                 = "(uid={0})"
  search_base                   = "ou=users"
  search_sub_tree               = true
  manager_dn                    = ""
  manager_password              = ""
}
│ Error: Provider produced inconsistent result after apply

│ When applying changes to artifactory_ldap_setting.ldap_name, provider "provider[\"registry.terraform.io/jfrog/artifactory\"].ha1" 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.
@railoni railoni added the bug Something isn't working label Feb 27, 2024
@alexhung
Copy link
Member

@railoni I assume there is another provider configuration in your environment since there is no provider with alias ha1 in your description above.

@alexhung
Copy link
Member

alexhung commented Mar 2, 2024

Closing as artifactory_ldap_setting_v2 does not have this issue and is the preferred resource to use now.

@alexhung alexhung closed this as completed Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants