If you're contributing changes or code to the provider, the integration tests create, update, and destroy real resources in a Lightstep-managed integration environment.
To run the tests, first get an API key with a Member role for the public environment and run:
export TF_ACC_PROVIDER_NAMESPACE="hashicorp"
export TF_ACC_PROVIDER_HOST="registry.opentofu.org"
export TF_ACC_TERRAFORM_PATH="$(which terraform)"
LIGHTSTEP_API_KEY_PUBLIC=(your api key here) make acc-test
- Update the version in
.go-version
and runmake build
- Create a
.terraformrc
in your $HOME directory that points this checked-out repository with your changes.
provider_installation {
filesystem_mirror {
path = "/Users/your-username/workspace/terraform-provider-lightstep/.terraform/providers"
include = ["registry.terraform.io/lightstep/lightstep"]
}
direct {
exclude = ["lightstep/lightstep"]
}
}
- Import the module in another project pinned to the version that matches
.version
. Delete any terraform lock files and runterraform init
.
Documentation files in docs
are generated by combining:
- the contents of the
.md.tmpl
template files found in thetemplate
directory - field-level documentation configured inline via
Description
attributes inlightstep/*.go
.
Any edits to documentation files should be made in the templates
directory or the .go files. Then you can use the following steps to generate the files in the docs directory:
- Download
tfplugindocs
from https://github.com/hashicorp/terraform-plugin-docs/releases and make it available on yourPATH
- Run
$ make docs
from the root of this directory
Note that there is a github action that will prevent merging if the docs
files checked in do not match the generated ones.