confluent_dns_record
provides a DNS Record resource that enables creating, editing, and deleting DNS Records on Confluent Cloud.
resource "confluent_environment" "development" {
display_name = "Development"
}
resource "confluent_dns_record" "main" {
display_name = "dns_record"
environment {
id = confluent_environment.development.id
}
domain = "example.com"
gateway {
id = confluent_network.main.gateway[0].id
}
private_link_access_point {
id = confluent_access_point.main.id
}
}
The following arguments are supported:
display_name
- (Optional String) The name of the DNS Record.environment
(Required Configuration Block) supports the following:
id
- (Required String) The ID of the Environment that the DNS Record 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 Record belongs, for example, gw-abc123
.domain
(Required String) The fully qualified domain name of the DNS Record.private_link_access_point
(Required Configuration Block) supports the following:
id
- (Required String) The ID of the Private Link access point to which the DNS Record is associated, for example ap-123abc
.In addition to the preceding arguments, the following attributes are exported:
id
- (Required String) The ID of the DNS Record, for example, dnsrec-abc123
.You can import a DNS Record by using Environment ID and DNS Record ID, in the format <Environment ID>/<DNS Record ID>
. The following example shows how to import a DNS Record:
$ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"
$ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"
$ terraform import confluent_dns_record.main env-abc123/dnsrec-abc123