Skip to content

Commit 0fc6c9d

Browse files
committed
feat(config-managed-rule): remove validations for resource_types and resource_id
1 parent ba09758 commit 0fc6c9d

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

modules/config-managed-rule/variables.tf

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,29 +76,13 @@ variable "resource_types" {
7676
type = list(string)
7777
default = []
7878
nullable = false
79-
80-
validation {
81-
condition = anytrue([
82-
var.scope != "RESOURCES",
83-
var.scope == "RESOURCES" && length(var.resource_types) > 0,
84-
])
85-
error_message = "You must provide at least one resource type in `resource_types` when `scope` is configured with value `RESOURCES`."
86-
}
8779
}
8880

8981
variable "resource_id" {
9082
description = "(Optional) The ID of the only AWS resource that you want to trigger an evaluation for the rule. If you specify this, you must specify only one resource type for `resource_types`. Only need when `scope` is configured with value `RESOURCES`."
9183
type = string
9284
default = null
9385
nullable = true
94-
95-
validation {
96-
condition = anytrue([
97-
var.scope != "RESOURCES",
98-
var.scope == "RESOURCES" && (var.resource_id == null || (var.resource_id != null && length(var.resource_types) == 1)),
99-
])
100-
error_message = "You must provide only one resource type in `resource_types` when `resource_id` is specified and `scope` is configured with value `RESOURCES`."
101-
}
10286
}
10387

10488
variable "resource_tag" {

0 commit comments

Comments
 (0)