Paperspace terraform provider
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
pkg
src
.gitignore
LICENSE.txt
README.md

README.md

paperspace-terraform

Paperspace terraform provider

Release Notes

v0.1.2 -- first release; supports machine and script resources for create/read/destroy/import, and data sources for networks, templates, and users.

Note: currently this provider is offered as a terraform 'private cloud' provider while under early development. We are moving toward contributing it back to the terraform open source project, which will remove the need for a separate download and installation step in the future.

Downloads

Linux x64 terraform-provider-paperspace

Windows x64 terraform-provider-paperspace.exe

Note: The these downloads were built with go 1.8.3 and tested with terraform 0.9.11

Installation and Testing

  1. Install terraform and make sure it is in your path.

Note: this release of the Paperspace provider was tested with terraform 0.9.11

  1. Download the Paperspace terraform provider from one of the links above, or build it from source as described below.

  2. Acquire a Paperspace API key for your account. See Paperspace API for instructions on creating an api key.

  3. A sample terraform config file is provided in src/terraform-provider-paperspace/main.tf

Modify this file to use your actual api_key, and valid user email address in the account associated with the api_key.

  1. cd to the directory where the sample configuration file is located, e.g.:
cd src/terraform-provider-paperspace
  1. Make sure the terraform-provider-paperspace executable is also in your path, or in the directory with the .tf config files you want to use.

  2. Run the following terraform commands interactively to exercise the configuration and examine the output:

(Note the sample configuration will create a machine with a public ip; testing this configuration will result in charges for the machine and public ip resources in most cases.)

terraform plan
terraform apply
terraform show
terraform refresh
terraform show
terraform plan
  1. When you are done with testing, run the following to destroy the configuration (and thus destroy the machine and script objects created above):
terraform destroy
terraform show

Building from source

  1. Install the latest version of go

Note: this version of the provider has been successfully compiled with go version 1.8.3

  1. Clone this repository and change to the project directory
git clone https://github.com/Paperspace/paperspace-terraform.git
cd paperspace-terraform
  1. Set your GOPATH environment variable to the the root of the project, e.g., on Linux:
export GOPATH=~/paperspace-terraform
  1. Change to the src/terraform-provider-paperspace subdirectory
cd src/terraform-provider-paperspace
  1. Build the Paperspace terraform provider

On Linux x64 run:

make

On Windows run:

go get
go build

The output of the build is a terraform-provider-paperspace executable.

Note: you cannot execute this provider binary directly. The binary will be loaded by the terraform app if the provider binary is in your path and your .tf configuration files refer to the paperspace provider and paperspace resources, or datasources.

Contributing

Want to contribute? Contact us at hello@paperspace.com