ayewo / terraform_clickhouse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to start the project

Create your env file

cp terraform.tfvars.example terraform.tfvars

Then fill the terraform.tfvars file with your values

Install terraform

Linux

curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" -y
sudo apt-get update && sudo apt-get install terraform -y

MacOS

brew install terraform

Init terraform

terraform init

Create terraform plan

terraform plan

Apply terraform plan

terraform apply

Note the host in the output

Destroy terraform plan

terraform destroy

Read clickhouse password

terraform output -json clickhouse_password 

How to connect to clickhouse

Connection string: jdbc:clickhouse://<clickhouse_host>:9000/default?password=<clickhouse_password>

About


Languages

Language:HCL 79.3%Language:Smarty 20.7%