Skip to content

Instance functions on resource typed params and outputs crash the build and are not proposed as completions #10994

@jeskew

Description

@jeskew

Discussed in #10992

Originally posted by jikuja June 16, 2023
I just used resourceTypedParamsAndOutputs experimental feature to simplify our PoC template. Here is the diff of the relevant changes: jikuja/azure-data-factory-runtime-aci@security-1...jikuja:azure-data-factory-runtime-aci:bicep-resource-param-outputs

The only issue I encountered is the fact that secureValue: ir.listAuthKeys().authKey1 is valid code according to intellisense but bicep build will crash. Changing that code to listAuthKeys(ir.id, ir.apiVersion).authKey1 solved the issue.

Feelings: This is a cool feature addition for Bicep. Passing resources instead of resource id and usage of existing key word is too verbose.


Alternative approach: jikuja/azure-data-factory-runtime-aci@security-1...jikuja:azure-data-factory-runtime-aci:id-plust-list-functions

  • Does not require experimental features
  • On our use case requires passing more parameters into module

Feelings: Usage pattern documentation of list*() methods without resource accessor is really limited. I should have noticed this approach earlier.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions