---
title: "Comment by Alejandro Barone on \"How To Manage an Amazon Bedrock Agent Using Terraform\" | Hashnode"
description: "Awesome!!, but how do you handle aliases and versioning with preparing? Am having a problem when creating an alias in TF because it needs to be \"prepared\" to do"
url: "https://hashnode.com/posts/how-to-manage-an-amazon-bedrock-agent-using-terraform/6631c56c95bfbcda61a25f54/comment/67b9587dfc9d2529ed153938"
---

[Discussion](https://hashnode.com/posts/how-to-manage-an-amazon-bedrock-agent-using-terraform/6631c56c95bfbcda61a25f54)

Comment [How To Manage an Amazon Bedrock Agent Using Terraform](https://hashnode.com/posts/how-to-manage-an-amazon-bedrock-agent-using-terraform/6631c56c95bfbcda61a25f54)

[Alejandro Barone](https://hashnode.com/@alejandrombc)

[Feb 22, 2025](https://hashnode.com/posts/how-to-manage-an-amazon-bedrock-agent-using-terraform/6631c56c95bfbcda61a25f54/comment/67b9587dfc9d2529ed153938)

Awesome!!, but how do you handle aliases and versioning with preparing?

Am having a problem when creating an alias in TF because it needs to be "prepared" to do so. Should I use some depends on my alias using the null resource? (or something like that)

[Anthony Wat](https://hashnode.com/@acwwat)

[Mar 2, 2025](https://hashnode.com/posts/how-to-manage-an-amazon-bedrock-agent-using-terraform/6631c56c95bfbcda61a25f54/comment/67b9587dfc9d2529ed153938#reply-67c4d9c06cb44d1271551e8a)

Thanks for your comment.

An alias must be (re-created) when there are changes that require preparing, so the agent resource and the null resource for preparing action group changes should be added to `depends_on` for the alias resource.

Furthermore, the alias must be re-created upon changes to the above. So you may need to use the `replace_triggered_by` meta-argument to force re-creation based on changes to the agent and the null resource's ID. I've not yet tried this myself but see if this works.
