Skip to content

Latest commit

 

History

History
83 lines (61 loc) · 2.36 KB

File metadata and controls

83 lines (61 loc) · 2.36 KB
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.

dbtcloud_ip_restrictions_rule (Resource)

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.

Example Usage

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
}

Schema

Required

  • cidrs (Attributes Set) Set of CIDR ranges for this rule (see below for nested schema)
  • name (String) The name of the IP restriction rule
  • rule_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)

Optional

  • description (String) A description of the IP restriction rule
  • resource_metadata (Dynamic) Metadata for tracking resource identity during account migrations. Stored in Terraform state only and not sent to the API.

Read-Only

  • id (Number) The ID of the IP restriction rule

Nested Schema for cidrs

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 range
  • ip_restriction_rule_id (Number) ID of the IP restriction rule

Import

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