confluent_network
describes a Network data source.
provider "confluent" {
cloud_api_key = var.confluent_cloud_api_key # optionally use CONFLUENT_CLOUD_API_KEY env var
cloud_api_secret = var.confluent_cloud_api_secret # optionally use CONFLUENT_CLOUD_API_SECRET env var
}
data "confluent_network" "example_using_id" {
id = "n-abc123"
environment {
id = "env-xyz456"
}
}
resource "confluent_service_account" "test-sa" {
display_name = "test_sa"
description = "test_sa for ${data.confluent_network.example_using_id.display_name}"
}
data "confluent_network" "example_using_name" {
display_name = "my_network"
environment {
id = "env-xyz456"
}
}
output "example_using_name" {
value = data.confluent_network.example_using_name
}
The following arguments are supported:
id
- (Optional String) The ID of the Network, for example, n-abc123
.display_name
- (Optional String) A human-readable name for the Network.environment
(Required Configuration Block) supports the following:
id
- (Required String) The ID of the Environment that the Network belongs to, for example, env-xyz456
.In addition to the preceding arguments, the following attributes are exported:
id
- (Required String) The ID of the Network, for example, n-abc123
.display_name
- (Required String) The name of the Network.cloud
- (Required String) The cloud service provider in which the network exists. Accepted values are: AWS
, AZURE
, and GCP
.region
- (Required String) The cloud provider region where the network exists.cidr
- (Required String) The IPv4 CIDR block to used for the network. Must be /16
. Required for VPC peering and AWS TransitGateway.reserved_cidr
- (Required String) The reserved IPv4 CIDR block to be used for the network. Must be /24
. If not specified, Confluent Cloud Network uses 172.20.255.0/24
.zone_info
(Required Configuration Blocks) Each item represents information related to a single zone. It supports the following:
zone_id
- (Required String) Cloud provider zone ID.cidr
- (Required String) The IPv4 CIDR block to be used for the network. Must be /27
. Required for VPC peering and AWS TransitGateway.connection_types
- (Required List of String) The list of connection types that may be used with the network. Accepted connection types are: PEERING
, TRANSITGATEWAY
, and PRIVATELINK
.zones
- (Optional List of String) The 3 availability zones for this network. They can optionally be specified for AWS networks
used with PrivateLink, for GCP networks used with Private Service Connect, and for AWS and GCP
networks used with Peering. Otherwise, they are automatically chosen by Confluent Cloud.
On AWS, zones are AWS AZ IDs, for example, use1-az3
.
On GCP, zones are GCP zones, for example, us-central1-c
.
On Azure, zones are Confluent-chosen names (for example, 1
, 2
, 3
) since Azure does not have universal zone identifiers.dns_config
(Optional Configuration Block) Network DNS config. It applies only to the PRIVATELINK network connection type. It supports the following:
resolution
- (Required String) Network DNS resolution.
When resolution is CHASED_PRIVATE
, clusters in this network require both public and private DNS to resolve cluster endpoints.
When resolution is PRIVATE
, clusters in this network only require private DNS to resolve cluster endpoints.resource_name
- (Required String) The Confluent Resource Name of the Network.
gateway
(Optional Configuration Block) supports the following:
id
- (Optional String) The ID of the Gateway, for example, gw-abc123
.aws
- (Optional Configuration Block) The AWS-specific network details if available. It supports the following:
vpc
- (Required String) The Confluent Cloud VPC ID.account
- (Required String) The AWS account ID associated with the Confluent Cloud VPC.private_link_endpoint_service
- (Optional String) The endpoint service of the Confluent Cloud VPC (used for PrivateLink) if available.azure
- (Optional Configuration Block) The Azure-specific network details if available. It supports the following:
private_link_service_aliases
- (Optional Map) The mapping of zones to Private Link Service Aliases if available. Keys are zones and values are Azure Private Link Service Aliases.zone
- (Required String) The zone name, for example, 1
.private_link_service_aliase
- (Required String) The Private Link Service Alias, for example, s-aa11a-privatelink-1.1c12abc3-695c-1234-bc35-11fe6abb303a.centralus.azure.privatelinkservice
.gcp
- (Optional Configuration Block) The GCP-specific network details if available. It supports the following:
project
- (Required String) The GCP Project ID associated with the Confluent Cloud VPC.vpc_network
- (Required String) The network name of the Confluent Cloud VPC.private_service_connect_service_attachments
- (Optional Map) The mapping of zones to Private Service Connect Service Attachments if available. Keys are zones and values are GCP Private Service Connect service attachment.