Map credentials between Cloud Provisioning and Governance and Terraform
Map credential types and service account fields between Cloud Provisioning and Governance and Terraform using Credential Mapping.
Before you begin
The latest Cloud Services Catalog Terraform Connector must be installed from the ServiceNow Store.
Role required: sn_cmp.cloud_admin, admin
About this task
Use the Credential Mapping module to perform credential and service account mappings for datacenter credentials used by the Terraform provider to provision datacenter resources and Cloud Provisioning and Governance for discovery.
Procedure
Navigate to All > Design > Credential Mapping.
Select New.
Terraform Datacenter Mapping form
On the form, fill in the fields.
Field Description Terraform Provider Name of the Terraform provider. Datacenter Block The resource block whose credentials you are mapping from the lookup table. Credential Type The appropriate credential type from the lookup table. For example, Azure Service Principal [azure_service_principal]. Credential Resolver An appropriate MID Server script include from the lookup table. For example, Search and select the TerraformProviderCredentialResolver script. Select Submit.
The Terraform provider credentials record is created and displayed in the Terraform Datacenter Mappings list.
On the record you created, navigate to the Credentials Mappings related list, and then select New.
Complete the Credential Mapping form.
Field Description Provider Authentication Key Authentication key (variable) field name as used by the provider. For example, the Terraform provider block for (Amazon Web Services) AWS uses the field secret_key.Discovery Credential Key The corresponding field in the Discovery credentials from the lookup table. For example, access_keyfield in Terraform corresponds toSecret keyfield in the ServiceNow instance.Terraform Datacenter Mapping Datacenter for which you are mapping the credentials. Select Submit.
Select the Service Account Mappings tab, and then select New.
Complete the Service Account Mapping form.
Field Description Provider Authentication Key Authentication key (variable) field name as used by the provider. For example, the Terraform provider block for AWS uses the field secret_key.Service Account Field Service Account (variable) field name from the lookup table, whose credentials you are mapping to the Provider Authentication Key. Terraform Datacenter Mapping Datacenter for which you are mapping the credentials. Select Submit.
You have mapped the field values that you added under the Credential Mapping and Service Account Mapping related lists to the Terraform provider.
Parent Topic:Using Cloud Services Catalog Terraform Connector