Skip to content

A Terraform provider for provisioning Internet Computer canisters

License

Notifications You must be signed in to change notification settings

dfinity/terraform-provider-ic

Repository files navigation

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