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. When using the password_sha256_hash field, it works with all versions. The password_sha256_hash_wo field requires at least Terraform 1.11 (write-only arguments support). 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