Replies: 2 comments
-
After the first provision of Azure resources, it will create/amend a .NET secrets file. On subsequent runs, if a resource exists in the secrets file, it assumes it exists in Azure and won't try to recreate it. |
Beta Was this translation helpful? Give feedback.
-
Thanks @yarseyah, I think that file is so secret that I don't know where it is 😄 It sounds like it's probably not the ideal mechanism for sharing a resource across a team, though it could work I guess. I've gone down the route of using the 'builder.ExecutionContext.IsPublishMode' switch to provision a database with azd and use a connection string locally. I feel like there's potential for an easier way, but will post as an idea. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to provision one Azure Cosmos Db instance/database in Azure, and that to be then used by other devs locally as well as by the deployed development environment.
I notice on 'azd provision --preview' that the database and key vault it will create have a random set of characters at the end of their name. Does this mean during debug, it will create these resources again uniquely for me, and if someone else runs this on their machine, they'll get their own instances, and the Azure DevOps will create a new db again when it does it's provision/deploy?
Is there a way to say that within the scope of the targeted resource group in azure, I want it to provision one instance of this resource with this specific name (ideally without the random characters)? I'm a bit confused as to what I'm going to get, and don't want duplicate databases. I'd like Aspire to be responsible to creating the db rather than me creating it manually and using 'AddConnectionString', but am a bit confused how to do this in a way that creates this shared resource.
Similarly, if I want to use the same database in another Aspire solution (but have the original one as the 'owner/creator' of the resource), how would I reference it in the other Aspire project?
Beta Was this translation helpful? Give feedback.
All reactions