Skip to content

Azure backend: support snapshots/versioning#24069

Merged
tombuildsstuff merged 2 commits intohashicorp:masterfrom
evenh:feature/azure_backend_versioning
Jun 25, 2020
Merged

Azure backend: support snapshots/versioning#24069
tombuildsstuff merged 2 commits intohashicorp:masterfrom
evenh:feature/azure_backend_versioning

Conversation

@evenh
Copy link
Copy Markdown
Contributor

@evenh evenh commented Feb 10, 2020

Rebased PR with some small fixes. Originally by @pmarques (2018) and @rahdjoudj (2019).

Fixes #18284
Closes #18512
Closes #21888

@hashicorp-cla
Copy link
Copy Markdown

hashicorp-cla commented Feb 10, 2020

CLA assistant check
All committers have signed the CLA.

@evenh evenh requested a review from tombuildsstuff February 10, 2020 15:23
@Bessonov
Copy link
Copy Markdown

Just mess up my state. @tombuildsstuff please, don't let this MR rotten in 2020. If you have not enough time, who can help out?

@evenh evenh requested a review from pselle February 13, 2020 13:47
@WebSpider
Copy link
Copy Markdown

Really looking forward to this!
(Just spent a few hr rolling back a failed provider update, rewriting statefile by hand)

@landro
Copy link
Copy Markdown

landro commented Mar 23, 2020

Hi @tombuildsstuff , any chance we can get this merged any time soon? We urgently need this in order to prevent incidents like the one @WebSpider experienced. Thanks!

@WascawyWabbit
Copy link
Copy Markdown

Really looking forward to this, any news on when it will be released?

@Bowbaq
Copy link
Copy Markdown
Contributor

Bowbaq commented Apr 10, 2020

@tombuildsstuff I just messed my state, thought I was just going to restore a previous version & came to find out that versioning is not only not enabled by default but not even possible. This would have likely saved me a few hours of work

@WascawyWabbit
Copy link
Copy Markdown

Any update on this one please? I can see that review requests are pending From Feb 10th, which is > 2 months ago now.

@pselle pselle removed their request for review April 28, 2020 19:48
@doubletr
Copy link
Copy Markdown

@tombuildsstuff, Could you please help to review this RP? It's pending for about 3 months. Thanks for your help in advance.

@tombuildsstuff
Copy link
Copy Markdown
Contributor

Dependent on #24669

@codecov
Copy link
Copy Markdown

codecov bot commented May 20, 2020

Codecov Report

Merging #24069 into master will decrease coverage by 0.00%.
The diff coverage is 50.00%.

Impacted Files Coverage Δ
backend/remote-state/azure/backend_state.go 0.00% <0.00%> (ø)
backend/remote-state/azure/client.go 0.00% <0.00%> (ø)
backend/remote-state/azure/backend.go 96.10% <100.00%> (+0.18%) ⬆️
terraform/node_resource_plan.go 91.80% <0.00%> (-1.64%) ⬇️
dag/walk.go 92.54% <0.00%> (-0.63%) ⬇️
terraform/evaluate.go 53.15% <0.00%> (+0.45%) ⬆️

Co-authored-by: Reda Ahdjoudj <reda.ahdjoudj@gmail.com>
Co-authored-by: Patrick F. Marques <patrickfmarques@gmail.com>
@evenh evenh force-pushed the feature/azure_backend_versioning branch from 31c8fff to b9584d7 Compare May 20, 2020 19:17
@evenh
Copy link
Copy Markdown
Contributor Author

evenh commented May 20, 2020

I have squashed the commits and rebased after #24669 was merged in. Could you please review @tombuildsstuff, especially since you are very familiar with Giovanni ;)

Copy link
Copy Markdown
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

hey @evenh

Thanks for this PR - apologies for the delay reviewing this - as mentioned previously we've been waiting to move off the deprecated Storage SDK in the Azure SDK for Go in favour of Giovanni.

Taking a look through this mostly LGTM - the main issue being switching to use the terminology that Azure uses instead of what Amazon uses ("snapshot" instead of "versioning") - but if we can fix that up then we should be able to take another look and kick off the tests :)

Thanks!

@tombuildsstuff tombuildsstuff added the waiting-response An issue/pull request is waiting for a response from the community label May 26, 2020
@tombuildsstuff tombuildsstuff added this to the v0.13.0 milestone May 26, 2020
@landro
Copy link
Copy Markdown

landro commented May 26, 2020

Hi there, just wanted to let you know that if you enable soft delete on the storage account, you actually get new snapshots of the state every time you run terraform. See this for details: https://docs.microsoft.com/en-us/azure/storage/blobs/soft-delete-overview (Put operation)

@ghost ghost removed waiting-response An issue/pull request is waiting for a response from the community labels May 26, 2020
@tombuildsstuff tombuildsstuff added the waiting-response An issue/pull request is waiting for a response from the community label May 26, 2020
@ghost ghost removed the waiting-response An issue/pull request is waiting for a response from the community label May 26, 2020
@tombuildsstuff tombuildsstuff added the waiting-response An issue/pull request is waiting for a response from the community label May 26, 2020
@evenh evenh requested a review from tombuildsstuff May 27, 2020 21:55
Copy link
Copy Markdown
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for this @evenh

@tombuildsstuff tombuildsstuff added enhancement and removed waiting-response An issue/pull request is waiting for a response from the community labels Jun 4, 2020
@tombuildsstuff
Copy link
Copy Markdown
Contributor

tombuildsstuff commented Jun 25, 2020

Ran the tests for this and they pass - thanks for this @evenh / sorry for the delay getting this merged 👍

PASS
ok  	github.com/hashicorp/terraform/backend/remote-state/azure	1468.780s

@evenh
Copy link
Copy Markdown
Contributor Author

evenh commented Jun 25, 2020

Hooray, thanks :-)

@tombuildsstuff tombuildsstuff merged commit 0f85b28 into hashicorp:master Jun 25, 2020
tombuildsstuff added a commit that referenced this pull request Jun 25, 2020
@ghost
Copy link
Copy Markdown

ghost commented Jul 26, 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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 26, 2020
@evenh evenh deleted the feature/azure_backend_versioning branch November 20, 2020 11:51
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.

AzureRM Backend: support for snapshotting before changes are made

9 participants