#terraform - bunnynet_pullzone_edgerule requiring 2 triggers field

1 messages · Page 1 of 1 (latest)

sinful path
#

for some reason the terraform module for pullzone_edgerule requires 2 triggers
one is the form of block
one is the form of attribute

this shows the red lines error on vscode

bunny tf provider version 0.7.0
my terraform version 1.12.1

#

discussion in help
#🤗help message

#
resource "bunnynet_pullzone_edgerule" "corsfix-ap-disable-b-cdn" {
  enabled     = true
  pullzone    = bunnynet_pullzone.corsfix-ap.id
  description = "Disable b-cdn"

  actions = [
    {
      type       = "BlockRequest"
      parameter1 = null
      parameter2 = null
      parameter3 = null
    }
  ]

  match_type = "MatchAny"
  triggers = [{
    type       = "Url"
    match_type = "MatchAny"
    patterns   = ["*.b-cdn.net*"]
    parameter1 = null
    parameter2 = null
  }]
}
#

adding the triggers {} block fixes the red lines, but i can't plan the terraform

#

see, both required/min 1