Terraform Provider TreeApp is a custom Terraform provider written in Go that allows you to literally terraform the Earth by planting real trees via TreeApp.com.
Use infrastructure as code to contribute to reforestation efforts and make environmental impact as part of your CI/CD workflows or infrastructure deployments.
- Plant trees as a one-time effort or recurring schedule
- Easily integrate tree planting into your Terraform workflows
- Automate your environmental impact with code
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
installcommand:
go installTo use the provider, add it to your Terraform configuration:
terraform {
required_providers {
treeapp = {
source = "hashicorp.com/test/treeapp" # use your own provider path
}
}
}You will need a TreeApp API key to authenticate. Pass it in via the provider block :
provider "treeapp" {
api_key = var.treeapp_api_key
}
variable "treeapp_api_key" {}
Here's a minimal example that plants 6 trees as a one-time action:
resource "treeapp_tree" "myforest" {
quantity = 6
frequency = "one_time"
}| Name | Type | Description |
|---|---|---|
| quantity | int | Number of trees to plant |
| frequency | string | How often to plant: one_time, per_deployment, per_month |