Skip to content

Commit

Permalink
remove regular_expression_validation
Browse files Browse the repository at this point in the history
  • Loading branch information
OrNovo committed Aug 20, 2024
1 parent d0f2e85 commit 0f365d0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 21 deletions.
25 changes: 11 additions & 14 deletions coralogix/resource_coralogix_alert.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2024 Coralogix Ltd.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// https://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -604,9 +604,8 @@ func commonAlertSchema() map[string]*schema.Schema {

func searchQuerySchema() *schema.Schema {
return &schema.Schema{
Type: schema.TypeString,
Optional: true,
//ValidateFunc: validation.StringIsValidRegExp,
Type: schema.TypeString,
Optional: true,
Description: "The search_query that we wanted to be notified on.",
}
}
Expand Down Expand Up @@ -1043,10 +1042,9 @@ func metricSchema() map[string]*schema.Schema {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"search_query": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringIsValidRegExp,
Description: "Regular expiration. More info: https://coralogix.com/blog/regex-101/",
Type: schema.TypeString,
Required: true,
Description: "Regular expiration. More info: https://coralogix.com/blog/regex-101/",
},
"condition": {
Type: schema.TypeList,
Expand Down Expand Up @@ -1163,10 +1161,9 @@ func metricSchema() map[string]*schema.Schema {
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"search_query": {
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringIsValidRegExp,
Description: "Regular expiration. More info: https://coralogix.com/blog/regex-101/",
Type: schema.TypeString,
Required: true,
Description: "Regular expiration. More info: https://coralogix.com/blog/regex-101/",
},
"condition": {
Type: schema.TypeList,
Expand Down
13 changes: 6 additions & 7 deletions coralogix/resource_coralogix_rules_group.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2024 Coralogix Ltd.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// https://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -463,10 +463,9 @@ func appendDestinationFieldSchema(m map[string]*schema.Schema) map[string]*schem

func appendRegularExpressionSchema(m map[string]*schema.Schema) map[string]*schema.Schema {
m["regular_expression"] = &schema.Schema{
Type: schema.TypeString,
Required: true,
ValidateFunc: validation.StringIsValidRegExp,
Description: "Regular expiration. More info: https://coralogix.com/blog/regex-101/",
Type: schema.TypeString,
Required: true,
Description: "Regular expiration. More info: https://coralogix.com/blog/regex-101/",
}
return m
}
Expand Down

0 comments on commit 0f365d0

Please sign in to comment.