{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":29238,"path":"it-operations-management/cloud-configuration-governance/map-cloud-mgmt-terraform-credentials.md","title":"Map credentials between Cloud Provisioning and Governance and Terraform","bundle":null,"doc_type":null,"release":"australia","body":"\n# Map credentials between Cloud Provisioning and Governance and Terraform\n\nMap credential types and service account fields between Cloud Provisioning and Governance and Terraform using Credential Mapping.\n\n## Before you begin\n\nThe latest Cloud Services Catalog Terraform Connector must be installed from the [ServiceNow Store](https://store.servicenow.com/sn_appstore_store.do#!/store/application/9b04ffc20b1323002530a387b6673a1d/).\n\nRole required: sn\\_cmp.cloud\\_admin, admin\n\n## About this task\n\nUse 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.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Design** &gt; **Credential Mapping**.\n\n2.  Select **New**.\n\n    \\[Omitted image \"new-credential-mapping-terraform.png\"\\] Alt text: Terraform Datacenter Mapping form\n\n3.  On the form, fill in the fields.\n\n    |Field|Description|\n    |-----|-----------|\n    |Terraform Provider|Name of the Terraform provider.|\n    |Datacenter Block|The resource block whose credentials you are mapping from the lookup table.|\n    |Credential Type|The appropriate credential type from the lookup table. For example, Azure Service Principal \\[azure\\_service\\_principal\\].|\n    |Credential Resolver|An appropriate MID Server script include from the lookup table. For example, Search and select the TerraformProviderCredentialResolver script.|\n\n4.  Select **Submit**.\n\n    The Terraform provider credentials record is created and displayed in the Terraform Datacenter Mappings list.\n\n5.  On the record you created, navigate to the **Credentials Mappings** related list, and then select **New**.\n\n    1.  Complete the **Credential Mapping** form.\n\n        |Field|Description|\n        |-----|-----------|\n        |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`.|\n        |Discovery Credential Key|The corresponding field in the Discovery credentials from the lookup table. For example, `access_key` field in Terraform corresponds to `Secret key` field in the ServiceNow instance.|\n        |Terraform Datacenter Mapping|Datacenter for which you are mapping the credentials.|\n\n    2.  Select **Submit**.\n\n6.  Select the **Service Account Mappings** tab, and then select **New**.\n\n    1.  Complete the **Service Account Mapping** form.\n\n        |Field|Description|\n        |-----|-----------|\n        |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`.|\n        |Service Account Field|Service Account \\(variable\\) field name from the lookup table, whose credentials you are mapping to the Provider Authentication Key.|\n        |Terraform Datacenter Mapping|Datacenter for which you are mapping the credentials.|\n\n    2.  Select **Submit**.\n\n    You have mapped the field values that you added under the Credential Mapping and Service Account Mapping related lists to the Terraform provider.\n\n\n**Parent Topic:**[Using Cloud Services Catalog Terraform Connector](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-operations-management/cloud-configuration-governance/using-ccg-terraform-connector.md)\n\n"}}