# A0deploy AUTH0\_KEYWORD\_REPLACE\_MAPPINGS with boolean value

**URL:** <https://community.auth0.com/t/a0deploy-auth0-keyword-replace-mappings-with-boolean-value/186147>\
**Category:** Get Help\
**Tags:** other, missing-category\
**Created:** [April 30, 2025, 3:17pm UTC](https://community.auth0.com/t/a0deploy-auth0-keyword-replace-mappings-with-boolean-value/186147 "2025-04-30T15:17:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![danclarke](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/danclarke/32/17243_2.png) [@danclarke](https://community.auth0.com/u/danclarke)\
**Post date:** [April 30, 2025, 3:17pm UTC](https://community.auth0.com/t/a0deploy-auth0-keyword-replace-mappings-with-boolean-value/186147/1 "2025-04-30T15:17:59Z")

</div>

I’m using a0deploy in my pipeline, and using `AUTH0_KEYWORD_REPLACE_MAPPINGS` to support different values for each deployment environment (eg. dev, qa, staging, prod). This is working fine. However, I’m now trying to add a replacement value that’s a boolean…

```auto
{
    // ...snip...

    "AUTH0_PRESERVE_KEYWORDS": true,
    "AUTH0_KEYWORD_REPLACE_MAPPINGS": {
        "ENABLE_BRUTE_FORCE_PROTECTION": false
    }

    // ...snip...
}

```

 ![image](https://global.discourse-cdn.com/auth0/original/3X/e/3/e3b4eb3ba6b8a9464b0a117c787dcb64dcbb5988.png)

In that tenant.yaml screenshot - if I don’t include the single quotes, then a0deploy export overrides that with whatever the real value from the tenant is. Ie. ignoring `AUTH0_PRESERVE_KEYWORDS=true`. Given it’s a bool, I’d expect to not have the quotes around it. I’m assuming the “#” is breaking it, as that makes it a YAML comment?

If I include those single quotes - then the `a0deploy import` fails saying…

“Payload validation error: ‘Expected type boolean but found type string’ on property enabled (Whether or not brute force attack protections are active).”

Which makes sense.

Does this not support boolean / non-string values?

---

<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:** [April 30, 2025, 7:21pm UTC](https://community.auth0.com/t/a0deploy-auth0-keyword-replace-mappings-with-boolean-value/186147/3 "2025-04-30T19:21:17Z")

</div>

Hi @danclarke,

Thanks for your question.

Yes, it’s true that using the “#” causes it to become a YAML comment. One workaround you might consider is using the @@ARRAY\_REPLACE@@ syntax instead.

I recommend referring to our [Keyword Preservation not Working with Configurations such as Action Secrets and Flow Actions](https://community.auth0.com/t/keyword-preservation-not-working-with-configurations-such-as-action-secrets-and-flow-actions/120379) knowledge article for more specifics on how to accomplish this.

Let me know if you have any questions about this.

Best,  
Rueben

---

<div class="post-metadata">

**Author:** ![danclarke](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/danclarke/32/17243_2.png) [@danclarke](https://community.auth0.com/u/danclarke)\
**Post date:** [May 1, 2025, 10:26am UTC](https://community.auth0.com/t/a0deploy-auth0-keyword-replace-mappings-with-boolean-value/186147/4 "2025-05-01T10:26:55Z")

</div>

Thanks, this works. However, I am a bit concerned that this is now hard-coding the entire `bruteForceProtection` JSON block (when I just want to replace a boolean field’s value).

This means that if Auth0 ever change any fields within that `bruteForceProtection` JSON block, my hardcoded replacement-mapping is going to trash over it.

It does seem a bit strange that this replacement mapping doesn’t support a fundamental data type like a boolean. Especially when a lot of Auth0 settings are booleans (on/off).

This is too limiting - so I think I’m either going to swap out the templating side of things with something else like Handlebars or T4.

Or alternatively, spike the Terraform provider.

Thanks for your help though, and quick reply - that’ll certainly work as a short-term fix.

---

<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:** [May 3, 2025, 12:32am UTC](https://community.auth0.com/t/a0deploy-auth0-keyword-replace-mappings-with-boolean-value/186147/5 "2025-05-03T00:32:52Z")

</div>

Hi @danclarke,

Thanks for your response.

I completely understand, and I’m glad you are able to use this as a short-term fix.

If it helps, you could try raising this concern directly to the [Auth0 Deploy CLI Github repo](https://github.com/auth0/auth0-deploy-cli/issues) for extra help.

Kind regards,  
Rueben

---

<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:** [May 17, 2025, 12:33am UTC](https://community.auth0.com/t/a0deploy-auth0-keyword-replace-mappings-with-boolean-value/186147/6 "2025-05-17T00:33:41Z")

</div>

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