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

Firewall rule names for Redis Cache doesn't support underscores #2903

Closed
inkel opened this issue Feb 15, 2019 · 4 comments
Closed

Firewall rule names for Redis Cache doesn't support underscores #2903

inkel opened this issue Feb 15, 2019 · 4 comments

Comments

@inkel
Copy link
Contributor

inkel commented Feb 15, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform (and AzureRM Provider) Version

Terraform v0.11.1
+ provider.azurerm (unversioned)

I've also confirmed that the latest master at the time of writing this has the same bug.

Affected Resource(s)

Terraform Configuration Files

# Variables are all of type string and defined in variables.tf

resource "azurerm_redis_firewall_rule" "rule" {
  name                = "${var.redis_cache_name}_firewall_rule"
  redis_cache_name    = "${var.redis_cache_name}"
  resource_group_name = "${var.resource_group_name}"
  start_ip            = "${var.firewall_rule_start_ip}"
  end_ip              = "${var.firewall_rule_end_ip}"
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

When trying to create an azurerm_redis_firewall_rule it should've accepted using _ in the name. Running terraform validate should've succeeded, but it reports an error that the name property only allows for alphanumeric characters.

The documentation for this resource doesn't state this requirement, which is confusing.

Using Azure's portal I was able to create a Redis Cache Firewall Rule with the name az_0_9_A. The official Azure's documentation for the Redis Firewall Rule - Create Or Update doesn't specify the alphanumeric constraint.

Actual Behavior

$ terraform validate

Error: azurerm_redis_firewall_rule.rule: "name" may only contain alphanumeric characters

Steps to Reproduce

  1. Try creating an azurerm_redis_firewall_rule resource with a name property with underscores.
  2. Run terraform validate

Important Factoids

N/A

References

I couldn't find any issues related to this.

@inkel
Copy link
Contributor Author

inkel commented Feb 15, 2019

For the record, I was also able to create a firewall rule named _az_. I have a local fix for this issue that I can send as a pull request.

@RiverPhillips
Copy link
Contributor

RiverPhillips commented Feb 17, 2019

I've raised PR #2906 which resolves this

@inkel
Copy link
Contributor Author

inkel commented Feb 18, 2019

Thank you so much!

@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants