I am currently trying to add a resource of type threat-exception and link that to a exception-group (using its 'exception_group_name' attribute).
This is the relevant Terraform code I'm using:
resource checkpoint_management_exception_group gr1 {
apply_on = "manually-select-threat-rules"
comments = "abc123"
ignore_errors = true
ignore_warnings = true
name = "my custom exception group"
}
resource checkpoint_management_threat_exception ex1 {
name = "Test Exception"
layer = "Terraform_gbl Threat Prevention"
position = {
top = "top"
}
exception_group_name = checkpoint_management_exception_group.gr1.name
}
This code will produce the following error on 'terraform apply':
checkpoint_management_threat_exception.ex1: Creating...
╷
│ Error: failed to execute API call
│ Status: 400 Bad Request
│ Code: generic_err_invalid_parameter
│ Message: layer can't be used with exception-group-name or exception-group-uid
│
│ with checkpoint_management_threat_exception.ex1,
│ on main.tf line 29, in resource "checkpoint_management_threat_exception" "ex1":
│ 29: resource checkpoint_management_threat_exception ex1 {
If I omit the layer-attribute in the exception, it results in Terraform complaining of a missing required attribute:
│ Error: Missing required argument
│
│ on main.tf line 29, in resource "checkpoint_management_threat_exception" "ex1":
│ 29: resource checkpoint_management_threat_exception ex1 {
│
│ The argument "layer" is required, but no definition was found.
So currently there is no way to create a threat-exception and linking it to a exception-group or am I missing something?
I think this could be solved by simply removing the required-flag from the layer attribute.
I am currently trying to add a resource of type threat-exception and link that to a exception-group (using its 'exception_group_name' attribute).
This is the relevant Terraform code I'm using:
This code will produce the following error on 'terraform apply':
If I omit the layer-attribute in the exception, it results in Terraform complaining of a missing required attribute:
So currently there is no way to create a threat-exception and linking it to a exception-group or am I missing something? I think this could be solved by simply removing the required-flag from the layer attribute.
I would be happy about a fix :)