Problem
Creating a no-code enabled module through the No-Code Provisioning of a Module within an Organization API or the TFE provider's tfe_no_code_module resource fails with the following validation error.
{
"errors": [
{
"status": "422",
"title": "unprocessable entity",
"detail": "Validation failed: Organization has already been taken"
}
]
}Cause
This error indicates that the registry module has already been configured for no-code provisioning. The validation enforces a unique combination of the organization and registry module on the no-code-allowed module record.
When a module is first enabled for no-code provisioning, HCP Terraform creates a no-code-allowlist record in the backend. Even if you later disable no-code provisioning in the UI, this underlying record persists for the organization and registry module pair. Attempting to create a new no-code-allowed module using the API or the tfe_no_code_module resource results in the validation error because the record already exists.
Solution
If a registry module has been enabled for no-code provisioning at any point, the no-code-allowlist object already exists. Instead of creating a new one, you must edit the existing no-code settings using the Update No-Code Provisioning Settings for a Module API.
If you are managing this configuration with Terraform, you must import the existing resource into your state file before you can manage it.
To find the unique identifier of a no-code-allowed module, navigate to the registry module's overview page and, under No Code Provisioning, select Configure Settings. The identifier is visible in the URL.