-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Azurerm storage for remote state backend #4487
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
Open
omattsson
wants to merge
52
commits into
gruntwork-io:main
Choose a base branch
from
omattsson:azurerm_storage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+28,789
−72
Open
Changes from 50 commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
4022280
Starting to test with azurerm storage backend. Mostly done to speed u…
omattsson 12c7ef4
Add azure_helper functions
olofmattsson-inriver 228b6fe
Merge branch 'gruntwork-io:main' into azurerm_storage
omattsson ded4b00
Add azurerm as remote backend
olofmattsson-inriver 543870e
Merge branch 'azurerm_storage' of https://github.com/omattsson/terrag…
olofmattsson-inriver 561dd63
Add integration test for backed booststrap and delete
olofmattsson-inriver 307bf1c
Add test helpers for Azure storage
olofmattsson-inriver 2d7ba15
Fix lint errors in azurerm backend
olofmattsson-inriver 41aaa32
Fix lint issues in azurehelper
olofmattsson-inriver 23f6d26
Add getTerragruntOutputJSONFromRemoteStateAzurerm and fix linters
olofmattsson-inriver 5d4e128
Fix syntax error
olofmattsson-inriver 9518a41
Misc cleanups
olofmattsson-inriver 42604b4
Fix linting
olofmattsson-inriver 9e3da17
Running godot
olofmattsson-inriver 9d1c686
Update docs
olofmattsson-inriver 9b1b33c
Update go mod
olofmattsson-inriver 00ed2c8
Merge branch 'gruntwork-io:main' into azurerm_storage
omattsson a39ccf3
Merge branch 'gruntwork-io:main' into azurerm_storage
omattsson 281b772
Adding resource group and storage account creating and tests
olofmattsson-inriver 03dba9a
Updated docs
olofmattsson-inriver 47234dc
UPdate go.mod
olofmattsson-inriver 032f64e
Tests and moving to use a experiment flag
olofmattsson-inriver 59d9bdf
Fix azure integration test
olofmattsson-inriver a35f4d7
Linting away
olofmattsson-inriver af84a93
Adding tests and linting
olofmattsson-inriver 5a3e579
Adding and moving tests
olofmattsson-inriver a5b3f59
Update error handling and add retry logic on Azure operations
olofmattsson-inriver c4897b4
Lint after changes
olofmattsson-inriver 7ef35a6
Cleanups
olofmattsson-inriver a876d75
Increase testing of azurehelper
olofmattsson-inriver 5aba15b
Add test for backend migrate
olofmattsson-inriver 18e30cd
Added more unit and integration tests
olofmattsson-inriver 53f3407
Removed Hierarchical namespace support
olofmattsson-inriver 4c5c181
Test cleanups
olofmattsson-inriver be48a41
Update docs
olofmattsson-inriver 9b1c317
Update integration tests
olofmattsson-inriver 6c5b83a
Update logging
olofmattsson-inriver f69414e
Fixing issues found by Coderabbit
olofmattsson-inriver cb78df2
Fix integration test to work with experiment azure-backend
olofmattsson-inriver 999c7b5
Merge branch 'main' into azurerm_storage
olofmattsson-inriver c177476
Minor test fixes and cleanup
olofmattsson-inriver 2da6c9d
Updating after Coderabbits advice
olofmattsson-inriver 4c8de94
Make test and code more robust by waiting for storage account to be c…
olofmattsson-inriver baf374e
Removed binary test file
olofmattsson-inriver bee06de
Add retry logic when adding RBAC permission
omattsson a3a89b3
Reorganize rbac constants tests
omattsson 5ba33de
Add RBAC assignment retry
olofmattsson-inriver 82f9a7b
Merge pull request #1 from omattsson/add_rbac_retry
omattsson e792234
Make integration tests run more stable and remove need for pre-existi…
olofmattsson-inriver 78d1a2c
Redesign to use interfaces instead of direct access to azurehelper
olofmattsson-inriver 517dd6c
Better integration test isolation
omattsson c3fee1f
Cleanup
omattsson 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
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
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,42 @@ | ||
package migrate_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/gruntwork-io/terragrunt/cli/commands/backend/migrate" | ||
"github.com/gruntwork-io/terragrunt/options" | ||
"github.com/gruntwork-io/terragrunt/test/helpers/logger" | ||
"github.com/stretchr/testify/require" | ||
) | ||
|
||
func TestMigrateOutputMessage(t *testing.T) { | ||
t.Parallel() | ||
|
||
// Create a simple test to verify the migration function includes output messages | ||
// This test doesn't require actual Azure resources | ||
|
||
// Create test options | ||
opts, err := options.NewTerragruntOptionsForTest("") | ||
require.NoError(t, err) | ||
|
||
// Create a logger | ||
testLogger := logger.CreateLogger() | ||
|
||
ctx := t.Context() | ||
|
||
// Note: This test would normally fail because we don't have valid paths, | ||
// but we're mainly testing that the message structure is correct | ||
// In a real scenario, we'd mock the dependencies | ||
|
||
srcPath := "/tmp/test-src" | ||
dstPath := "/tmp/test-dst" | ||
|
||
// This will fail early due to missing files, but we can at least verify | ||
// that the function structure and imports are correct | ||
err = migrate.Run(ctx, testLogger, srcPath, dstPath, opts) | ||
|
||
// We expect an error due to missing files, but the function should be callable | ||
require.Error(t, err) | ||
|
||
t.Logf("Migration function callable and returns expected error for invalid paths") | ||
} |
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.