Provision VMs in Azure with Azure DevOps

Page22
Tera Contributor

Hi All,

I need help with a client requirements. The request is to create a cloud catalog item with the following sections with variables, general info, provision and others and upon submitting the form it goes through series of approvals and once done, the variables are converted to JSON object and sent to the version control (github) of the Azure DevOps.

Is this possible? If yes can you guide me through how to approach this?

 

I know of using terraform template (Terraform Environment/ Enterprise), ARM template (Cloud Template) and Azure DevOps pipeline discovery but they do not want to utilize these approach.

5 REPLIES 5

Ram Devanathan1
ServiceNow Employee
ServiceNow Employee

Does the customer have the itom cpg/cloud accelerate licenses? this is available out of the box with CSC app.

 

see blog post for the details -

Empowering DevOps: ITOM Cloud Accelerate for Strea... - ServiceNow Community

Page22
Tera Contributor

@Ram Devanathan1  yes they do have the license and we have recommended for them to utilize OOB supported solutions. Their Azure Team wants a JSON file to be submitted to the repository and some how trigger the pipeline from there.

you can use the CSC catalog API set to trigger via REST API and the json file can be sent as payload.

 

example below -

Send POST request to -

https:// <YOURINSTANCE> .service-now.com/api/now/cmp_catalog_api/submitrequest?cat_id=52883707c363a510538c7d27050131a8

{
    "CloudAccount": "Automation Provider Cloud Account",
    "Azure_Devops_ConfigurationProvider": "36107fef477fb9107df6c502d16d43b6",
    "Azure_Devops_PipelineVars": "{\"variables\":{\"subscriptionID\":{\"value\":\"subscriptionID\"},\"deploymentID\":{\"value\":\"auto\"}}}",
    "LeaseEndDate": "",
    "ScheduleProfile": "-- No Schedule --",
    "Azure_Devops_ChangeRequest": "",
    "UserGroup": "cfcbad03d711110050f5edcb9e61038f",
    "Azure_Devops_Pipeline": "terraaws1",
    "Azure_Devops_Subscription": "8fc00622bcf08110f8776ddaa65bdbf9",
    "ScheduleTimeZone": "America/Los_Angeles",
    "secret_key": "undefined",
    "BusinessService": "",
    "cloudTaskWorkflowInput": "undefined",
    "Azure_Devops_CloudLocation": "ap-south-1",
    "CostCenter": "",
    "Azure_Devops_Project": "awsterraformbasicvm",
    "secret_value": "undefined",
    "Application": "",
    "value": "undefined",
    "StackName": "apiado",
    "key": "undefined",
    "Location": "Automation Provider LDC"
}

 

Thank you very much @Ram Devanathan1.

Is there a ServiceNow Documentation detailing how this can be done?