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

Pulumi CLI returns error 400 when listing policies if no policies are present #315

Open
scottslowe opened this issue Oct 10, 2023 · 1 comment
Labels
feature/pac Impacts the Policy as Code offering kind/bug Some behavior is incorrect or out of spec

Comments

@scottslowe
Copy link

What happened?

I ran pulumi policy ls against a Pulumi Cloud organization (zephyr) that does have Policy as Code enabled. The command returns this output:

error: List Policy Packs failed: [400] Bad Request: Policy as code feature not enabled.

However, this is incorrect, because I am able to publish policy packs.

Example

  1. Remove all policy packs from the organization.
  2. Run pulumi policy ls.

Output of pulumi about

CLI
Version 3.88.0
Go Version go1.21.2
Go Compiler gc

Host
OS darwin
Version 13.5.2
Arch arm64

Backend
Name pulumi.com
URL https://app.pulumi.com/slowe-pulumi-corp
User slowe-pulumi-corp
Organizations slowe-pulumi-corp, zephyr, pulumi
Token type personal

Additional context

@pierskarsenbarg has said he can also reproduce the error in his Pulumi Cloud organization

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

@scottslowe scottslowe added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Oct 10, 2023
@pierskarsenbarg
Copy link
Member

To add context, I was seeing the same error message on an org that does have policies added.

@justinvp justinvp added feature/pac Impacts the Policy as Code offering and removed needs-triage Needs attention from the triage team labels Oct 11, 2023
@justinvp justinvp self-assigned this Oct 11, 2023
@justinvp justinvp added this to the 0.95 milestone Oct 11, 2023
@justinvp justinvp modified the milestones: 0.95, 0.96 Oct 24, 2023
@mikhailshilkov mikhailshilkov modified the milestones: 0.96, 0.97 Nov 23, 2023
@justinvp justinvp modified the milestones: 0.97, 0.98 Dec 18, 2023
@justinvp justinvp modified the milestones: 0.98, 0.99 Jan 8, 2024
@justinvp justinvp modified the milestones: 0.99, 0.100 Jan 29, 2024
@justinvp justinvp removed their assignment Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/pac Impacts the Policy as Code offering kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

4 participants