# Activate attributes features of database connection

**URL:** <https://community.auth0.com/t/activate-attributes-features-of-database-connection/147648>\
**Category:** Get Help\
**Tags:** connections-management-api, management-api\
**Created:** [September 20, 2024, 4:21pm UTC](https://community.auth0.com/t/activate-attributes-features-of-database-connection/147648 "2024-09-20T16:21:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![daunais.m](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/daunais.m/32/60691_2.png) [@daunais.m](https://community.auth0.com/u/daunais.m)\
**Post date:** [September 20, 2024, 4:21pm UTC](https://community.auth0.com/t/activate-attributes-features-of-database-connection/147648/1 "2024-09-20T16:21:24Z")

</div>

Hello!  
I saw the disable the attributes feature post ([Disable the Attributes Feature of a Database Connection](https://community.auth0.com/t/disable-the-attributes-feature-of-a-database-connection/145352))  
But I was wondering is there a way to activate the feature currently via terraform or would it be basically the same method via the Auth0 Management API directly only for now?  
Thanks!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 20, 2024, 4:55pm UTC](https://community.auth0.com/t/activate-attributes-features-of-database-connection/147648/3 "2024-09-20T16:55:04Z")

</div>

Hi @daunais.m,

Welcome to the Auth0 Community!

You can activate the **Attributes** feature via Terraform by updating your database connection to include the `options.attributes`.

See Terraform’s doc: [Terraform: Auth0 Connection Resource - Attributes](https://registry.terraform.io/providers/auth0/auth0/latest/docs/resources/connection#attributes)

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![daunais.m](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/daunais.m/32/60691_2.png) [@daunais.m](https://community.auth0.com/u/daunais.m)\
**Post date:** [September 20, 2024, 6:09pm UTC](https://community.auth0.com/t/activate-attributes-features-of-database-connection/147648/4 "2024-09-20T18:09:47Z")

</div>

Hi @rueben.tiow,  
Thanks for the welcome!

Indeed I saw that part in the documentaion, but everytime I try to use that one it doesn’t seem to allow me, when I try to plan by example:

```auto
options {
    enabled_database_customization = true
    disable_signup = true
    import_mode = false
    requires_username = true
    enable_script_context = true
    brute_force_protection = true
    password_policy = "good"

    attributes {
      email {
        identifier {
          active = true
        }
        signup {
          status = true
          verification {
            active = true
          }
        }
      }
      username {
        identifier {
          active = true
        }
        signup {
          status = true
        }
        validation {
          allowed_types {
            email = true
          }
          max_length = 100
          min_length = 1
        }
      }
    }

```

and a more complete auth0\_connection before and after it tells me unsupported block types.  
I tried in various different way.

If I do:

```auto
    attribute_map {
      mapping_mode = "basic_profile"
      attributes = jsonencode({
        email = {
          signup = true
          verification = true
          require = true
        },
        username = {
          signup = true
          require = true
        }
      })
    }
    validation {
      username {
        min = 1
        max = 100
      }
    }

```

I can apply but when I go to attributes I have the popup which I need to activate flexible attributes, once activated everything works fine.  
But on the next apply the pop up comes back and I need to manually accept it.

I might be doing something wrong or not understanding something.

---

<div class="post-metadata">

**Author:** ![daunais.m](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/daunais.m/32/60691_2.png) [@daunais.m](https://community.auth0.com/u/daunais.m)\
**Post date:** [September 20, 2024, 6:52pm UTC](https://community.auth0.com/t/activate-attributes-features-of-database-connection/147648/5 "2024-09-20T18:52:48Z")

</div>

My mistake, just noticed that our version doesn’t match the latest, will update and try again.

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [September 20, 2024, 9:30pm UTC](https://community.auth0.com/t/activate-attributes-features-of-database-connection/147648/6 "2024-09-20T21:30:34Z")

</div>

Hi @daunais.m,

Sounds good. Let me know on your findings.

---

<div class="post-metadata">

**Author:** ![daunais.m](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/daunais.m/32/60691_2.png) [@daunais.m](https://community.auth0.com/u/daunais.m)\
**Post date:** [September 21, 2024, 1:57am UTC](https://community.auth0.com/t/activate-attributes-features-of-database-connection/147648/7 "2024-09-21T01:57:32Z")

</div>

Yeah, you were indeed right, with the correct version the options.attributes work wonder!  
Thanks

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [October 5, 2024, 1:57am UTC](https://community.auth0.com/t/activate-attributes-features-of-database-connection/147648/8 "2024-10-05T01:57:56Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
