1. Obtain a Management API key
You will need to generate an API key for the Management API to use with the Terraform provider. This key is different from the key used for the Server API. The key can be generated in the admin portal.2. Create initial Terraform configuration
The following 3 variables are needed for the provider to run and can be found on the admin portal page linked above. These can be written directly into your Terraform files but we recommend configuring them as environment variables, especially for production environments. Please note the addition of/v1/management
on the end of the API host URI.
terraform init
to validate the configuration. From here you can start configuring resources, please refer to the Terraform registry to see what resources are available and the related syntax.
3. Export Rule JSON from the Admin portal (optional)
We recommend configuring some rules in the admin portal by hand and then exporting them into your Terraform configuration, rather than writing out the rules from scratch. After configuring a rule in the portal, you can export rule’s JSON by doing the following:- Click ‘Edit’

- Click ‘Export’

4. Import already-existing resources into your Terraform configuration (optional)
Rather than deleting your existing rules in the portal and then adding them back through Terraform, you are able to import rules directly into your Terraform state. You will need to write the corresponding Terraform for your action configurations and rules and then import them one by one. This can be done via theterraform import
command which is documented here. The address syntax can be found under each resource’s documentation on the Terraform registry.
Importing an action configuration
You will need to find your action code in the admin portal, it can be found here:
terraform import authsignal_action_configuration.my_action My-Action
Importing a rule
You will need to find your rule’s unique identifier in the admin portal, it can be found in the URL when editing a rule:
terraform import authsignal_rule.my_rule "My-Action/ccad3b11-14dc-4509-895a-dacac4983ed3"
Importing a theme
To use aauthsignal_theme
resource you will need to import the current theme settings using terraform import
. All Authsignal tenants come with some default theme settings.
Write the corresponding Terraform for your theme:
""
ID:terraform import authsignal_theme.my_theme ""