Modify Web App + MongoDB sample to add Network Services and Log Analytics#53
Conversation
bryansan-local
left a comment
There was a problem hiding this comment.
In the case of Terraform, I would say it is far better, cleaner and with less amount of files if instead of having multiple terraform modules we just have one terraform file per resource. Like instead of having this structure:
app_service_plan:
- main.tf
- outputs.tf
- variables.tf
just do app_service_plan.tf with no variables nor outputs blocks. Just use the resource block
that will remove the whole ceremony of variables.tf and output.tf. I would understand the current structure if this module were going to be reused or shared outside of the samples like the AVM initiative of microsoft but here it is only used by this sample sooo.... in my head is unnecessary.
Yea in Bicep we are forced to use the modules structure even when is not necessary (hence why i hate it) but in terraform we don't have to.
PS: I don't really want to open an unhealthy 1h debate like the ones we always have sooo if you dont agree with my perspective I wont be a blocker for this PR
e85eddc to
34995a0
Compare
Thanks for the feedback @bryansan-local! I appreciate the perspective. The modular approach, where each resource is encapsulated in its own module with
I hope this clarifies my approach and why we'll use this approach from now on for complex projects. P.S. No AI assistant was used to create this comment 🙂 |
Modify Web App + MongoDB sample to add Network Services and Log Analytics
Description
This pull request modifies the Azure Web App with Azure Cosmos DB for MongoDB sample by adding the following resources:
The pull requests modifies also the following artifacts:
README.mdfilesTesting
All the samples have been successfully deployed on both Azure and latest version of the LocalStack for Azure emulator.