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

[DXE-3711] Edge redirector match rule invalid output #535

Closed
antoine-savignac-nm opened this issue Mar 20, 2024 · 3 comments
Closed

[DXE-3711] Edge redirector match rule invalid output #535

antoine-savignac-nm opened this issue Mar 20, 2024 · 3 comments

Comments

@antoine-savignac-nm
Copy link

antoine-savignac-nm commented Mar 20, 2024

Terraform Version

1.2.5

Provider version

5.6.0

Affected Resource(s)

  • akamai_cloudlets_edge_redirector_match_rule

Terraform Configuration Files

data "akamai_cloudlets_edge_redirector_match_rule" "my_er_match_rule" {
    match_rules {
        name = "my_er_match_rule"
        redirect_url = "https://my_er_match_url.org"
        status_code = 301
        use_incoming_query_string = true
        use_relative_url = "none"
        matches {
            case_sensitive = false
            match_operator = "equals"
            match_type = "query"
            negate = false
            object_match_value {
                type = "simple"
                name = "p"
                value = ["123"]
            }
        }
    }
}

Expected Behavior

The rule should have been created. When a query string named p has a value of 123 then the redirections should happen.

Actual Behavior

The API returned an error and the rule was not created.

{
    "type": "/cloudlets/v3/error-types/validation-failed",
    "title": "Validation failed",
    "instance": "a760d277-6a1d-447c-b1cc-bc0be734432d",
    "status": 400,
    "errors": [
        {
            "title": "Validation failed",
            "detail": "/matchRules/1: Encountered null value"
        }
    ],
    "detail": ""
}

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

None
One thing to note, in the terraform difference, it looks like the name property was omitted from the provider's output, see below what terraform plan was going to add (it's missing name = "p"):

{
    matches = [{
        caseSensitive    = false
        matchOperator    = "equals"
        matchType        = "query"
        negate           = false
        objectMatchValue = {
            type  = "simple"
            value = ["123"]
        }
    }]
    redirectURL              = "https://my_er_match_url.org"
    statusCode               = 301
    type                     = "erMatchRule"
    useIncomingQueryString   = true
    useIncomingSchemeAndHost = false
    useRelativeUrl           = "none"
}

References

None

@antoine-savignac-nm
Copy link
Author

FYI I'm also getting the same error from the API with the following configuration

object_match_value {
          name                = "p"
          type                = "object"
          name_case_sensitive = false
          name_has_wildcard   = false
          options {
            value                = ["123"]
            value_has_wildcard   = false
            value_case_sensitive = false
            value_escaped        = false
          }
        }

The booleans are still missing from the terraform difference output.

@PawelSnoch PawelSnoch changed the title Edge redirector match rule invalid output [DXE-3711] Edge redirector match rule invalid output Mar 22, 2024
@PawelSnoch
Copy link

Hi @antoine-savignac-nm ,

Thank you for rising this ticket. I was able to reproduce your issue. We will inform you about the progress.

Best regards,
Pawel

@lkowalsk-akamai-com
Copy link
Contributor

Hi @antoine-savignac-nm, this issue should be fixed in recent release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants