Skip to content

[enhancement] aws_neptune_cluster: add Point in time restore feature#48464

Open
sukumaar wants to merge 3 commits into
hashicorp:mainfrom
sukumaar:neptune-pitr
Open

[enhancement] aws_neptune_cluster: add Point in time restore feature#48464
sukumaar wants to merge 3 commits into
hashicorp:mainfrom
sukumaar:neptune-pitr

Conversation

@sukumaar

@sukumaar sukumaar commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

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 restore_to_point_in_time support to aws_neptune_cluster, enabling users to create point-in-time restored clusters and fast clones via the Neptune RestoreDBClusterToPointInTime API.

Previously, users who wanted to clone a Neptune cluster or restore to a specific point in time had to do so manually via the AWS console/CLI and then import the resource. This change adds a restore_to_point_in_time configuration block that supports:

  • source_cluster_identifier to specify which cluster to restore from
  • restore_type for choosing between full-copy or copy-on-write (fast clone)
  • restore_to_time to restore to a specific UTC timestamp
  • use_latest_restorable_time to restore to the most recent available backup point

The implementation follows the same pattern already established by aws_rds_cluster PITR support, adapted for Neptune's API surface.

Relations

Closes #44620

References

Output from Acceptance Testing

% make testacc TESTS=TestAccNeptuneCluster_restoreToPointInTime PKG=neptune ACCTEST_PARALLELISM=1 ACCTEST_TIMEOUT=4880m
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Validating schemas
ok      github.com/hashicorp/terraform-provider-aws/internal/provider/sdkv2     (cached)
ok      github.com/hashicorp/terraform-provider-aws/internal/provider/framework (cached)
make: Running acceptance tests on branch: 🌿 neptune-pitr 🌿...
TF_ACC=1 go1.26.4 test ./internal/service/neptune/... -v -count 1 -parallel 1 -run='TestAccNeptuneCluster_restoreToPointInTime'  -timeout 4880m -vet=off -buildvcs=false
2026/06/19 11:13:19 Creating Terraform AWS Provider (SDKv2-style)...
2026/06/19 11:13:19 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN   TestAccNeptuneCluster_restoreToPointInTime_latestRestorableTime
=== PAUSE TestAccNeptuneCluster_restoreToPointInTime_latestRestorableTime
=== RUN   TestAccNeptuneCluster_restoreToPointInTime_copyOnWrite
=== PAUSE TestAccNeptuneCluster_restoreToPointInTime_copyOnWrite
=== CONT  TestAccNeptuneCluster_restoreToPointInTime_latestRestorableTime
--- PASS: TestAccNeptuneCluster_restoreToPointInTime_latestRestorableTime (1332.22s)
=== CONT  TestAccNeptuneCluster_restoreToPointInTime_copyOnWrite
--- PASS: TestAccNeptuneCluster_restoreToPointInTime_copyOnWrite (1463.28s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/neptune    2800.882s

@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 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/neptune Issues and PRs that pertain to the neptune service. size/L Managed by automation to categorize the size of a PR. partner Contribution from a partner. labels Jun 18, 2026
@sukumaar sukumaar changed the title add Point in time restore in neptune just like rds [enhancement] aws_neptune_cluster:add Point in time restore feature Jun 19, 2026
@sukumaar sukumaar changed the title [enhancement] aws_neptune_cluster:add Point in time restore feature [enhancement] aws_neptune_cluster: add Point in time restore feature Jun 19, 2026
@sukumaar sukumaar marked this pull request as ready for review June 19, 2026 16:49
@sukumaar sukumaar requested a review from a team as a code owner June 19, 2026 16:49
@dosubot dosubot Bot added the enhancement Requests to existing resources that expand the functionality or scope. label Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. partner Contribution from a partner. service/neptune Issues and PRs that pertain to the neptune 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.

r/aws_neptune_cluster: Add restore_to_point_in_time for Neptune cluster

1 participant