# It is possible to import / export tag rules between tennants?

**URL:** <https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483>\
**Category:** Open Q&A\
**Tags:** tagging, dynatrace-saas\
**Created:** [February 27, 2025, 10:24am UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483 "2025-02-27T10:24:16Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarlosTF](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@CarlosTF](https://community.dynatrace.com/u/CarlosTF)\
**Post date:** [February 27, 2025, 10:24am UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/1 "2025-02-27T10:24:16Z")

</div>

Good morning.

We’ve got to SaaS Dynatrace environment.

In the Dev one I’ve created a set of automatic tag rules I’m happy with and I would like to know if there is a easy way to get that set of rules from that teenant and moved it into the Prod teenant.

Maybe using the API can be a solution.

I’ve managed to get the list of automatic tag rules by running:

curl -X GET “https://{environmentid}.live.dynatrace.com/api/v2/settings/objects?schemaIds=builtin%3Atags.auto-tagging&scopes=environment&fields=objectId%2Cvalue” -H “Authorization: Api-Token my.token” -H “Content-Type: application/json” | jq .

Any idea.

Thank you all in advance!

---

<div class="post-metadata">

**Author:** ![gopher](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/gopher/32/5728_2.png) [@gopher](https://community.dynatrace.com/u/gopher)\
**Post date:** [February 27, 2025, 11:19am UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/2 "2025-02-27T11:19:32Z")

</div>

HI&nbsp;[@CarlosTF](https://community.dynatrace.com/user/87040)

You can use Monaco or the Terraform provided - which ever you prefer to manage this.  
I’ll go with Monaco as you’ll get a little more support from Dynatrace on this since it’s their preferred tool.

Documentation is here:&nbsp;[Dynatrace Configuration as Code — Dynatrace Docs](https://docs.dynatrace.com/docs/deliver/configuration-as-code)  
Example (inc. Auto Tag):&nbsp;[Deploy your first configuration — Dynatrace Docs](https://docs.dynatrace.com/docs/deliver/configuration-as-code/monaco/manage-configuration)  
Git Repo:&nbsp;[GitHub - Dynatrace/dynatrace-configuration-as-code: This tool automates deployment of Dynatrace Configuration to one or multiple Dynatrace environments.](https://github.com/Dynatrace/dynatrace-configuration-as-code)

I would recommend first taking a backup via monaco cli,&nbsp; which will give you all your configs (inc auto tags) in a format that you can then use going forward.&nbsp; e.g create a new repo and only copy across what you need to automate.

Anyway, have fun

---

<div class="post-metadata">

**Author:** ![CarlosTF](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@CarlosTF](https://community.dynatrace.com/u/CarlosTF)\
**Post date:** [February 27, 2025, 12:26pm UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/3 "2025-02-27T12:26:44Z")

</div>

Thank you very much gopher, I’ll give it a try

---

<div class="post-metadata">

**Author:** ![DanielS](https://avatars.discourse-cdn.com/v4/letter/d/3ab097/32.png) [@DanielS](https://community.dynatrace.com/u/DanielS)\
**Post date:** [February 27, 2025, 12:53pm UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/4 "2025-02-27T12:53:08Z")

</div>

As [@gopher](https://community.dynatrace.com/user/10565)&nbsp;indicates, the preferred option for Dynatrace is to use Monaco, but I find that in most cases doing it via [API](https://docs.dynatrace.com/docs/shortlink/api-v2-settings-get-schemas-builtin-tags-auto-tagging) is much faster and more direct. Especially for transferring configurations from one environment to another. I find Monaco ideal for having a backup of the configuration.

---

<div class="post-metadata">

**Author:** ![PacoPorro](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/pacoporro/32/36087_2.png) [@PacoPorro](https://community.dynatrace.com/u/PacoPorro)\
**Post date:** [February 27, 2025, 1:10pm UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/5 "2025-02-27T13:10:48Z")

</div>

The terraform provider is also a great tool for this scenario  
you can export the resource&nbsp;

> **[Terraform CLI commands](https://docs.dynatrace.com/docs/deliver/configuration-as-code/terraform/terraform-cli-commands)**
>
> This is a list of Terraform CLI commands.

```auto
dynatrace_autotag_v2

```

And load it to the new tenant.

> **[Migrate between different environments using Terraform](https://docs.dynatrace.com/docs/deliver/configuration-as-code/terraform/best-practices/terraform-best-practices)**
>
> Migrate between environments an Dynatrace tenants using Terraform.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [February 27, 2025, 1:54pm UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/6 "2025-02-27T13:54:18Z")

</div>

If you are looking to Pull Rules that are defined in a particular Tenant, Ive found that it is easy to just run an API export using the GET and then jumping over to your target Tenant and pasting it as a POST. Yes you will need to delete a few segments like the TAG ID as that ID is associated to the GET request and the new POST will generate its own ID.

Now with the recent designs, you wont be able to use the old tag API, youll need to use the “Settings - Objects” from the Envrionment V2. If you need the schema ID, you can go to the Auto tags and click the “…” in the upper right hand and select Schema Info:

 ![ChadTurner_0-1740663501198.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/6/667f243447d97357e9764398929239f122c99176.png)

You can also then select the Auto Tag&nbsp; and click the “…” you can then see the API just for that Tag segment as well:

 ![ChadTurner_1-1740663822355.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/5/f5e40c70d9c1ef7cd37019688280f3f361ad107a.png)

Then just paste in the Schema ID, pull the export, then shift to the post.

 ![ChadTurner_2-1740664078899.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/f/ef2bab2cfe8ecebc57cb46abd3c7bde93972aaf8.png)

If you are looking to Pull Rules that are defined in a particular Tenant, Ive found that it is easy to just run an API export using the GET and then jumping over to your target Tenant and pasting it as a POST. Yes you will need to delete a few segments like the TAG ID as that ID is associated to the GET request and the new POST will generate its own ID.

Now with the recent designs, you wont be able to use the old tag API, youll need to use the “Settings - Objects” from the Envrionment V2. If you need the schema ID, you can go to the Auto tags and click the “…” in the upper right hand and select Schema Info:

 ![ChadTurner_0-1740663501198.png](https://global.discourse-cdn.com/dynatrace/original/3X/6/6/667f243447d97357e9764398929239f122c99176.png)

You can also then select the Auto Tag&nbsp; and click the “…” you can then see the API just for that Tag segment as well:

 ![ChadTurner_1-1740663822355.png](https://global.discourse-cdn.com/dynatrace/original/3X/f/5/f5e40c70d9c1ef7cd37019688280f3f361ad107a.png)

Then just paste in the Schema ID, pull the export, then shift to the post.

 ![ChadTurner_2-1740664078899.png](https://global.discourse-cdn.com/dynatrace/original/3X/e/f/ef2bab2cfe8ecebc57cb46abd3c7bde93972aaf8.png)

 ![ChadTurner_0-1740664422533.png](https://global.discourse-cdn.com/dynatrace/original/2X/2/24365e98a027441d68eefda73e667c5346771427.png)

---

<div class="post-metadata">

**Author:** ![CarlosTF](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@CarlosTF](https://community.dynatrace.com/u/CarlosTF)\
**Post date:** [February 28, 2025, 1:43pm UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/7 "2025-02-28T13:43:24Z")

</div>

What a positive surprised seing so many people trying to help.

I appreciate all your answer a lot. Thank you all 🙂  
Right now we are backing up the Prd teenant so probably we wont tackle this until next Monday.  
Anyway, the Terraform seemed the most suitable way until&nbsp;[@ChadTurner](https://community.dynatrace.com/user/14877)&nbsp;explained how to use the API.&nbsp;  
It took me some tries to make it work but I could export the tag rules object and create a new tag with a similar name to check how to do it and it worked great. So I think that, being confortable with the howto, using the API is going to be my choice once the backup is done.

I’ll keep you reported.  
Thank you all again and have a great WK

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [February 28, 2025, 1:50pm UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/8 "2025-02-28T13:50:32Z")

</div>

There are many ways that you can achieve the desired outcome, just what best fits your needs and skill sets. You could then even move towards a script to do it all for you! I’m thrilled with all the responses and options we all provided you, a true ‘community’ effort for sure!

---

<div class="post-metadata">

**Author:** ![StrangerThing](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/strangerthing/32/12182_2.png) [@StrangerThing](https://community.dynatrace.com/u/StrangerThing)\
**Post date:** [February 28, 2025, 2:03pm UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/9 "2025-02-28T14:03:53Z")

</div>

We use Monaco for pushing and pulling configurations from one tenant to another. However you need to be careful with scoping because there’s a lot of ID use and ID’s are tenant specific. We’re moving to the Terraform provider to help with some of this translation.

---

<div class="post-metadata">

**Author:** ![CarlosTF](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@CarlosTF](https://community.dynatrace.com/u/CarlosTF)\
**Post date:** [March 4, 2025, 11:10am UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/10 "2025-03-04T11:10:30Z")

</div>

After getting a backup in the Prod teenant first, I ended finally using the API as&nbsp;[@ChadTurner](https://community.dynatrace.com/user/14877)&nbsp;suggested to do the export and it work perfectly well. No issues at all.&nbsp;  
Thank you very much everybody for al the suggested approches which I would like one day to explore those other aprroches/capabilities.  
Thank you all again!!

---

<div class="post-metadata">

**Author:** ![Abidyaseen](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/abidyaseen/32/19726_2.png) [@Abidyaseen](https://community.dynatrace.com/u/Abidyaseen)\
**Post date:** [March 11, 2025, 9:18am UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/11 "2025-03-11T09:18:09Z")

</div>

Documentation is here:&nbsp;[Dynatrace Configuration as Code — Dynatrace Docs](https://docs.dynatrace.com/docs/deliver/configuration-as-code)

i have attached a word Doc file&nbsp; it will guide you step by step regarding how you can achieve it&nbsp;&nbsp;  
[Monaco Guide 1.0 1.docx](https://community.dynatrace.com/uploads/short-url/5C1Du1cOlTd5HDFQu0OUVLjEFmf.docx) (519 KB)

---

<div class="post-metadata">

**Author:** ![CarlosTF](https://avatars.discourse-cdn.com/v4/letter/c/dfb087/32.png) [@CarlosTF](https://community.dynatrace.com/u/CarlosTF)\
**Post date:** [March 12, 2025, 9:01am UTC](https://community.dynatrace.com/t/it-is-possible-to-import-export-tag-rules-between-tennants/50483/12 "2025-03-12T09:01:23Z")

</div>

Thank you very much [@Abidyaseen](https://community.dynatrace.com/user/63100)&nbsp;, I’ll take a look to that too 🙂
