dfinity / terraform-provider-ic

A Terraform provider for provisioning Internet Computer canisters
Apache License 2.0
3 stars 0 forks source link
internetcomputer terraform

Terraform Provider for the IC

A Terraform provider for the Internet Computer.

resource "ic_canister" "hello_world" {

    wasm_file = "${path.root}/hello-world.wasm"

    arg = { greeter = "Hi" }

    controllers = [ "fgte5-ciaaa-aaaad-aaatq-cai" ]
}

For provider usage, visit the official docs.

[!CAUTION] terraform-provider-ic is under active development and highly experimental.

The rest of this document describes how to BUILD the provider.

Requirements

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
go install

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

To generate or update documentation, run go generate.

To run the tests, start a local replica with dfx start and then run make.

Releasing the provider

Create a tag:

git tag v0.0.3

Push the tag to trigger release creation:

git push origin v0.0.3