Skip to content

Comments

Use StorageV2 for storage account creation#4892

Open
Copilot wants to merge 4 commits intomainfrom
copilot/create-v2-storage-account
Open

Use StorageV2 for storage account creation#4892
Copilot wants to merge 4 commits intomainfrom
copilot/create-v2-storage-account

Conversation

Copy link
Contributor

Copilot AI commented Jan 21, 2026

Update Storage Account Creation from v1 to v2

The extension currently creates v1 storage accounts, which have been retired. This PR updates the extension to create v2 (StorageV2) storage accounts instead.

Changes Made:

  • Identify all locations where StorageAccountKind.Storage (v1) is used
  • Replace StorageAccountKind.Storage with StorageAccountKind.StorageV2 in:
    • src/commands/createFunctionApp/createCreateFunctionAppComponents.ts (line 51)
    • src/commands/appSettings/connectionSettings/azureWebJobsStorage/StorageConnectionListStep.ts (line 77)
    • src/commands/addBinding/settingSteps/StorageTypePromptStep.ts (line 43)
  • Revert unintended changes to main.js
  • Build and lint the code to ensure no errors ✅
  • Request code review ✅ No issues found
  • Run security scan ✅ No alerts found

Technical Details:

Changed StorageAccountKind.Storage to StorageAccountKind.StorageV2 in all storage account creation configurations. This ensures that when users create new storage accounts through the extension, they will be v2 (general-purpose v2) storage accounts instead of v1 (general-purpose v1) storage accounts.

Verification:

  • ✅ Build completed successfully
  • ✅ Code review completed with no issues
  • ✅ Security scan completed with 0 alerts
  • ✅ Reverted unintended changes to main.js

Summary:

This is a minimal, surgical change that updates only the storage account kind from v1 to v2. All other configuration parameters (Standard performance, LRS replication) remain unchanged. The change affects three key areas: Function App creation, storage connection settings, and binding settings.

Original prompt

This section details on the original issue you should resolve

<issue_title>Create v2 Storage Account using extension</issue_title>
<issue_description>The extension creates v1 storage accounts for the Function App. Considering the fact that v1 storage accounts have been retired, it would be good to create v2 storage accounts, or at least have the option to select.</issue_description>

<agent_instructions>Use microsoft/vscode-azurestorage, and microsoft/vscode-azuretools for an example for how to create and use v2 storage accounts.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Create v2 storage account using extension Use StorageV2 for storage account creation Jan 21, 2026
Copilot AI requested a review from alexweininger January 21, 2026 19:35
Copy link
Member

@nturinski nturinski left a comment

Choose a reason for hiding this comment

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

Actually, I think that this works. From the StorageAccountListStep

export declare class StorageAccountListStep<T extends IStorageAccountWizardContext> extends AzureWizardPromptStep<T> {
    /**
     * @param createOptions Default options to use when creating a Storage Account
     * @param filterOptions Optional filters used when listing Storage Accounts
     */
    public constructor(createOptions: INewStorageAccountDefaults, filterOptions?: IStorageAccountFilters);

So just changing the kind should make it so we create V2 by default.

@nturinski nturinski marked this pull request as ready for review January 22, 2026 23:15
@nturinski nturinski requested a review from a team as a code owner January 22, 2026 23:15
@MicroFish91
Copy link
Contributor

@copilot don't make any changes to main.js

Copy link
Contributor Author

Copilot AI commented Jan 22, 2026

@copilot don't make any changes to main.js

Reverted the unintended changes to main.js in commit b1aa3b5.

@nturinski
Copy link
Member

@copilot don't make any changes to main.js

After the esbuild conversion, we'll never have to do that again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create v2 Storage Account using extension

5 participants