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

Case-insensitive comparison of IPv6 addresses #468

Merged
merged 1 commit into from
Sep 17, 2021

Commits on Sep 17, 2021

  1. Case-insensitive comparison of IPv6 addresses

    Our API converts upper-case IPv6 addresses to lower-case. This in turn
    leads to a mismatch between what is stored in the Terraform state and
    what our API returns. As a result Terraform tries to update a rule,
    which does not need updating.
    
    The solution is to convert any IP addresses to lower-case before
    Terraform saves them to the state. This can be easily achieved using the
    StateFunc field of schema.Schema. However, when the field is used within
    a schema element of schema.TypeSet it creates an additional invalid
    value. This to be a known bug in Terraform:
    hashicorp/terraform-plugin-sdk#160
    
    For our case we can get by with filtering the invalid entry from the
    firewall rules before sending any requests to the API.
    fhofherr committed Sep 17, 2021
    Configuration menu
    Copy the full SHA
    a5776d8 View commit details
    Browse the repository at this point in the history