Skip to content

Latest commit

 

History

History
62 lines (41 loc) · 1.26 KB

CONTRIBUTING.md

File metadata and controls

62 lines (41 loc) · 1.26 KB

Setting up the environment

To set up the repository, run:

$ ./scripts/bootstrap
$ ./scripts/build

This will install all the required dependencies and build the Provider binary into the root directory.

You can also install go 1.22+ manually.

Running the Provider locally

You can build the provider locally and have your .tf files refer to the local build instead of the one in the Hashicorp registry.

First, build the provider binary:

$ ./scripts/build

Then edit (or create) your ~/.terraformrc to look something like this:

  provider_installation {
    dev_overrides {
      "cloudflare/cloudflare" = "/local/path/to/this/repo"
    }
    direct {}
  }

Running tests

To execute the schema and unit tests, run:

$ ./scripts/test

Note that this does not run acceptance tests by default, because those tests interact with real resources in the cloud and could incur fees.

To enable the running of acceptance tests, use the TF_ACC environment variable:

$ TF_ACC=1 ./scripts/test

Formatting

This library uses the standard gofmt code formatter:

$ ./scripts/format

Running Tests

To run schema tests,