Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

f-aws_fsx_openzfs_file_system-add endpoint IP as output #36767

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/36767.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/openzfs_file_system: Add `endpoint_ip_address` attribute
```
5 changes: 5 additions & 0 deletions internal/service/fsx/openzfs_file_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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))
Expand Down
2 changes: 2 additions & 0 deletions internal/service/fsx/openzfs_file_system_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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"),
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/fsx_openzfs_file_system.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Loading