1.I would like to test my deployment projects via Visual studio
2.Package my deployment projects
3.Trigger them using variables that are stored in octopus.
Right now when I try to deploy using Visual studio I am getting this error. Would love to have an example for this.
I have got 2 files
1.Template ( parameters(defaultvalues),variables,resources)
2.Parameters ( parameters)
14:50:35 - [ERROR] New-AzureRmResourceGroupDeployment : 2:50:34 PM - Resource
14:50:35 - [ERROR] Microsoft.Sql/servers ‘variables(‘serverName’)’ failed with message '{
14:50:35 - [ERROR] “code”: “40645”,
14:50:35 - [ERROR] “message”: “Servername “variables(‘serverName’)” cannot be empty or null.
14:50:35 - [ERROR] It can only be made up of lowercase letters ‘a’-‘z’, the numbers 0-9 and the
14:50:35 - [ERROR] hyphen. The hyphen may not lead or trail in the name.”,
14:50:35 - [ERROR] “target”: null,
14:50:35 - [ERROR] “details”: [
I am working on the issue. Yesterday I have created a simple parameters file called default. And Cleaned all the parameters there so I can test the default parameters from the visual studio.
I am still not sure how to test the different environments. Should I add a parameters file for each one of them or should I have only one octopus file with generic octopus parameters.
Best practices or a tutorial would tremendously help
Use a parameters file, also contained in the package.
Reference the values of each parameter in the parameters file using an Octopus Variable in the #{variable} format. When the deployment runs, those variables in the parameters file will be replaced with the values of your Octopus variables. Keep in mind that the name of the variable between #{} has to match your Octopus variable. I’m mentioning this last bit because in your example you typed "value": "#{replicaServerName}", when according to your screenshot it should be "value": "#{Azure.db.replicaServerName}"