:_mod-docs-content-type: PROCEDURE
[id="resolving-HSM-secret-creation-failures_{context}"]

= Resolving HSM secret creation failures

[role="_abstract"]
If hardware security module (HSM) secrets cannot be created in the target environment, check whether you need to update the names of your secrets in your source configuration file.

Example error:

----
TASK [Create HSM secrets in target environment] ****
fatal: [localhost]: FAILED! => {
    "msg": "Failed to create secret proteccio-data"
}
----

.Procedure

. Verify target environment access:
+
[source,bash]
----
$ export KUBECONFIG=/path/to/.kube/config
$ oc get secrets -n openstack
----

. Check if secrets already exist:
+
[source,bash]
----
$ oc get secret proteccio-data hsm-login -n openstack
----

. If secrets exist with different names, update the configuration variables:
+
[source,yaml]
----
proteccio_login_secret_name: "your-hsm-login-secret"
proteccio_client_data_secret_name: "your-proteccio-data-secret"
----
