confluent_dns_forwarder
provides a DNS Forwarder resource that enables creating, editing, and deleting DNS Forwarders on Confluent Cloud.
resource "confluent_environment" "development" {
display_name = "Development"
}
resource "confluent_dns_forwarder" "main" {
display_name = "dns_forwarder"
environment {
id = confluent_environment.development.id
}
domains = ["example.com", "domainname.com"]
gateway {
id = confluent_network.main.gateway[0].id
}
forward_via_ip {
dns_server_ips = ["10.200.0.0", "10.200.0.1"]
}
}
The following arguments are supported:
display_name
- (Optional String) The name of the DNS Forwarder.environment
(Required Configuration Block) supports the following:
id
- (Required String) The ID of the Environment that the DNS Forwarder belongs to, for example, env-abc123
.gateway
(Required Configuration Block) supports the following:
id
- (Required String) The ID of the gateway to which the DNS Forwarder belongs, for example, gw-abc123
.domains
(Required String List) List of domains for the DNS forwarder to use.forward_via_ip
(Required Block) supports the following:
dns_server_ips
(Required String List) List of IP addresses of the DNS server.In addition to the preceding arguments, the following attributes are exported:
id
- (Required String) The ID of the DNS Forwarder, for example, dnsf-abc123
.You can import a DNS Forwarder by using Environment ID and DNS Forwarder ID, in the format <Environment ID>/<DNS Forwarder ID>
. The following example shows how to import a DNS Forwarder:
$ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"
$ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"
$ terraform import confluent_dns_forwarder.main env-abc123/dnsf-abc123