Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block runtime functions in deploy-time constant syntaxes #2622

Closed
shenglol opened this issue May 11, 2021 · 0 comments · Fixed by #2769
Closed

Block runtime functions in deploy-time constant syntaxes #2622

shenglol opened this issue May 11, 2021 · 0 comments · Fixed by #2769
Assignees
Labels
bug Something isn't working
Milestone

Comments

@shenglol
Copy link
Contributor

shenglol commented May 11, 2021

Bicep version
Bicep CLI version 0.3.500 (cca422d)

Describe the bug

resource publicIPAddress 'Microsoft.Network/publicIPAddresses@2019-11-01' = {
  // Runtime error. This should be blocked.
  name: listKeys('foo', '2012-01-01')[0].value

  location: resourceGroup().location
  properties: {
    publicIPAllocationMethod: 'Dynamic'
    dnsSettings: {
      domainNameLabel: 'dnsname'
    }
  }
}
@ghost ghost added the Needs: Triage 🔍 label May 11, 2021
@shenglol shenglol added bug Something isn't working and removed Needs: Triage 🔍 labels May 11, 2021
@shenglol shenglol added enhancement New feature or request and removed bug Something isn't working labels May 11, 2021
@shenglol shenglol added this to the v0.4 milestone May 18, 2021
@shenglol shenglol self-assigned this May 21, 2021
@shenglol shenglol added bug Something isn't working and removed enhancement New feature or request labels May 21, 2021
shenglol added a commit that referenced this issue May 26, 2021
* Refactor DTC visitors

* Add scenario tests for issue #2622 and #2291

* Remove DTC checking logic from ForSyntaxValidatorVisitor

* Handle more corner cases

* Address comments

* Add a test case

* Fix pattern matching for FunctionFlags.RequiresInlining

* Drop a default parameter value
@ghost ghost locked as resolved and limited conversation to collaborators May 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant