chore: deprecate type field for boundary_account_ldap (#400)
* deprecate type field for resource_account_ldap
This commit is contained in:
1 parent
32c081aec9
commit
8e413b25bd
3 files changed
+36
-1
No files matched your search
@@ -26,6 +26,10 @@ Canonical reference for changes, improvements, and bugfixes for the Boundary Ter
|
||||
`password_auth_method_login_name` & `password_auth_method_password` fields have been set to deprecated
|
||||
with a recommendation to use `auth_method_login_name` & `auth_method_password` fields instead.
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/392))
|
||||
* Deprecate type field for `boundary_account_password`
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/396))
|
||||
* Deprecate type field for `boundary_account_ldap`
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/400))
|
||||
|
||||
## 1.1.4 (February 15, 2023)
|
||||
|
||||
|
||||
@@ -54,7 +54,9 @@ func resourceAccountLdap() *schema.Resource {
|
||||
TypeKey: {
|
||||
Description: "The resource type.",
|
||||
Type: schema.TypeString,
|
||||
Required: true,
|
||||
Deprecated: "The value for this field will be infered since 'ldap' is the only possible value.",
|
||||
Default: accountTypeLdap,
|
||||
Optional: true,
|
||||
ForceNew: true,
|
||||
},
|
||||
accountLoginNameKey: {
|
||||
|
||||
@@ -57,6 +57,23 @@ resource "boundary_account_ldap" "foo" {
|
||||
auth_method_id = boundary_auth_method_ldap.foo.id
|
||||
}`, testAccountLdapNameUpdate, testAccountLdapDescUpdate)
|
||||
|
||||
testAccountLdapWithoutTypeField = fmt.Sprintf(`
|
||||
resource "boundary_auth_method_ldap" "foo" {
|
||||
name = "test"
|
||||
description = "test account"
|
||||
type = "ldap"
|
||||
scope_id = boundary_scope.org1.id
|
||||
depends_on = [boundary_role.org1_admin]
|
||||
urls = ["ldaps://ldap1", "ldaps://ldap2"]
|
||||
}
|
||||
|
||||
resource "boundary_account_ldap" "foo" {
|
||||
name = "%s"
|
||||
description = "%s"
|
||||
login_name = "foo"
|
||||
auth_method_id = boundary_auth_method_ldap.foo.id
|
||||
}`, testAccountLdapNameUpdate, testAccountLdapDescUpdate)
|
||||
|
||||
testProviderLdapAccountConfig = `
|
||||
resource "boundary_account_ldap" "test-ldap" {
|
||||
name = "alice"
|
||||
@@ -116,6 +133,18 @@ func TestAccLdapAccount(t *testing.T) {
|
||||
),
|
||||
},
|
||||
importStep("boundary_account_ldap.foo", "ldap"),
|
||||
{
|
||||
// update without passing type field
|
||||
Config: testConfig(url, fooOrg, testAccountLdapWithoutTypeField),
|
||||
Check: resource.ComposeTestCheckFunc(
|
||||
resource.TestCheckResourceAttr("boundary_account_ldap.foo", "description", testAccountLdapDescUpdate),
|
||||
resource.TestCheckResourceAttr("boundary_account_ldap.foo", "name", testAccountLdapNameUpdate),
|
||||
resource.TestCheckResourceAttr("boundary_account_ldap.foo", "type", "ldap"),
|
||||
resource.TestCheckResourceAttr("boundary_account_ldap.foo", "login_name", "foo"),
|
||||
testAccCheckAccountResourceExists(provider, "boundary_account_ldap.foo"),
|
||||
),
|
||||
},
|
||||
importStep("boundary_account_ldap.foo", "ldap"),
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user