You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| <aname="input_resource_group_description"></a> [resource\_group\_description](#input\_resource\_group\_description)| (Optional) The description of Resource Group. |`string`|`"Managed by Terraform."`| no |
41
42
| <aname="input_resource_group_enabled"></a> [resource\_group\_enabled](#input\_resource\_group\_enabled)| (Optional) Whether to create Resource Group to find and group AWS resources which are created by this module. |`bool`|`true`| no |
42
43
| <aname="input_resource_group_name"></a> [resource\_group\_name](#input\_resource\_group\_name)| (Optional) The name of Resource Group. A Resource Group name can have a maximum of 127 characters, including letters, numbers, hyphens, dots, and underscores. The name cannot start with `AWS` or `aws`. |`string`|`""`| no |
44
+
| <a name="input_rules"></a> [rules](#input\_rules) | (Optional) The rules that you define for the firewall rule group determine the filtering behavior. Each rule consists of a priority, a domain list, and action. Each item of `rules` block as defined below.<br> (Required) `priority` - Determine the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest priority.<br> (Required) `name` - A name that lets you identify the rule.<br> (Optional) `description` - The description of the rule.<br> (Required) `domain_list` - The ID of the domain list that you want to use in the rule.<br> (Required) `action` - The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list. Valid values are `ALLOW`, `BLOCK`, `ALERT`.<br> (Optional) `action_parameters` - The configuration block for the parameters of the rule action. Only required with `BLOCK` action. `action_parameters` block as defined below.<br> (Required) `response` - The way that you want DNS Firewall to block the request. Valid values are `NODATA`, `NXDOMAIN`, `OVERRIDE`. `NODATA` indicates that this query was successful, but there is no response available for the query. `NXDOMAIN` indicates that the domain name that's in the query doesn't exist. `OVERRIDE` provides a custom override response to the query.<br> (Optional) `override` - The configuration for a custom override response to the query. Only required with `OVERRIDE` block response.<br> (Required) `type` - The DNS record's type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values are `CNAME`.<br> (Required) `value` - The custom DNS record to send back in response to the query.<br> (Required) `ttl` - The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of `0`. Maximum value of `604800`. | `any` | `[]` | no |
43
45
| <aname="input_tags"></a> [tags](#input\_tags)| (Optional) A map of tags to add to all resources. |`map(string)`|`{}`| no |
44
46
45
47
## Outputs
@@ -50,5 +52,6 @@ No modules.
50
52
| <aname="output_id"></a> [id](#output\_id)| The ID of the firewall rule group. |
51
53
| <aname="output_name"></a> [name](#output\_name)| The name of the firewall rule group. |
52
54
| <aname="output_owner_id"></a> [owner\_id](#output\_owner\_id)| The AWS Account ID for the account that created the rule group. |
55
+
| <aname="output_rules"></a> [rules](#output\_rules)| The rules of the firewall rule group. |
53
56
| <aname="output_share_status"></a> [share\_status](#output\_share\_status)| Whether the rule group is shared with other AWS accounts, or was shared with the current account by another AWS account. Sharing is configured through AWS Resource Access Manager (AWS RAM). Valid values: `NOT_SHARED`, `SHARED_BY_ME`, `SHARED_WITH_ME`. |
Copy file name to clipboardExpand all lines: modules/dns-firewall-rule-group/variables.tf
+59Lines changed: 59 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,65 @@ variable "description" {
9
9
default="Managed by Terraform."
10
10
}
11
11
12
+
variable"rules" {
13
+
description=<<EOF
14
+
(Optional) The rules that you define for the firewall rule group determine the filtering behavior. Each rule consists of a priority, a domain list, and action. Each item of `rules` block as defined below.
15
+
(Required) `priority` - Determine the processing order of the rule in the rule group. DNS Firewall processes the rules in a rule group by order of priority, starting from the lowest priority.
16
+
(Required) `name` - A name that lets you identify the rule.
17
+
(Optional) `description` - The description of the rule.
18
+
(Required) `domain_list` - The ID of the domain list that you want to use in the rule.
19
+
(Required) `action` - The action that DNS Firewall should take on a DNS query when it matches one of the domains in the rule's domain list. Valid values are `ALLOW`, `BLOCK`, `ALERT`.
20
+
(Optional) `action_parameters` - The configuration block for the parameters of the rule action. Only required with `BLOCK` action. `action_parameters` block as defined below.
21
+
(Required) `response` - The way that you want DNS Firewall to block the request. Valid values are `NODATA`, `NXDOMAIN`, `OVERRIDE`. `NODATA` indicates that this query was successful, but there is no response available for the query. `NXDOMAIN` indicates that the domain name that's in the query doesn't exist. `OVERRIDE` provides a custom override response to the query.
22
+
(Optional) `override` - The configuration for a custom override response to the query. Only required with `OVERRIDE` block response.
23
+
(Required) `type` - The DNS record's type. This determines the format of the record value that you provided in BlockOverrideDomain. Value values are `CNAME`.
24
+
(Required) `value` - The custom DNS record to send back in response to the query.
25
+
(Required) `ttl` - The recommended amount of time, in seconds, for the DNS resolver or web browser to cache the provided override record. Minimum value of `0`. Maximum value of `604800`.
26
+
EOF
27
+
type=any
28
+
default=[]
29
+
30
+
validation {
31
+
condition=alltrue([
32
+
forruleinvar.rules:
33
+
alltrue([
34
+
rule.priority>=0,
35
+
rule.priority<=10000,
36
+
])
37
+
])
38
+
error_message="Valid value for `rule.priority` from `rules` is between 0 and 10000."
0 commit comments