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

Fix unexpected crashes when using cloudflare_notification_policy with a filters attribute #1520

Closed

Commits on Mar 21, 2022

  1. Do not use TypeMap for non-primitive types, use TypeList

    Currently, TypeMap doesn't support non-primitive type values.
    ref : hashicorp/terraform-plugin-sdk#62
    
    When using non-primitive values with TypeMap, terraform crashes at
    runtime with a following error message.
    
    ```
    panic: Unknown validation type: 6
    ```
    
    This error is originated at
    https://github.com/hashicorp/terraform-plugin-sdk/blob/v2.11.0/helper/schema/schema.go#L2017
    Only TypeBool, TypeInt, TypeFloat and TypeString are supported.
    
    So, in this change, use TypeList with new custom resource to store
    non-primitive values.
    0gajun committed Mar 21, 2022
    Configuration menu
    Copy the full SHA
    7e1f0cd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c9dc2e4 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2022

  1. Use TypeSet instead of TypeList for filters attributes

    Cause filters and its child attributes don't care about ordering of
    values.
    0gajun committed Mar 22, 2022
    Configuration menu
    Copy the full SHA
    fe50c84 View commit details
    Browse the repository at this point in the history