Skip to content

Import existing resources

Every resource of the Terraform provider can be imported by its ID, so objects first built in the FuseScope UI can move under Terraform without being recreated.

Use this page when you already have rules, dashboards or channels in FuseScope and want to manage them as code from now on.

Imports use the object’s ID, a UUID such as 0192a9c2-1234-7abc-8def-0123456789ab. For dashboards and alert rules it is in the page URL when you open the object in FuseScope. For any object, the list endpoints of the FuseScope API return it, for example:

Terminal window
curl -H "SIGNOZ-API-KEY: $FUSESCOPE_ACCESS_TOKEN" \
https://fusescope.example.com/api/v3/rules

fusescope_public_dashboard is imported with the ID of the dashboard it publishes.

With Terraform 1.5+ or OpenTofu, declare the import and let Terraform write the configuration for you:

  1. Add an import block:

    imports.tf
    import {
    to = fusescope_rule.checkout_latency
    id = "0192a9c2-1234-7abc-8def-0123456789ab"
    }
  2. Generate the configuration from the live object:

    Terminal window
    terraform plan -generate-config-out=generated.tf
  3. Review generated.tf: rename the resource, replace literal channel names and IDs with references to other resources, and drop attributes you want left at their defaults.

  4. Run terraform plan again until it shows only the import and no changes, then terraform apply. Remove the import block afterwards.

On Terraform 1.4, write the resource block yourself and import into it:

Terminal window
terraform import fusescope_dashboard.redis_overview 0192a9c2-1234-7abc-8def-0123456789ab
terraform plan

Adjust the configuration until plan shows no changes.

  • Secrets. A fusescope_rum_application has a null key after an import, because FuseScope returns the key only on create; see RUM applications. Generated configuration for a notification channel can hold its credentials; move them into sensitive variables before you commit the file.
  • Defaults filled by the server. Generated configuration lists every attribute the server returned. Removing the ones you never set keeps the files short; plan tells you if a removal would change the object.