Skip to content

azurerm_data_protection_backup_vault - add workaround for ArchiveStore datastore_type - #31985

Draft
ziyeqf wants to merge 7 commits into
hashicorp:mainfrom
ziyeqf:ziyeqf/dataprotection/datastore_type
Draft

azurerm_data_protection_backup_vault - add workaround for ArchiveStore datastore_type#31985
ziyeqf wants to merge 7 commits into
hashicorp:mainfrom
ziyeqf:ziyeqf/dataprotection/datastore_type

Conversation

@ziyeqf

@ziyeqf ziyeqf commented Mar 18, 2026

Copy link
Copy Markdown
Collaborator

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

Per the error message, setting the datastore_type to ArchiveStore requires an addtional item of StorageSettings.
The schema was designed to only accept 1 datastore_type, considering this is currently the only known case, requires more than 1 StorageSettings, added a workaround logic instead of introduce breaking change to the schema.

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.
    For example: “resource_name_here - description of change e.g. adding property new_property_name_here

Changes to existing Resource / Data Source

  • I have added an explanation of what my changes do and why I'd like you to include them (This may be covered by linking to an issue above, but may benefit from additional explanation).
  • I have written new tests for my resource or datasource changes & updated any relevant documentation.
  • I have successfully run tests with my changes locally. If not, please provide details on testing challenges that prevented you running the tests.
  • (For changes that include a state migration only). I have manually tested the migration path between relevant versions of the provider.

Testing

  • My submission includes Test coverage as described in the Contribution Guide and the tests pass. (if this is not possible for any reason, please include details of why you did or could not add test coverage)
image

Change Log

Below please provide what should go into the changelog (if anything) conforming to the Changelog Format documented here.

  • azurerm_data_protection_backup_vault - add workaround for ArchiveStore datastore_type[GH-00000]

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

Fixes #31962

AI Assistance Disclosure

  • AI Assisted - This contribution was made by, or with the assistance of, AI/LLMs

For code review

Rollback Plan

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

Changes to Security Controls

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

Note

If this PR changes meaningfully during the course of review please update the title and description as required.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a workaround in the azurerm_data_protection_backup_vault resource to support datastore_type = "ArchiveStore" by sending an additional VaultStore entry in the service storageSettings, aligning with the Data Protection API’s requirement.

Changes:

  • Add ArchiveStore workaround by appending a VaultStore storage setting during create/update.
  • Add new acceptance tests covering datastore_type values OperationalStore and ArchiveStore.
  • Update the resource documentation to reflect the currently supported datastore_type values (removing SnapshotStore references).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
internal/services/dataprotection/data_protection_backup_vault_resource.go Implements the ArchiveStore workaround by adding required extra VaultStore storage setting.
internal/services/dataprotection/data_protection_backup_vault_resource_test.go Adds acceptance coverage for OperationalStore and ArchiveStore datastore types.
website/docs/r/data_protection_backup_vault.html.markdown Updates docs to match supported datastore types and removes outdated SnapshotStore note.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/services/dataprotection/data_protection_backup_vault_resource.go Outdated
@github-actions github-actions Bot closed this May 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This draft pull request is being closed because it has been inactive for 60 days ⏳. This helps our maintainers find and focus on the active contributions.

If you would like to continue working on this, please reopen the pull request and mark it as ready for review when complete. Thank you!

@ziyeqf ziyeqf reopened this May 18, 2026
@github-actions github-actions Bot closed this Jul 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This draft pull request is being closed because it has been inactive for 60 days ⏳. This helps our maintainers find and focus on the active contributions.

If you would like to continue working on this, please reopen the pull request and mark it as ready for review when complete. Thank you!

@ziyeqf ziyeqf reopened this Jul 21, 2026
@ziyeqf

This comment has been minimized.

@hc-github-team-tf-azure

Copy link
Copy Markdown
Collaborator

Build: 732886
PR: #31985

Total: 11
Passed: 11
Failed: 0
Test Duration: 0h 7m 48s

Test Details
Status Test Name Duration %❌ First Last
✅ PASS TestAccDataProtectionBackupVaultDataSource_complete 172.161s 0% 181d 174d
✅ PASS TestAccDataProtectionBackupVault_requiresImport 209.416s 0% 178d 121d
✅ PASS TestAccDataProtectionBackupVault_zoneRedundant 211.718s 0% 174d 174d
✅ PASS TestAccDataProtectionBackupVault_datastoreTypeArchiveStore 213.242s N/A N/A N/A
✅ PASS TestAccDataProtectionBackupVault_datastoreTypeOperationalStore 218.407s N/A N/A N/A
✅ PASS TestAccDataProtectionBackupVault_basic 219.097s 0% 174d 118d
✅ PASS TestAccDataProtectionBackupVault_complete 219.471s 0% 177d 121d
✅ PASS TestAccDataProtectionBackupVault_resourceIdentity 225.137s 0% 176d 118d
✅ PASS TestAccDataProtectionBackupVault_crossRegionRestore 262.044s 0% 182d 129d
✅ PASS TestAccDataProtectionBackupVault_update 323.987s 0% 178d 129d
✅ PASS TestAccDataProtectionBackupVault_updateIdentity 388.459s 0% 181d 128d

@hc-github-team-tf-azure hc-github-team-tf-azure added the teamcity-passed No failures in teamcity tests label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

azurerm_data_protection_backup_vault datastore_type creation failure for ArchiveStore

5 participants