Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@tabito-hara
Copy link
Contributor

@tabito-hara tabito-hara commented Nov 20, 2025

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the library.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

Description

  • Adds the read_cache_configuration block to support the Intelligent-Tiering storage type for aws_fsx_openzfs_file_system.
  • INTELLIGENT_TIERING is already a valid value for storage_type due to updates in the AWS SDK for Go v2.

AWS API behavior and provider implementation

  • When storage_class = "INTELLIGENT_TIERING",

    • deployment_type must be MULTI_AZ_1. A custom diff function is added to enforce this validation.
    • storage_capacity must not be set.
      • storage_capacity is provided to the AWS API only when it is explicitly specified.
      • A validation is added to a custom diff function to ensure storage_capacity is not specified.
  • When read_cache_configuration.sizing_mode is set to a value other than USER_PROVISIONED, the size argument must not be sent to the AWS API. In such cases, the AWS API still returns a value even if one was provided.

    • To handle this,
      • size is marked as Computed
      • the expander sets size only when sizing_mode is USER_PROVISIONED
      • the flattener set size even if the returned value is nil. (When nil is returned, 0 is set)
  • While the field name for specifying a size is SizeGiB, it is defined as size in the schema, following the corresponding implementation of aws_fsx_lustre_file_system.

  • In the newly added acceptance test, all options for sizing_mode are tested.

Relations

Closes #45138
Closes #40382

References

https://docs.aws.amazon.com/fsx/latest/APIReference/API_CreateFileSystem.html#FSx-CreateFileSystem-request-StorageType

Output from Acceptance Testing

$ make testacc TESTS='TestAccFSxOpenZFSFileSystem_(basic|intelligentTiering)' PKG=fsx
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-aws_fsx_openzfs_file_system-add_intelligent_tier 🌿...
TF_ACC=1 go1.24.10 test ./internal/service/fsx/... -v -count 1 -parallel 20 -run='TestAccFSxOpenZFSFileSystem_(basic|intelligentTiering)'  -timeout 360m -vet=off
2025/11/20 23:22:07 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/20 23:22:07 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccFSxOpenZFSFileSystem_basic
=== PAUSE TestAccFSxOpenZFSFileSystem_basic
=== RUN   TestAccFSxOpenZFSFileSystem_intelligentTiering
=== PAUSE TestAccFSxOpenZFSFileSystem_intelligentTiering
=== CONT  TestAccFSxOpenZFSFileSystem_basic
=== CONT  TestAccFSxOpenZFSFileSystem_intelligentTiering
--- PASS: TestAccFSxOpenZFSFileSystem_basic (953.89s)
--- PASS: TestAccFSxOpenZFSFileSystem_intelligentTiering (1660.54s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/fsx        1664.940s

@github-actions
Copy link
Contributor

Community Guidelines

This comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀

Voting for Prioritization

  • Please vote on this Pull Request by adding a 👍 reaction to the original post to help the community and maintainers prioritize it.
  • Please see our prioritization guide for additional information on how the maintainers handle prioritization.
  • Please do not leave +1 or other comments that do not add relevant new information or questions; they generate extra noise for others following the Pull Request and do not help prioritize the request.

Pull Request Authors

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/fsx Issues and PRs that pertain to the fsx service. size/L Managed by automation to categorize the size of a PR. labels Nov 20, 2025
@github-actions github-actions bot added the size/XL Managed by automation to categorize the size of a PR. label Nov 20, 2025
@tabito-hara tabito-hara force-pushed the f-aws_fsx_openzfs_file_system-add_intelligent_tier branch from 246b449 to 2b6f01d Compare November 20, 2025 15:36
@tabito-hara tabito-hara marked this pull request as ready for review November 20, 2025 16:27
@tabito-hara tabito-hara requested a review from a team as a code owner November 20, 2025 16:27
@ewbankkit ewbankkit added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 20, 2025
@ewbankkit ewbankkit self-assigned this Nov 20, 2025
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Nov 20, 2025
@ewbankkit
Copy link
Contributor

% make testacc TESTARGS='-run=TestAccFSxOpenZFSFileSystem_' PKG=fsx ACCTEST_PARALLELISM=4
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 HEAD 🌿...
TF_ACC=1 go1.24.10 test ./internal/service/fsx/... -v -count 1 -parallel 4  -run=TestAccFSxOpenZFSFileSystem_ -timeout 360m -vet=off
2025/11/20 12:53:57 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/20 12:53:57 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccFSxOpenZFSFileSystem_basic
=== PAUSE TestAccFSxOpenZFSFileSystem_basic
=== RUN   TestAccFSxOpenZFSFileSystem_diskIops
=== PAUSE TestAccFSxOpenZFSFileSystem_diskIops
=== RUN   TestAccFSxOpenZFSFileSystem_disappears
=== PAUSE TestAccFSxOpenZFSFileSystem_disappears
=== RUN   TestAccFSxOpenZFSFileSystem_rootVolume
=== PAUSE TestAccFSxOpenZFSFileSystem_rootVolume
=== RUN   TestAccFSxOpenZFSFileSystem_securityGroupIDs
=== PAUSE TestAccFSxOpenZFSFileSystem_securityGroupIDs
=== RUN   TestAccFSxOpenZFSFileSystem_tags
=== PAUSE TestAccFSxOpenZFSFileSystem_tags
=== RUN   TestAccFSxOpenZFSFileSystem_copyTags
=== PAUSE TestAccFSxOpenZFSFileSystem_copyTags
=== RUN   TestAccFSxOpenZFSFileSystem_throughput
=== PAUSE TestAccFSxOpenZFSFileSystem_throughput
=== RUN   TestAccFSxOpenZFSFileSystem_storageType
=== PAUSE TestAccFSxOpenZFSFileSystem_storageType
=== RUN   TestAccFSxOpenZFSFileSystem_weeklyMaintenanceStartTime
=== PAUSE TestAccFSxOpenZFSFileSystem_weeklyMaintenanceStartTime
=== RUN   TestAccFSxOpenZFSFileSystem_automaticBackupRetentionDays
=== PAUSE TestAccFSxOpenZFSFileSystem_automaticBackupRetentionDays
=== RUN   TestAccFSxOpenZFSFileSystem_kmsKeyID
=== PAUSE TestAccFSxOpenZFSFileSystem_kmsKeyID
=== RUN   TestAccFSxOpenZFSFileSystem_dailyAutomaticBackupStartTime
=== PAUSE TestAccFSxOpenZFSFileSystem_dailyAutomaticBackupStartTime
=== RUN   TestAccFSxOpenZFSFileSystem_throughputCapacity
=== PAUSE TestAccFSxOpenZFSFileSystem_throughputCapacity
=== RUN   TestAccFSxOpenZFSFileSystem_storageCapacity
=== PAUSE TestAccFSxOpenZFSFileSystem_storageCapacity
=== RUN   TestAccFSxOpenZFSFileSystem_deploymentType
=== PAUSE TestAccFSxOpenZFSFileSystem_deploymentType
=== RUN   TestAccFSxOpenZFSFileSystem_multiAZ
=== PAUSE TestAccFSxOpenZFSFileSystem_multiAZ
=== RUN   TestAccFSxOpenZFSFileSystem_routeTableIDs
=== PAUSE TestAccFSxOpenZFSFileSystem_routeTableIDs
=== RUN   TestAccFSxOpenZFSFileSystem_deleteConfig
    openzfs_file_system_test.go:1021: Environment variable AWS_FSX_CREATE_FINAL_BACKUP is not set, skipping test
--- SKIP: TestAccFSxOpenZFSFileSystem_deleteConfig (0.00s)
=== RUN   TestAccFSxOpenZFSFileSystem_intelligentTiering
=== PAUSE TestAccFSxOpenZFSFileSystem_intelligentTiering
=== CONT  TestAccFSxOpenZFSFileSystem_intelligentTiering
=== CONT  TestAccFSxOpenZFSFileSystem_basic
=== CONT  TestAccFSxOpenZFSFileSystem_routeTableIDs
=== CONT  TestAccFSxOpenZFSFileSystem_multiAZ
--- PASS: TestAccFSxOpenZFSFileSystem_basic (940.74s)
=== CONT  TestAccFSxOpenZFSFileSystem_deploymentType
--- PASS: TestAccFSxOpenZFSFileSystem_multiAZ (1271.73s)
=== CONT  TestAccFSxOpenZFSFileSystem_storageCapacity
--- PASS: TestAccFSxOpenZFSFileSystem_routeTableIDs (1487.26s)
=== CONT  TestAccFSxOpenZFSFileSystem_throughputCapacity
--- PASS: TestAccFSxOpenZFSFileSystem_intelligentTiering (1774.51s)
=== CONT  TestAccFSxOpenZFSFileSystem_dailyAutomaticBackupStartTime
--- PASS: TestAccFSxOpenZFSFileSystem_storageCapacity (892.08s)
=== CONT  TestAccFSxOpenZFSFileSystem_kmsKeyID
--- PASS: TestAccFSxOpenZFSFileSystem_dailyAutomaticBackupStartTime (963.00s)
=== CONT  TestAccFSxOpenZFSFileSystem_automaticBackupRetentionDays
--- PASS: TestAccFSxOpenZFSFileSystem_throughputCapacity (1369.91s)
=== CONT  TestAccFSxOpenZFSFileSystem_weeklyMaintenanceStartTime
--- PASS: TestAccFSxOpenZFSFileSystem_kmsKeyID (951.64s)
=== CONT  TestAccFSxOpenZFSFileSystem_storageType
--- PASS: TestAccFSxOpenZFSFileSystem_automaticBackupRetentionDays (1071.53s)
=== CONT  TestAccFSxOpenZFSFileSystem_throughput
--- PASS: TestAccFSxOpenZFSFileSystem_weeklyMaintenanceStartTime (991.59s)
=== CONT  TestAccFSxOpenZFSFileSystem_copyTags
--- PASS: TestAccFSxOpenZFSFileSystem_deploymentType (3036.62s)
=== CONT  TestAccFSxOpenZFSFileSystem_tags
--- PASS: TestAccFSxOpenZFSFileSystem_storageType (939.29s)
=== CONT  TestAccFSxOpenZFSFileSystem_securityGroupIDs
--- PASS: TestAccFSxOpenZFSFileSystem_copyTags (963.93s)
=== CONT  TestAccFSxOpenZFSFileSystem_rootVolume
--- PASS: TestAccFSxOpenZFSFileSystem_tags (904.35s)
=== CONT  TestAccFSxOpenZFSFileSystem_disappears
--- PASS: TestAccFSxOpenZFSFileSystem_throughput (1534.77s)
=== CONT  TestAccFSxOpenZFSFileSystem_diskIops
--- PASS: TestAccFSxOpenZFSFileSystem_disappears (946.91s)
--- PASS: TestAccFSxOpenZFSFileSystem_securityGroupIDs (1829.86s)
--- PASS: TestAccFSxOpenZFSFileSystem_diskIops (1014.88s)
--- PASS: TestAccFSxOpenZFSFileSystem_rootVolume (1711.64s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/fsx	6529.694s

Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

@ewbankkit
Copy link
Contributor

@tabito-hara Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit 4a3034f into hashicorp:main Nov 21, 2025
43 checks passed
@github-actions
Copy link
Contributor

Warning

This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v6.23.0 milestone Nov 21, 2025
@github-actions
Copy link
Contributor

This functionality has been released in v6.22.1 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Nov 21, 2025
@github-actions
Copy link
Contributor

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/fsx Issues and PRs that pertain to the fsx service. size/L Managed by automation to categorize the size of a PR. size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FSx for OpenZFS Intelligent-Tiering storage class Amazon FSx Intelligent-Tiering

2 participants