From 0932bdb32ca517d77e6b224af46d3e60003b6665 Mon Sep 17 00:00:00 2001 From: Bruno Schaatsbergen Date: Tue, 22 Mar 2022 09:52:40 +0100 Subject: [PATCH 1/3] Add `zookeeper_connect_string_tls` to MSK cluster data source --- internal/service/kafka/cluster_data_source.go | 1 + website/docs/d/msk_cluster.html.markdown | 1 + 2 files changed, 2 insertions(+) diff --git a/internal/service/kafka/cluster_data_source.go b/internal/service/kafka/cluster_data_source.go index c8b931bdcb8..7f4c9cf0960 100644 --- a/internal/service/kafka/cluster_data_source.go +++ b/internal/service/kafka/cluster_data_source.go @@ -116,6 +116,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/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. From 6eb86c973d51a5a1842240b7b6bb10f2095ba611 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 22 Mar 2022 11:33:28 -0400 Subject: [PATCH 2/3] Add CHANGELOG entry. --- .changelog/23804.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/23804.txt 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 From 93d274a4f0f27ddc9e45cf3956bb71635faf2cd3 Mon Sep 17 00:00:00 2001 From: Kit Ewbank Date: Tue, 22 Mar 2022 11:35:10 -0400 Subject: [PATCH 3/3] d/aws_msk_cluster: Test 'zookeeper_connect_string_tls'. --- internal/service/kafka/cluster_data_source.go | 4 ++++ internal/service/kafka/cluster_data_source_test.go | 1 + 2 files changed, 5 insertions(+) diff --git a/internal/service/kafka/cluster_data_source.go b/internal/service/kafka/cluster_data_source.go index 7f4c9cf0960..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, + }, }, } } 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"), ), }, },