The Terraform Provider for Sealos provides a more straightforward and robust means of executing Sealos automation from Terraform than local-exec. Users can run Sealos on infrastructure provisioned by Terraform.
This provider can be found in the Terraform Registry here.
- install Go: official installation guide
- install Terraform: official installation guide
- install Sealos: official installation guide
This is a small example of how to install the Kubernetes cluster. Please read the documentation for more information.
provider "sealos" {}
resource "sealos_cluster" "example" {
cluster_name = "test-cluster"
masters = ["ip1", "ip2", "ip3"]
nodes = ["ip4", "ip5", "ip6"]
images = ["testimage1", "testimage2", "testimage3"]
ssh {
user = "test-user"
passwd = "test-passwd"
port = 22
}
}The examples subdirectory contains a usage example for this provider.
The Sealos Provider for Terraform is the work of many contributors. We appreciate your help!