This is the official Terraform provider for ClickHouse database operations.
With this Terraform provider you can:
- Manage
databasesin aClickHouseinstance using theclickhousedbops_databaseresource - Manage
usersin aClickHouseinstance using theclickhousedbops_userresource - Manage
rolesin aClickHouseinstance using theclickhousedbops_roleresource - Manage
role grantsin aClickHouseinstance using theclickhousedbops_grant_roleresource - Manage
privilege grantsin aClickHouseinstance using theclickhousedbops_grant_privilegeresource
The clickhousedbops_user resource works with both Terraform and OpenTofu. Write-only authentication values (the auth block's value_wo fields and the legacy password_sha256_hash_wo) require at least Terraform 1.11 (write-only arguments support); the in-state value / password_sha256_hash fields work with all versions. All other resources work with older versions too.
You can find examples in the examples/tests directory.
Please refer to the official docs for more details.
Please read the Migration guide
Please read the Development readme