Skip to content

ServiceNow Service Graph Connector for Terraform - 1.0.0 GA documentation #375

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

Merged
merged 28 commits into from
Jul 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0596957
ServiceNow Service Graph GA documentation and ServiceNow Integrations…
jastr945 Jun 13, 2023
43d9714
Add missing Connector and remove the sentence about PDI availability
jastr945 Jun 16, 2023
043ab85
Adding Key Benefits section to the Service Graph overview
jastr945 Jun 28, 2023
735d61c
Adding information about dependencies
jastr945 Jul 3, 2023
551eaf4
Merge branch 'main' into servicenow-service-graph-ga
jastr945 Jul 6, 2023
d17075b
Adding redirects for the ServiceNow Service Catalog pages
jastr945 Jul 6, 2023
942190e
Update redirects
BrianMMcClain Jul 11, 2023
38ccc27
Update wording on SGC Customizations doc
BrianMMcClain Jul 11, 2023
259fc6b
Update index page
BrianMMcClain Jul 11, 2023
6b984af
Update resource coverage
BrianMMcClain Jul 11, 2023
9318a35
Update wording to match tutorial
BrianMMcClain Jul 11, 2023
854340f
Update AWS field attribute mapping
BrianMMcClain Jul 11, 2023
476b5cc
Update remaining field attribute mappings
BrianMMcClain Jul 11, 2023
4b9bfa0
Update service catelog config redirect
BrianMMcClain Jul 11, 2023
dde9677
ServiceNow updates, renaming Catalog folder, review comments, screens…
jastr945 Jul 14, 2023
3bd823b
Merge branch 'main' into servicenow-service-graph-ga
jastr945 Jul 14, 2023
4bad69f
Updates to the SGC overview
BrianMMcClain Jul 17, 2023
46dd45a
Begin updating setup guide
BrianMMcClain Jul 18, 2023
609b482
Edit SGC setup page
BrianMMcClain Jul 18, 2023
06c73ed
Edit customizations
BrianMMcClain Jul 18, 2023
940b17b
Merge branch 'main' into servicenow-service-graph-ga
jastr945 Jul 19, 2023
705b957
Service Graph Connector breaking resource coverage into child pages
jastr945 Jul 19, 2023
b8edb37
Service Graph Connector - fix wording, typos and broken link
jastr945 Jul 19, 2023
8494f0a
Service Graph Connector - fix broken link
jastr945 Jul 19, 2023
0e7a95e
Update Service Catalog app version
jastr945 Jul 24, 2023
ac79ac9
Merge branch 'main' into servicenow-service-graph-ga
BrianMMcClain Jul 24, 2023
694117d
Service Graph - add Store listing
jastr945 Jul 26, 2023
2c0c918
Service Graph - remove Store screenshot
jastr945 Jul 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 65 additions & 18 deletions website/data/cloud-docs-nav-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -462,28 +462,75 @@
"title": "Integrations",
"routes": [
{
"title": "ServiceNow Integration",
"title": "ServiceNow Integrations",
"routes": [
{ "title": "Overview", "path": "integrations/service-now" },
{
"title": "Service Catalog",
"path": "integrations/service-now/service-catalog"
},
{
"title": "Admin Guide",
"path": "integrations/service-now/admin-guide"
},
{
"title": "Developer Reference",
"path": "integrations/service-now/developer-reference"
},
{
"title": "Example Customizations",
"path": "integrations/service-now/example-customizations"
"title": "Service Catalog for Terraform",
"routes": [
{ "title": "Overview", "path": "integrations/service-now/service-catalog-terraform" },
{
"title": "Service Catalog",
"path": "integrations/service-now/service-catalog-terraform/service-catalog-config"
},
{
"title": "Admin Guide",
"path": "integrations/service-now/service-catalog-terraform/admin-guide"
},
{
"title": "Developer Reference",
"path": "integrations/service-now/service-catalog-terraform/developer-reference"
},
{
"title": "Example Customizations",
"path": "integrations/service-now/service-catalog-terraform/example-customizations"
},
{
"title": "V1 Setup Instructions",
"path": "integrations/service-now/service-catalog-terraform/service-now-v1"
}
]
},
{
"title": "V1 Setup Instructions",
"path": "integrations/service-now/service-now-v1"
"title": "Service Graph Connector for Terraform",
"routes": [
{
"title": "Overview",
"path": "integrations/service-now/service-graph"
},
{
"title": "Setup",
"path": "integrations/service-now/service-graph/service-graph-setup"
},
{
"title": "Resource Coverage",
"routes": [
{
"title": "Overview",
"path": "integrations/service-now/service-graph/resource-coverage"
},
{
"title": "AWS",
"path": "integrations/service-now/service-graph/resource-coverage/aws"
},
{
"title": "Azure",
"path": "integrations/service-now/service-graph/resource-coverage/azure"
},
{
"title": "GCP",
"path": "integrations/service-now/service-graph/resource-coverage/gcp"
},
{
"title": "vSphere",
"path": "integrations/service-now/service-graph/resource-coverage/vsphere"
}
]
},
{
"title": "Customizations",
"path": "integrations/service-now/service-graph/customizations"
}
]
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ ServiceNow administrators have several options with configuring the Terraform
integration.

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

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

You can also configure how frequently ServiceNow will poll Terraform Cloud using
the documentation below.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@ For users who only need to order from the Terraform Catalog, we recommend
creating another role with read-only permissions for
`x_terraform_vcs_repositories` to view the available repositories for ordering
infrastructure. Install the Terraform ServiceNow Service Catalog integration by
following [the installation guide](/terraform/cloud-docs/integrations/service-now).
following [the installation guide](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform).
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-

# Terraform ServiceNow Service Catalog Integration Setup Instructions

-> **Integration version:** v2.2.0
-> **Integration version:** v2.2.1

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

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

<!-- BEGIN: TFC:only name:pnp-callout -->
-> **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.
Expand Down Expand Up @@ -216,21 +216,21 @@ Now that you have connected ServiceNow to Terraform Cloud, you are ready to
create a Service Catalog using the VCS repositories provided by the Terraform
Admin.

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

### ServiceNow Developer Reference

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

### ServiceNow Administrator's Guide.

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

### Example Customizations

Once the ServiceNow integration is installed, you can consult the [example
customizations documentation](/terraform/cloud-docs/integrations/service-now/example-customizations).
customizations documentation](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform/example-customizations).
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ reporting the results back to ServiceNow.

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

Additionally, you must have have the following information:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-

# Terraform ServiceNow Service Catalog Integration Setup Instructions

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

!> **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.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
page_title: Overview - ServiceNow Service Graph Connector for Terraform Integration - instructions on customizations for admins
description: >-
ServiceNow Service Graph Connector for Terraform allows you to edit ETL mapping and add more resources.
---

# ETL Mapping Customizations

-> **ServiceNow roles:** `admin`

-> **ServiceNow plugin requirement:** `IntegrationHub ETL`

You can update and customize the default ETL mapping rules offered by the Service Graph Connector for Terraform.

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.

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.

Any customizations should be done from the application's scope: **Service Graph Connector for Terraform**.

## Clone the ETL map

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.

## Build a resource in Terraform Cloud

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.

[Configure a webhook](/terraform/cloud-docs/integrations/service-now/service-graph/service-graph-setup#configure-terraform-webhook) and initiate a Terraform run.

## Download Terraform State

Once the run is successfully completed, open your ServiceNow instance, click on **All** and navigate to **Scheduled Imports**.

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.

Since there are no existing ETL rules configured for the new resource, it is ignored during the ETL process.

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.

![ServiceNow Service Graph Connector Outbound Http Requests interface](/img/docs/service-now-service-graph-state-object-url.png)

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.

Locate the resource in the state object. This JSON record will serve as a source for the future mapping.

## Identify the CI target

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.

## Consult the CI Class Manager

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.

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.

For example, according to the **CI Class Manager**, **Cloud Network** should be hosted on **Logical Datacenter** and **Cloud Service Account**.

## Set the mapping rules

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.

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**.

Open the **Preview and Prepare Data** section and review the imported rows. Click **Mark as Complete**.

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**.

![ServiceNow Service Graph Connector: setting the Conditional Class rules in the ETL mapping](/img/docs/service-now-service-graph-conditional-class-mapping.png)

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.

![ServiceNow Service Graph Connector: mapping resource attributes in the ETL](/img/docs/service-now-service-graph-etl-attribute-mapping.png)

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**.

![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)

Click **Mark as Complete** to finalize the **Select CMDB Classes to Map Source Data** section.

## Set the required relationships

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**.

![ServiceNow Service Graph Connector: setting dependent relationships in the ETL mapping interface](/img/docs/service-now-service-graph-etl-setting-relationship.png)

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**.

![ServiceNow Service Graph Connector: updating existing dependent relationships in the ETL mapping interface](/img/docs/service-now-service-graph-etl-editing-relationship.png)

Click **Mark as Complete** to finalize the **Add Relationships** section.

## Run a test

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.
Loading