Override props on Container Apps Environment in AppHost #6371
-
When Aspire creates a container apps environment it looks like this resource containerAppEnvironment 'Microsoft.App/managedEnvironments@2024-02-02-preview' = {
name: 'cae-${resourceToken}'
location: location
properties: {
workloadProfiles: [{
workloadProfileType: 'Consumption'
name: 'consumption'
}]
appLogsConfiguration: {
destination: 'log-analytics'
logAnalyticsConfiguration: {
customerId: logAnalyticsWorkspace.properties.customerId
sharedKey: logAnalyticsWorkspace.listKeys().primarySharedKey
}
}
}
tags: tags
resource aspireDashboard 'dotNetComponents' = {
name: 'aspire-dashboard'
properties: {
componentType: 'AspireDashboard'
}
}
} I would like to customize some properties. How can I control subnet for example? vnetConfiguration: {
infrastructureSubnetId: subnet.id
} Or to override logAnalyticsWorkspace to use the existing one. I can just manually change this in the resources file after I have done azd infra synth and deploy using the created bicep files. But we want less manual operations, not more. Since subnet must be set during creation, I can't use builder.AddBicepTemplate to update the resource. Is there a way this can be done inside the AppHost? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Not yet. In Aspire 9 we allow you to change the container app but not the environment or related resources. That will come in update soon after. |
Beta Was this translation helpful? Give feedback.
Not yet. In Aspire 9 we allow you to change the container app but not the environment or related resources. That will come in update soon after.