terraform-provider-grid

command module
v1.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

Grid provider for terraform

Codacy Badge Testing Testing Testing Dependabot

A terraform provider for the threefold grid to manage your infrastructure using terraform.

Requirements

Using provider for different environments

  • to use the mainnet's version of the provider for v1.7.0, use the following configs:

    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{
      required_providers{
        grid = {
          source = "threeflodtech/grid"
          version = "1.7.0-rcX"
        }
      }
    }
    
  • for devnet, qanet use <VERSION>-dev and <VERSION>-qa respectivly

Generating the docs

make docs

Using the provider

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 page.
  • Detailed docs for resources and their arguments can be found in the docs.

Building The Provider (for development only)

make

Run tests

export MNEMONIC="mnemonic words"
export NETWORK="network" # dev, qa, test, main
  • Unit tests
    make unittests
    
  • Integration tests
    make integration
    
    • if you want to run one test use:

      cd integrationtests
      go test . -run <TestNameFunction> -v --tags=integration 
      go test . -run <TestNameFunction/SubFunctionName> -v --tags=integration #for testing only one sub-function
      

Known Issues

Latest Releases

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 usesSSH_KEY default location is file("~/.ssh/id_rsa.pub") the path should be changed to match your public key location

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal
provider
Package provider is the terraform provider
Package provider is the terraform provider
provider/scheduler
Package scheduler provides a simple scheduler interface to request deployments on nodes.
Package scheduler provides a simple scheduler interface to request deployments on nodes.
state
Package state provides a state to save the user work in a database.
Package state provides a state to save the user work in a database.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL