Does ServiceNow supports Terraform Null Provider

Nithyasekar
Tera Contributor

we are using terraform null provider for some azure resources to do some activity. We are ready with the terraform script templates, but in the cloud, catalog items it is not populating the templates and we want to know whether the ServiceNow CPG module supports terraform null provider.

6 REPLIES 6

Nithyasekar
Tera Contributor
This is the template we are using to call a script file to stop or start the virtual machine
resource "null_resource" "vm_stop" {
  provisioner "local-exec" {
    command = templatefile("./script.ps1", {
      vm_name       = var.vm_name
      rg_name       = var.rg_name
      client_id     = var.client_id
      client_secret = var.client_secret
      tenant_id     = var.tenant_id
    })
    interpreter = ["PowerShell", "-Command"]
  }
}

 

You can run the vm stop and other actions via ServiceNow CPG itself - in fact it will put in change request automatically for this.

 

reg this - what's the outcome you are expecting from this?

 

also what error are you seeing in cloud catalog item page - when importing template?

 

btw - have you gotten past the earlier issue Sekar with the errors in post-provisioning?

 

While I am trying to import the template for provisioning the resources with the help of Terraform azure provider, it brings the templates, variable sets, lifecycle operations etc. as mentioned in below screenshot.

Nithyasekar_0-1698909489620.png

 

After provisioning the resource, I am trying to do a lifecycle management by terraform itself with the help of terraform null provider, while I am using this template ServiceNow not showing the variable sets etc. as mentioned in the below screenshot.

Nithyasekar_1-1698909767155.png

 

  1. From this outcome I am expecting the template to do a lifecycle management for all azure resources with the help of terraform itself
  2. No errors I have seen while creating this catalog items and variables are not auto populated from the script
  3. This is not related to the issue that I have posted before. 
  4. Does ServiceNow supports terraform null provider?

The day-2 actions are not brought in - they are added via our action layer called CAPI - we don't use or recognize the null provider. you can use existing actions in servicenow as i mentioned earlier.

 

i know this is not related - since you did not close the other thread, i am asking where's the status on the earlier problem?