I'm looking a solution for changing the priority on a dynamic "ip_restriction" the code that I use is
variable "ip_address_list" {
type = list
default = ["20.20.20.3/32" , "10.10.10.2/32"]
}
site_config {
dynamic "ip_restriction" {
for_each = var.ip_address_list
content {
ip_address = cidrhost(ip_restriction.value, 0)
action = "Allow"
priority = 100
}
}
When using this code I got the following output
- ip_restriction= [
- {
- action= "Allow"
- headers= (known after apply)
- ip_address= "20.20.20.3"
- name= (known after apply)
- priority= 100
- service_tag= null
- virtual_network_subnet_id = null },
- {
- action= "Allow"
- headers= (known after apply)
- ip_address= "10.10.10.2"
- name= (known after apply)
- priority= 100
- service_tag= null
- virtual_network_subnet_id = null }, ]