terraform AWS This page details the mapping rules for importing AWS resources provisioned with Terraform into ServiceNow CMDB page title ServiceNow Service Graph Connector for Terraform Integration AWS Coverage ServiceNow Service Graph integration allows to import selected resources from AWS into ServiceNow CMDB

Answer:
---
page_title: ServiceNow Service Graph Connector for Terraform Integration - AWS Coverage
description: >-
  ServiceNow Service Graph integration allows to import selected resources from AWS into ServiceNow CMDB.
---

# AWS

This page details the mapping rules for importing AWS resources, provisioned with Terraform, into ServiceNow CMDB.

## Mapping of Terraform resources to CMDB CI Classes

| AWS resource                                                                         | Terraform resource name    | ServiceNow CMDB CI Class        | ServiceNow CMDB Category Name |
|--------------------------------------------------------------------------------------|----------------------------|---------------------------------|-------------------------------|
| AWS account                                                                          | N/A                        | `cmdb_ci_cloud_service_account` | Cloud Service Account         |
| AWS region                                                                           | N/A                        | `cmdb_ci_aws_datacenter`        | AWS Datacenter                |
| EC2 Instance                                                                         | `aws_instance`             | `cmdb_ci_vm_instance`           | Virtual Machine Instance      |
| S3 Bucket                                                                            | `aws_s3_bucket`            | `cmdb_ci_cloud_object_storage`  | Cloud Object Storage          |
| ECS Cluster                                                                          | `aws_ecs_cluster`          | `cmdb_ci_cloud_ecs_cluster`     | AWS Cloud ECS Cluster         |
| EKS Cluster                                                                          | `aws_eks_cluster`          | `cmdb_ci_kubernetes_cluster`    | Kubernetes Cluster            |
| VPC                                                                                | `aws_vpc`                  | `cmdb_ci_network`               | Cloud Network                 |
| Database Instance (*non-Aurora databases: e.g., MySQL, PostgreSQL, SQL Server, etc.*)| `aws_db_instance`          | `cmdb_ci_cloud_database`        | Cloud DataBase                |
| RDS Aurora Cluster                                                                   | `aws_rds_cluster`          | `cmdb_ci_cloud_db_cluster`      | Cloud DataBase Cluster        |
| RDS Aurora Instance                                                                  | `aws_rds_cluster_instance` | `cmdb_ci_cloud_database`        | Cloud DataBase                |
| DynamoDB Global Table                                                                | `aws_dynamodb_global_table`| `cmdb_ci_dynamodb_global_table` | DynamoDB Global Table         |
| DynamoDB Table                                                                       | `aws_dynamodb_table`       | `cmdb_ci_dynamodb_table`        | DynamoDB Table                |
| Security Group                                                                       | `aws_security_group`       | `cmdb_ci_compute_security_group`| Compute Security Group        |
| Lambda                                                                               | `aws_lambda_function`      | `cmdb_ci_cloud_function`        | Cloud Function                |
| Load Balancer                                                                        | `aws_lb`                   | `cmdb_ci_cloud_load_balancer`   | Cloud Load Balancer           |
| Tags                                                                                | N/A                        | `cmdb_key_value`                | Key Value                     |

## Resource relationships

| Child CI Class                                             | Relationship type| Parent CI Class                                           |
|------------------------------------------------------------|------------------|-----------------------------------------------------------|
| AWS Datacenter 1 (`cmdb_ci_aws_datacenter`)                | Hosted On::Hosts | Cloud Service Account 1 (`cmdb_ci_cloud_service_account`) |
| AWS Datacenter 2 (`cmdb_ci_aws_datacenter`)                | Hosted On::Hosts | Cloud Service Account 6 (`cmdb_ci_cloud_service_account`) |
| Virtual Machine Instance 1 (`cmdb_ci_vm_instance`)         | Hosted On::Hosts | AWS Datacenter 1 (`cmdb_ci_aws_datacenter`)               |
| Virtual Machine Instance 1 (`cmdb_ci_vm_instance`)         | Reference        | Key Value 1 (`cmdb_key_value`)                            |
| AWS Cloud ECS Cluster 1 (`cmdb_ci_cloud_ecs_cluster`)      | Hosted On::Hosts | AWS Datacenter 1 (`cmdb_ci_aws_datacenter`)               |
| AWS Cloud ECS Cluster 1 (`cmdb_ci_cloud_ecs_cluster`)      | Reference        | Key Value 2 (`cmdb_key_value`)                            |
| Cloud Object Storage 1 (`cmdb_ci_cloud_object_storage`)    | Hosted On::Hosts | AWS Datacenter 2 (`cmdb_ci_aws_datacenter`)               |
| Cloud Object Storage 1 (`cmdb_ci_cloud_object_storage`)    | Reference        | Key Value 3 (`cmdb_key_value`)                            |
| Kubernetes Cluster 1 (`cmdb_ci_kubernetes_cluster`)        | Hosted On::Hosts | AWS Datacenter 1 (`cmdb_ci_aws_datacenter`)               |
| Kubernetes Cluster 1 (`cmdb_ci_kubernetes_cluster`)        | Reference        | Key Value 4 (`cmdb_key_value`)                            |
| Cloud Network 1 (`cmdb_ci_network`)                        | Hosted On::Hosts | AWS Datacenter 1 (`cmdb_ci_aws_datacenter`)               |
| Cloud Network 1 (`cmdb_ci_network`)                        | Reference        | Key Value 5 (`cmdb_key_value`)                            |
| Cloud DataBase 1 (`cmdb_ci_cloud_database` )               | Hosted On::Hosts | AWS Datacenter 1 (`cmdb_ci_aws_datacenter`)               |
| Cloud DataBase 1 (`cmdb_ci_cloud_database` )               | Reference        | Key Value 6 (`cmdb_key_value`)                            |
| Cloud DataBase Cluster 1 (`cmdb_ci_cloud_db_cluster`)      | Hosted On::Hosts | AWS Datacenter 1 (`cmdb_ci_aws_datacenter`)               |
| Cloud DataBase Cluster 1 (`cmdb_ci_cloud_db_cluster`)      | Reference        | Key Value 7 (`cmdb_key_value`)                            |
| DynamoDB Global Table 1 (`cmdb_ci_dynamodb_global_table`)  | Hosted On::Hosts | Cloud Service Account 1 (`cmdb_ci_cloud_service_account`) |
| DynamoDB Table 1 (`cmdb_ci_dynamodb_table`)                | Hosted On::Hosts | AWS Datacenter 1 (`cmdb_ci_aws_datacenter`)               |
| DynamoDB Table 1 (`cmdb_ci_dynamodb_table`)                | Reference        | Key Value 8 (`cmdb_key_value`)                            |
| Compute Security Group 1 (`cmdb_ci_compute_security_group`)| Hosted On::Hosts | AWS Datacenter 1 (`cmdb_ci_aws_datacenter`)               |
| Compute Security Group 1 (`cmdb_ci_compute_security_group`)| Reference        | Key Value 10 (`cmdb_key_value`)                           |
| Cloud Function 1 (`cmdb_ci_cloud_function`)                | Hosted On::Hosts | AWS Datacenter 1 (`cmdb_ci_aws_datacenter`)               |
| Cloud Function 1 (`cmdb_ci_cloud_function`)                | Reference        | Key Value 11 (`cmdb_key_value`)                           |
| Cloud Load Balancer 1 (`cmdb_ci_cloud_load_balancer`)      | Hosted On::Hosts | AWS Datacenter 1 (`cmdb_ci_aws_datacenter`)               |
| Cloud Load Balancer 1 (`cmdb_ci_cloud_load_balancer`)      | Reference        | Key Value 12 (`cmdb_key_value`)                           |

## Field attributes mapping

### Cloud Service Account (`cmdb_ci_cloud_service_account`)

|  CMDB field        | Terraform state field                         |
|--------------------|-----------------------------------------------|
| Source Native Key  | Resource account number extracted from `arn`  |
| Account Id         | Resource account number extracted from `arn`  |
| Datacenter Type    | Resource cloud provider extracted from `arn`  |
| Object ID          | Resource id extracted from `arn`              |
| Name               | Resource name extracted from `arn`            |
| Operational Status | Defaults to "1" ("Operational")               |

### AWS Datacenter (`cmdb_ci_aws_datacenter`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | Concatenation of region and account number extracted from `arn`|
| Object Id         | Region extracted from `arn`                                    |
| Region            | Region extracted from `arn`                                    |
| Name              | Region extracted from `arn`                                    |
| Operational Status| Defaults to "1" ("Operational")                                |

### Virtual Machine Instance (`cmdb_ci_vm_instance`)

|  CMDB field        | Terraform state field                                         |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| Object Id         | `id`                                                           |
| Placement Group ID| `placement_group`                                              |
| IP Address        | `public_ip`                                                    |
| Status            | `instance_state`                                               |
| VM Instance ID    | `id`                                                           |
| Name              | `id`                                                           |
| State             | `state`                                                        |
| CPU               | `cpu_core_count`                                               |
| Operational Status| Defaults to "1" ("Operational")                                |

### AWS Cloud ECS Cluster (`cmdb_ci_cloud_ecs_cluster`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| Object Id         | `id`                                                           |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")                                |

### Cloud Object Storage (`cmdb_ci_cloud_object_storage`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| Object Id         | `id`                                                           |
| Cloud Provider    | Resource cloud provider extracted from `arn`                   |
| Name              | `bucket`                                                       |
| Operational Status| Defaults to "1" ("Operational")                                |

### Kubernetes Cluster (`cmdb_ci_kubernetes_cluster`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| IP Address        | `endpoint`                                                     |
| Port              | Defaults to "6443"                                             |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")                                |

### Cloud Network (`cmdb_ci_network`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| Object Id         | `id`                                                           |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")                                |

### Cloud DataBase (`cmdb_ci_cloud_database`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| Object Id         | `id`                                                           |
| Version           | `engine_version`                                               |
| Type              | `engine`                                                       |
| TCP port(s)       | `port`                                                         |
| Category          | `instance_class`                                               |
| Fully qualified domain name| `endpoint`                                            |
| Location          | Region extracted from `arn`                                    |
| Name              | `name`                                                         |
| Vendor            | Resource cloud provider extracted from `arn`                   |
| Operational Status| Defaults to "1" ("Operational")                                |

### Cloud DataBase Cluster (`cmdb_ci_cloud_db_cluster`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| Cluster ID        | `cluster_resource_id`                                          |
| Name              | `name`                                                         |
| TCP port(s)       | `port`                                                         |
| Fully qualified domain name| `endpoint`                                            |
| Vendor            | Resource cloud provider extracted from `arn`                   |
| Operational Status| Defaults to "1" ("Operational")                                |

### DynamoDB Table (`cmdb_ci_dynamodb_table`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| Object Id         | `arn`                                                          |
| Location          | Region extracted from `arn`                                    |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")                                |

### DynamoDB Global Table (`cmdb_ci_dynamodb_global_table`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| Object Id         | `arn`                                                          |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")                                |

### Compute Security Group (`cmdb_ci_compute_security_group`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| Object Id         | `id`                                                           |
| Location          | Region extracted from `arn`                                    |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")                                |

### Cloud Function (`cmdb_ci_cloud_function`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| Object Id         | `arn`                                                          |
| Language          | `runtime`                                                      |
| Code Size         | `source_code_size`                                             |
| Location          | Region extracted from `arn`                                    |
| Name              | `function_name`                                                |
| Operational Status| Defaults to "1" ("Operational")                                |

### Cloud Load Balancer (`cmdb_ci_cloud_load_balancer`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `arn`                                                          |
| Object Id         | `id`                                                           |
| Canonical Hosted Zone Name| `dns_name`                                             |
| Canonical Hosted Zone ID| `zone_id`                                                |
| Location          | Region extracted from `arn`                                    |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")

page title  ServiceNow Service Graph Connector for Terraform Integration   AWS Coverage description       ServiceNow Service Graph integration allows to import selected resources from AWS into ServiceNow CMDB         AWS  This page details the mapping rules for importing AWS resources  provisioned with Terraform  into ServiceNow CMDB      Mapping of Terraform resources to CMDB CI Classes    AWS resource                                                                           Terraform resource name      ServiceNow CMDB CI Class          ServiceNow CMDB Category Name                                                                                AWS account                                                                            N A                           cmdb ci cloud service account    Cloud Service Account             AWS region                                                                             N A                           cmdb ci aws datacenter           AWS Datacenter                    EC2 Instance                                                                            aws instance                 cmdb ci vm instance              Virtual Machine Instance          S3 Bucket                                                                               aws s3 bucket                cmdb ci cloud object storage     Cloud Object Storage              ECS Cluster                                                                             aws ecs cluster              cmdb ci cloud ecs cluster        AWS Cloud ECS Cluster             EKS Cluster                                                                             aws eks cluster              cmdb ci kubernetes cluster       Kubernetes Cluster                VPC                                                                                aws vpc                      cmdb ci network                  Cloud Network                     Database Instance   non Aurora databases  e g   MySQL  PostgreSQL  SQL Server  etc      aws db instance              cmdb ci cloud database           Cloud DataBase                    RDS Aurora Cluster                                                                      aws rds cluster              cmdb ci cloud db cluster         Cloud DataBase Cluster            RDS Aurora Instance                                                                     aws rds cluster instance     cmdb ci cloud database           Cloud DataBase                    DynamoDB Global Table                                                                   aws dynamodb global table    cmdb ci dynamodb global table    DynamoDB Global Table             DynamoDB Table                                                                          aws dynamodb table           cmdb ci dynamodb table           DynamoDB Table                    Security Group                                                                          aws security group           cmdb ci compute security group   Compute Security Group            Lambda                                                                                aws lambda function          cmdb ci cloud function           Cloud Function                    Load Balancer                                                                           aws lb                       cmdb ci cloud load balancer      Cloud Load Balancer               Tags                                                                                N A                           cmdb key value                   Key Value                           Resource relationships    Child CI Class                                               Relationship type  Parent CI Class                                                                                AWS Datacenter 1   cmdb ci aws datacenter                    Hosted On  Hosts   Cloud Service Account 1   cmdb ci cloud service account       AWS Datacenter 2   cmdb ci aws datacenter                    Hosted On  Hosts   Cloud Service Account 6   cmdb ci cloud service account       Virtual Machine Instance 1   cmdb ci vm instance             Hosted On  Hosts   AWS Datacenter 1   cmdb ci aws datacenter                     Virtual Machine Instance 1   cmdb ci vm instance             Reference          Key Value 1   cmdb key value                                  AWS Cloud ECS Cluster 1   cmdb ci cloud ecs cluster          Hosted On  Hosts   AWS Datacenter 1   cmdb ci aws datacenter                     AWS Cloud ECS Cluster 1   cmdb ci cloud ecs cluster          Reference          Key Value 2   cmdb key value                                  Cloud Object Storage 1   cmdb ci cloud object storage        Hosted On  Hosts   AWS Datacenter 2   cmdb ci aws datacenter                     Cloud Object Storage 1   cmdb ci cloud object storage        Reference          Key Value 3   cmdb key value                                  Kubernetes Cluster 1   cmdb ci kubernetes cluster            Hosted On  Hosts   AWS Datacenter 1   cmdb ci aws datacenter                     Kubernetes Cluster 1   cmdb ci kubernetes cluster            Reference          Key Value 4   cmdb key value                                  Cloud Network 1   cmdb ci network                            Hosted On  Hosts   AWS Datacenter 1   cmdb ci aws datacenter                     Cloud Network 1   cmdb ci network                            Reference          Key Value 5   cmdb key value                                  Cloud DataBase 1   cmdb ci cloud database                    Hosted On  Hosts   AWS Datacenter 1   cmdb ci aws datacenter                     Cloud DataBase 1   cmdb ci cloud database                    Reference          Key Value 6   cmdb key value                                  Cloud DataBase Cluster 1   cmdb ci cloud db cluster          Hosted On  Hosts   AWS Datacenter 1   cmdb ci aws datacenter                     Cloud DataBase Cluster 1   cmdb ci cloud db cluster          Reference          Key Value 7   cmdb key value                                  DynamoDB Global Table 1   cmdb ci dynamodb global table      Hosted On  Hosts   Cloud Service Account 1   cmdb ci cloud service account       DynamoDB Table 1   cmdb ci dynamodb table                    Hosted On  Hosts   AWS Datacenter 1   cmdb ci aws datacenter                     DynamoDB Table 1   cmdb ci dynamodb table                    Reference          Key Value 8   cmdb key value                                  Compute Security Group 1   cmdb ci compute security group    Hosted On  Hosts   AWS Datacenter 1   cmdb ci aws datacenter                     Compute Security Group 1   cmdb ci compute security group    Reference          Key Value 10   cmdb key value                                 Cloud Function 1   cmdb ci cloud function                    Hosted On  Hosts   AWS Datacenter 1   cmdb ci aws datacenter                     Cloud Function 1   cmdb ci cloud function                    Reference          Key Value 11   cmdb key value                                 Cloud Load Balancer 1   cmdb ci cloud load balancer          Hosted On  Hosts   AWS Datacenter 1   cmdb ci aws datacenter                     Cloud Load Balancer 1   cmdb ci cloud load balancer          Reference          Key Value 12   cmdb key value                                   Field attributes mapping      Cloud Service Account   cmdb ci cloud service account       CMDB field          Terraform state field                                                                                Source Native Key    Resource account number extracted from  arn       Account Id           Resource account number extracted from  arn       Datacenter Type      Resource cloud provider extracted from  arn       Object ID            Resource id extracted from  arn                   Name                 Resource name extracted from  arn                 Operational Status   Defaults to  1    Operational                        AWS Datacenter   cmdb ci aws datacenter      CMDB field          Terraform state field                                                                                Source Native Key   Concatenation of region and account number extracted from  arn     Object Id           Region extracted from  arn                                         Region              Region extracted from  arn                                         Name                Region extracted from  arn                                         Operational Status  Defaults to  1    Operational                                          Virtual Machine Instance   cmdb ci vm instance        CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               Object Id            id                                                                Placement Group ID   placement group                                                   IP Address           public ip                                                         Status               instance state                                                    VM Instance ID       id                                                                Name                 id                                                                State                state                                                             CPU                  cpu core count                                                    Operational Status  Defaults to  1    Operational                                         AWS Cloud ECS Cluster   cmdb ci cloud ecs cluster      CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               Object Id            id                                                                Name                 name                                                              Operational Status  Defaults to  1    Operational                                         Cloud Object Storage   cmdb ci cloud object storage       CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               Object Id            id                                                                Cloud Provider      Resource cloud provider extracted from  arn                        Name                 bucket                                                            Operational Status  Defaults to  1    Operational                                         Kubernetes Cluster   cmdb ci kubernetes cluster      CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               IP Address           endpoint                                                          Port                Defaults to  6443                                                  Name                 name                                                              Operational Status  Defaults to  1    Operational                                         Cloud Network   cmdb ci network      CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               Object Id            id                                                                Name                 name                                                              Operational Status  Defaults to  1    Operational                                         Cloud DataBase   cmdb ci cloud database      CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               Object Id            id                                                                Version              engine version                                                    Type                 engine                                                            TCP port s           port                                                              Category             instance class                                                    Fully qualified domain name   endpoint                                                 Location            Region extracted from  arn                                         Name                 name                                                              Vendor              Resource cloud provider extracted from  arn                        Operational Status  Defaults to  1    Operational                                         Cloud DataBase Cluster   cmdb ci cloud db cluster      CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               Cluster ID           cluster resource id                                               Name                 name                                                              TCP port s           port                                                              Fully qualified domain name   endpoint                                                 Vendor              Resource cloud provider extracted from  arn                        Operational Status  Defaults to  1    Operational                                         DynamoDB Table   cmdb ci dynamodb table      CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               Object Id            arn                                                               Location            Region extracted from  arn                                         Name                 name                                                              Operational Status  Defaults to  1    Operational                                         DynamoDB Global Table   cmdb ci dynamodb global table       CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               Object Id            arn                                                               Name                 name                                                              Operational Status  Defaults to  1    Operational                                         Compute Security Group   cmdb ci compute security group      CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               Object Id            id                                                                Location            Region extracted from  arn                                         Name                 name                                                              Operational Status  Defaults to  1    Operational                                         Cloud Function   cmdb ci cloud function      CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               Object Id            arn                                                               Language             runtime                                                           Code Size            source code size                                                  Location            Region extracted from  arn                                         Name                 function name                                                     Operational Status  Defaults to  1    Operational                                         Cloud Load Balancer   cmdb ci cloud load balancer      CMDB field          Terraform state field                                                                                Source Native Key    arn                                                               Object Id            id                                                                Canonical Hosted Zone Name   dns name                                                  Canonical Hosted Zone ID   zone id                                                     Location            Region extracted from  arn                                         Name                 name                                                              Operational Status  Defaults to  1    Operational


terraform This page describes how Terraform provisioned Azure resources are mapped to the classes within the ServiceNow CMDB Microsoft Azure ServiceNow Service Graph integration allows to import selected resources from Azure into ServiceNow CMDB page title ServiceNow Service Graph Connector for Terraform Integration Azure Coverage

Answer:
---
page_title: ServiceNow Service Graph Connector for Terraform Integration - Azure Coverage
description: >-
  ServiceNow Service Graph integration allows to import selected resources from Azure into ServiceNow CMDB.
---

# Microsoft Azure

This page describes how Terraform-provisioned Azure resources are mapped to the classes within the ServiceNow CMDB.

## Mapping of Terraform resources to CMDB CI Classes

| Azure resource             | Terraform resource name            | ServiceNow CMDB CI Class        | ServiceNow CMDB Category Name |
|----------------------------|------------------------------------|---------------------------------|-------------------------------|
| Azure account              | N/A                                | `cmdb_ci_cloud_service_account` | Cloud Service Account         |
| Azure region               | N/A                                | `cmdb_ci_azure_datacenter`      | Azure Datacenter              |
| Resource Group             | `azurerm_resource_group`           | `cmdb_ci_resource_group`        | Resource Group                |
| Windows VM                 | `azurerm_windows_virtual_machine`  | `cmdb_ci_vm_instance`           | Virtual Machine Instance      |
| Linux VM                   | `azurerm_linux_virtual_machine`    | `cmdb_ci_vm_instance`           | Virtual Machine Instance      |
| AKS Cluster                | `azurerm_kubernetes_cluster`       | `cmdb_ci_kubernetes_cluster`    | Kubernetes Cluster            |
| Storage Container          | `azurerm_storage_container`        | `cmdb_ci_cloud_storage_account` | Cloud Storage Account         |
| MariaDB Database           | `azurerm_mariadb_server`           | `cmdb_ci_cloud_database`        | Cloud DataBase                |
| MS SQL Database            | `azurerm_mssql_server`             | `cmdb_ci_cloud_database`        | Cloud DataBase                |
| MySQL Database             | `azurerm_mysql_server`             | `cmdb_ci_cloud_database`        | Cloud DataBase                |
| PostgreSQL Database        | `azurerm_postgresql_server`        | `cmdb_ci_cloud_database`        | Cloud DataBase                |
| Network security group     | `azurerm_network_security_group`   | `cmdb_ci_compute_security_group`| Compute Security Group        |
| Linux Function App         | `azurerm_linux_function_app`       | `cmdb_ci_cloud_function`        | Cloud Function                |
| Windows Function App       | `azurerm_windows_function_app`     | `cmdb_ci_cloud_function`        | Cloud Function                |
| Virtual Network            | `azurerm_virtual_network`          | `cmdb_ci_network`               | Cloud Network                 |
| Tags                       | N/A                                | `cmdb_key_value`                | Key Value                     |

## Resource relationships

| Child CI Class                                             | Relationship type      | Parent CI Class                                           |
|------------------------------------------------------------|------------------------|-----------------------------------------------------------|
| Azure Datacenter 1 (`cmdb_ci_azure_datacenter`)            | Hosted On::Hosts       | Cloud Service Account 2 (`cmdb_ci_cloud_service_account`) |
| Azure Datacenter 2 (`cmdb_ci_azure_datacenter`)            | Hosted On::Hosts       | Cloud Service Account 3 (`cmdb_ci_cloud_service_account`) |
| Azure Datacenter 1 (`cmdb_ci_azure_datacenter`)            | Contains::Contained by | Resource Group 1 (`cmdb_ci_resource_group`)               |
| Cloud Storage Account 1 (`cmdb_ci_cloud_storage_account`)  | Hosted On::Hosts       | Azure Datacenter 2 (`cmdb_ci_azure_datacenter`)           |
| Virtual Machine Instance 2 (`cmdb_ci_vm_instance`)         | Hosted On::Hosts       | Azure Datacenter 1 (`cmdb_ci_azure_datacenter`)           |
| Virtual Machine Instance 2 (`cmdb_ci_vm_instance`)         | Reference              | Key Value 14 (`cmdb_key_value`)                           |
| Virtual Machine Instance 3 (`cmdb_ci_vm_instance`)         | Hosted On::Hosts       | Azure Datacenter 1 (`cmdb_ci_azure_datacenter`)           |
| Virtual Machine Instance 3 (`cmdb_ci_vm_instance`)         | Reference              | Key Value 15 (`cmdb_key_value`)                           |
| Kubernetes Cluster 2 (`cmdb_ci_kubernetes_cluster`)        | Hosted On::Hosts       | Azure Datacenter 1 (`cmdb_ci_azure_datacenter`)           |
| Kubernetes Cluster 2 (`cmdb_ci_kubernetes_cluster`)        | Reference              | Key Value 16 (`cmdb_key_value`)                           |
| Cloud DataBase 2 (`cmdb_ci_cloud_database` )               | Hosted On::Hosts       | Azure Datacenter 1 (`cmdb_ci_azure_datacenter`)           |
| Cloud DataBase 2 (`cmdb_ci_cloud_database` )               | Reference              | Key Value 9 (`cmdb_key_value`)                            |
| Compute Security Group 2 (`cmdb_ci_compute_security_group`)| Hosted On::Hosts       | Azure Datacenter 1 (`cmdb_ci_azure_datacenter`)           |
| Compute Security Group 2 (`cmdb_ci_compute_security_group`)| Reference              | Key Value 17 (`cmdb_key_value`)                           |
| Cloud Function 2 (`cmdb_ci_cloud_function`)                | Hosted On::Hosts       | Azure Datacenter 1 (`cmdb_ci_azure_datacenter`)           |
| Cloud Function 2 (`cmdb_ci_cloud_function`)                | Reference              | Key Value 19 (`cmdb_key_value`)                           |
| Cloud Network 2 (`cmdb_ci_network`)                        | Hosted On::Hosts       | Azure Datacenter 1 (`cmdb_ci_azure_datacenter`)           |
| Cloud Network 2 (`cmdb_ci_network`)                        | Reference              | Key Value 20 (`cmdb_key_value`)                           |

## Field attributes mapping

### Cloud Service Account (`cmdb_ci_cloud_service_account`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | Subscription ID extracted from `id`                            |
| Account Id        | Subscription ID extracted from `id`                            |
| Datacenter Type   | Defaults to `azure`                                            |
| Object ID         | Subscription ID extracted from `id`                            |
| Name              | Subscription ID extracted from `id`                            |
| Operational Status| Defaults to "1" ("Operational")                                |

### Azure Datacenter (`cmdb_ci_azure_datacenter`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | Concatenation of `location` and Subscription ID                |
| Object Id         | `location`                                                     |
| Region            | `location`                                                     |
| Name              | `location`                                                     |
| Operational Status| Defaults to "1" ("Operational")                                |

### Virtual Machine Instance (`cmdb_ci_vm_instance`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `id`                                                           |
| Object Id         | `id`                                                           |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")                                |

### Cloud Storage Account (`cmdb_ci_cloud_storage_account`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `resource_manager_id`                                          |
| Object Id         | `resource_manager_id`                                          |
| Fully qualified domain name| `id`                                                  |
| Blob Service      | `storage_account_name`                                         |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")                                |

### Resource Group (`cmdb_ci_resource_group`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `id`                                                           |
| Object Id         | `id`                                                           |
| Name              | `name`                                                         |
| Location          | `location`                                                     |
| Operational Status| Defaults to "1" ("Operational")                                |

### Kubernetes Cluster (`cmdb_ci_kubernetes_cluster`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `id`                                                           |
| IP Address        | `fqdn`                                                         |
| Port              | Defaults to "6443"                                             |
| Name              | `name`                                                         |
| Location          | `location`                                                     |
| Operational Status| Defaults to "1" ("Operational")                                |

### Cloud DataBase (`cmdb_ci_cloud_database`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `id`                                                           |
| Object Id         | `id`                                                           |
| Version           | `engine_version`                                               |
| Fully qualified domain name| `fqdn`                                                |
| Name              | `name`                                                         |
| Vendor            | Defaults to `azure`                                            |
| Operational Status| Defaults to "1" ("Operational")                                |

### Compute Security Group (`cmdb_ci_compute_security_group`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `id`                                                           |
| Object Id         | `id`                                                           |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")                                |

### Cloud Function (`cmdb_ci_cloud_function`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `id`                                                           |
| Object Id         | `id`                                                           |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")                                |

### Cloud Network (`cmdb_ci_network`)

| CMDB field        | Terraform state field                                          |
|-------------------|----------------------------------------------------------------|
| Source Native Key | `id`                                                           |
| Object Id         | `id`                                                           |
| Name              | `name`                                                         |
| Operational Status| Defaults to "1" ("Operational")

page title  ServiceNow Service Graph Connector for Terraform Integration   Azure Coverage description       ServiceNow Service Graph integration allows to import selected resources from Azure into ServiceNow CMDB         Microsoft Azure  This page describes how Terraform provisioned Azure resources are mapped to the classes within the ServiceNow CMDB      Mapping of Terraform resources to CMDB CI Classes    Azure resource               Terraform resource name              ServiceNow CMDB CI Class          ServiceNow CMDB Category Name                                                                                Azure account                N A                                   cmdb ci cloud service account    Cloud Service Account             Azure region                 N A                                   cmdb ci azure datacenter         Azure Datacenter                  Resource Group                azurerm resource group               cmdb ci resource group           Resource Group                    Windows VM                    azurerm windows virtual machine      cmdb ci vm instance              Virtual Machine Instance          Linux VM                      azurerm linux virtual machine        cmdb ci vm instance              Virtual Machine Instance          AKS Cluster                   azurerm kubernetes cluster           cmdb ci kubernetes cluster       Kubernetes Cluster                Storage Container             azurerm storage container            cmdb ci cloud storage account    Cloud Storage Account             MariaDB Database              azurerm mariadb server               cmdb ci cloud database           Cloud DataBase                    MS SQL Database               azurerm mssql server                 cmdb ci cloud database           Cloud DataBase                    MySQL Database                azurerm mysql server                 cmdb ci cloud database           Cloud DataBase                    PostgreSQL Database           azurerm postgresql server            cmdb ci cloud database           Cloud DataBase                    Network security group        azurerm network security group       cmdb ci compute security group   Compute Security Group            Linux Function App            azurerm linux function app           cmdb ci cloud function           Cloud Function                    Windows Function App          azurerm windows function app         cmdb ci cloud function           Cloud Function                    Virtual Network               azurerm virtual network              cmdb ci network                  Cloud Network                     Tags                         N A                                   cmdb key value                   Key Value                           Resource relationships    Child CI Class                                               Relationship type        Parent CI Class                                                                                Azure Datacenter 1   cmdb ci azure datacenter                Hosted On  Hosts         Cloud Service Account 2   cmdb ci cloud service account       Azure Datacenter 2   cmdb ci azure datacenter                Hosted On  Hosts         Cloud Service Account 3   cmdb ci cloud service account       Azure Datacenter 1   cmdb ci azure datacenter                Contains  Contained by   Resource Group 1   cmdb ci resource group                     Cloud Storage Account 1   cmdb ci cloud storage account      Hosted On  Hosts         Azure Datacenter 2   cmdb ci azure datacenter                 Virtual Machine Instance 2   cmdb ci vm instance             Hosted On  Hosts         Azure Datacenter 1   cmdb ci azure datacenter                 Virtual Machine Instance 2   cmdb ci vm instance             Reference                Key Value 14   cmdb key value                                 Virtual Machine Instance 3   cmdb ci vm instance             Hosted On  Hosts         Azure Datacenter 1   cmdb ci azure datacenter                 Virtual Machine Instance 3   cmdb ci vm instance             Reference                Key Value 15   cmdb key value                                 Kubernetes Cluster 2   cmdb ci kubernetes cluster            Hosted On  Hosts         Azure Datacenter 1   cmdb ci azure datacenter                 Kubernetes Cluster 2   cmdb ci kubernetes cluster            Reference                Key Value 16   cmdb key value                                 Cloud DataBase 2   cmdb ci cloud database                    Hosted On  Hosts         Azure Datacenter 1   cmdb ci azure datacenter                 Cloud DataBase 2   cmdb ci cloud database                    Reference                Key Value 9   cmdb key value                                  Compute Security Group 2   cmdb ci compute security group    Hosted On  Hosts         Azure Datacenter 1   cmdb ci azure datacenter                 Compute Security Group 2   cmdb ci compute security group    Reference                Key Value 17   cmdb key value                                 Cloud Function 2   cmdb ci cloud function                    Hosted On  Hosts         Azure Datacenter 1   cmdb ci azure datacenter                 Cloud Function 2   cmdb ci cloud function                    Reference                Key Value 19   cmdb key value                                 Cloud Network 2   cmdb ci network                            Hosted On  Hosts         Azure Datacenter 1   cmdb ci azure datacenter                 Cloud Network 2   cmdb ci network                            Reference                Key Value 20   cmdb key value                                   Field attributes mapping      Cloud Service Account   cmdb ci cloud service account      CMDB field          Terraform state field                                                                                Source Native Key   Subscription ID extracted from  id                                 Account Id          Subscription ID extracted from  id                                 Datacenter Type     Defaults to  azure                                                 Object ID           Subscription ID extracted from  id                                 Name                Subscription ID extracted from  id                                 Operational Status  Defaults to  1    Operational                                         Azure Datacenter   cmdb ci azure datacenter      CMDB field          Terraform state field                                                                                Source Native Key   Concatenation of  location  and Subscription ID                    Object Id            location                                                          Region               location                                                          Name                 location                                                          Operational Status  Defaults to  1    Operational                                         Virtual Machine Instance   cmdb ci vm instance      CMDB field          Terraform state field                                                                                Source Native Key    id                                                                Object Id            id                                                                Name                 name                                                              Operational Status  Defaults to  1    Operational                                         Cloud Storage Account   cmdb ci cloud storage account      CMDB field          Terraform state field                                                                                Source Native Key    resource manager id                                               Object Id            resource manager id                                               Fully qualified domain name   id                                                       Blob Service         storage account name                                              Name                 name                                                              Operational Status  Defaults to  1    Operational                                         Resource Group   cmdb ci resource group      CMDB field          Terraform state field                                                                                Source Native Key    id                                                                Object Id            id                                                                Name                 name                                                              Location             location                                                          Operational Status  Defaults to  1    Operational                                         Kubernetes Cluster   cmdb ci kubernetes cluster      CMDB field          Terraform state field                                                                                Source Native Key    id                                                                IP Address           fqdn                                                              Port                Defaults to  6443                                                  Name                 name                                                              Location             location                                                          Operational Status  Defaults to  1    Operational                                         Cloud DataBase   cmdb ci cloud database      CMDB field          Terraform state field                                                                                Source Native Key    id                                                                Object Id            id                                                                Version              engine version                                                    Fully qualified domain name   fqdn                                                     Name                 name                                                              Vendor              Defaults to  azure                                                 Operational Status  Defaults to  1    Operational                                         Compute Security Group   cmdb ci compute security group      CMDB field          Terraform state field                                                                                Source Native Key    id                                                                Object Id            id                                                                Name                 name                                                              Operational Status  Defaults to  1    Operational                                         Cloud Function   cmdb ci cloud function      CMDB field          Terraform state field                                                                                Source Native Key    id                                                                Object Id            id                                                                Name                 name                                                              Operational Status  Defaults to  1    Operational                                         Cloud Network   cmdb ci network      CMDB field          Terraform state field                                                                                Source Native Key    id                                                                Object Id            id                                                                Name                 name                                                              Operational Status  Defaults to  1    Operational


terraform Example customizations for the ServiceNow Service Catalog Integration This example use case creates a Terraform Catalog Item for requesting resources Cloud Example Customizations ServiceNow Service Catalog Integration Terraform page title Example Customizations

Answer:
---
page_title: >-
  Example Customizations - ServiceNow Service Catalog Integration - Terraform
  Cloud
description: Example customizations for the ServiceNow Service Catalog Integration.
---

# Example Customizations

This example use case creates a Terraform Catalog Item for requesting resources
with custom variable values passed to the Terraform configuration.

## Change the scope

When you make a customization to the app, ensure you switch to the "Terraform"
scope. This guarantees that all items you create are correctly assigned to that
scope. To change the scope in your ServiceNow instance, click the globe icon at
the top right of the screen. For detailed instructions on changing the scope,
refer to the [ServiceNow
documentation](https://developer.servicenow.com/dev.do#!/learn/learning-plans/xanadu/new_to_servicenow/app_store_learnv2_buildneedit_xanadu_application_scope).

## Make a copy of the existing Catalog Item

The ServiceNow Service Catalog for Terraform application provides pre-configured [Catalog
Items](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform/developer-reference#example-service-catalog-flows-and-actions)
for immediate use. We recommend creating a copy of the most recent version of the
Catalog Item to ensure you have access to the latest features and
improvements. Make a copy of the most appropriate Catalog Item for your specific
business requirements by following these steps:

1. Navigate to **All > Service Catalog > Catalogs > Terraform Catalog**, and review the
   Catalog Items based on flows, whose names use the suffix "Flow".
   We recommend choosing Flows over Workflows because Flows provide enhanced functionality and performance and are actively developed by ServiceNow.
For more information, refer
   to [Catalog Items based on Flows vs. Workflows](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform/developer-reference#example-service-catalog-flows-and-actions).
1. Open the Catalog Item in editing mode:
   1. Click the Catalog Item to open the request form.
   1. Click **...** in the top right corner.
   1. Select **Configure Item** from the menu.
   ![Screenshot: ServiceNow Configure Catalog Item](/img/docs/servicenow-catalog-configure-item.png "Screenshot of the ServiceNow Configure Catalog Item dropdown menu")
1. Click the **Process Engine** tab in the Catalog Item configuration. Take
   note of the Flow name associated with the Catalog Item, because you need to
   create a copy of this Flow as well.
   ![Screenshot: ServiceNow Process Engine](/img/docs/servicenow-catalog-process-engine.png "Screenshot of the ServiceNow Configure Catalog Item – Process Engine tab")
1. Start the copying process:
   1. Click the **Copy** button above the **Related Links** section.
   1. Assign a new name to the copied Catalog Item.
   1. Optionally, modify the description and short description fields.
      Right-click the header and select **Save**.
   ![Screenshot: ServiceNow Copy Item](/img/docs/servicenow-catalog-copied-item.png "Screenshot of the copied ServiceNow Catalog Item")

## Adjust the Variable Set

If a Catalog Item requires users to input variable values,
you must update the variable set with those required variables.
Although some default Catalog Items come with pre-defined example variables, it
is common practice to remove these and replace them with your own custom
variables.

1. Create a new Variable Set.
   1. On the Catalog Item's configuration page, under the **Related Links**
      section, click the **Variable Sets** tab.
   1. Click the **New** button to create a new variable set. Ensure that the
   variables in your new set match the variables required by your Terraform
   configuration.
   ![Screenshot: ServiceNow New Variable Set](/img/docs/servicenow-catalog-new-varset.png "Screenshot of the ServiceNow Catalog Item – new Variable Set")
   1. Select **Single-Row Variable Set** and provide a title and description.
   1. Click **Submit**. Upon submission, you will be redirected back to the Catalog
   Item's configuration page.
   ![Screenshot: ServiceNow New Variable Set Form](/img/docs/servicenow-catalog-new-varset-form.png "Screenshot of the ServiceNow Catalog Item – new Variable Set")
   1. Click the name of your newly created Variable Set and create your
   variables. You must follow the [naming convention for Terraform
   variables](/terraform/cloud-docs/integrations/service-now/service-catalog-terraform/developer-reference#terraform-variables-and-servicenow-variable-sets).
   ServiceNow offers various types of variable representation (such as strings,
   booleans, and dropdown menus). Refer to the [ServiceNow documentation on
   variables](https://docs.servicenow.com/csh?topicname=c_ServiceCatalogVariables.html&version=latest)
   and select the types that best suit your use case. You can also set default
   values for the variables in the **Default Value** tab, which ServiceNow prefills for the end users.
   ![Screenshot: ServiceNow New Variables](/img/docs/servicenow-catalog-variables.png "Screenshot of the ServiceNow Catalog Item – new variables")
1. Attach the newly created Variable Set to your custom Catalog Item and remove
the default Workspace Variables.
   1. Return to the **Variable Sets** tab on the Catalog Item's configuration page
   and click the **Edit** button.
   1. Move the "Workspace Variables" Set from the right side to the left side
   and click **Save**. Do not remove the
   "Workspace Request Create" or the "Workspace Request Update" Sets.
   ![Screenshot: ServiceNow Remove Example Variables](/img/docs/servicenow-catalog-remove-example-variables.png "Screenshot of the ServiceNow Catalog Item – new variables")

## Make a copy of the Flow and Action

1. Open the ServiceNow Studio by navigating to **All > Studio** and open the
      "Terraform" application. Once in the **Terraform** application, navigate to
      **Flow Designer > Flows**.
      ![Screenshot: ServiceNow Flow Designer Interface](/img/docs/servicenow-catalog-original-flow.png "Screenshot of the ServiceNow Flow Designer – selecting a Flow")

      Another way to access the ServiceNow Studio is to click **All**, select
      "Flow Designer", then select **Flows**. You can set the **Application**
      filter to "Terraform" to quickly find the desired Flow.
1. Open the Flow referenced in your Catalog Item. Click **...**
   in the top right corner of the Flow Designer interface and
   select **Copy flow**. Provide a name for the copied Flow and
   click **Copy**.
   ![Screenshot: ServiceNow Copy Flow Interface](/img/docs/servicenow-catalog-copy-flow.png "Screenshot of the ServiceNow Flow Designer – copying a Flow")
1. Customize your newly copied Flow by clicking **Edit flow**.
   ![Screenshot: ServiceNow Edit New Flow Interface](/img/docs/servicenow-catalog-edit-flow.png "Screenshot of the ServiceNow Flow Designer – editing a Flow")
   1. Do not change the **Service Catalog** trigger.
   1. Update the "Get Catalog Variables" action:
      1. Keep the "Requested Item Record" in the **Submitted Request** field.
      1. Select your newly created Catalog Item from the dropdown menu for
         **Template Catalog Item**.
      1. Move all of your variables to the **Selected** side in the **Catalog
         Variables** section. Remove any previous example variables from the
         **Available** side.
         ![Screenshot: ServiceNow Get Variables Flow Step](/img/docs/servicenow-catalog-get-variables.png "Screenshot of the ServiceNow Flow Designer – getting Variables step")
      1. Click **Done** to finish configuring this Action.
1. Unfold the second Action in the Flow and click the arrow to open it in
      the Action Designer.
      ![Screenshot: ServiceNow Open Action Designer](/img/docs/servicenow-catalog-open-action.png "Screenshot of the ServiceNow Action Designer")
      1. Click **...** in the top right corner and select **Copy Action**.
         ![Screenshot: ServiceNow Copy Action](/img/docs/servicenow-catalog-copy-action.png "Screenshot of the ServiceNow Copy Action")
         Rename it and click **Copy**.
         ![Screenshot: ServiceNow Rename Action](/img/docs/servicenow-catalog-rename-action.png "Screenshot of the ServiceNow Rename Action")
      1. In the the Inputs section, remove any previous example variables.
      ![Screenshot: ServiceNow Remove Variables From Action](/img/docs/servicenow-catalog-remove-example-variables-from-action.png "Screenshot of the ServiceNow Action Input Variables")
      1. Add your custom variables by clicking the **Create Input** button. Ensure that the variable names match your Catalog Item variables and select the variable type that matches each variable. Click **Save**.
      ![Screenshot: ServiceNow Add Variables To Action](/img/docs/servicenow-catalog-add-variables-to-action.png "Screenshot of adding ServiceNow Action Input Variables")
      1. Open the **Script step** within the Action. Remove any example variables
         and add your custom variables by clicking **Create Variable** at the
         bottom. Enter the name of each variable and drag the corresponding data
         pill from the right into the **Value field**.
         ![Screenshot: ServiceNow Add Script Step Variables To Action](/img/docs/servicenow-catalog-adjust-script-variables.png "Screenshot of adjusting ServiceNow Action Script Variables")
      1. Click **Save** and then **Publish**.
1. Reopen the Flow and attach the newly created Action to the Flow
   after "Get Catalog Variables" step:
   1. Remove the "Create Terraform Workspace with Vars" Action that you copied earlier and replace it with
      your newly created Action.
      ![Screenshot: ServiceNow Replace Action Step](/img/docs/servicenow-catalog-replace-action.png "Screenshot of replacing ServiceNow Action step")
   1. Connect the new Action to the Flow by dragging and dropping the data pills
      from the "Get Catalog Variables" Action to the corresponding inputs of
      your new Action. Click **Done** to save this step.
      ![Screenshot: ServiceNow Fill Variables for Action](/img/docs/servicenow-catalog-fill-new-action-step.png "Screenshot of filling out ServiceNow Action variables")
   1. Click **Save**.
   1. Click **Activate** to enable the Flow and make it available for use.

## Set the Flow for your Catalog Item

1. Navigate back to the Catalog by clicking on **All** and then go to **Service
   Catalog > Catalogs > Terraform Catalog**.
1. Locate your custom Catalog Item and click **...** at the top
   of the item. From the dropdown menu, select **Configure item**.
1. In the configuration settings, click the **Process Engine** tab.
1. In the **Flow** field, search for the Flow you recently created. Click
   the Flow then click the **Update**.
   ![Screenshot: ServiceNow Update Process Engine](/img/docs/servicenow-catalog-update-process-engine.png "Screenshot of updating Process Engine for the Catalog Item")

## Test the Catalog Item

The new item is now available in the Terraform Service Catalog. To make the
new item accessible to your end users via the Service Portal, follow these
steps:
1. Navigate to the configuration page of the item you want to make available.
1. Locate the **Catalogs** field on the configuration page and click the lock
   icon next to it.
1. In the search bar, type "Service Catalog" and select it from the search
   results. Add "Service Catalog" to the list of catalogs associated with the
   item. Click the lock icon again to lock the changes.
   ![Screenshot: ServiceNow Enable Service Portal](/img/docs/servicenow-catalog-service-portal.png "Screenshot of adding the Catalog Item to the Service Portal")
1. Click the **Update** button at the top of the page.

After completing these steps, end users will be able to
access the new item through the Service Portal of your ServiceNow instance. You
can access the Service Portal by navigating to **All > Service Portal Home**

page title       Example Customizations   ServiceNow Service Catalog Integration   Terraform   Cloud description  Example customizations for the ServiceNow Service Catalog Integration         Example Customizations  This example use case creates a Terraform Catalog Item for requesting resources with custom variable values passed to the Terraform configuration      Change the scope  When you make a customization to the app  ensure you switch to the  Terraform  scope  This guarantees that all items you create are correctly assigned to that scope  To change the scope in your ServiceNow instance  click the globe icon at the top right of the screen  For detailed instructions on changing the scope  refer to the  ServiceNow documentation  https   developer servicenow com dev do   learn learning plans xanadu new to servicenow app store learnv2 buildneedit xanadu application scope       Make a copy of the existing Catalog Item  The ServiceNow Service Catalog for Terraform application provides pre configured  Catalog Items   terraform cloud docs integrations service now service catalog terraform developer reference example service catalog flows and actions  for immediate use  We recommend creating a copy of the most recent version of the Catalog Item to ensure you have access to the latest features and improvements  Make a copy of the most appropriate Catalog Item for your specific business requirements by following these steps   1  Navigate to   All   Service Catalog   Catalogs   Terraform Catalog    and review the    Catalog Items based on flows  whose names use the suffix  Flow       We recommend choosing Flows over Workflows because Flows provide enhanced functionality and performance and are actively developed by ServiceNow  For more information  refer     to  Catalog Items based on Flows vs  Workflows   terraform cloud docs integrations service now service catalog terraform developer reference example service catalog flows and actions   1  Open the Catalog Item in editing mode      1  Click the Catalog Item to open the request form      1  Click         in the top right corner      1  Select   Configure Item   from the menu       Screenshot  ServiceNow Configure Catalog Item   img docs servicenow catalog configure item png  Screenshot of the ServiceNow Configure Catalog Item dropdown menu   1  Click the   Process Engine   tab in the Catalog Item configuration  Take    note of the Flow name associated with the Catalog Item  because you need to    create a copy of this Flow as well       Screenshot  ServiceNow Process Engine   img docs servicenow catalog process engine png  Screenshot of the ServiceNow Configure Catalog Item   Process Engine tab   1  Start the copying process      1  Click the   Copy   button above the   Related Links   section      1  Assign a new name to the copied Catalog Item      1  Optionally  modify the description and short description fields         Right click the header and select   Save         Screenshot  ServiceNow Copy Item   img docs servicenow catalog copied item png  Screenshot of the copied ServiceNow Catalog Item       Adjust the Variable Set  If a Catalog Item requires users to input variable values  you must update the variable set with those required variables  Although some default Catalog Items come with pre defined example variables  it is common practice to remove these and replace them with your own custom variables   1  Create a new Variable Set     1  On the Catalog Item s configuration page  under the   Related Links         section  click the   Variable Sets   tab     1  Click the   New   button to create a new variable set  Ensure that the    variables in your new set match the variables required by your Terraform    configuration       Screenshot  ServiceNow New Variable Set   img docs servicenow catalog new varset png  Screenshot of the ServiceNow Catalog Item   new Variable Set      1  Select   Single Row Variable Set   and provide a title and description     1  Click   Submit    Upon submission  you will be redirected back to the Catalog    Item s configuration page       Screenshot  ServiceNow New Variable Set Form   img docs servicenow catalog new varset form png  Screenshot of the ServiceNow Catalog Item   new Variable Set      1  Click the name of your newly created Variable Set and create your     variables  You must follow the  naming convention for Terraform    variables   terraform cloud docs integrations service now service catalog terraform developer reference terraform variables and servicenow variable sets      ServiceNow offers various types of variable representation  such as strings     booleans  and dropdown menus   Refer to the  ServiceNow documentation on    variables  https   docs servicenow com csh topicname c ServiceCatalogVariables html version latest     and select the types that best suit your use case  You can also set default    values for the variables in the   Default Value   tab  which ServiceNow prefills for the end users       Screenshot  ServiceNow New Variables   img docs servicenow catalog variables png  Screenshot of the ServiceNow Catalog Item   new variables   1  Attach the newly created Variable Set to your custom Catalog Item and remove the default Workspace Variables     1  Return to the   Variable Sets   tab on the Catalog Item s configuration page    and click the   Edit   button      1  Move the  Workspace Variables  Set from the right side to the left side    and click   Save    Do not remove the     Workspace Request Create  or the  Workspace Request Update  Sets       Screenshot  ServiceNow Remove Example Variables   img docs servicenow catalog remove example variables png  Screenshot of the ServiceNow Catalog Item   new variables       Make a copy of the Flow and Action  1  Open the ServiceNow Studio by navigating to   All   Studio   and open the        Terraform  application  Once in the   Terraform   application  navigate to         Flow Designer   Flows            Screenshot  ServiceNow Flow Designer Interface   img docs servicenow catalog original flow png  Screenshot of the ServiceNow Flow Designer   selecting a Flow          Another way to access the ServiceNow Studio is to click   All    select        Flow Designer   then select   Flows    You can set the   Application          filter to  Terraform  to quickly find the desired Flow  1  Open the Flow referenced in your Catalog Item  Click            in the top right corner of the Flow Designer interface and     select   Copy flow    Provide a name for the copied Flow and    click   Copy         Screenshot  ServiceNow Copy Flow Interface   img docs servicenow catalog copy flow png  Screenshot of the ServiceNow Flow Designer   copying a Flow   1  Customize your newly copied Flow by clicking   Edit flow         Screenshot  ServiceNow Edit New Flow Interface   img docs servicenow catalog edit flow png  Screenshot of the ServiceNow Flow Designer   editing a Flow      1  Do not change the   Service Catalog   trigger     1  Update the  Get Catalog Variables  action        1  Keep the  Requested Item Record  in the   Submitted Request   field        1  Select your newly created Catalog Item from the dropdown menu for            Template Catalog Item          1  Move all of your variables to the   Selected   side in the   Catalog          Variables   section  Remove any previous example variables from the            Available   side             Screenshot  ServiceNow Get Variables Flow Step   img docs servicenow catalog get variables png  Screenshot of the ServiceNow Flow Designer   getting Variables step         1  Click   Done   to finish configuring this Action  1  Unfold the second Action in the Flow and click the arrow to open it in       the Action Designer          Screenshot  ServiceNow Open Action Designer   img docs servicenow catalog open action png  Screenshot of the ServiceNow Action Designer         1  Click         in the top right corner and select   Copy Action               Screenshot  ServiceNow Copy Action   img docs servicenow catalog copy action png  Screenshot of the ServiceNow Copy Action            Rename it and click   Copy               Screenshot  ServiceNow Rename Action   img docs servicenow catalog rename action png  Screenshot of the ServiceNow Rename Action         1  In the the Inputs section  remove any previous example variables          Screenshot  ServiceNow Remove Variables From Action   img docs servicenow catalog remove example variables from action png  Screenshot of the ServiceNow Action Input Variables         1  Add your custom variables by clicking the   Create Input   button  Ensure that the variable names match your Catalog Item variables and select the variable type that matches each variable  Click   Save            Screenshot  ServiceNow Add Variables To Action   img docs servicenow catalog add variables to action png  Screenshot of adding ServiceNow Action Input Variables         1  Open the   Script step   within the Action  Remove any example variables          and add your custom variables by clicking   Create Variable   at the          bottom  Enter the name of each variable and drag the corresponding data          pill from the right into the   Value field               Screenshot  ServiceNow Add Script Step Variables To Action   img docs servicenow catalog adjust script variables png  Screenshot of adjusting ServiceNow Action Script Variables         1  Click   Save   and then   Publish    1  Reopen the Flow and attach the newly created Action to the Flow    after  Get Catalog Variables  step     1  Remove the  Create Terraform Workspace with Vars  Action that you copied earlier and replace it with       your newly created Action          Screenshot  ServiceNow Replace Action Step   img docs servicenow catalog replace action png  Screenshot of replacing ServiceNow Action step      1  Connect the new Action to the Flow by dragging and dropping the data pills       from the  Get Catalog Variables  Action to the corresponding inputs of       your new Action  Click   Done   to save this step          Screenshot  ServiceNow Fill Variables for Action   img docs servicenow catalog fill new action step png  Screenshot of filling out ServiceNow Action variables      1  Click   Save       1  Click   Activate   to enable the Flow and make it available for use      Set the Flow for your Catalog Item  1  Navigate back to the Catalog by clicking on   All   and then go to   Service    Catalog   Catalogs   Terraform Catalog    1  Locate your custom Catalog Item and click         at the top    of the item  From the dropdown menu  select   Configure item    1  In the configuration settings  click the   Process Engine   tab  1  In the   Flow   field  search for the Flow you recently created  Click     the Flow then click the   Update         Screenshot  ServiceNow Update Process Engine   img docs servicenow catalog update process engine png  Screenshot of updating Process Engine for the Catalog Item       Test the Catalog Item  The new item is now available in the Terraform Service Catalog  To make the new item accessible to your end users via the Service Portal  follow these steps  1  Navigate to the configuration page of the item you want to make available  1  Locate the   Catalogs   field on the configuration page and click the lock    icon next to it  1  In the search bar  type  Service Catalog  and select it from the search    results  Add  Service Catalog  to the list of catalogs associated with the    item  Click the lock icon again to lock the changes       Screenshot  ServiceNow Enable Service Portal   img docs servicenow catalog service portal png  Screenshot of adding the Catalog Item to the Service Portal   1  Click the   Update   button at the top of the page   After completing these steps  end users will be able to access the new item through the Service Portal of your ServiceNow instance  You can access the Service Portal by navigating to   All   Service Portal Home