Manage DoubleCloud resources with Terraform
You can add, modify, and delete ClickHouse® clusters, Apache Kafka® clusters, Airflow® clusters, networks, endpoints, and transfers on DoubleCloud with the same Terraform configuration that you used to create these resources.
Add resources
-
Add configuration of the resources you want to create to the project Terraform files.
-
Apply the configuration and create new resources:
terraform apply
-
When prompted, type
yes
and pressEnter
. Terraform will provision your resources, which may take some time.
Update resources
Warning
Some resource parameters can't be updated. For example, you can't change an endpoint source type or make a cluster storage smaller. If you need to do that, recreate the resources.
-
Update the resource configuration in the project Terraform files.
-
Apply the configuration:
terraform apply
-
When prompted, type
yes
and pressEnter
. Terraform will update your resources, which may take some time.
Delete resources
-
In the project's configuration file, comment out or remove the resources you want to delete.
-
Apply the configuration:
terraform apply
-
When prompted, type
yes
and pressEnter
. Terraform will delete the resources you commented out or removed. This may take some time.
Alert
To remove all the resources described in the project's configuration file,
you can also use the terraform destroy
command.
However, it's not common to use it in production environments.