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

policyId property in ApiOperationPolicy is misleading #3960

Open
otahirs opened this issue Feb 18, 2025 · 1 comment
Open

policyId property in ApiOperationPolicy is misleading #3960

otahirs opened this issue Feb 18, 2025 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@otahirs
Copy link
Contributor

otahirs commented Feb 18, 2025

What happened?

pulumi allows specifying the policyId property for ApiOperationPolicy
but this field cannot contain any other value than policy according to azure api validation

Example

code example

new azure_native.apimanagement.ApiOperationPolicy('my-resource-name-policy',
    {
      policyId: 'foo' 
      ...
    },
    {},
  );

error prom pulumi up

2025-02-07T13:33:08   azure-native:apimanagement:ApiOperationPolicy (my-resource-name-policy):
2025-02-07T13:33:08     error: Status=400 Code="ValidationError" Message="Name should only be 'policy' for policies entity."

Output of pulumi about

CLI
Version      3.145.0
Go Version   go1.23.4
Go Compiler  gc

Host
OS       Microsoft Windows 11 Enterprise
Arch     x86_64

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).

@otahirs otahirs added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Feb 18, 2025
@otahirs otahirs changed the title policyId property inApiOperationPolicy is misleading policyId property in ApiOperationPolicy is misleading Feb 18, 2025
@rquitales rquitales removed the needs-triage Needs attention from the triage team label Feb 19, 2025
@rquitales
Copy link
Member

Thanks for reporting this issue. From the upstream REST API specs, I can see that this field is modeled as an enum with only policy as a valid value. This is consistent with what you've observed. I'll add this to our backlog to ensure enum validation occurs within our provider.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants