Skip to content

tfpluginsdk: cannot build schema for terraform type "List of Map of String" #597

@jwefers

Description

@jwefers

What happened?

Trying to convert a provider for terraform-provider-auth0 to using TerraformPluginSDK. On make generate, i get:
panic: cannot generate crd for resource auth0_custom_domain: cannot build types for CustomDomain: cannot build the Types for resource "auth0_custom_domain": cannot infer type from schema of field verification: cannot infer type from resource schema of element type of CustomDomain.Verification: cannot infer type from schema of field methods: element type of CustomDomain.Verification.Methods is basic but not one of known basic types.

The terraform attribute in question: https://github.com/auth0/terraform-provider-auth0/blob/main/internal/auth0/customdomain/resource.go#L89:

"methods": {
    Type:        schema.TypeList,
    Elem:        schema.TypeMap,
    Computed:    true,
    Description: "Defines the list of domain verification methods used. ",
},

The error comes from https://github.com/crossplane/upjet/blob/main/pkg/types/builder.go#L254, where this case is simply not expected.

I have a hard time figuring out how to deal with this. i guess types.Universe.Lookup("map[string]string") is not a thing.
Any advice how to improve upjet to properly handle this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions