published on Tuesday, Mar 17, 2026 by Pulumi
published on Tuesday, Mar 17, 2026 by Pulumi
Creates and manages an Aiven for ClickHouse database. If this resource is missing (for example, after a service power off), it’s removed from the state and a new create plan is generated.
Tables cannot be created using Aiven Terraform Provider. To create a table, use the Aiven Console or CLI.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const exampleClickhouse = new aiven.Clickhouse("example_clickhouse", {
project: exampleProject.project,
cloudName: "google-europe-west1",
plan: "business-4",
serviceName: "example-clickhouse-service",
maintenanceWindowDow: "monday",
maintenanceWindowTime: "10:00:00",
});
const exampleDb = new aiven.ClickhouseDatabase("example_db", {
project: exampleProject.project,
serviceName: exampleClickhouse.serviceName,
name: "example-database",
});
import pulumi
import pulumi_aiven as aiven
example_clickhouse = aiven.Clickhouse("example_clickhouse",
project=example_project["project"],
cloud_name="google-europe-west1",
plan="business-4",
service_name="example-clickhouse-service",
maintenance_window_dow="monday",
maintenance_window_time="10:00:00")
example_db = aiven.ClickhouseDatabase("example_db",
project=example_project["project"],
service_name=example_clickhouse.service_name,
name="example-database")
package main
import (
"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleClickhouse, err := aiven.NewClickhouse(ctx, "example_clickhouse", &aiven.ClickhouseArgs{
Project: pulumi.Any(exampleProject.Project),
CloudName: pulumi.String("google-europe-west1"),
Plan: pulumi.String("business-4"),
ServiceName: pulumi.String("example-clickhouse-service"),
MaintenanceWindowDow: pulumi.String("monday"),
MaintenanceWindowTime: pulumi.String("10:00:00"),
})
if err != nil {
return err
}
_, err = aiven.NewClickhouseDatabase(ctx, "example_db", &aiven.ClickhouseDatabaseArgs{
Project: pulumi.Any(exampleProject.Project),
ServiceName: exampleClickhouse.ServiceName,
Name: pulumi.String("example-database"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;
return await Deployment.RunAsync(() =>
{
var exampleClickhouse = new Aiven.Clickhouse("example_clickhouse", new()
{
Project = exampleProject.Project,
CloudName = "google-europe-west1",
Plan = "business-4",
ServiceName = "example-clickhouse-service",
MaintenanceWindowDow = "monday",
MaintenanceWindowTime = "10:00:00",
});
var exampleDb = new Aiven.ClickhouseDatabase("example_db", new()
{
Project = exampleProject.Project,
ServiceName = exampleClickhouse.ServiceName,
Name = "example-database",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aiven.Clickhouse;
import com.pulumi.aiven.ClickhouseArgs;
import com.pulumi.aiven.ClickhouseDatabase;
import com.pulumi.aiven.ClickhouseDatabaseArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var exampleClickhouse = new Clickhouse("exampleClickhouse", ClickhouseArgs.builder()
.project(exampleProject.project())
.cloudName("google-europe-west1")
.plan("business-4")
.serviceName("example-clickhouse-service")
.maintenanceWindowDow("monday")
.maintenanceWindowTime("10:00:00")
.build());
var exampleDb = new ClickhouseDatabase("exampleDb", ClickhouseDatabaseArgs.builder()
.project(exampleProject.project())
.serviceName(exampleClickhouse.serviceName())
.name("example-database")
.build());
}
}
resources:
exampleClickhouse:
type: aiven:Clickhouse
name: example_clickhouse
properties:
project: ${exampleProject.project}
cloudName: google-europe-west1
plan: business-4
serviceName: example-clickhouse-service
maintenanceWindowDow: monday
maintenanceWindowTime: 10:00:00
exampleDb:
type: aiven:ClickhouseDatabase
name: example_db
properties:
project: ${exampleProject.project}
serviceName: ${exampleClickhouse.serviceName}
name: example-database
Create ClickhouseDatabase Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ClickhouseDatabase(name: string, args: ClickhouseDatabaseArgs, opts?: CustomResourceOptions);@overload
def ClickhouseDatabase(resource_name: str,
args: ClickhouseDatabaseArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ClickhouseDatabase(resource_name: str,
opts: Optional[ResourceOptions] = None,
project: Optional[str] = None,
service_name: Optional[str] = None,
name: Optional[str] = None,
termination_protection: Optional[bool] = None,
timeouts: Optional[ClickhouseDatabaseTimeoutsArgs] = None)func NewClickhouseDatabase(ctx *Context, name string, args ClickhouseDatabaseArgs, opts ...ResourceOption) (*ClickhouseDatabase, error)public ClickhouseDatabase(string name, ClickhouseDatabaseArgs args, CustomResourceOptions? opts = null)
public ClickhouseDatabase(String name, ClickhouseDatabaseArgs args)
public ClickhouseDatabase(String name, ClickhouseDatabaseArgs args, CustomResourceOptions options)
type: aiven:ClickhouseDatabase
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ClickhouseDatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ClickhouseDatabaseArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ClickhouseDatabaseArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ClickhouseDatabaseArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ClickhouseDatabaseArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var clickhouseDatabaseResource = new Aiven.ClickhouseDatabase("clickhouseDatabaseResource", new()
{
Project = "string",
ServiceName = "string",
Name = "string",
Timeouts = new Aiven.Inputs.ClickhouseDatabaseTimeoutsArgs
{
Create = "string",
Delete = "string",
Read = "string",
Update = "string",
},
});
example, err := aiven.NewClickhouseDatabase(ctx, "clickhouseDatabaseResource", &aiven.ClickhouseDatabaseArgs{
Project: pulumi.String("string"),
ServiceName: pulumi.String("string"),
Name: pulumi.String("string"),
Timeouts: &aiven.ClickhouseDatabaseTimeoutsArgs{
Create: pulumi.String("string"),
Delete: pulumi.String("string"),
Read: pulumi.String("string"),
Update: pulumi.String("string"),
},
})
var clickhouseDatabaseResource = new ClickhouseDatabase("clickhouseDatabaseResource", ClickhouseDatabaseArgs.builder()
.project("string")
.serviceName("string")
.name("string")
.timeouts(ClickhouseDatabaseTimeoutsArgs.builder()
.create("string")
.delete("string")
.read("string")
.update("string")
.build())
.build());
clickhouse_database_resource = aiven.ClickhouseDatabase("clickhouseDatabaseResource",
project="string",
service_name="string",
name="string",
timeouts={
"create": "string",
"delete": "string",
"read": "string",
"update": "string",
})
const clickhouseDatabaseResource = new aiven.ClickhouseDatabase("clickhouseDatabaseResource", {
project: "string",
serviceName: "string",
name: "string",
timeouts: {
create: "string",
"delete": "string",
read: "string",
update: "string",
},
});
type: aiven:ClickhouseDatabase
properties:
name: string
project: string
serviceName: string
timeouts:
create: string
delete: string
read: string
update: string
ClickhouseDatabase Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ClickhouseDatabase resource accepts the following input properties:
- Project string
- Project name. Changing this property forces recreation of the resource.
- Service
Name string - Service name. Changing this property forces recreation of the resource.
- Name string
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - Termination
Protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - Timeouts
Clickhouse
Database Timeouts
- Project string
- Project name. Changing this property forces recreation of the resource.
- Service
Name string - Service name. Changing this property forces recreation of the resource.
- Name string
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - Termination
Protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - Timeouts
Clickhouse
Database Timeouts Args
- project String
- Project name. Changing this property forces recreation of the resource.
- service
Name String - Service name. Changing this property forces recreation of the resource.
- name String
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - termination
Protection Boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - timeouts
Clickhouse
Database Timeouts
- project string
- Project name. Changing this property forces recreation of the resource.
- service
Name string - Service name. Changing this property forces recreation of the resource.
- name string
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - termination
Protection boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - timeouts
Clickhouse
Database Timeouts
- project str
- Project name. Changing this property forces recreation of the resource.
- service_
name str - Service name. Changing this property forces recreation of the resource.
- name str
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - termination_
protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - timeouts
Clickhouse
Database Timeouts Args
- project String
- Project name. Changing this property forces recreation of the resource.
- service
Name String - Service name. Changing this property forces recreation of the resource.
- name String
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - termination
Protection Boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - timeouts Property Map
Outputs
All input properties are implicitly available as output properties. Additionally, the ClickhouseDatabase resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ClickhouseDatabase Resource
Get an existing ClickhouseDatabase resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ClickhouseDatabaseState, opts?: CustomResourceOptions): ClickhouseDatabase@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
project: Optional[str] = None,
service_name: Optional[str] = None,
termination_protection: Optional[bool] = None,
timeouts: Optional[ClickhouseDatabaseTimeoutsArgs] = None) -> ClickhouseDatabasefunc GetClickhouseDatabase(ctx *Context, name string, id IDInput, state *ClickhouseDatabaseState, opts ...ResourceOption) (*ClickhouseDatabase, error)public static ClickhouseDatabase Get(string name, Input<string> id, ClickhouseDatabaseState? state, CustomResourceOptions? opts = null)public static ClickhouseDatabase get(String name, Output<String> id, ClickhouseDatabaseState state, CustomResourceOptions options)resources: _: type: aiven:ClickhouseDatabase get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Name string
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - Project string
- Project name. Changing this property forces recreation of the resource.
- Service
Name string - Service name. Changing this property forces recreation of the resource.
- Termination
Protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - Timeouts
Clickhouse
Database Timeouts
- Name string
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - Project string
- Project name. Changing this property forces recreation of the resource.
- Service
Name string - Service name. Changing this property forces recreation of the resource.
- Termination
Protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - Timeouts
Clickhouse
Database Timeouts Args
- name String
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - project String
- Project name. Changing this property forces recreation of the resource.
- service
Name String - Service name. Changing this property forces recreation of the resource.
- termination
Protection Boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - timeouts
Clickhouse
Database Timeouts
- name string
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - project string
- Project name. Changing this property forces recreation of the resource.
- service
Name string - Service name. Changing this property forces recreation of the resource.
- termination
Protection boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - timeouts
Clickhouse
Database Timeouts
- name str
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - project str
- Project name. Changing this property forces recreation of the resource.
- service_
name str - Service name. Changing this property forces recreation of the resource.
- termination_
protection bool - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - timeouts
Clickhouse
Database Timeouts Args
- name String
- Service database name. Maximum length:
40. Changing this property forces recreation of the resource. - project String
- Project name. Changing this property forces recreation of the resource.
- service
Name String - Service name. Changing this property forces recreation of the resource.
- termination
Protection Boolean - Client-side deletion protection that prevents the resource from being deleted by Terraform. Resource can still be deleted in the Aiven Console. The default value is
false. Deprecated: Instead, useprevent_destroy - timeouts Property Map
Supporting Types
ClickhouseDatabaseTimeouts, ClickhouseDatabaseTimeoutsArgs
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Default string
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- Default string
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- Delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- Read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- Update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default_ String
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default string
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update string
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default str
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update str
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- create String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
- default String
- Timeout for all operations. Deprecated, use operation-specific timeouts instead.
- delete String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
- read String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
- update String
- A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours).
Import
$ pulumi import aiven:index/clickhouseDatabase:ClickhouseDatabase example PROJECT/SERVICE_NAME/NAME
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Aiven pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aivenTerraform Provider.
published on Tuesday, Mar 17, 2026 by Pulumi
