Use the Terraform Provider
Diese Seite ist noch nicht in deiner Sprache verfügbar. Englische Seite aufrufen
The Constellation Terraform provider allows to manage the full lifecycle of a Constellation cluster (namely creation, upgrades, and deletion) via Terraform. The provider is available through the Terraform registry and is released in lock-step with Constellation releases.
Prerequisites
Section titled “Prerequisites”- a Linux operating system (ARM64/AMD64)
- a Terraform installation of version
v1.4.4or above
Quick setup
Section titled “Quick setup”This example shows how to set up a Constellation cluster with the reference IAM and infrastructure setup. This setup is also used when creating a Constellation cluster through the Constellation CLI. You can either consume the IAM / infrastructure modules through a remote source (recommended) or local files. The latter requires downloading the infrastructure and IAM modules for STACKIT from terraform-modules.zip on the Constellation release page and placing them in the Terraform workspace directory.
- Create a directory (workspace) for your Constellation cluster.
Terminal window mkdir constellation-workspace cd constellation-workspace - Use the example configuration for using the Constellation Terraform provideror create a
main.tffile and fill it with the resources you want to create. The Constellation Terraform provider documentation offers thorough documentation on the resources and their attributes. - Initialize the providers and apply the Terraform configuration.
Optionally, you can prefix the
Terminal window terraform initterraform applyterraform applycommand withTF_LOG=INFOto collect Terraform logs while applying the configuration. This may provide helpful output in debugging scenarios. - Connect to the cluster.
Terminal window terraform output -raw kubeconfig > constellation-admin.confexport KUBECONFIG=$(realpath constellation-admin.conf)
Bringing your own infrastructure
Section titled “Bringing your own infrastructure”Instead of using the example infrastructure used in the quick setup, you can also provide your own infrastructure. If you need a starting point for a custom infrastructure setup, you can download the infrastructure / IAM Terraform modules for STACKIT from the Constellation GitHub releases. You can modify and extend the modules per your requirements, while keeping the basic functionality intact. The module contains:
STACKIT: cloud resources the cluster runs onIAM/STACKIT: IAM resources used within the cluster
When upgrading your cluster, make sure to check the Constellation release notes for potential breaking changes in the reference infrastructure / IAM modules that need to be considered.