| page_title | dbtcloud_ip_restrictions_rule Resource - dbtcloud |
|---|---|
| subcategory | |
| description | Manages IP restriction rules in dbt Cloud. IP restriction rules allow you to control access to your dbt Cloud instance based on IP address ranges. |
Manages IP restriction rules in dbt Cloud. IP restriction rules allow you to control access to your dbt Cloud instance based on IP address ranges.
resource "dbtcloud_ip_restrictions_rule" "test" {
name = "My restriction rule"
description = "Important description"
cidrs = [
{
cidr = "::ffff:106:708" # IPv6 config
},
{
cidr = "1.6.7.10/24" # /24 for adding a range of addresses via netmask
}
]
type = "deny"
rule_set_enabled = false
}cidrs(Attributes Set) Set of CIDR ranges for this rule (see below for nested schema)name(String) The name of the IP restriction rulerule_set_enabled(Boolean) Whether the IP restriction rule set is enabled or not. Important!: This value needs to be the same for all rules if multiple rules are defined. All rules must be active or inactive at the same time.type(String) The type of the IP restriction rule (allow or deny)
description(String) A description of the IP restriction ruleresource_metadata(Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.
id(Number) The ID of the IP restriction rule
Optional:
cidr(String) IP CIDR range (can be IPv4 or IPv6)
Read-Only:
cidr_ipv6(String) IPv6 CIDR range (read-only)id(Number) ID of the CIDR rangeip_restriction_rule_id(Number) ID of the IP restriction rule
Import is supported using the following syntax:
# using import blocks (requires Terraform >= 1.5)
import {
to = dbtcloud_ip_restrictions_rule.my_rule
id = "ip_restriction_rule_id"
}
import {
to = dbtcloud_ip_restrictions_rule.my_rule
id = "12345"
}
# using the older import command
terraform import dbtcloud_ip_restrictions_rule.my_rule "ip_restriction_rule_id"
terraform import dbtcloud_ip_restrictions_rule.my_rule 12345