Skip to content
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

Dealing with fully formed resources #10

Closed
jeffpatton1971 opened this issue Mar 4, 2018 · 1 comment
Closed

Dealing with fully formed resources #10

jeffpatton1971 opened this issue Mar 4, 2018 · 1 comment

Comments

@jeffpatton1971
Copy link

I'm attempting to leverage your task as part of a process to build ARM templates on the fly, but have run into a problem with how you kick out the values. It appears that your assumption is the data coming back is possibly just a one line value. I base this simply from viewing your README and the code.

I'm passing full objects around in my parameters and when I attempt to leverage those in my deployments I'm getting failures. As I run through your code against my templates I see the following getting kicked out.

Write-Host "##vso[task.setvariable variable=$prefix$key;$isSecret]$value"

##vso[task.setvariable variable=subnet;]"name": "DMZ" "properties": {
  "addressPrefix": "1.2.3.4",
  "networkSecurityGroup": null,
  "routeTable": null,
  "serviceEndpoints": null
}

This results in the following error

2018-03-04T03:35:38.0901663Z There was an error while overriding 'addressSpace' parameter because of 'SyntaxError: Unexpected token . in JSON at position 6', make sure it follows JavaScript Object Notation (JSON)

Below is what is output from the ARMOutput Task

2018-03-04T03:35:35.3181761Z ##[command]Select-AzureRMSubscription -SubscriptionId redacted -TenantId ********
2018-03-04T03:35:37.4674285Z   "addressPrefix": "172.16.192.0/24",
2018-03-04T03:35:37.4674589Z   "networkSecurityGroup": null,
2018-03-04T03:35:37.4675069Z   "routeTable": null,
2018-03-04T03:35:37.4675244Z   "serviceEndpoints": null
2018-03-04T03:35:37.4675592Z }
2018-03-04T03:35:37.5028817Z ##[section]Finishing: ARM Outputs

It's a little late and I'm struggling with how to figure out what the incoming parameters look like as the deployment is not getting to my Azure subscription, it fails before any actual deployment. My gut is telling me that the data is either coming in malformed, like the above is missing the name and properties key/values, or there is some parsing error in on the arm deployment task from Microsoft.

Any thoughts you have would be greatly appreciated.

Thanks!

@keesschollaart81
Copy link
Owner

Implemented in v4.0 (#16)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants