Add a dev_overrides section in your ~/.terraformrc file as follows:
provider_installation {
dev_overrides {
# Replace with your own GOBIN path. Default is $GOPATH/bin
"ngpc.rxt.io/rackerlabs/spot" = "/home/<your-username>/go/bin"
}
direct {}
}
Ensure that ~/go/bin is included in your system's PATH.
Run make check-versions to verify that Go and Terraform are installed.
Add new data sources or resources in provider_code_spec.json.
Make corresponding entries in generator_config.yml.
Refer to the openapi-spec to understand the attributes supported by these resources and data sources.
Run make generate to create schemas corresponding to resources and data sources. The generated files, ending with _gen.go, should not be edited manually.
Run NAME=<resource-name> make scaffold-rs or scaffold-ds to scaffold code for interacting with resources and data sources.
Implement the necessary functions in the scaffolded Go files, located at internal/provider/<resource-name>_resource.go.
Run make install.
To view detailed logs during a Terraform execution, use TF_LOG=TRACE terraform plan.