Skip to content

[Doc]: New-AzStaticWebApp : -SkuName should be marked as required or have a default value #29010

@raddragan

Description

@raddragan

Type of issue

Other (describe below)

Feedback

When -SkuName is not provided:

PS> New-AzStaticWebApp -Name $staticAppName -ResourceGroupName $ResourceGroupName -Location "West US 2" -SkipGithubActionWorkflowGeneration
Az.Websites.internal\New-AzStaticWebApp : The server responded with a Request Error, Status: BadRequest
At C:\Program Files\WindowsPowerShell\Modules\Az.Websites\3.4.2\Websites.Autorest\custom\New-AzStaticWebApp.ps1:299 char:13
+             Az.Websites.internal\New-AzStaticWebApp @PSBoundParameter ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: ({ ResourceGroup...": ""
  }
} }:<>f__AnonymousType18`4) [New-AzStaticWebApp_CreateExpanded], RestException`1
    + FullyQualifiedErrorId : BadRequest,Microsoft.Azure.PowerShell.Cmdlets.Websites.Cmdlets.NewAzStaticWebApp_CreateExpanded

Adding -SkuName Free resolves the issue.

Page URL

https://learn.microsoft.com/en-us/powershell/module/az.websites/new-azstaticwebapp?view=azps-15.1.0

Content source URL

https://github.com/Azure/azure-powershell/blob/main/src/Websites/Websites/help/New-AzStaticWebApp.md

Author

@mikefrobbins

Document Id

d3234102-aeaf-d9e9-06ae-7bebcd20505d

Platform Id

f345b8b6-217b-c36a-380f-f9f385ab60c0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions