-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[AppService]: Feature #19496 Added -Tag parameter support to New-AzWebApp & New-AzWebAppSlot #20019
Conversation
It looks good to me except the indentation. Please help me double-check @BethanyZhou |
Review comments are updated
src/Websites/Websites/Cmdlets/DeploymentSlots/NewAzureWebAppSlot.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
/azp run azure-powershell - security-tools |
Azure Pipelines successfully started running 1 pipeline(s). |
I am running Az 9.5 and I see the -Tag parameter in the documentation, but the command is failing when attempting to pass a hashtable to it. Is this not completed yet?
results in:
Dropping the -Tag argument from the command allows it to complete successfully |
Hi @Poolshark314 , could you append -Debug at the end of your command and paste the debug message here? |
@BethanyZhou Unfortunately the output looks the same when run with -Debug: New-AzWebApp : Parameter set cannot be resolved using the specified named parameters.
|
Hi @Poolshark314 , checked the syntax of New-AzWebApp, I find -Tag only exists in the first parameter set. See New-AzWebApp [[-ResourceGroupName] <String>] [-Name] <String> [[-Location] <String>]
[[-AppServicePlan] <String>] [-ContainerImageName <String>] [-EnableContainerContinuousDeployment] [-AsJob]
[-GitRepositoryPath <String>] [-Tag <Hashtable>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
[-Confirm] [<CommonParameters>]
New-AzWebApp [-ResourceGroupName] <String> [-Name] <String> [[-Location] <String>] [[-AppServicePlan] <String>]
-ContainerImageName <String> -ContainerRegistryUrl <String> -ContainerRegistryUser <String>
-ContainerRegistryPassword <SecureString> [-EnableContainerContinuousDeployment] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-AzWebApp [-ResourceGroupName] <String> [-Name] <String> [-Location] <String> [[-AppServicePlan] <String>]
[[-SourceWebApp] <PSSite>] [[-TrafficManagerProfile] <String>] [-EnableContainerContinuousDeployment]
[-IgnoreSourceControl] [-IgnoreCustomHostNames] [[-AppSettingsOverrides] <Hashtable>] [[-AseName] <String>]
[[-AseResourceGroupName] <String>] [-IncludeSourceWebAppSlots] [-AsJob]
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>] Which means AseResourceGroupName and AseName (in last parameter set) can't work with Tag together in New-AzWebApp. @Kotasudhakarreddy could you check is this behavior by design? |
@BethanyZhou - Yes, it is by design. |
…pSlot
#19496
Description
In my organisation we are required to add tags for every Azure resource. The mentioned cmdlet doesn't have a -Tag parameter which effectively prevents me from creating a resource. Ont he other hand Azure Portal also doesn't allow me to supply the tag upon creation.
Checklist
CONTRIBUTING.md
and reviewed the following information:generation
branch.ChangeLog.md
file(s) appropriatelyChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header in the past tense. Add changelog in description section if PR goes intogeneration
branch.ChangeLog.md
if no new release is required, such as fixing test case only.