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

On this page