Azure / azure-dev

A developer CLI that reduces the time it takes for you to get started on Azure. The Azure Developer CLI (azd) provides a set of developer-friendly commands that map to key stages in your workflow - code, build, deploy, monitor, repeat.
https://aka.ms/azd
MIT License
402 stars 195 forks source link

Allow for service-level provisions #2650

Open savannahostrowski opened 1 year ago

savannahostrowski commented 1 year ago

For example, suppose I'm a new dev to the contoso real estate app. How do I provision only the cms service?

Originally posted by @diberry in https://github.com/Azure/azure-dev/discussions/2649

savannahostrowski commented 1 year ago

We have a similar pattern for deploy but not for provision.

vhvb1989 commented 1 year ago

I talked about this to @ellismg some time ago. One approach here is by supporting azd-nested projects. From a root azure.yml, users could add a new service with type azd.
When calling azd provision, azd would use the top-level infra folder, and then it would call azd provision to each nested-azd project.

That would allow folks to split a big system with many apps.

savannahostrowski commented 1 year ago

I think that the issue we are going to have here is that this doesn't map 1:1 with how application developers think about their application. I think ideally we'd end up with deploy and provision behaving the same way because that's the easiest thing to understand but I recognize that's not really possible today.

Might be worth revisiting this after we think through IaC abstraction in Germanium.

jongio commented 12 months ago

We could do with one bicep, but hacky. It would be a mix of env var setting and checking. If --service=cms, then set env var, and then read that env var into the bicep and have a conditional in the bicep.