A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.hashicorp.com/terraform/cloud-docs/integrations/service-now below:

Set up ServiceNow Service Catalog integration for HCP Terraform | Terraform

Set up ServiceNow Service Catalog integration for HCP Terraform

Integration version: v2.8.1

The Terraform ServiceNow Service Catalog integration enables your end-users to provision self-serve infrastructure via ServiceNow. By connecting ServiceNow to HCP Terraform, this integration lets ServiceNow users order Service Items, create workspaces, and perform Terraform runs using prepared Terraform configurations hosted in VCS repositories or as no-code modules for self-service provisioning.

Note: The ServiceNow Catalog integration is available in HCP Terraform Plus and Premium editions. Refer to HCP Terraform pricing for details.

The integration relies on Terraform ServiceNow Catalog integration software installed within your ServiceNow instance. Installing and configuring this integration requires administration in both ServiceNow and HCP Terraform. Since administrators of these services within your organization are not necessarily the same person, this documentation refers to a ServiceNow Admin and a Terraform Admin.

First, the Terraform Admin configures your HCP Terraform organization with a dedicated team for the ServiceNow integration, and obtains a team API token for that team. The Terraform Admin provides the following to your ServiceNow admin:

Next, the ServiceNow Admin will install the Terraform ServiceNow Catalog integration to your ServiceNow instance, and configure it using the team API token and hostname.

Finally, the ServiceNow Admin will create a Service Catalog within ServiceNow for the Terraform integration, and configure it using the version control repositories or no-code modules, and variable definitions provided by the Terraform Admin.

ServiceNow Admin Terraform Admin Prepare an organization for use with the ServiceNow Catalog. Create a team that can manage workspaces in that organization. Create a team API token so the integration can use that team's permissions. If using VCS repositories, retrieve the OAuth token IDs and repository identifiers that HCP Terraform uses to identify your VCS repositories. If using a no-code flow, create a no-code ready module in your organization's private registry. Learn more in Configure VCS Repositories or No-Code Modules. Provide the API token, OAuth token ID, repository identifiers, variable definitions, and HCP Terraform hostname to the ServiceNow Admin. Install the Terraform integration application from the ServiceNow App Store. Connect the integration application with HCP Terraform. Add the Terraform Service Catalog to ServiceNow. If you are using the VCS flow, configure the VCS repositories in ServiceNow. Configure variable sets for use with the VCS repositories or no-code modules.

Once these steps are complete, self-serve infrastructure will be available through the ServiceNow Catalog. HCP Terraform will provision and manage requested infrastructure and report the status back to ServiceNow.

To start using Terraform with the ServiceNow Catalog Integration, you must have:

You can use this integration on the following ServiceNow server versions:

It requires the following ServiceNow plugins as dependencies:

Note: Dependent plugins are installed on your ServiceNow instance automatically when the app is downloaded from the ServiceNow Store.

Before installing the ServiceNow integration, the Terraform Admin will need to perform the following steps to configure and gather information from HCP Terraform.

  1. Sign in to HCP Terraform or Terraform Enterprise.
  2. Either create an organization or choose an existing organization where ServiceNow will create new workspaces. Save the organization name for later.
  3. Create a team for that organization called "ServiceNow", and ensure that it has permission to manage workspaces. You do not need to add any users to this team.
  4. On the "ServiceNow" team's settings page, generate a team API token. You can apply fine-grained permissions for team tokens at the project level. You can assign teams and their associated tokens permission levels on specific projects. To learn more about the different permissions necessary to provision resources, refer to Permissions. Save the team API token for later.
  5. If you are using the VCS flow:
    1. Ensure your Terraform organization is connected to a VCS provider. Repositories that are connectable to HCP Terraform workspaces can also be used as workspace templates in the ServiceNow integration.
    2. On your organization's VCS provider settings page (Settings > VCS Providers), find the OAuth Token ID for the VCS provider(s) that you intend to use with the ServiceNow integration. HCP Terraform uses the OAuth token ID to identify and authorize the VCS provider. Save the OAuth token ID for later.
    3. Identify the VCS repositories in the VCS provider containing Terraform configurations that the ServiceNow Terraform integration will deploy. Take note of any Terraform or environment variables used by the repositories you select. Save the Terraform and environment variables for later.
  6. If using the no-code flow, create one or more no-code modules in the private registry of your HCP Terraform. Save the no-code module names for later.
  7. Provide the following information to the ServiceNow Admin:

Note: Repository identifiers are determined by your VCS provider; they typically use a format like <ORGANIZATION>/<REPO_NAME> or <PROJECT_KEY>/<REPO_NAME>. Azure DevOps repositories use the format <ORGANIZATION>/<PROJECT>/_git/<REPO_NAME>. A GitHub repository hosted at https://github.com/exampleorg/examplerepo/ would have the repository identifier exampleorg/examplerepo.

For instance, if you are configuring this integration for your company, Example Corp, using two GitHub repositories, you would share values like the following with the ServiceNow Admin.

Terraform Enterprise Organization Name: `ServiceNowExampleOrg`

Team API Token: `q2uPExampleELkQ.atlasv1.A7jGHmvufExampleTeamAPITokenimVYxwunJk0xD8ObVol054`

Terraform Enterprise Hostname: `terraform.corp.example`

OAuth Token ID (GitHub org: example-corp): `ot-DhjEXAMPLELVtFA`
  - Repository ID (Developer Environment): `example-corp/developer-repo`
    - Environment variables:
      - `AWS_ACCESS_KEY_ID=AKIAEXAMPLEKEY`
      - `AWS_SECRET_ACCESS_KEY=ZB0ExampleSecretAccessKeyGjUiJh`
      - `AWS_DEFAULT_REGION=us-west-2`
    - Terraform variables:
      - `instance_type=t2.medium`
  - Repository ID (Testing Environment): `example-corp/testing-repo`
    - Environment variables:
      - `AWS_ACCESS_KEY_ID=AKIAEXAMPLEKEY`
      - `AWS_SECRET_ACCESS_KEY=ZB0ExampleSecretAccessKeyGjUiJh`
      - `AWS_DEFAULT_REGION=us-west-2`
    - Terraform variables:
      - `instance_type=t2.large`

Before beginning setup, the ServiceNow Admin must install the Terraform ServiceNow Catalog integration software.

This can be added to your ServiceNow instance from the ServiceNow Store. Search for the "Terraform" integration, published by "HashiCorp Inc".

ServiceNow Roles: admin or x_terraform.config_user

Once the integration is installed, the ServiceNow Admin can connect your ServiceNow instance to HCP Terraform. Before you begin, you will need the information described in the "Configure HCP Terraform" section from your Terraform Admin.

Once you have this information, connect ServiceNow to HCP Terraform with the following steps.

  1. Navigate to your ServiceNow Service Management Screen.
  2. Using the left-hand navigation, open the configuration table for the integration to manage the HCP Terraform connection.
  3. Click on "New" to create a new HCP Terraform connection.
  4. Click "Submit".

Now that you have connected ServiceNow to HCP Terraform, you are ready to create a Service Catalog using the VCS repositories or no-code modules provided by the Terraform Admin.

Navigate to the Service Catalog documentation to begin. You can also refer to this documentation whenever you need to add or update request items.

Team Tokens

Team-scoped tokens can help you manage a team's access to things in HCP Terraform, but team tokens are limited within the ServiceNow context. We recommend only using one API team token, regardless of the number of teams accessing ServiceNow. To learn more about API tokens, refer to Team tokens.

ServiceNow Developer Reference

ServiceNow developers who wish to customize the Terraform integration can refer to the developer documentation.

ServiceNow Administrator's Guide.

Refer to the ServiceNow Administrator documentation for information about configuring the integration.

Example Customizations

Once the ServiceNow integration is installed, you can consult the example customizations documentation.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4