Copyright IBM Corp. 2018, 2018 This code is released under the Apache 2.0 License.
ServiceNow CMDB configuration record to add and remove CMDB records on create and delete of a server. This integration template is responsible for the create of a ServiceNow CMDB record and is designed to be chained after the creation of a server. Upon deletion of a server, the template will delete the CMDB record from ServiceNow.
Local to the terraform container.
This script should be executed after the successful execution of a Terraform Template to register the Server Assets in CMDB.
- on_create Create the CMDB Record or update the CMDB record if an existing record already exists.
 - on_delete Delete the CMDB Record.
 
NOTE: On Plan/Apply, the on_delete method will not be executed.
- A working version of ServiceNow addressable from the Terraform Engine.
 - The Terraform container requires the servicenow module installed.
 - The Terraform container requires that python 2.7 is installed.
 
| Variable | Description | 
|---|---|
| cmdb_pass | User to connect to ServiceNow | 
| cmdb_user | Administrative user password. | 
| cmdb_instance | Target ServiceNow instance. | 
| cmdb_key | Key value for the Server, this may be the host name. THis field will realte to the cmdb_ci_server name field. | 
| cmdb_key | Key value for the Server, this may be the host name. THis field will realte to the cmdb_ci_server name field. | 
| cmdb_record | A MAP of values that constitute the CMDB Record. The structure is user defined and should follow the fields describe in the ServiceNow ci_cmdb_server record. The only mandatory value is the name field. |