azure-xplat-cli icon indicating copy to clipboard operation
azure-xplat-cli copied to clipboard

"resource set" command ignores the "properties" argument/option

Open ryanbecker opened this issue 8 years ago • 5 comments

CLI Version: 0.10.8 OS Type: Win Installation via: npm

Mode: ARM

Environment: AzureCloud

Description: azure resource set command ignores the properties argument/option. The code in resource.js expects it to be on the options object, which is the case for azure resource create, but not for azure resource set. It doesn't work when passing properties as a free argument OR as an option -p {\"scmType\":\"LocalGit\"}.

Steps to reproduce:

  1. Run azure resource set my-group my-webapp/config/web Microsoft.Web/sites {\"scmType\":\"LocalGit\"} 2015-08-01 -vv on a new resource.
  2. Observe that scmType is still None in the response.

ryanbecker avatar Jan 20 '17 22:01 ryanbecker

As a workaround, it appears that azure resource create can be used in place of azure resource set, at least to set the scmType property. For example: azure resource create my-group my-webapp/config/web Microsoft.Web/sites {\"scmType\":\"LocalGit\"} 2015-08-01 -vv

ryanbecker avatar Jan 20 '17 22:01 ryanbecker

Did you try using the azure webapp commands? azure webapp -h

amarzavery avatar Jan 20 '17 22:01 amarzavery

I am sorry.. looks like the we don't have a command in the webapp surface that can help you do that.

The closest that I could find was to manage the config of your webapp

D:\sdk>azure webapp config set -h
help:    Set webapp configuration
example:  webapp config set RGName WebAppName --alwayson true --numberofworkers 1
help:
help:    Usage: webapp config set [options] <resource-group> <name>
help:
help:    Options:
help:      -h, --help                                                   output usage information
help:      -v, --verbose                                                use verbose output
help:      -vv                                                          more verbose with debug output
help:      --json                                                       use json output
help:      -g --resource-group <resource-group>                         the name of the resource group
help:      -n --name <name>                                             the name of the webapp to update
help:      -j --jsonInput <jsonInput>                                   the json config object string
help:      --phpversion <phpversion>                                    php version of webapp
help:      --pythonversion <pythonversion>                              python version of webapp
help:      --nodeversion <nodeversion>                                  node version of webapp
help:      --numberofworkers <numberofworkers>                          number of workers
help:      --appcommandline <appcommandline>                            app command line
help:      --netframeworkversion <netframeworkversion>                  net framwork version of webapp
help:      --requesttracingenabled <requesttracingenabled>              request tracing enabled option
help:      --remotedebuggingenabled <remotedebuggingenabled>            remote debugging enabled option
help:      --httploggingenabled <httploggingenabled>                    http logging enabled option
help:      --detailederrorloggingenabled <detailederrorloggingenabled>  detailed error logging enabled option
help:      --websocketenabled <websocketenabled>                        web socket enabled option
help:      --use32bitworkerprocess <use32bitworkerprocess>              use 32 bit process option
help:      --alwayson <alwayson>                                        always on option
help:      --autohealenabled <autohealenabled>                          auto heal enabled option
help:      --javaversion <javaversion>                                  java version of webapp
help:      --javacontainer <javacontainer>                              java container of webapp
help:      --javacontainerversion <javacontainerversion>                java container version of webapp
help:      --slot <slot>                                                the name of the slot
help:      -s --subscription <subscription>                             the subscription identifier
help:
help:    Current Mode: arm (Azure Resource Management)

@Lukaszstem Can you take a look into this?

  • Is there a webapp command available to set the scmType of the webapp?

amarzavery avatar Jan 20 '17 22:01 amarzavery

@vivsriaus - Please take a look at this issue with resource set command.

amarzavery avatar Jan 20 '17 22:01 amarzavery

@amarzavery I've made the change here commit on pull 3436 . I've manually tested it with success.

LukaszStem avatar Jan 23 '17 16:01 LukaszStem