Repository navigation
feat(azure): make storage account replication type configurable - #941
Open
officialasishkumar wants to merge 1 commit into
Open
officialasishkumar wants to merge 1 commit into
officialasishkumar wants to merge 1 commit into
Conversation
The stack's storage account, which holds its buckets, key/value stores and queues, was always deployed with locally redundant storage. Stacks that need to survive a zone or region outage had no way of asking for more. Add a storage.replication-type stack file option, accepting LRS, ZRS, GRS, RAGRS, GZRS or RAGZRS, for both the Pulumi and Terraform providers. It defaults to LRS so existing stacks are unaffected, and unknown values are rejected when the stack config is loaded, rather than part way through a deployment. Website storage accounts are unchanged, as their content is redeployable. Run the tests in ./common as part of the Azure test targets, otherwise the new config tests wouldn't run in CI. Fixes nitrictech#777
|
@officialasishkumar is attempting to deploy a commit to the Nitric Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The stack's storage account, which holds its buckets, key/value stores and queues, was always deployed as
LRS. This adds a stack file option to choose the replication type, for both the Pulumi and Terraform Azure providers:LRS,ZRS,GRS,RAGRS,GZRSorRAGZRS, and defaults toLRSso existing stacks are unaffected../commonis added to the Azuretestandtest-coveragetargets, because they only covered./runtime/...and the new tests wouldn't have run in CI.generated/stackwas regenerated withcdktf-cli@0.20.8, as pinned in the Makefile.Changing the type on a deployed stack: azurerm recreates the storage account for some changes, which deletes its data (details). The docs warn about this next to the option.
Fixes #777
Type of change
Testing
TestConfigFromAttributes_StorageReplicationType, covering the default, every accepted value and rejected values. The rejection cases fail without the validation.createStorageAccountwith Pulumi mocks, which gaveStandard_LRSandStandard_RAGZRS. I also checked that all six names exist in the pinnedpulumi-azure-native-sdk/storage.stackmodule with CDKTF, which gave"storage_replication_type": "GZRS", andterraform validatepasses against azurerm 4.20.0.make test-coverageandmake lintpass incloud/azure,cmd/deployandcmd/deploytfbuild, and the docs spellcheck passes.Not tested: a real deployment, as I don't have an Azure subscription to test against.