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

Confusing error message on 4.x #324

Open
t0yv0 opened this issue Jun 2, 2023 · 1 comment
Open

Confusing error message on 4.x #324

t0yv0 opened this issue Jun 2, 2023 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@t0yv0
Copy link
Member

t0yv0 commented Jun 2, 2023

What happened?

import * as pulumi from "@pulumi/pulumi";
import * as okta from "@pulumi/okta";

export const customPolicy = new okta.PolicyProfileEnrollment('custom-policy', {
    name: 'example',
    status: 'ACTIVE'
});

Gives:

  okta:index:PolicyProfileEnrollment (custom-policy):
    error: 1 error occurred:
        * failed to create profile enrollment policy: the API returned an error: The request was not valid: Invalid policy type specified.

But on 3.22.0 it would give:

  okta:index:PolicyProfileEnrollment (custom-policy):
    error: 1 error occurred:
        * "okta_policy_profile_enrollment" is a resource for OIE Orgs only, see https://registry.terraform.io/providers/okta/okta/latest/docs/resources/policy_profile_enrollment

Which was more informative.

Expected Behavior

Retain quality of error messages

Steps to reproduce

See above

Output of pulumi about

CLI          
Version      3.68.1-dev.0
Go Version   go1.20.1
Go Compiler  gc

Plugins
NAME    VERSION
nodejs  unknown
okta    4.0.0

Host     
OS       darwin
Version  13.3.1
Arch     x86_64

This project is written in nodejs: executable='/Users/t0yv0/.nix-profile/bin/node' version='v18.12.1'

Current Stack: t0yv0/okta-291/dev

TYPE                   URN
pulumi:pulumi:Stack    urn:pulumi:dev::okta-291::pulumi:pulumi:Stack::okta-291-dev
pulumi:providers:okta  urn:pulumi:dev::okta-291::pulumi:providers:okta::default_4_0_0
pulumi:providers:okta  urn:pulumi:dev::okta-291::pulumi:providers:okta::default_3_22_0


Found no pending operations associated with dev

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/t0yv0
User           t0yv0
Organizations  t0yv0, pulumi

Dependencies:
NAME            VERSION
@pulumi/okta    4.0.0
@pulumi/pulumi  3.69.0
@types/node     16.18.34

Pulumi locates its logs in /var/folders/gk/cchgxh512m72f_dmkcc3d09h0000gp/T/ by default

Additional context

Potentially related okta/terraform-provider-okta#1311

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

@t0yv0 t0yv0 added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jun 2, 2023
@AaronFriel
Copy link
Contributor

This function in the upstream provider is what logs the higher quality message:

https://github.com/okta/terraform-provider-okta/blob/4f1c1ad7b4b7e2e4c0140758bda01c4e22ba94fb/okta/provider.go#L453-L462

And it looks like it would be logged here:

https://github.com/okta/terraform-provider-okta/blob/4f1c1ad7b4b7e2e4c0140758bda01c4e22ba94fb/okta/resource_okta_policy_profile_enrollment.go#L34-L37

Is this a bridge issue not passing through the upstream diagnostic?

@AaronFriel AaronFriel removed the needs-triage Needs attention from the triage team label Jun 6, 2023
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