Comments (6)
I found that I could not use an object to create the string and had to use a string replacement instead. This is showing to not be an issue with the connection-string set function.
$newConnectionString = $ConnectionStringName + '=''Data Source=tcp:' + $DataSource + ',1433;Initial Catalog=' + $SQLDatabase + ';User Id=' + $UserID + ';Password=' + $Password + ';'''
az webapp config connection-string set --connection-string-type SQLServer --name $AppServiceName --resource-group $AppServiceResourceGroupName --subscription $AppServiceSubscriptionID --settings $newConnectionString
from azure-cli.
Thank you for opening this issue, we will look into it.
from azure-cli.
Hi @sc-draymond
Find similar issue #11552.
Issue title | Error configuration function app with powershell object for --settings |
Create time | 2019-12-11 |
Comment number | 7 |
Possible solution:
The error message "not enough values to unpack (expected 2, got 1)" is usually caused by an incorrect format of the input. In the existing issue, the error occurred when configuring application settings using a powershell object. The solution was to use the json format inside the json file and provide the correct path to the file in the --settings parameter.
Similarly, in this new issue, the error occurred when running the command "az webapp config connection-string set". The solution might be to check the format of the input and make sure it matches the expected format. It might also be helpful to check the structure of the json file to ensure it has the correct schema.
To set the connection string, you can try running the command with the --settings parameter and providing the correct path to the json file. The content of the json file should be in the following format:
[
{
"name": "ConnectionString",
"slotSetting": false,
"value": "Data Source=tcp:MyServer.database.windows.net,1433;Initial Catalog=MyDatabase;User Id=MyID;Password=MyPassword;"
}
]
Make sure to replace the values with your own connection string information.
Please confirm if this resolves your issue.
from azure-cli.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.
from azure-cli.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI, @antcp.
from azure-cli.
I'm unable to repro - I copied your input into CloudShell and was able to set the connection strings.
Please ensure the settings parameter is formatted correctly and escape characters are included where needed based on your shell type.
from azure-cli.
Related Issues (20)
- [Errno 13] Permission denied: '.' when call"az iot du update init v5" HOT 3
- CredentialUnavailableError error HOT 11
- az sql db list-editions filter documentation is wrong HOT 1
- Support Admin State on Azure Global Load Balancer HOT 2
- "az logic workflow create" overwrites existing resource instead of giving duplication error HOT 1
- Reg Adding new force Deletion Types for: az group delete command HOT 3
- acr task create is broken for FileTask with no git context HOT 9
- Az login HOT 3
- az upgrade failed because trivy-repo is changed HOT 5
- [WebToolsE2E]Can't delete resource group use command "az group delete --name <your-resource-group-name>" HOT 2
- Ability to Update Tags in "az sig image-version update" and "az sig image-definition update" HOT 1
- Allow Creation of Azure Containerapp Job even when create_acrpull_role_assignment fails HOT 1
- az network private-dns link vnet create not idempotent HOT 2
- Azure CLI Support for Scheduled Event Profile HOT 5
- VMSS add zone-balance parameter to vmss create HOT 3
- 'az mysql flexible-server create' got requests.exceptions.ConnectionError HOT 4
- "az functionapp create" failing to create App Service Plan in select regions HOT 3
- Unable to install azure cli on ubuntu 24 HOT 6
- `az aks enable-addons -a monitoring ` failed due to wrong api-version `2015-11-01-preview` HOT 7
- "az rest" fails with error "not enough values to unpack" HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-cli.