Skip to content

Infomaniak/terraform-provider-infomaniak

Repository files navigation

Quality Gate Status Go Report Card License Release Terraform Registry OpenTofu Registry Coverage

Infomaniak Terraform Provider

The Infomaniak Provider allows Terraform to manage Infomaniak's resources.

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 override Terraform's provider installation and use the in-dev provider, fill your ~/.terraformrc with the following : You need to replace $GOPATH/bin with the actual location of the binary on your system.

provider_installation {

  dev_overrides {
      "registry.terraform.io/infomaniak/infomaniak" = "$GOPATH/bin"
  }

  # For all other providers, install them directly from their origin provider
  # registries as normal. If you omit this, Terraform will _only_ use
  # the dev_overrides block, and so no other providers will be available.
  direct {}
}

Test the Provider

Two types of tests are available for the provider:

  • Unit tests: Test specific functions
  • Acceptance mocked tests: End-to-end tests using real Terraform files with mocked infrastructure calls

Run tests using the Taskfile.yml:

go tool task

Packages

No packages published

Contributors 9