-
Notifications
You must be signed in to change notification settings - Fork 63
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
Unable to create ns1_redirect resource when target url contains query string parameters #326
Comments
Hi @AlejandroTrev, thanks for the heads-up!
However I also tried creating a redirect with that target and when I curl to it I see
So it looks like the query part is currently ineffective: we'll have to do an investigation server side as well. |
Yes, you are correct! I have a support ticket open with NS1 about this (sorry I forgot to mention it). They advised me to url-encode the target url, e.g. |
* Review redirect validation regexes * Add unit test check * Re-enabling import verification
Hi there,
Using the
ns1_redirect
resource that was introduced in #307 (released in v.2.3.0), I'm unable to create a redirect where the target url contains query string parameters.Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
The plan should indicate that the redirect will be created.
Actual Behavior
An error message is returned:
Steps to Reproduce
terraform plan
Important Factoids
The
target
field uses the ValidateFuncvalidateURL
defined here: https://github.com/ns1-terraform/terraform-provider-ns1/blob/master/ns1/resource_redirect.go#L373The regex should be updated to allow query string parameters in the url. NS1 supports target urls with query string parameters when creating the redirects through their admin console. Example:
The text was updated successfully, but these errors were encountered: