Skip to content

Commit 4c99b44

Browse files
authored
Merge pull request #375 from hashicorp/servicenow-service-graph-ga
ServiceNow Service Graph Connector for Terraform - 1.0.0 GA documentation
2 parents c4c4c8f + 2c0c918 commit 4c99b44

33 files changed

+1087
-29
lines changed

website/data/cloud-docs-nav-data.json

+65-18
Original file line numberDiff line numberDiff line change
@@ -462,28 +462,75 @@
462462
"title": "Integrations",
463463
"routes": [
464464
{
465-
"title": "ServiceNow Integration",
465+
"title": "ServiceNow Integrations",
466466
"routes": [
467-
{ "title": "Overview", "path": "integrations/service-now" },
468467
{
469-
"title": "Service Catalog",
470-
"path": "integrations/service-now/service-catalog"
471-
},
472-
{
473-
"title": "Admin Guide",
474-
"path": "integrations/service-now/admin-guide"
475-
},
476-
{
477-
"title": "Developer Reference",
478-
"path": "integrations/service-now/developer-reference"
479-
},
480-
{
481-
"title": "Example Customizations",
482-
"path": "integrations/service-now/example-customizations"
468+
"title": "Service Catalog for Terraform",
469+
"routes": [
470+
{ "title": "Overview", "path": "integrations/service-now/service-catalog-terraform" },
471+
{
472+
"title": "Service Catalog",
473+
"path": "integrations/service-now/service-catalog-terraform/service-catalog-config"
474+
},
475+
{
476+
"title": "Admin Guide",
477+
"path": "integrations/service-now/service-catalog-terraform/admin-guide"
478+
},
479+
{
480+
"title": "Developer Reference",
481+
"path": "integrations/service-now/service-catalog-terraform/developer-reference"
482+
},
483+
{
484+
"title": "Example Customizations",
485+
"path": "integrations/service-now/service-catalog-terraform/example-customizations"
486+
},
487+
{
488+
"title": "V1 Setup Instructions",
489+
"path": "integrations/service-now/service-catalog-terraform/service-now-v1"
490+
}
491+
]
483492
},
484493
{
485-
"title": "V1 Setup Instructions",
486-
"path": "integrations/service-now/service-now-v1"
494+
"title": "Service Graph Connector for Terraform",
495+
"routes": [
496+
{
497+
"title": "Overview",
498+
"path": "integrations/service-now/service-graph"
499+
},
500+
{
501+
"title": "Setup",
502+
"path": "integrations/service-now/service-graph/service-graph-setup"
503+
},
504+
{
505+
"title": "Resource Coverage",
506+
"routes": [
507+
{
508+
"title": "Overview",
509+
"path": "integrations/service-now/service-graph/resource-coverage"
510+
},
511+
{
512+
"title": "AWS",
513+
"path": "integrations/service-now/service-graph/resource-coverage/aws"
514+
},
515+
{
516+
"title": "Azure",
517+
"path": "integrations/service-now/service-graph/resource-coverage/azure"
518+
},
519+
{
520+
"title": "GCP",
521+
"path": "integrations/service-now/service-graph/resource-coverage/gcp"
522+
},
523+
{
524+
"title": "vSphere",
525+
"path": "integrations/service-now/service-graph/resource-coverage/vsphere"
526+
}
527+
]
528+
},
529+
{
530+
"title": "Customizations",
531+
"path": "integrations/service-now/service-graph/customizations"
532+
}
533+
]
487534
}
488535
]
489536
},

website/docs/cloud-docs/integrations/service-now/admin-guide.mdx renamed to website/docs/cloud-docs/integrations/service-now/service-catalog-terraform/admin-guide.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ ServiceNow administrators have several options with configuring the Terraform
99
integration.
1010

1111
If you haven't yet installed the integration, see the [installation
12-
documentation](/terraform/cloud-docs/integrations/service-now).
12+
documentation](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform).
1313

1414
Once the integration has been installed, you can add and customize a service
1515
catalog and VCS repositories using the [service catalog
16-
documentation](/terraform/cloud-docs/integrations/service-now/service-catalog).
16+
documentation](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform/service-catalog-config).
1717

1818
You can also configure how frequently ServiceNow will poll Terraform Cloud using
1919
the documentation below.

website/docs/cloud-docs/integrations/service-now/developer-reference.mdx renamed to website/docs/cloud-docs/integrations/service-now/service-catalog-terraform/developer-reference.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ For users who only need to order from the Terraform Catalog, we recommend
9393
creating another role with read-only permissions for
9494
`x_terraform_vcs_repositories` to view the available repositories for ordering
9595
infrastructure. Install the Terraform ServiceNow Service Catalog integration by
96-
following [the installation guide](/terraform/cloud-docs/integrations/service-now).
96+
following [the installation guide](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform).

website/docs/cloud-docs/integrations/service-now/index.mdx renamed to website/docs/cloud-docs/integrations/service-now/service-catalog-terraform/index.mdx

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: >-
77

88
# Terraform ServiceNow Service Catalog Integration Setup Instructions
99

10-
-> **Integration version:** v2.2.0
10+
-> **Integration version:** v2.2.1
1111

1212
The Terraform ServiceNow Service Catalog integration enables your end-users to
1313
provision self-serve infrastructure via ServiceNow. By connecting ServiceNow to
@@ -16,7 +16,7 @@ Items, create workspaces, and perform Terraform runs using prepared Terraform
1616
configurations hosted in VCS repositories.
1717

1818
-> **Note:** The v1.x integration is deprecated, but documentation for existing
19-
installations can be found [here](/terraform/cloud-docs/integrations/service-now/service-now-v1)
19+
installations can be found [here](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform/service-now-v1)
2020

2121
<!-- BEGIN: TFC:only name:pnp-callout -->
2222
-> **Note:** The ServiceNow Catalog integration is available in Terraform Cloud **Plus** Edition. Refer to [Terraform Cloud pricing](https://www.hashicorp.com/products/terraform/pricing) for details.
@@ -216,21 +216,21 @@ Now that you have connected ServiceNow to Terraform Cloud, you are ready to
216216
create a Service Catalog using the VCS repositories provided by the Terraform
217217
Admin.
218218

219-
Navigate to the [Service Catalog documentation](/terraform/cloud-docs/integrations/service-now/service-catalog) to
219+
Navigate to the [Service Catalog documentation](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform/service-catalog-config) to
220220
begin. You can also refer to this documentation whenever you need to add or
221221
update request items.
222222

223223
### ServiceNow Developer Reference
224224

225225
ServiceNow developers who wish to customize the Terraform integration can refer
226-
to the [developer documentation](/terraform/cloud-docs/integrations/service-now/developer-reference).
226+
to the [developer documentation](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform/developer-reference).
227227

228228
### ServiceNow Administrator's Guide.
229229

230-
Refer to the [ServiceNow Administrator documentation](/terraform/cloud-docs/integrations/service-now/admin-guide) for
230+
Refer to the [ServiceNow Administrator documentation](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform/admin-guide) for
231231
information about configuring the integration.
232232

233233
### Example Customizations
234234

235235
Once the ServiceNow integration is installed, you can consult the [example
236-
customizations documentation](/terraform/cloud-docs/integrations/service-now/example-customizations).
236+
customizations documentation](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform/example-customizations).

website/docs/cloud-docs/integrations/service-now/service-catalog.mdx renamed to website/docs/cloud-docs/integrations/service-now/service-catalog-terraform/service-catalog-config.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ reporting the results back to ServiceNow.
1919

2020
Before configuring a service catalog, you must install and configure the
2121
Terraform Cloud integration software on your ServiceNow instance. These steps
22-
are covered in the [installation documentation](/terraform/cloud-docs/integrations/service-now).
22+
are covered in the [installation documentation](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform).
2323

2424
Additionally, you must have have the following information:
2525

website/docs/cloud-docs/integrations/service-now/service-now-v1/index.mdx renamed to website/docs/cloud-docs/integrations/service-now/service-catalog-terraform/service-now-v1/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: >-
77

88
# Terraform ServiceNow Service Catalog Integration Setup Instructions
99

10-
-> **\[DEPRECATED] Integration version:** v1.1.0 (Find the latest version [here](/terraform/cloud-docs/integrations/service-now))
10+
-> **\[DEPRECATED] Integration version:** v1.1.0 (Find the latest version [here](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform))
1111

1212
!> **Note:** The ServiceNow Catalog integration is designed for use by Terraform Enterprise customers. We do not currently recommend using it with the SaaS version of Terraform Cloud.
1313

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
page_title: Overview - ServiceNow Service Graph Connector for Terraform Integration - instructions on customizations for admins
3+
description: >-
4+
ServiceNow Service Graph Connector for Terraform allows you to edit ETL mapping and add more resources.
5+
---
6+
7+
# ETL Mapping Customizations
8+
9+
-> **ServiceNow roles:** `admin`
10+
11+
-> **ServiceNow plugin requirement:** `IntegrationHub ETL`
12+
13+
You can update and customize the default ETL mapping rules offered by the Service Graph Connector for Terraform.
14+
15+
To ensure that your custom rules remain intact during future updates, you can clone the existing ETL record and maintain it separately from the default one.
16+
17+
This documentation guides you through the process of mapping a resource using an example of an AWS virtual private network (VPC). Although this resource is already covered by the application, the principles discussed apply to any new potential resource mapping.
18+
19+
Any customizations should be done from the application's scope: **Service Graph Connector for Terraform**.
20+
21+
## Clone the ETL map
22+
23+
Navigate to the **IntegrationHub ETL** in the top menu. Check the **SG-Terraform** record and click **Duplicate**. Refer to the [ServiceNow documentation](https://docs.servicenow.com/en-US/bundle/utah-servicenow-platform/page/product/configuration-management/task/duplicate-cmdb-transform-map.html) to create a duplicate of an existing ETL transform map.
24+
25+
## Build a resource in Terraform Cloud
26+
27+
Create a new workspace in your Terraform Cloud organization and create a Terraform resource that you would like to map. It helps to have a Terraform state record of the resource to ensure accurate mapping.
28+
29+
[Configure a webhook](/terraform/cloud-docs/integrations/service-now/service-graph/service-graph-setup#configure-terraform-webhook) and initiate a Terraform run.
30+
31+
## Download Terraform State
32+
33+
Once the run is successfully completed, open your ServiceNow instance, click on **All** and navigate to **Scheduled Imports**.
34+
35+
Open the **SG-Terraform Scheduled Process State** record, search for the import set corresponding to the latest webhook request. Click the **Import Set** field to open the import set. Wait for the import set to be successfully processed.
36+
37+
Since there are no existing ETL rules configured for the new resource, it is ignored during the ETL process.
38+
39+
Open the **Outbound Http Requests** tab to list the requests sent from your ServiceNow instance to Terraform Cloud and get the latest state of the workspace.
40+
41+
![ServiceNow Service Graph Connector Outbound Http Requests interface](/img/docs/service-now-service-graph-state-object-url.png)
42+
43+
Open the record that starts with "http://archivist.terraform.io" by clicking on the timestamp. Copy the content of the URL field and open it you your browser to download the Terraform state file.
44+
45+
Locate the resource in the state object. This JSON record will serve as a source for the future mapping.
46+
47+
## Identify the CI target
48+
49+
Pick a suitable Configuration Item (CI) target for your resource. For example, the AWS virtual private network (VPC) resource is mapped to Cloud Network (`cmdb_ci_network`) by the Service Graph Connector for Terraform. Refer to the [ServiceNow CMDB documentation](https://docs.servicenow.com/en-US/bundle/utah-servicenow-platform/page/product/configuration-management/reference/cmdb-tables-details.html) for more details on available CI tables.
50+
51+
## Consult the CI Class Manager
52+
53+
After selecting an appropriate CI target, it is important to consult the CI Class Manager for guidance on dependent relationships. Many CMDB resources rely on other CI tables. If a related class is not properly mapped, the ETL job will generate errors or warnings and fail to import your resource into the CMDB.
54+
55+
In the top navigation, click on **All**, search for **CI Class Manager**, and click on **Open Hierarchy**. Search for your target CI Class and check **Dependent Relationships** tab to learn more about dependent mappings required by the resource.
56+
57+
For example, according to the **CI Class Manager**, **Cloud Network** should be hosted on **Logical Datacenter** and **Cloud Service Account**.
58+
59+
## Set the mapping rules
60+
61+
Open the **IntegrationHub ETL** from the top navigation menu and select your cloned ETL map record prepared for customization. Refer to the [ServiceNow documentation](https://docs.servicenow.com/en-US/bundle/utah-servicenow-platform/page/product/configuration-management/concept/create-etl-transform-map.html) for instructions to create an ETL transform map.
62+
63+
Click on the first **Specify Basic Details** section of the ETL Transform Map Assistant. Select the import set number containing your resource from the **Sample Import Set** dropdown and click **Mark as Complete**.
64+
65+
Open the **Preview and Prepare Data** section and review the imported rows. Click **Mark as Complete**.
66+
67+
The third section provides the interface for mapping resource attributes. Click on **Select CMDB Classes to Map Source Data**. Click on **Add Conditional Class** button at the top. Set the rules that will identify your resource in the import set. Use the `type` field value from the Terraform state object to identify your resource (on the ServiceNow side, field name are prefaced with `u_`). Set the target CMDB CI Class name and click **Save**.
68+
69+
![ServiceNow Service Graph Connector: setting the Conditional Class rules in the ETL mapping](/img/docs/service-now-service-graph-conditional-class-mapping.png)
70+
71+
To modify the mapping for your new Conditional Class record, select **Edit Mapping**. On the right side of the interface, drag the relevant data pills and drop them into the corresponding CMDB fields on the left side. Refer to the Terraform state record to verify the presence of attributes. For uniqueness, the **Source Native Key** value is typically mapped to the `arn` field when dealing with AWS resources. All resources mapped in the Service Graph Connector for Terraform will have the **Operational status** and **Name** fields populated.
72+
73+
![ServiceNow Service Graph Connector: mapping resource attributes in the ETL](/img/docs/service-now-service-graph-etl-attribute-mapping.png)
74+
75+
Once the mapping is completed, click on the left arrow at the top to return to the list of Conditional Classes. Map two more conditional classes in the same manner, according to the rules set in the CI Class Manager: **Logical Datacenter** (**AWS Datacenter** in case of AWS VPC) and **Cloud Service Account**. Since the AWS cloud provider is already covered by the application, these classes are already present. Click **Edit Class** to include your newly mapped resource into the listed conditional rules. Add another **OR** condition to each of them and click **Save**.
76+
77+
![ServiceNow Service Graph Connector: updating conditions on existing parent records when a new resource is mapped](/img/docs/service-now-service-graph-etl-condition-update.png)
78+
79+
Click **Mark as Complete** to finalize the **Select CMDB Classes to Map Source Data** section.
80+
81+
## Set the required relationships
82+
83+
Click **Add Relationships** to continue to the next section. Click the **Add Conditional Relationship** button at the top of the page. The following configuration tells the ETL that when a record with `aws_vpc` type is found in the import set, it should be hosted on **AWS Datacenter 1**. Click **Save**.
84+
85+
![ServiceNow Service Graph Connector: setting dependent relationships in the ETL mapping interface](/img/docs/service-now-service-graph-etl-setting-relationship.png)
86+
87+
A similar dependent relationship needs to be established from **AWS Datacenter** to **Cloud Service Account**. Since the AWS cloud provider is already covered by the application, the relationship record is present in the application. Click **Edit Relationship** and add another **OR** condition containing your new resource to the list. Click **Save**.
88+
89+
![ServiceNow Service Graph Connector: updating existing dependent relationships in the ETL mapping interface](/img/docs/service-now-service-graph-etl-editing-relationship.png)
90+
91+
Click **Mark as Complete** to finalize the **Add Relationships** section.
92+
93+
## Run a test
94+
95+
There are two ways to test the new resource mapping. You can utilize the **Test and Rollback Integration Results** interface of the ETL Transform Map Assistant. Alternatively, you can initiate a new run in your Terraform Cloud workspace that includes the deployment of the resource.

0 commit comments

Comments
 (0)