diff --git a/client/config.go b/client/config.go index 796c343..695bf44 100644 --- a/client/config.go +++ b/client/config.go @@ -43,6 +43,7 @@ func GetConfigAuth(d *schema.ResourceData) models.ConfigBodyPost { AuthMode: "ldap_auth", LdapURL: d.Get("ldap_url").(string), LdapSearchDn: d.Get("ldap_search_dn").(string), + LdapSearchPassword: d.Get("ldap_search_password").(string), LdapBaseDn: d.Get("ldap_base_dn").(string), LdapFilter: d.Get("ldap_filter").(string), LdapUID: d.Get("ldap_uid").(string), diff --git a/models/config.go b/models/config.go index 01eec35..4f7e262 100644 --- a/models/config.go +++ b/models/config.go @@ -32,6 +32,7 @@ type ConfigBodyPost struct { LdapGroupBaseDn string `json:"ldap_group_base_dn,omitempty"` LdapGroupAttributeName string `json:"ldap_group_attribute_name,omitempty"` LdapGroupMembershipAttribute string `json:"ldap_group_membership_attribute,omitempty"` + LdapSearchPassword string `json:"ldap_search_password,omitempty"` EmailInsecure bool `json:"email_insecure"` LdapGroupAdminDn string `json:"ldap_group_admin_dn,omitempty"` EmailUsername string `json:"email_username,omitempty"` diff --git a/provider/resource_config_auth.go b/provider/resource_config_auth.go index 6f7dcc4..8500f9d 100644 --- a/provider/resource_config_auth.go +++ b/provider/resource_config_auth.go @@ -79,7 +79,7 @@ func resourceConfigAuth() *schema.Resource { Type: schema.TypeString, Optional: true, ConflictsWith: ldapConflictsWith(), - RequiredWith: ldapRequiredWith(), + RequiredWith: ldapRequiredWith(), }, "ldap_uid": { Type: schema.TypeString, diff --git a/provider/resource_garbage_collection_test.go b/provider/resource_garbage_collection_test.go index 2520477..44519bc 100644 --- a/provider/resource_garbage_collection_test.go +++ b/provider/resource_garbage_collection_test.go @@ -45,7 +45,7 @@ func TestAccGCUpdate(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckResourceExists(harborGCMain), resource.TestCheckResourceAttr( - harborGCMain, "schedule", "daily"), + harborGCMain, "schedule", "Daily"), ), }, { @@ -53,7 +53,7 @@ func TestAccGCUpdate(t *testing.T) { Check: resource.ComposeTestCheckFunc( testAccCheckResourceExists(harborGCMain), resource.TestCheckResourceAttr( - harborGCMain, "schedule", "hourly"), + harborGCMain, "schedule", "Hourly"), resource.TestCheckResourceAttr( harborGCMain, "delete_untagged", "true"), ), @@ -65,7 +65,7 @@ func TestAccGCUpdate(t *testing.T) { func testAccCheckGCBasic() string { return fmt.Sprintf(` resource "harbor_garbage_collection" "main" { - schedule = "daily" + schedule = "Daily" } `) } @@ -73,7 +73,7 @@ func testAccCheckGCBasic() string { func testAccCheckGCUpdate() string { return fmt.Sprintf(` resource "harbor_garbage_collection" "main" { - schedule = "hourly" + schedule = "Hourly" delete_untagged = true } `)