Skip to content
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

Support for Azure File Share backup #5213

Merged
merged 18 commits into from
Dec 19, 2019

Conversation

sean-nixon
Copy link
Contributor

Addresses #5026

An additional resource beyond the suggested resources in the associated issue was required in order to first register a storage account with a recovery services vault. I've also used an updated naming scheme based on my proposal in #5089 and associated PR #5170 in order to better distinguish Azure Backup resources from Site Recovery (DR) resources. That PR does not technically block this one, but it would make the naming more consistent with the existing Azure Backup resources.

This is my first PR creating totally new resources and I'm pretty new to Go so I'm very open to feedback on style and conventions.

API Docs:
https://docs.microsoft.com/en-us/rest/api/backup/protecteditems
https://docs.microsoft.com/en-us/rest/api/backup/protectioncontainers
https://docs.microsoft.com/en-us/rest/api/backup/protectionpolicies

Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

Hi @sean-nixon,

Thanks for the PR! overall this looks great, however i've left a few minor comments left inline that should be addressed before merge. a FYI we are planning on doing a large refactor that will impact all open PRs shortly and it doesn't seem like i was able to push changes to this branch/

azurerm/resource_arm_backup_policy_file_share.go Outdated Show resolved Hide resolved
Comment on lines 116 to 117
_, err = resourceArmBackupProtectionContainerStorageAccountWaitForOperation(ctx, opStatusClient, vaultName, resGroup, operationID, d)
if err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

these two lines can be merged

Comment on lines 199 to 200
_, err = resourceArmBackupProtectionContainerStorageAccountWaitForOperation(ctx, opClient, vaultName, resGroup, operationID, d)
if err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can these two lines be merged?

azurerm/resource_arm_backup_protected_file_share_test.go Outdated Show resolved Hide resolved
azurerm/resource_arm_backup_protected_file_share_test.go Outdated Show resolved Hide resolved
azurerm/resource_arm_backup_protected_file_share_test.go Outdated Show resolved Hide resolved
azurerm/resource_arm_backup_policy_file_share_test.go Outdated Show resolved Hide resolved
azurerm/resource_arm_backup_policy_file_share_test.go Outdated Show resolved Hide resolved
@katbyte katbyte added this to the v1.40.0 milestone Dec 18, 2019
@sean-nixon
Copy link
Contributor Author

@katbyte I've updated the PR with most of your suggestions. In regards to the comments on code accounting for Azure/azure-sdk-for-go#2824 (comment), I am still seeing this issue locally for every resource included here. Assuming it's fixed, I'm guessing an SDK upgrade would be required in order to incorporate the fix? What's the process for that?

@ghost ghost removed the waiting-response label Dec 18, 2019
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

@sean-nixon, thanks for checking. It could have only been fixed for a couple of the endpoints or require a new API version. Either way this looks great now! thanks for the revisions and i'll merge it once the tests finish

@katbyte katbyte merged commit 42b5c34 into hashicorp:master Dec 19, 2019
katbyte added a commit that referenced this pull request Dec 19, 2019
@sean-nixon sean-nixon deleted the azure-file-backup branch December 19, 2019 14:15
@ghost
Copy link

ghost commented Jan 8, 2020

This has been released in version 1.40.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.40.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Mar 28, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants