This provider leverages the hoop API to manage resources in the Hoop platform. It's a Terraform provider that allows you to create, read, update, and delete resources in Hoop.
- Connections
- Plugin Connection
Refer to ./docs or the Hoop Terraform Provider Documentation for detailed documentation on how to use the provider, including examples and configuration options.
This provider is built using the Terraform Plugin Framework. It was scaffolded using the Terraform Provider Scaffolding template repository.
To test the provider, you can run the following command:
make test
- To work with a live Hoop instance, spin up a local instance of the Hoop API server:
- Use the development server in the hoophq/hoop repository.
- Use the docker-compose setup
- Obtain the organization id to setup your API KEY.
- Restart your development server with the API KEY set
- Open a new terminal and use the script
./scripts/terraform
to run the provider with the local Hoop API server.
mv ./dev/main/main.tf-sample ./dev/main/main.tf
./scripts/terraform plan -chdir=dev/main plan
The script will use the
$HOME/go/bin
folder by default to install the provider binary.
It will build and install the provider, and then run the plan
command against the local Hoop API server.
If you need to clean the state, remove the local files in this folder:
rm -rf ./dev/main/terraform.tfstate*
To clean up resources from the local Hoop API server, the command line could be used to manage the resources directly.
hoop admin delete conn bash-console
This project uses the tfplugindocs
tool to generate documentation for the provider.
The tfplugindocs
tool will automatically include schema-based descriptions, if present in a data source, provider, or resource's schema. The schema.Schema
type's Description
field describes the data source, provider, or resource itself. Each attribute's or block's Description field describes that particular attribute or block. These descriptions should be tailored to practitioner usage and include any caveats or value expectations, such as special syntax.
To generate the documentation, you can run the following command:
make generate
The tfplugindocs
tool will automatically include Terraform configuration examples from files with the following naming conventions:
- Provider:
examples/provider/provider.tf
- Resources:
examples/resources/TYPE/resource.tf
- Data Sources:
examples/data-sources/TYPE/data-source.tf
- Functions:
examples/functions/TYPE/function.tf
Replace TYPE
with the name of the resource, data source, or function. For example: examples/resources/hoop_connection/resource.tf
.
The tfplugindocs
tool automatically will include Terraform import examples for resources with the file naming convention examples/resources/TYPE/import.sh
.