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.
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 {}
}
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
This library uses the standard gofmt code formatter:
$ ./scripts/format
To run schema tests,