From ec572a3a32150ebbf292d4aaa58cc73f987b8a9d Mon Sep 17 00:00:00 2001 From: nikhil Date: Sat, 6 Apr 2024 13:13:04 +0100 Subject: [PATCH 1/4] f-aws_fsx_openzfs_file_system-add endpoint IP as output --- internal/service/fsx/openzfs_file_system.go | 5 +++++ website/docs/r/fsx_openzfs_file_system.html.markdown | 1 + 2 files changed, 6 insertions(+) diff --git a/internal/service/fsx/openzfs_file_system.go b/internal/service/fsx/openzfs_file_system.go index 3d273241fca..6f4e0d3837e 100644 --- a/internal/service/fsx/openzfs_file_system.go +++ b/internal/service/fsx/openzfs_file_system.go @@ -117,6 +117,10 @@ func ResourceOpenZFSFileSystem() *schema.Resource { Type: schema.TypeString, Computed: true, }, + "endpoint_ip_address": { + Type: schema.TypeString, + Computed: true, + }, "endpoint_ip_address_range": { Type: schema.TypeString, Optional: true, @@ -494,6 +498,7 @@ func resourceOpenZFSFileSystemRead(ctx context.Context, d *schema.ResourceData, return sdkdiag.AppendErrorf(diags, "setting disk_iops_configuration: %s", err) } d.Set("dns_name", filesystem.DNSName) + d.Set("endpoint_ip_address", openZFSConfig.EndpointIpAddress) d.Set("endpoint_ip_address_range", openZFSConfig.EndpointIpAddressRange) d.Set("kms_key_id", filesystem.KmsKeyId) d.Set("network_interface_ids", aws.StringValueSlice(filesystem.NetworkInterfaceIds)) diff --git a/website/docs/r/fsx_openzfs_file_system.html.markdown b/website/docs/r/fsx_openzfs_file_system.html.markdown index 154181139aa..ca14db229fe 100644 --- a/website/docs/r/fsx_openzfs_file_system.html.markdown +++ b/website/docs/r/fsx_openzfs_file_system.html.markdown @@ -82,6 +82,7 @@ This resource exports the following attributes in addition to the arguments abov * `arn` - Amazon Resource Name of the file system. * `dns_name` - DNS name for the file system, e.g., `fs-12345678.fsx.us-west-2.amazonaws.com` +* `endpoint_ip_address` - IP address of the endpoint that is used to access data or to manage the file system. * `id` - Identifier of the file system, e.g., `fs-12345678` * `network_interface_ids` - Set of Elastic Network Interface identifiers from which the file system is accessible The first network interface returned is the primary network interface. * `root_volume_id` - Identifier of the root volume, e.g., `fsvol-12345678` From 800beed49d949822fb5503a121b1a37a15d43038 Mon Sep 17 00:00:00 2001 From: nikhil Date: Sat, 6 Apr 2024 13:15:20 +0100 Subject: [PATCH 2/4] f-aws_fsx_openzfs_file_system-add endpoint IP as output --- .changelog/36767.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelog/36767.txt diff --git a/.changelog/36767.txt b/.changelog/36767.txt new file mode 100644 index 00000000000..641d1187dfd --- /dev/null +++ b/.changelog/36767.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/openzfs_file_system: add `endpoint_ip_address` attribute as output +``` \ No newline at end of file From df094243c23ad525ac4444b2980f458025e5afdc Mon Sep 17 00:00:00 2001 From: nikhil Date: Sat, 6 Apr 2024 19:28:52 +0100 Subject: [PATCH 3/4] f-policy_data_source: adding support for attachment count --- internal/service/fsx/openzfs_file_system_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/service/fsx/openzfs_file_system_test.go b/internal/service/fsx/openzfs_file_system_test.go index b15f6e11e45..bc9ed679ce8 100644 --- a/internal/service/fsx/openzfs_file_system_test.go +++ b/internal/service/fsx/openzfs_file_system_test.go @@ -58,6 +58,7 @@ func TestAccFSxOpenZFSFileSystem_basic(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "disk_iops_configuration.0.iops", "192"), resource.TestCheckResourceAttr(resourceName, "disk_iops_configuration.0.mode", "AUTOMATIC"), resource.TestCheckResourceAttrSet(resourceName, "dns_name"), + resource.TestCheckResourceAttr(resourceName, "endpoint_ip_address", ""), resource.TestCheckResourceAttr(resourceName, "endpoint_ip_address_range", ""), resource.TestCheckResourceAttrSet(resourceName, "kms_key_id"), resource.TestCheckResourceAttr(resourceName, "network_interface_ids.#", "1"), @@ -870,6 +871,7 @@ func TestAccFSxOpenZFSFileSystem_multiAZ(t *testing.T) { resource.TestCheckResourceAttr(resourceName, "disk_iops_configuration.0.iops", "192"), resource.TestCheckResourceAttr(resourceName, "disk_iops_configuration.0.mode", "AUTOMATIC"), resource.TestCheckResourceAttrSet(resourceName, "dns_name"), + resource.TestCheckResourceAttrSet(resourceName, "endpoint_ip_address"), resource.TestCheckResourceAttrSet(resourceName, "endpoint_ip_address_range"), resource.TestCheckResourceAttrSet(resourceName, "kms_key_id"), resource.TestCheckResourceAttr(resourceName, "network_interface_ids.#", "2"), From 86000e4734a12223f90aede09b69d32dbd3458a3 Mon Sep 17 00:00:00 2001 From: Jared Baker Date: Tue, 16 Apr 2024 15:55:15 -0400 Subject: [PATCH 4/4] chore: changelog --- .changelog/36767.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changelog/36767.txt b/.changelog/36767.txt index 641d1187dfd..5aadd08a783 100644 --- a/.changelog/36767.txt +++ b/.changelog/36767.txt @@ -1,3 +1,3 @@ ```release-note:enhancement -resource/openzfs_file_system: add `endpoint_ip_address` attribute as output -``` \ No newline at end of file +resource/openzfs_file_system: Add `endpoint_ip_address` attribute +```