https://github.com/threefoldtech/terraform-provider-grid
https://github.com/threefoldtech/terraform-provider-grid
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/threefoldtech/terraform-provider-grid
- Owner: threefoldtech
- License: apache-2.0
- Created: 2021-08-08T13:32:18.000Z (almost 5 years ago)
- Default Branch: development
- Last Pushed: 2025-01-19T12:49:54.000Z (over 1 year ago)
- Last Synced: 2025-04-09T17:10:02.184Z (about 1 year ago)
- Language: Go
- Size: 1.83 MB
- Stars: 8
- Watchers: 14
- Forks: 6
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Grid provider for terraform
[](https://www.codacy.com/gh/threefoldtech/terraform-provider-grid/dashboard?utm_source=github.com&utm_medium=referral&utm_content=threefoldtech/terraform-provider-grid&utm_campaign=Badge_Grade) [](https://github.com/threefoldtech/terraform-provider-grid/actions/workflows/test.yml) [](https://github.com/threefoldtech/terraform-provider-grid/actions/workflows/lint.yml) [](https://github.com/threefoldtech/terraform-provider-grid/actions/workflows/terratest.yml) [](https://dependabot.com/)
A terraform provider for the [threefold grid](https://threefold.io) to manage your infrastructure using terraform.
## Requirements
- [Terraform](https://www.terraform.io/downloads.html) >= 0.13.x
- [Go](https://golang.org/doc/install) >= 1.21
- [Gettting started document](https://manual.grid.tf/documentation/system_administrators/terraform/terraform_readme.html#get-started)
## Using provider for different environments
- to use the `mainnet`'s version of the provider for `v1.7.0`, use the following configs:
```terraform
terraform {
required_providers {
grid = {
source = "threefoldtech/grid"
}
}
}
```
- to use the `testnet`'s version of the provider for `v1.7.0`, use the following configs:
```terraform
terraform{
required_providers{
grid = {
source = "threeflodtech/grid"
version = "1.7.0-rcX"
}
}
}
```
- for devnet, qanet use `-dev` and `-qa` respectivly
## Generating the docs
```bash
make docs
```
## Using the provider
```bash
cd examples/resources/singlenode
export MNEMONIC="mnemonic words"
export NETWORK="network" # dev, qa, test, main
terraform init && terraform apply # creates resources defined in main.tf
terraform destroy # destroy the created resource
```
- For a tutorials, please visit the [wiki](https://manual.grid.tf/documentation/system_administrators/terraform/terraform_readme.html#get-started) page.
- Detailed docs for resources and their arguments can be found in the [docs](docs).
## Building The Provider (for development only)
```bash
make
```
## Run tests
```bash
export MNEMONIC="mnemonic words"
export NETWORK="network" # dev, qa, test, main
```
- ### Unit tests
```bash
make unittests
```
- ### Integration tests
```bash
make integration
```
- if you want to run one test use:
```bash
cd integrationtests
go test . -run -v --tags=integration
go test . -run -v --tags=integration #for testing only one sub-function
```
## Known Issues
- [increasing IPs in active deployment](https://github.com/threefoldtech/terraform-provider-grid/issues/15)
- [same private ips for parallel deployments](https://github.com/threefoldtech/terraform-provider-grid/issues/781#issuecomment-1865961184)
## Latest Releases
- Releasing for each environment is done using the methods in this [Wiki](wiki/release.md#releasing-for-each-environment)
- For latest releases [terraform-provider-grid](https://registry.terraform.io/providers/threefoldtech/grid/latest)
## Using example directory
- the examples directory contains some examples to show user how to use the provider so kindly note that
- User should change the nodes to match the node that wants to deploy on
- In examples that uses`SSH_KEY` default location is `file("~/.ssh/id_rsa.pub")` the path should be changed to match your public key location