Getting Started
Configure the zsphere Terraform provider with credentials and environment variables.
Provider configuration
terraform {
required_providers {
zsphere = {
source = "terraform-zstack-modules/zsphere"
version = "~> 1.0"
}
}
}
provider "zsphere" {
host = "your-zstack-host"
access_key_id = "your-access-key-id"
access_key_secret = "your-access-key-secret"
}Environment variables
You can also configure the provider using environment variables:
export ZSPHERE_HOST="your-zstack-host"
export ZSPHERE_ACCESS_KEY_ID="your-access-key-id"
export ZSPHERE_ACCESS_KEY_SECRET="your-access-key-secret"For the full provider schema, authentication options, and optional parameters such as port, see Provider Configuration.
Next steps
- Review Instance Management for VM creation patterns.
- Browse Resources and Data Sources reference pages.
Terraform for ZSvirt
Manage ZSvirt infrastructure as code with the official Terraform provider.
ZSvirt Provider
The ZStack provider is used to interact with the resources supported by ZStack Cloud, a powerful cloud management platform. This provider allows you to manage various cloud resources such as virtual machines, networks, storage, and more. It provides a seamless integration with Terraform, enabling you to define and manage your cloud infrastructure as code.