aiven.ClickhouseDatabase

Explore with Pulumi AI

The Clickhouse Database resource allows the creation and management of Aiven Clickhouse Databases.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aiven = Pulumi.Aiven;

return await Deployment.RunAsync(() => 
{
    var clickhouseDb = new Aiven.ClickhouseDatabase("clickhouseDb", new()
    {
        Project = aiven_clickhouse.Ch.Project,
        ServiceName = aiven_clickhouse.Ch.Service_name,
    });

});
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 {
		_, err := aiven.NewClickhouseDatabase(ctx, "clickhouseDb", &aiven.ClickhouseDatabaseArgs{
			Project:     pulumi.Any(aiven_clickhouse.Ch.Project),
			ServiceName: pulumi.Any(aiven_clickhouse.Ch.Service_name),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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 clickhouseDb = new ClickhouseDatabase("clickhouseDb", ClickhouseDatabaseArgs.builder()        
            .project(aiven_clickhouse.ch().project())
            .serviceName(aiven_clickhouse.ch().service_name())
            .build());

    }
}
import pulumi
import pulumi_aiven as aiven

clickhouse_db = aiven.ClickhouseDatabase("clickhouseDb",
    project=aiven_clickhouse["ch"]["project"],
    service_name=aiven_clickhouse["ch"]["service_name"])
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";

const clickhouseDb = new aiven.ClickhouseDatabase("clickhouseDb", {
    project: aiven_clickhouse.ch.project,
    serviceName: aiven_clickhouse.ch.service_name,
});
resources:
  clickhouseDb:
    type: aiven:ClickhouseDatabase
    properties:
      project: ${aiven_clickhouse.ch.project}
      serviceName: ${aiven_clickhouse.ch.service_name}

Create ClickhouseDatabase Resource

new ClickhouseDatabase(name: string, args: ClickhouseDatabaseArgs, opts?: CustomResourceOptions);
@overload
def ClickhouseDatabase(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       name: Optional[str] = None,
                       project: Optional[str] = None,
                       service_name: Optional[str] = None,
                       termination_protection: Optional[bool] = None)
@overload
def ClickhouseDatabase(resource_name: str,
                       args: ClickhouseDatabaseArgs,
                       opts: Optional[ResourceOptions] = 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.

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.

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

The ClickhouseDatabase resource accepts the following input properties:

Project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

ServiceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

Name string

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

TerminationProtection bool

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

Project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

ServiceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

Name string

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

TerminationProtection bool

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

project String

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

serviceName String

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

name String

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

terminationProtection Boolean

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

serviceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

name string

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

terminationProtection boolean

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

project str

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

service_name str

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

name str

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

termination_protection bool

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

project String

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

serviceName String

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

name String

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

terminationProtection Boolean

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

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) -> ClickhouseDatabase
func 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)
Resource lookup is not supported in YAML
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.
The following state arguments are supported:
Name string

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

Project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

ServiceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

TerminationProtection bool

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

Name string

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

Project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

ServiceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

TerminationProtection bool

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

name String

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

project String

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

serviceName String

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

terminationProtection Boolean

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

name string

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

project string

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

serviceName string

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

terminationProtection boolean

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

name str

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

project str

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

service_name str

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

termination_protection bool

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

name String

The name of the Clickhouse database. This property cannot be changed, doing so forces recreation of the resource.

project String

Identifies the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

serviceName String

Specifies the name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. This property cannot be changed, doing so forces recreation of the resource.

terminationProtection Boolean

It is a Terraform client-side deletion protections, which prevents the Clickhouse database from being deleted by Terraform. It is recommended to enable this for any production Clickhouse databases containing critical data. The default value is false.

Import

 $ pulumi import aiven:index/clickhouseDatabase:ClickhouseDatabase clickhouse_db project/service_name/name

Package Details

Repository
Aiven pulumi/pulumi-aiven
License
Apache-2.0
Notes

This Pulumi package is based on the aiven Terraform Provider.