northwood-labs / terraform-provider-corefunc

Utilities that should have been Terraform core functions.
https://registry.terraform.io/providers/northwood-labs/corefunc
Apache License 2.0
23 stars 2 forks source link

[Feature]: `corefunc_ip_in_cidr` #159

Closed skyzyx closed 5 days ago

skyzyx commented 9 months ago

What functionality would you like to see?

data "corefunc_ip_in_cidr" "maybe" {
  ip_address = "10.100.32.100"
  cidr_range = "172.16.0.0/16"
}
#=> false

data "corefunc_ip_in_cidr" "maybe" {
  ip_address = "10.100.32.100"
  cidr_range = "172.16.0.0/16"

  trigger_error_with_message = "The IP must be within the specified CIDR subnet."
}
#=> ERROR: The IP must be within the specified CIDR subnet.
skyzyx commented 7 months ago

https://1-7-0-beta1.opentofu.pages.dev/docs/language/functions/cidrcontains/

skyzyx commented 2 months ago
skyzyx commented 5 days ago

Implemented in https://github.com/northwood-labs/terraform-provider-corefunc/pull/381.