Open devnev opened 4 months ago
This is what we call "a relaxed enum", Azure specs define it like this:
"type": {
"description": "The type of the Security policy to create.",
"enum": [
"WebApplicationFirewall"
],
"type": "string",
"x-ms-enum": {
"name": "SecurityPolicyType",
"modelAsString": true
}
}
You can see that they instruct us to accept any string in this property with "modelAsString": true
. We generate a helper enum, but don't require its usage.
What happened?
Defining a cdn.SecurityPolicy, the Parameters.Type field (type StringInput) should be populated with the value "WebApplicationFirewall", for which there is a const cdn.SecurityPolicyTypeWebApplicationFirewall - however this has type cdn.SecurityPolicyType which doesn't implement the methods for a StringInput - as far as I can tell this is something most other enums do. As an aside, having fields with enum-y values be StringInputs instead of the enum type makes it hard to discover that there is an enum type.
Example
The
pulumi.String()
call in the above example seems like it shouldn't be necessaryOutput of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).