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

okta.idp.Oidc creation fails #649

Closed
michaeldop opened this issue Jun 18, 2024 · 3 comments · Fixed by #650
Closed

okta.idp.Oidc creation fails #649

michaeldop opened this issue Jun 18, 2024 · 3 comments · Fixed by #650
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed

Comments

@michaeldop
Copy link

Describe what happened

Trying to create an okta.idp.Oidc resource results in a panic. I believe this is due to not mapping the schema field, pkceRequired, highlighted here #594 (comment).

The stack trace points to this line https://github.com/okta/terraform-provider-okta/blob/v4.8.1/okta/resource_okta_idp_oidc.go#L232

Sample program

new okta.idp.Oidc('idp', {
  issuerUrl: 'https://login.test.com/oauth2/default',
  authorizationUrl: 'https://login.test.com/oauth2/default/v1/authorize',
  authorizationBinding: 'HTTP-REDIRECT',
  jwksUrl: 'https://login.test.com/oauth2/default/v1/keys',
  jwksBinding: 'HTTP-REDIRECT',
  tokenUrl: 'https://login.test.com/oauth2/default/v1/token',
  tokenBinding: 'HTTP-POST',
  userInfoUrl: 'https://login.test.com/oauth2/default/v1/userinfo',
  userInfoBinding: 'HTTP-REDIRECT',
  name: 'Test IDP',
  clientId: '123456789',
  clientSecret: '*******************',
  issuerMode: 'DYNAMIC',
  scopes: ['openid', 'profile', 'email'],
});

Log output

 panic: value has no attribute of that name
    goroutine 275 [running]:
    github.com/hashicorp/go-cty/cty.Value.GetAttr({{{0x2e02bc8?, 0xc0007ad8a0?}}, {0x27844a0?, 0xc000ee7470?}}, {0x2ac512f, 0xd})
        /home/runner/go/pkg/mod/github.com/hashicorp/[email protected]/cty/value_ops.go:700 +0x2f1
    github.com/okta/terraform-provider-okta/okta.buildIdPOidc(0x441e108?)
        /home/runner/work/pulumi-okta/pulumi-okta/upstream/okta/resource_okta_idp_oidc.go:232 +0x23d
    github.com/okta/terraform-provider-okta/okta.resourceIdpCreate({0x2e02530, 0xc0003f4d20}, 0x0?, {0x28f0700?, 0xc000b98000})
        /home/runner/work/pulumi-okta/pulumi-okta/upstream/okta/resource_okta_idp_oidc.go:130 +0x7b
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc0002ecc40, {0x2e02488, 0xc000ee6810}, 0xd?, {0x28f0700, 0xc000b98000})
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:783 +0x11b
    github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0002ecc40, {0x2e02488, 0xc000ee6810}, 0x0, 0xc000a6f880, {0x28f0700, 0xc000b98000})
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:914 +0xa89
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2.v2Provider.Apply({0xc000056f00?, {0x0?, 0x29d5360?, 0x1?}}, {0x2e02488, 0xc000ee6810}, {0x2ac4dae, 0xd}, {0x0, 0x0}, ...)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfshim/sdk-v2/provider.go:131 +0x176
    github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge.(*Provider).Create(0xc000015980, {0x2e02488?, 0xc000ee63f0?}, 0xc000e2b9a0)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/[email protected]/pkg/tfbridge/provider.go:1109 +0x87e
    github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Create.func1({0x2e16d20?, 0xc000015980?})
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/[email protected]/muxer.go:375 +0x30
    github.com/pulumi/pulumi-terraform-bridge/x/muxer.resourceMethod[...](0xc0009dec60?, 0x40, 0xc000a816c0?)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/[email protected]/muxer.go:334 +0xb5
    github.com/pulumi/pulumi-terraform-bridge/x/muxer.(*muxer).Create(0x0?, {0x2e02488?, 0xc000ee63f0?}, 0x40?)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi-terraform-bridge/x/[email protected]/muxer.go:374 +0x65
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler.func1({0x2e02488, 0xc000ee63f0}, {0x29416e0?, 0xc000e2b9a0})
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/proto/go/provider_grpc.pb.go:593 +0x72
    github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc.OpenTracingServerInterceptor.func1({0x2e02488, 0xc000ee60c0}, {0x29416e0, 0xc000e2b9a0}, 0xc000be1e20, 0xc0006ed9f8)
        /home/runner/go/pkg/mod/github.com/grpc-ecosystem/[email protected]/go/otgrpc/server.go:57 +0x3d0
    github.com/pulumi/pulumi/sdk/v3/proto/go._ResourceProvider_Create_Handler({0x2a3f1c0?, 0xc0009dec60}, {0x2e02488, 0xc000ee60c0}, 0xc000881080, 0xc0002604a0)
        /home/runner/go/pkg/mod/github.com/pulumi/pulumi/sdk/[email protected]/proto/go/provider_grpc.pb.go:595 +0x135
    google.golang.org/grpc.(*Server).processUnaryRPC(0xc000596000, {0x2e02488, 0xc000ee6030}, {0x2e0d8e0, 0xc00028e600}, 0xc000edcea0, 0xc0001acc30, 0x3e25a00, 0x0)
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1369 +0xe23
    google.golang.org/grpc.(*Server).handleStream(0xc000596000, {0x2e0d8e0, 0xc00028e600}, 0xc000edcea0)
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1780 +0x1016
    google.golang.org/grpc.(*Server).serveStreams.func2.1()
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1019 +0x8b
    created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 83
        /home/runner/go/pkg/mod/google.golang.org/[email protected]/server.go:1030 +0x135

Affected Resource(s)

okta.idp.Oidc

Output of pulumi about

❯ pulumi about
CLI          
Version      3.120.0
Go Version   go1.22.4
Go Compiler  gc

Plugins
KIND      NAME    VERSION
resource  aws     6.40.0
language  nodejs  unknown
resource  okta    4.8.2

Host     
OS       darwin
Version  14.5
Arch     x86_64

This project is written in nodejs: executable='/Users/michaeldop/.nvm/versions/node/v20.14.0/bin/node' version='v20.14.0'

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

@michaeldop michaeldop added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jun 18, 2024
@VenelinMartinov VenelinMartinov added the p1 A bug severe enough to be the next item assigned to an engineer label Jun 18, 2024
@VenelinMartinov
Copy link
Contributor

Hi @michaeldop, thanks for reporting! This is a pretty bad experience and we'll have a look at it as soon as possible.

@VenelinMartinov VenelinMartinov removed the needs-triage Needs attention from the triage team label Jun 18, 2024
@guineveresaenger
Copy link
Contributor

This was fixed upstream in okta/terraform-provider-okta#1984. We'll be upgrading this provider shortly and this issue should be resolved.

@michaeldop
Copy link
Author

Thank you for the quick turn around, v4.9.0 is working great!

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 p1 A bug severe enough to be the next item assigned to an engineer resolution/fixed This issue was fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants