Skip to content

Commit c25e83a

Browse files
authored
fix(cli): remove storage info attributes for Azure (#1324)
1 parent 45a0fe1 commit c25e83a

File tree

3 files changed

+0
-61
lines changed

3 files changed

+0
-61
lines changed

lwgenerate/azure/azure.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,6 @@ func createConfig(args *GenerateAzureTfConfigurationArgs) ([]*hclwrite.Block, er
401401
attributes["management_group_id"] = args.ManagementGroupId
402402
}
403403

404-
// Set storage info if existing storage flag is set
405-
if args.ExistingStorageAccount {
406-
attributes["storage_account_name"] = args.StorageAccountName
407-
attributes["storage_account_resource_group"] = args.StorageAccountResourceGroup
408-
}
409-
410404
moduleDetails = append(moduleDetails,
411405
lwgenerate.HclModuleWithAttributes(attributes),
412406
)

lwgenerate/azure/azure_test.go

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -164,29 +164,6 @@ func TestGenerationConfigWithManagementGroupError(t *testing.T) {
164164
assert.Empty(t, hcl)
165165
}
166166

167-
func TestGenerationConfigWithStorageAccount(t *testing.T) {
168-
ConfigWithStorage, fileErr := getFileContent("test-data/config-with-storage-account.tf")
169-
assert.Nil(t, fileErr)
170-
hcl, err := azure.NewTerraform(true, false, true,
171-
azure.WithExistingStorageAccount(true),
172-
azure.WithStorageAccountName("test-storage-account-name"),
173-
azure.WithStorageAccountResourceGroup("test-storage-account-resource-group"),
174-
).Generate()
175-
assert.Nil(t, err)
176-
assert.NotNil(t, hcl)
177-
assert.Equal(t, ConfigWithStorage, hcl)
178-
}
179-
180-
func TestGenerationConfigWithStorageAccountError(t *testing.T) {
181-
hcl, err := azure.NewTerraform(true, false, true,
182-
azure.WithExistingStorageAccount(true),
183-
azure.WithStorageAccountName("test-storage-account-name"),
184-
).Generate()
185-
assert.NotNil(t, err)
186-
assert.True(t, strings.Contains(errors.Unwrap(err).Error(), "invalid inputs"))
187-
assert.Empty(t, hcl)
188-
}
189-
190167
func TestGenerationActivityLogWithSubscriptionsList(t *testing.T) {
191168
ActivityLogWithSubscriptions, fileErr := getFileContent("test-data/activity-log-with-list-subscriptions.tf")
192169
assert.Nil(t, fileErr)

lwgenerate/azure/test-data/config-with-storage-account.tf

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)