// Module included in the following assemblies:
//
// * hosted_control_planes/hcp-import.adoc

:_mod-docs-content-type: PROCEDURE
[id="hcp-import-disable_{context}"]
= Disabling the automatic import of hosted clusters into {mce-short}

[role="_abstract"]
Hosted clusters are automatically imported into {mce-short} after the control plane becomes available. If needed, you can disable the automatic import of hosted clusters.

Any hosted clusters that were previously imported are not affected, even if you disable automatic import. When you upgrade to {mce-short} 2.5 and automatic import is enabled, all hosted clusters that are not imported are automatically imported if their control planes are available.

[NOTE]
====
If {rh-rhacm-title} is installed, all {rh-rhacm-title} add-ons are also enabled. 
====

When automatic import is disabled, only newly created hosted clusters are not automatically imported. Hosted clusters that were already imported are not affected. You can still manually import clusters by using the console or by creating the `ManagedCluster` and `KlusterletAddonConfig` custom resources. 

.Procedure

. On the hub cluster, open the `hypershift-addon-deploy-config` specification that is in the `AddonDeploymentConfig` resource in the namespace where {mce-short} is installed by entering the following command:
+
[source,terminal]
----
$ oc edit addondeploymentconfig hypershift-addon-deploy-config \
  -n multicluster-engine
----

. In the `spec.customizedVariables` section, add the `autoImportDisabled` variable with value of `"true"`, as shown in the following example:
+
[source,yaml]
----
apiVersion: addon.open-cluster-management.io/v1alpha1
kind: AddOnDeploymentConfig
metadata:
  name: hypershift-addon-deploy-config
  namespace: multicluster-engine
spec:
  customizedVariables:
   - name: hcMaxNumber
     value: "80"
  - name: hcThresholdNumber
    value: "60"
  - name: autoImportDisabled
    value: "true"
----

. To re-enable automatic import, set the value of the `autoImportDisabled` variable to `"false"` or remove the variable from the `AddonDeploymentConfig` resource.
