-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Resource: azurerm_bot
#13832
New Resource: azurerm_bot
#13832
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR @howlowck. Overall this look good, there are just a few suggestions regarding the error messages. However I recently stumbled across another generic resource which should actually have been split into a base resource + a resource for each scope. This is done because of the way the Azure API behaves and for UX reasons. Before approving this I'd like to check internally first whether that would apply here too.
Co-authored-by: stephybun <[email protected]>
Co-authored-by: stephybun <[email protected]>
Co-authored-by: stephybun <[email protected]>
Co-authored-by: stephybun <[email protected]>
Co-authored-by: stephybun <[email protected]>
Co-authored-by: stephybun <[email protected]>
Co-authored-by: stephybun <[email protected]>
Co-authored-by: stephybun <[email protected]>
Hi @howlowck, this is indeed a case where this resource should be split into a base resource and a resource with tests for
More information on why we take this approach can be found in this issue comment. Since the example I provided is also a typed resource (it may not look as familiar), I'm happy to take a look at this and to provide the base resource. You are of course more than welcome to have a crack at this too. Let me know what you think. Thanks! |
Hi @stephybun! Thank you for your thoughtful response, and sorry for the late reply (I was on vacation). Responding to your suggestion:
I'd love it if you can take a look and provide a base resource, and I'd be happy to then build additional resources if necessary. Thanks again! |
Closing in favour of #14462 |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
Issue
fixes #12522
Changes
azurerm_bot
Tests:
Addressing Potential Questions
This looks like it's a carbon copy of
azurerm_bot_web_app
with minor changes.azurern_bot_web_app
has a hard-codedkind="sdk"
, why not just make thekind
in theazurerm_bot_web_app
resource configurable?The Web App Bot is a specific Terraform resource. This PR could be a lot smaller if I just made the
kind
configurable inazure_bot_web_app
. However it would dilute the intent of the Terraform resource. Creating anazure_bot_web_app
withkind="azurebot"
, will not longer make a Web App Bot, but an "Azure Bot". Additionally, there are conditionals that are specific to web app bot which could lead to compatibilities or regression issues if removed.