Replies: 3 comments 8 replies
-
I totally agree with your comments. I had to make ingress changes on the ACA, which get wiped out every time. I need to have multiple environments with exactly the same code, yet i need to deploy the ACR multiple times. Aspire has been amazing for local use, and to quickly put something up in test/stage/demo. However, we need more control in real life production stuff. I would suggest to leave the option to be able to leave the provisioning as a different process, and Aspire can configure specific ACAs/ACRs that have been previously created through another IaC process. |
Beta Was this translation helpful? Give feedback.
-
Ironically with the addition of Obviously it's better as we can now include Bicep within the app host, and have it in the actual deployable files by calling In our scenario, we have a bicep file that ingests the managed identity from the default set of resources created. So we can go in and change the Any change to the bicep in question requires an infra synth to stay in sync, and obviously wipes out this change. This is just 1 extra file, but there are of course other scenarios wherein there would be more each requiring changes in the future. With The only stable option at this point remains to keep bicep separate from the set of files from Side note, Aspire specific you can workaround needing to edit the |
Beta Was this translation helpful? Give feedback.
-
@rudiv , I'm curious on learning more about your use-case. Ideally, when you use .netAspire, you will not call Actually, there are two main scenarios when you want to use
There are some changes happening for .netAspire for preview5 which will hopefully eliminate the first scenario. You will be able to define everything for a resource, like you do with bicep, but using the AppHost. You can see some initial examples here: https://github.com/dotnet/aspire/blob/main/playground/cdk/CdkSample.AppHost/Program.cs#L44 After that, the scenario for running Once you commit the infrastructure to your repo, your version-control, like git, should help you to easily see new changes if you ever need to update it by running infra synth again. |
Beta Was this translation helpful? Give feedback.
-
I know this is somewhat Aspire related, but it's azd that is providing the limited options when it comes to
infra synth
. Yes, I know it's also an alpha. Yes, I know this is a tool targeted at developers.In a relatively large project that will be extended further and further as time goes on, the usefulness of synthesising a production infrastructure-as-code becomes limited to the first run and subsequent runs only for new projects.
I'm talking specifically about this resulting confirmation after the first run:
In the real world, the generated files are (somewhat) useless, in so far as for a production environment, proper naming, extra resources and further configuration of the generated files becomes very important.
The options presented are a simple brute force all or nothing (well, new file only) approach, with no change detection baked in to the tool (say for example if a
containerApp.tmpl.yaml
wasn't changed as a result of this synth it's still overwritten).Whilst it's great that for brand new services the files are still output, if the resources.bicep was changed (consider the Redis cache which by default it deploys the ACA Service but as a container, yet in the real world that would likely point to an Azure Cache for Redis instance so would be configured) there is no way to see what differences would actually be made.
I'm not saying I have a solution for this, but something as simple as separating out the resources.bicep in to different files could be beneficial. In the above scenario if there were 2 caches, 1 at the time of the first synth and another added later, having cache-name.bicep and cache-name2.bicep, allowing them to be configured would work as the cache-name2.bicep could be generated whilst untouching the first. Granted I know Bicep has limitations in what can be shared, but putting everything that isn't a separate project in to one file just seems wrong.
Another option could be presenting the diff of the files directly so they can be manually applied in an easier way? Again, not ideal, but better than all or nothing.
There are relatively simple workarounds such as moving the configured resources to separate files and replacing the "wrong" bits or re-adding additional references in the newly overwritten
resources|main.bicep
files.Just curious as to what the stance is on this and if there are any more plans given the early stages? Maybe it's just intended as a starting point and everything is meant to be manual after this point?
Beta Was this translation helpful? Give feedback.
All reactions