diff --git a/.changelog/23804.txt b/.changelog/23804.txt new file mode 100644 index 00000000000..bd94ada8f63 --- /dev/null +++ b/.changelog/23804.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +data-source/aws_msk_cluster: Add `zookeeper_connect_string_tls` attribute +``` \ No newline at end of file diff --git a/internal/service/kafka/cluster_data_source.go b/internal/service/kafka/cluster_data_source.go index c8b931bdcb8..6d8d9258c7e 100644 --- a/internal/service/kafka/cluster_data_source.go +++ b/internal/service/kafka/cluster_data_source.go @@ -54,6 +54,10 @@ func DataSourceCluster() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "zookeeper_connect_string_tls": { + Type: schema.TypeString, + Computed: true, + }, }, } } @@ -116,6 +120,7 @@ func dataSourceClusterRead(d *schema.ResourceData, meta interface{}) error { } d.Set("zookeeper_connect_string", SortEndpointsString(aws.StringValue(cluster.ZookeeperConnectString))) + d.Set("zookeeper_connect_string_tls", SortEndpointsString(aws.StringValue(cluster.ZookeeperConnectStringTls))) d.SetId(aws.StringValue(cluster.ClusterArn)) diff --git a/internal/service/kafka/cluster_data_source_test.go b/internal/service/kafka/cluster_data_source_test.go index cb540cdebc4..e0e0d84ef03 100644 --- a/internal/service/kafka/cluster_data_source_test.go +++ b/internal/service/kafka/cluster_data_source_test.go @@ -33,6 +33,7 @@ func TestAccKafkaClusterDataSource_basic(t *testing.T) { resource.TestCheckResourceAttrPair(dataSourceName, "number_of_broker_nodes", resourceName, "number_of_broker_nodes"), resource.TestCheckResourceAttrPair(dataSourceName, "tags.%", resourceName, "tags.%"), resource.TestCheckResourceAttrPair(dataSourceName, "zookeeper_connect_string", resourceName, "zookeeper_connect_string"), + resource.TestCheckResourceAttrPair(dataSourceName, "zookeeper_connect_string_tls", resourceName, "zookeeper_connect_string_tls"), ), }, }, diff --git a/website/docs/d/msk_cluster.html.markdown b/website/docs/d/msk_cluster.html.markdown index 519f982fa31..1b74fb9c5be 100644 --- a/website/docs/d/msk_cluster.html.markdown +++ b/website/docs/d/msk_cluster.html.markdown @@ -37,3 +37,4 @@ In addition to all arguments above, the following attributes are exported: * `number_of_broker_nodes` - Number of broker nodes in the cluster. * `tags` - Map of key-value pairs assigned to the cluster. * `zookeeper_connect_string` - A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster. The returned values are sorted alphbetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies. +* `zookeeper_connect_string_tls` - A comma separated list of one or more hostname:port pairs to use to connect to the Apache Zookeeper cluster via TLS. The returned values are sorted alphabetically. The AWS API may not return all endpoints, so this value is not guaranteed to be stable across applies.