confluent_network_link_service
provides a Network Link Service resource that enables creating, editing, and deleting Network Link Services on Confluent Cloud.
resource "confluent_environment" "development" {
display_name = "Development"
}
resource "confluent_network" "aws-private-link" {
display_name = "AWS Private Link Network"
cloud = "AWS"
region = "us-east-1"
connection_types = ["PRIVATELINK"]
zones = ["use1-az1", "use1-az2", "use1-az6"]
environment {
id = confluent_environment.development.id
}
lifecycle {
prevent_destroy = true
}
}
resource "confluent_network_link_service" "aws_nls" {
display_name = "AWS Private Link network link service"
environment {
id = confluent_environment.development.id
}
network {
id = confluent_network.aws-private-link.id
}
description = "Test NL service"
accept {
environments = ["env-5678", "env-0923"]
networks = ["n-1234"]
}
lifecycle {
prevent_destroy = true
}
}
The following arguments are supported:
display_name
- (Optional String) The name of the Network Link Service.description
- (Optional String) The description of the Network Link Service.environment
(Required Configuration Block) supports the following:
id
- (Required String) The ID of the Environment that the Network Link Service belongs to, for example, env-abc123
.network
(Required Configuration Block) supports the following:
id
- (Required String) The ID of the Network that the Network Link Service belongs to, for example, n-abc123
.accept
(Optional Configuration Block) supports the following:
environments
- (Optional List of Strings) List of environments ids from which connections can be accepted. All networks within the list of environment will be allowed.networks
- (Optional List of Strings) List of network ids from which connections can be accepted.In addition to the preceding arguments, the following attributes are exported:
id
- (Required String) The ID of the Network Link Service, for example, nls-abc123
.resource_name
(Required String) The Confluent Resource Name of the Network Link Service.You can import a Network Link Service by using Environment ID and Network Link Service ID, in the format <Environment ID>/<Network Link Service ID>
. The following example shows how to import a Network Link Service:
$ export CONFLUENT_CLOUD_API_KEY="<cloud_api_key>"
$ export CONFLUENT_CLOUD_API_SECRET="<cloud_api_secret>"
$ terraform import confluent_network_link_service.my_nls env-abc123/nls-abc123
The following end-to-end examples might help to get started with confluent_network_link_service
resource:
cluster-link-over-aws-private-link-networks
: Cluster link over two dedicated clusters in separate AWS PrivateLink networks