You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test = 104.42.195.92/32,40.76.54.131/32,52.176.6.30/32,52.169.50.45/32,52.187.184.26/32,0.0.0.0/24
Actual Behavior
terraform plan
Error: module.cosmosdb.azurerm_cosmosdb_account.sirenplatform: invalid value for ip_range_filter (Cosmos DB ip_range_filter must be a set of CIDR IP addresses separated by commas with no spaces: '10.0.0.1,10.0.0.2,10.20.0.0/16')
Steps to Reproduce
See configuration example above, then run terraform plan
Important Factoids
Actually adding IPs manually in Azure Portal, then trying to terraform plan to check sanity if the string is correct gives me this plan:
Hm.. it seems that upon closer inspection of regex for this field, it's not allowing a /32 (single IP) even if Azure allows it. In fact neither /31, /30 work, but /29 does.
Looks like a possible workaround might be to use replace() to strip out /32:
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 👉 hashibot-feedback@hashicorp.com. Thanks!
ghost
locked and limited conversation to collaborators
Mar 6, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
IPs with CIDR notations added to CosmosDB firewall.
For sake of sanity:
produces
test = 104.42.195.92/32,40.76.54.131/32,52.176.6.30/32,52.169.50.45/32,52.187.184.26/32,0.0.0.0/24
Actual Behavior
terraform plan
Steps to Reproduce
See configuration example above, then run
terraform plan
Important Factoids
Actually adding IPs manually in Azure Portal, then trying to
terraform plan
to check sanity if the string is correct gives me this plan:In short, it seems that validation for
ip_range_filter
is erroneous. All IPs provided are in CIDR have no spaces and are separated by commas.The text was updated successfully, but these errors were encountered: