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

Static value analysis #1439

Closed
stan-sz opened this issue Feb 2, 2021 · 1 comment
Closed

Static value analysis #1439

stan-sz opened this issue Feb 2, 2021 · 1 comment

Comments

@stan-sz
Copy link
Contributor

stan-sz commented Feb 2, 2021

Bicep version
Bicep CLI version 0.2.328 (a13b032)

Describe the bug
A string value could be determined at build-time to avoid the warning.

To Reproduce

var redis_size = 'C2'
resource redis 'Microsoft.Cache/Redis@2019-07-01' = {
    name: 'redis'
    location: 'westus'
    properties: {
        sku: {
            name: 'Standard'
            family: first(redis_size)
            capacity: int(last(redis_size))
        }
    }
}

Building the file above yields a warning:

Warning BCP036: The property "family" expected a value of type "'C' | 'P'" but the provided value is of type "string".

Possibly related to #795

@ghost ghost added the Needs: Triage 🔍 label Feb 2, 2021
@alex-frankel
Copy link
Collaborator

Closing as dup of #444

@ghost ghost locked as resolved and limited conversation to collaborators May 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants