remove support for providers() function in bicep
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
The JSON template language has a providers() function that returns information from the /providers api at run-time. The most common (may only) use case I've seen for this is
```providers().apiVersions[0]```
and using that in a list*() function to supply an apiVersion for the POST. The problem this creates is that the function is not deterministic... the "first" apiVersion will change over time (which changes the shape of the response) and it also doesn't indicate "latest" which is a mistaken common understanding.
TLDR; use of the function will eventually break your code even though you didn't change anything.
The function should be deprecated in ARM, though that would be a harder breaking change. In Bicep we can prevent the problem before it starts.
If we don't allow the fn, and there are valid use cases for it, we can always add it.
Contributor guide
Assessment
This issue has not been assessed yet.