# Getting started

> Overview of using OneFuse with HashiCorp Terraform

---

Site [llms.txt](/llms.txt)

---

Easily integrate CloudBolt OneFuse with HashiCorp Terraform (compatible with Terraform [Open Source](https://www.terraform.io/intro/index.html), [Enterprise](https://www.terraform.io/docs/enterprise/index.html), or [Cloud](https://www.terraform.io/docs/cloud/index.html)) to quickly automate and integrate into your business provisioning lifecycle.

The CloudBolt OneFuse integration platform offers integrations to services like Naming, IPAM, DNS, Microsoft Active Directory, Scripting, Ansible Tower and more.

[Upstream providers](/docs/onefuse/consume/what-is-upstream-provider/) like Terraform, VMware vRealize Automation, CloudBolt CMP, Ansible, ServiceNow and others are able to consume the same OneFuse integrations combined with organizational business logic for a standardized approach to automation across the enterprise.

## Prerequisites

1. [Learn](https://learn.hashicorp.com/terraform) about HashiCorp Terraform.
   - HashiCorp Terraform: [Releases](https://github.com/hashicorp/terraform/releases) and [ChangeLog](https://github.com/hashicorp/terraform/blob/master/CHANGELOG.md).
1. [Download](https://www.terraform.io/downloads.html) and install HashiCorp Terraform.
   - **Supported Terraform versions**: [OneFuse Terraform Provider product support lifecycle](/docs/onefuse/consume/hashicorp-terraform/product-support-lifecycle/)
1. [Get the OneFuse Provider](https://registry.terraform.io/providers/CloudBoltSoftware/onefuse/latest) via the *Terraform Registry*.
   - HashiCorp Terraform: [Using Providers](https://www.terraform.io/docs/language/providers/configuration.html)
1. [Configure the OneFuse Provider](#configure-the-onefuse-provider)

## Configure the OneFuse Provider

Configure the connection to OneFuse with a Terraform Provider for OneFuse.

- A [Terraform Provider](https://www.terraform.io/docs/configuration/providers.html) is responsible for understanding API interactions and exposing resources.

Have the following in the `main.tf` file. Update the values as needed.

```hcl
// Define the OneFuse Terraform Provider source
terraform {
 required_providers {
   onefuse = {
     source  = "CloudBoltSoftware/onefuse"
     version = ">= 1.40.0"
  }
 }
 required_version = ">= 0.13"
}

// Inititalize OneFuse Provider
provider "onefuse" {
 scheme     = var.onefuse_scheme
 address    = var.onefuse_address
 port       = var.onefuse_port
 user       = var.onefuse_user
 password   = var.onefuse_password
 verify_ssl = var.onefuse_verify_ssl
}
```

By pointing to the source `CloudBoltSoftware/onefuse`, Terraform will automatically download the OneFuse Terraform Provider based on the `required_version` specified.

| Variable Name | Variable Value |
| --- | --- |
| `onefuse_scheme` | `http` or `https` |
| `onefuse_address` | FQDN of the OneFuse Instance |
| `onefuse_port` | OneFuse Port Address, for example `443` |
| `onefuse_user` | OneFuse username with at minimum the [Workspace Member role](/docs/onefuse/getting-started/roles-and-permissions/#workspace-roles), for example `admin` |
| `onefuse_password` | Password for OneFuse user |
| `onefuse_verify_ssl` | `true` or `false` |

## Resources

- Visit our **GitHub Repos**: [terraform-provider-onefuse](https://github.com/CloudBoltSoftware/terraform-provider-onefuse) and [onefuse-examples](https://github.com/CloudBoltSoftware/onefuse-examples)

## Troubleshooting

Refer to Terraform's [Troubleshooting](https://www.terraform.io/docs/providers/oci/guides/troubleshooting.html) and [Debugging](https://www.terraform.io/docs/internals/debugging.html) guides.

## Next steps

Start integrating with [OneFuse Modules](/docs/onefuse/consume/hashicorp-terraform/modules/).
