-
Notifications
You must be signed in to change notification settings - Fork 5k
New Resource: azurerm_data_protection_backup_policy_data_lake_storage
#31179
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
Merged
sreallymatt
merged 37 commits into
hashicorp:main
from
neil-yechenwei:dataprotectionbackuppolicyadlsstorage
Mar 30, 2026
Merged
Changes from 7 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
589ffcb
New Resource: azurerm_data_protection_backup_policy_data_lake_storage
5d48bf2
fix the delete issue on backup vault
3d37a2d
update resource md file
0bca1d4
update pr per coments
bb6dd1c
update LRO
a07049d
remove unused func
e5c91cf
merge latest change
b50f8b2
update data_protection_backup_policy_data_lake_storage.html.markdown
ed02d83
sort parameters
2987cd4
merge latest change
cf87de6
Merge branch 'main' of github.com:hashicorp/terraform-provider-azurer…
teowa 9415e14
update doc
teowa 8576cbd
Merge branch 'main' of github.com:hashicorp/terraform-provider-azurer…
teowa 6af5998
update poller apiversion; update policy name validation; update doc
teowa e98ca3c
update doc
teowa 81ea365
update doc
teowa 63f190c
hide data_store_type
teowa db4590c
fmt
teowa c654526
add validation for timezone
teowa cb9c9e1
add maxitem for backup_repeating_time_interval
teowa 1d18b0d
rename `backup_repeating_time_intervals` to `backup_schedule`
ziyeqf 7933e3d
add test case for time offset
ziyeqf a683a12
rename `vault_id` to `data_protection_backup_vault_id`
ziyeqf d81824d
flatten `duration`
ziyeqf d30d1c6
add resource identity
ziyeqf 4366793
flatten `criteria`
ziyeqf d60eb7c
update error msg
ziyeqf b72d5c2
add `objectType` in create request
ziyeqf 9914c4f
compress `BackupPolicy` flatten function a single function
ziyeqf f827f7f
remove `priority` of retention_rule
ziyeqf 57620db
terrafmt
ziyeqf c4a9ce4
rollback test case for `complete`
ziyeqf 6a73fff
update per comment
ziyeqf a7db2bc
Merge branch 'main' into dataprotectionbackuppolicyadlsstorage
ziyeqf ee55f19
update per comments
ziyeqf 9d49d1f
update per comment
ziyeqf 3dd8ca1
update per comments
ziyeqf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
internal/services/dataprotection/custompollers/data_protection_backup_vault_poller.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| // Copyright (c) HashiCorp, Inc. | ||
| // SPDX-License-Identifier: MPL-2.0 | ||
|
|
||
| package custompollers | ||
|
|
||
| import ( | ||
| "context" | ||
| "fmt" | ||
| "time" | ||
|
|
||
| "github.com/hashicorp/go-azure-helpers/lang/response" | ||
| "github.com/hashicorp/go-azure-sdk/resource-manager/dataprotection/2024-04-01/backupvaults" | ||
| "github.com/hashicorp/go-azure-sdk/sdk/client/pollers" | ||
| ) | ||
|
|
||
| var _ pollers.PollerType = &dataProtectionBackupVaultPoller{} | ||
|
|
||
| type dataProtectionBackupVaultPoller struct { | ||
| client *backupvaults.BackupVaultsClient | ||
| id backupvaults.BackupVaultId | ||
| } | ||
|
|
||
| var ( | ||
| pollingSuccess = pollers.PollResult{ | ||
| PollInterval: 10 * time.Second, | ||
| Status: pollers.PollingStatusSucceeded, | ||
| } | ||
| pollingInProgress = pollers.PollResult{ | ||
| HttpResponse: nil, | ||
| PollInterval: 10 * time.Second, | ||
| Status: pollers.PollingStatusInProgress, | ||
| } | ||
| ) | ||
|
|
||
| func NewDataProtectionBackupVaultPoller(client *backupvaults.BackupVaultsClient, id backupvaults.BackupVaultId) *dataProtectionBackupVaultPoller { | ||
| return &dataProtectionBackupVaultPoller{ | ||
| client: client, | ||
| id: id, | ||
| } | ||
| } | ||
|
|
||
| func (p dataProtectionBackupVaultPoller) Poll(ctx context.Context) (*pollers.PollResult, error) { | ||
| resp, err := p.client.Get(ctx, p.id) | ||
| if err != nil { | ||
| if response.WasNotFound(resp.HttpResponse) { | ||
| return &pollingSuccess, nil | ||
| } | ||
| return nil, fmt.Errorf("retrieving %s: %+v", p.id, err) | ||
| } | ||
|
|
||
| return &pollingInProgress, nil | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AZBP006: redundant nil assignment to pointer field "HttpResponse" - omit the fieldGot this error from azurerm-linter. There are 6 other violations. Please run the linter on your local and fix / add explanation if you disagree with the linters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.