Skip to content

[Enhancement] aws_efs_mount_target: Add ip_address_type and ipv6_address arguments to support IPv6 connectivity#44079

Merged
ewbankkit merged 8 commits into
hashicorp:mainfrom
tabito-hara:f-aws_efs_mount_target-supoort_ip_address_type
Aug 29, 2025
Merged

[Enhancement] aws_efs_mount_target: Add ip_address_type and ipv6_address arguments to support IPv6 connectivity#44079
ewbankkit merged 8 commits into
hashicorp:mainfrom
tabito-hara:f-aws_efs_mount_target-supoort_ip_address_type

Conversation

@tabito-hara
Copy link
Copy Markdown
Contributor

@tabito-hara tabito-hara commented Aug 29, 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

This PR adds IPv6 support to EFS mount targets by introducing two new arguments for aws_efs_mount_target resource:

  • ip_address_type – Specifies the IP address type for the mount target (ipv4, ipv6, or dual-stack).

    • Although the read API does not return this value directly, it can be inferred from the IpAddress and IpV6Address fields in the response. Therefore, it is marked as Computed.
    • Since the update API does not allow this attribute to be modified, it is marked as ForceNew.
  • ipv6_address – The IPv6 address assigned to the mount target (a computed attribute when using IPv6).

    • The read API returns the assigned IPv6 address. Therefore, it is marked as Computed.
    • Since the update API does not allow this attribute to be modified, it is marked as ForceNew.
  • The two attributes are also added to aws_efs_mount_target data source.

Relations

Closes #44078

References

https://docs.aws.amazon.com/efs/latest/ug/API_CreateMountTarget.html#efs-CreateMountTarget-request-Ipv6Address

Output from Acceptance Testing

Resources

$ make testacc TESTS=TestAccEFSMountTarget_ PKG=efs     
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.6 test ./internal/service/efs/... -v -count 1 -parallel 20 -run='TestAccEFSMountTarget_'  -timeout 360m -vet=off
2025/08/29 09:04:39 Creating Terraform AWS Provider (SDKv2-style)...
2025/08/29 09:04:39 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccEFSMountTarget_basic
=== PAUSE TestAccEFSMountTarget_basic
=== RUN   TestAccEFSMountTarget_disappears
=== PAUSE TestAccEFSMountTarget_disappears
=== RUN   TestAccEFSMountTarget_ipAddress
=== PAUSE TestAccEFSMountTarget_ipAddress
=== RUN   TestAccEFSMountTarget_ipAddressTypeIPv6Only
=== PAUSE TestAccEFSMountTarget_ipAddressTypeIPv6Only
=== RUN   TestAccEFSMountTarget_ipAddressTypeIPv6OnlyWithIPv6Address
=== PAUSE TestAccEFSMountTarget_ipAddressTypeIPv6OnlyWithIPv6Address
=== RUN   TestAccEFSMountTarget_ipAddressTypeDualStack
=== PAUSE TestAccEFSMountTarget_ipAddressTypeDualStack
=== RUN   TestAccEFSMountTarget_ipAddressTypeDualStackWithIPv6Address
=== PAUSE TestAccEFSMountTarget_ipAddressTypeDualStackWithIPv6Address
=== RUN   TestAccEFSMountTarget_IPAddress_emptyString
=== PAUSE TestAccEFSMountTarget_IPAddress_emptyString
=== CONT  TestAccEFSMountTarget_basic
=== CONT  TestAccEFSMountTarget_ipAddressTypeIPv6OnlyWithIPv6Address
=== CONT  TestAccEFSMountTarget_ipAddress
=== CONT  TestAccEFSMountTarget_ipAddressTypeDualStackWithIPv6Address
=== CONT  TestAccEFSMountTarget_IPAddress_emptyString
=== CONT  TestAccEFSMountTarget_ipAddressTypeDualStack
=== CONT  TestAccEFSMountTarget_disappears
=== CONT  TestAccEFSMountTarget_ipAddressTypeIPv6Only
--- PASS: TestAccEFSMountTarget_ipAddress (130.81s)
--- PASS: TestAccEFSMountTarget_IPAddress_emptyString (132.69s)
--- PASS: TestAccEFSMountTarget_disappears (139.97s)
--- PASS: TestAccEFSMountTarget_ipAddressTypeIPv6OnlyWithIPv6Address (147.24s)
--- PASS: TestAccEFSMountTarget_ipAddressTypeIPv6Only (147.34s)
--- PASS: TestAccEFSMountTarget_ipAddressTypeDualStackWithIPv6Address (152.15s)
--- PASS: TestAccEFSMountTarget_ipAddressTypeDualStack (156.69s)
--- PASS: TestAccEFSMountTarget_basic (232.04s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/efs        236.945s

Data sources

$ make testacc TESTS=TestAccEFSMountTargetDataSource_ PKG=efs
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.6 test ./internal/service/efs/... -v -count 1 -parallel 20 -run='TestAccEFSMountTargetDataSource_'  -timeout 360m -vet=off
2025/08/29 09:09:17 Creating Terraform AWS Provider (SDKv2-style)...
2025/08/29 09:09:17 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccEFSMountTargetDataSource_basic
=== PAUSE TestAccEFSMountTargetDataSource_basic
=== RUN   TestAccEFSMountTargetDataSource_byAccessPointID
=== PAUSE TestAccEFSMountTargetDataSource_byAccessPointID
=== RUN   TestAccEFSMountTargetDataSource_byFileSystemID
=== PAUSE TestAccEFSMountTargetDataSource_byFileSystemID
=== CONT  TestAccEFSMountTargetDataSource_basic
=== CONT  TestAccEFSMountTargetDataSource_byFileSystemID
=== CONT  TestAccEFSMountTargetDataSource_byAccessPointID
--- PASS: TestAccEFSMountTargetDataSource_byAccessPointID (125.98s)
--- PASS: TestAccEFSMountTargetDataSource_basic (126.82s)
--- PASS: TestAccEFSMountTargetDataSource_byFileSystemID (126.97s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/efs        131.154s

@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/efs Issues and PRs that pertain to the efs service. labels Aug 29, 2025
@github-actions
Copy link
Copy Markdown
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 the size/L Managed by automation to categorize the size of a PR. label Aug 29, 2025
@tabito-hara tabito-hara changed the title [Enhancement] aws_efs_mount_target: Supoort ip_address_type and ipv6_address arguments [Enhancement] aws_efs_mount_target: Add ip_address_type and ipv6_address arguments to support IPv6 connectivity Aug 29, 2025
@tabito-hara tabito-hara marked this pull request as ready for review August 29, 2025 01:19
@tabito-hara tabito-hara requested a review from a team as a code owner August 29, 2025 01:19
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Aug 29, 2025
@ewbankkit ewbankkit self-assigned this Aug 29, 2025
@github-actions github-actions Bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Aug 29, 2025
Copy link
Copy Markdown
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 🚀.

% make testacc TESTARGS='-run=TestAccEFSMountTarget_\|TestAccEFSMountTargetDataSource_' PKG=efs ACCTEST_PARALLELISM=4
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.24.6 test ./internal/service/efs/... -v -count 1 -parallel 4  -run=TestAccEFSMountTarget_\|TestAccEFSMountTargetDataSource_ -timeout 360m -vet=off
2025/08/29 10:57:00 Creating Terraform AWS Provider (SDKv2-style)...
2025/08/29 10:57:00 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccEFSMountTargetDataSource_basic
=== PAUSE TestAccEFSMountTargetDataSource_basic
=== RUN   TestAccEFSMountTargetDataSource_byAccessPointID
=== PAUSE TestAccEFSMountTargetDataSource_byAccessPointID
=== RUN   TestAccEFSMountTargetDataSource_byFileSystemID
=== PAUSE TestAccEFSMountTargetDataSource_byFileSystemID
=== RUN   TestAccEFSMountTarget_basic
=== PAUSE TestAccEFSMountTarget_basic
=== RUN   TestAccEFSMountTarget_disappears
=== PAUSE TestAccEFSMountTarget_disappears
=== RUN   TestAccEFSMountTarget_ipAddress
=== PAUSE TestAccEFSMountTarget_ipAddress
=== RUN   TestAccEFSMountTarget_IPAddress_emptyString
=== PAUSE TestAccEFSMountTarget_IPAddress_emptyString
=== CONT  TestAccEFSMountTargetDataSource_basic
=== CONT  TestAccEFSMountTarget_disappears
=== CONT  TestAccEFSMountTarget_IPAddress_emptyString
=== CONT  TestAccEFSMountTarget_ipAddress
--- PASS: TestAccEFSMountTarget_disappears (117.85s)
=== CONT  TestAccEFSMountTargetDataSource_byFileSystemID
--- PASS: TestAccEFSMountTargetDataSource_basic (118.24s)
=== CONT  TestAccEFSMountTarget_basic
--- PASS: TestAccEFSMountTarget_ipAddress (121.04s)
=== CONT  TestAccEFSMountTargetDataSource_byAccessPointID
--- PASS: TestAccEFSMountTarget_IPAddress_emptyString (121.32s)
--- PASS: TestAccEFSMountTargetDataSource_byAccessPointID (115.29s)
--- PASS: TestAccEFSMountTargetDataSource_byFileSystemID (126.54s)
--- PASS: TestAccEFSMountTarget_basic (204.05s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/efs	327.774s

@ewbankkit
Copy link
Copy Markdown
Contributor

@tabito-hara Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit merged commit ec78166 into hashicorp:main Aug 29, 2025
47 checks passed
@github-actions
Copy link
Copy Markdown
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.12.0 milestone Aug 29, 2025
@github-actions github-actions Bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Sep 4, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 4, 2025

This functionality has been released in v6.12.0 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
Copy link
Copy Markdown
Contributor

github-actions Bot commented Oct 5, 2025

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 Oct 5, 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. service/efs Issues and PRs that pertain to the efs service. size/L 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.

"ip_address_type" is not supported on aws_efs_mount_target

2 participants