diff --git a/.changelog/36767.txt b/.changelog/36767.txt new file mode 100644 index 000000000000..5aadd08a7833 --- /dev/null +++ b/.changelog/36767.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +resource/openzfs_file_system: Add `endpoint_ip_address` attribute +``` diff --git a/internal/service/fsx/openzfs_file_system.go b/internal/service/fsx/openzfs_file_system.go index 3d273241fca4..6f4e0d3837e2 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/internal/service/fsx/openzfs_file_system_test.go b/internal/service/fsx/openzfs_file_system_test.go index b15f6e11e45e..bc9ed679ce89 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"), diff --git a/website/docs/r/fsx_openzfs_file_system.html.markdown b/website/docs/r/fsx_openzfs_file_system.html.markdown index 154181139aa5..ca14db229fe9 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`