Azure / Azure/bicep

Outputing a nested resource in a module results in deployment errors

Open
#12,894 1 comment 0 reactions 1 assignee Claimed by @jeskew View on GitHub
bug story: resource typed params
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 21m
Merged PRs (30d)
79

Description

### Discussed in https://github.com/Azure/bicep/discussions/12890

Originally posted by **jahead** January 2, 2024
Hey another question #sorry.
I know `resourceTypedParamsAndOutputs` is not GA but, I was just wondering if this is a `bug | future planned work | out-scope`
I currently have a module

image

`standard-app-service` does a bunch of things, but ends like this.
`output appService resource = appService` - with is a `resource appService 'Microsoft.Web/sites@2023-01-01'`

I then use the output in another parent module.
The deployment works fine but azure deployment reports an error when completing the intermediate module.

`The template output 'appService' is not valid: The language expression property 'id' can't be evaluated.. (Code: DeploymentOutputEvaluationFailed, Target: appService)`

TLDR:
`moduleA.outputs.appService` -> `moduleB.outputs.appservice` -> `output resource appService`
results in: `The template output 'appService' is not valid: The language expression property 'id' can't be evaluated.. (Code: DeploymentOutputEvaluationFailed, Target: appService)`

If this a bug then I'll happily report it, otherwise just looking for clarity if this a known limitation, so I can design around it?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.