Configuring Husonym with Terraform
Introduction
Husonym ships with an official Terraform provider that can be used to create, read, update, and delete supported Husonym resources.
Setup and Configuration
Before configuring the Husonym provider, you'll need to know a few pieces of config data so that you can properly configure the provider.
Endpoint Url
Husonym Cloud
If configuring via Husonym Cloud, no endpoint is required as the provider already defaults to the Husonym Cloud instance.
Self-Hosted
If self-hosting, the url to your self-hosted instance of Husonym API must be provided.
It can be provided either directly to the provider as a configuration parameter, or via the HUSONYM_ENDPOINT environment variable. This is detailed in the Terraform Registry docs as well.
API Key
Next, you'll need to generate an API key that the Terraform provider can use to act on the behalf of your account. If you haven't configured one, you can do so by heading over to the api key page in the settings for your specific account and creating one.
If the self-hosted instance is running without authentication enabled, this API Key is not utilized, but an account-id must be provided.
The API Key may be input as a variable to the provider, or provided in the environment through the HUSONYM_API_TOKEN environment variable.
Account Id
Generally, this option is omitted as it is inferred through the API Key.
If self-hosting Husonym and running without authentication, or simply wanting to be redundant, provide the account id to the provider or via the HUSONYM_ACCOUNT_ID environment variable to explicitly tell the provider which account id to use.
Terraform Registry Docs
To dive deeper into the provider documentation, head over to the latest docs page on the Terraform Registry. The registry documentation provided a better look into what resources are available, as well as examples of how to use them.
Bugs or Features
If there is an issue with the provider, or there is a feature that is missing, please do not hesitate to log an issue or email us at support@husonym.com.