CONTRIBUTING.md

January 22, 2026 ยท View on GitHub

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

Commit Format

We use conventional commits in this repository. If the change is specific to a single resource, include it in the scope of the commit.

Example commit: fix(account_member): fix detected drift in post-import refresh plan

Overview of Commit Types

Commit TypeTitleDescription
featFeaturesA new feature
fixBug FixesA bug fix
docsDocumentationDocumentation only changes
styleStylesChanges that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
refactorCode RefactoringA code change that neither fixes a bug nor adds a feature
perfPerformance ImprovementsA code change that improves performance
testTestsAdding or modifying tests and/or test data
buildBuildsChanges that affect the build system or external dependencies
ciContinuous IntegrationsChanges to our CI configuration files and scripts
choreChoresOther changes that don't modify source code or test files
revertRevertsReverts a previous commit