Open vc2023 opened 1 month ago
@vc2023 Could you please provide more context on the objective of this setup? I noticed that the infrastructureSubnetId parameter is currently commented out in your Bicep file (//infrastructureSubnetId: infrastructureSubnetId).
Would you be able to try uncommenting this line to enable the infrastructureSubnetId and test if it addresses the configuration requirements? Let us know the outcome,
Hi @v-vish
yes infrastructureSubnetId is currently commented, in order to run the deployment quicker.
I don't think I need networking in order to be able to set/get infrastructureResourceGroup
, do I?
I just want to be able to set the infrastructureResourceGroup: infrastructureResourceGroup
property.
And then I want to gt the infrastructureResourceGroup as output parameter output infrastructureResourceGroup string = managedEnvironment.properties.infrastructureResourceGroup
I just want to use this output parameter for the next step/module as input parameter in deployment process in order to get the internal load balancer.
module lbi 'services/load-balancer.bicep' = {
name:'lbi--${envName}'
params:{
infrastructureResourceGroup:containerAppEnvironmentInternal.outputs.infrastructureResourceGroup
}
}
param infrastructureResourceGroup string
resource lbi 'Microsoft.Network/loadBalancers@2023-09-01' existing = {
name:'kubernetes-internal'
scope:resourceGroup(infrastructureResourceGroup)
}
output loadBalancerFipId string = lbi.properties.frontendIPConfigurations[0].id
But I get the following error
{"code":"DeploymentOutputEvaluationFailed","target":"/subscriptions/9e3423d5-9fb5-4d91-a647-edf09b1bfc82/resourceGroups/rg-carat-platform-dev/providers/Microsoft.Resources/deployments/container-app-environment-dev-internal","message":"Unable to evaluate template outputs: 'infrastructureResourceGroup'. Please see error details and deployment operations. Please see https://aka.ms/arm-common-errors for usage details.","details":[{"code":"DeploymentOutputEvaluationFailed","target":"infrastructureResourceGroup","message":"The template output 'infrastructureResourceGroup' is not valid: The provided value for the template output 'infrastructureResourceGroup' is not valid. Expected a value of type 'String, Uri', but received a value of type 'Null'. Please see https://aka.ms/arm-create-parameter-file for usage details.."}]}
The issue is related to the following #1118 issue, which was closed. Below is my bicep module which still returns Null. What am I doing wrong? Maybe workload profile is wrong?