---
title: "Using Terraform with OVHcloud"
description: "Terraform is an open-source infrastructure as code (IaC) tool created by Hashicorp in 2014, and written in Go. It aims at building, changing, and version-contro"
url: https://docs.us.ovhcloud.com/en/manage-and-operate/terraform/using-terraform-with-ovhcloud
lang: en
---
> For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt.

# Using Terraform with OVHcloud

[Terraform](https://www.terraform.io/) is an open-source infrastructure as code (IaC) tool created by [Hashicorp](https://www.hashicorp.com/) in 2014, and written in Go. It aims at building, changing, and version-controlling your infrastructure. You can define and provision your infrastructure by writing the definition of your resources in Hashicorp Configuration Language (HCL).

It is widely used and you can also use it with OVHcloud.

At the heart of the Terraform product is the concept of a [provider](https://developer.hashicorp.com/terraform/language/providers), a plugin enabling interaction with an API.

 

## Providers

Based on your automation needs at OVHcloud, you have to pick one or more of the following Terraform providers:

- [OVH provider](https://registry.terraform.io/providers/ovh/ovh/latest) that interacts with [OVHcloud API portal](https://api.us.ovhcloud.com/). You can refer to [this guide](https://docs.us.ovhcloud.com/en/manage-and-operate/api/first-steps.md) to learn more about how to use the API portal. Furthermore, the OVH provider evolves as fast as the OVHcloud offering, so follow the [releases](https://github.com/ovh/terraform-provider-ovh/releases).
- [OpenStack provider](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest): the open standard cloud computing platform that OVHcloud uses to power its Public Cloud service.
- [Hashicorp AWS provider](https://registry.terraform.io/providers/hashicorp/aws/latest/) to automate the operations of the Object Storage.
- [Hashicorp Kubernetes provider](https://registry.terraform.io/providers/hashicorp/kubernetes/latest): once you have provisioned a Kubernetes cluster with the OVH provider, you can manage your Kubernetes configuration with this provider.
- [Hashicorp vSphere provider](https://registry.terraform.io/providers/hashicorp/vsphere/latest) to automate the operations of [VMware on OVHcloud solutions](https://us.ovhcloud.com/hosted-private-cloud/vmware/).
- [Nutanix provider](https://registry.terraform.io/providers/nutanix/nutanix/latest) to automate the operations of OVHcloud [Nutanix on OVHcloud](https://us.ovhcloud.com/hosted-private-cloud/nutanix/).

 

## Mapping OVHcloud GUI to Terraform providers & resources

OVHcloud console GUI (also called "Control Panel" or "Manager") hides some background API complexity to the user. From a GUI concept, it may be not easy to find the correct provider and the associated [resource](https://developer.hashicorp.com/terraform/language/resources). The tables below are here to help.

**Note:**

- The following categories are based on the Control Panel 'New version (Beta)' from December 2022.
- If no resource is available but a Terraform [data source](https://developer.hashicorp.com/terraform/language/data-sources) is, this is mentioned in the table with "\[data source]".
- When multiple resources are available for one GUI concept, only the main resource is provided in this list.

 

### Bare Metal Cloud

| Control Panel concept  | Terraform provider | Resource or Data Source                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ---------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Dedicated Server       | ovh                | \[data source] [ovh\_dedicated\_server](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/dedicated_server)                                                                                                                                                                                                                                                                                                                                                                                                                            |
| Virtual Private Server | ovh                | [ovh\_vps](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/vps)                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Veeam Cloud Connect    | not available      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Logs Data Platform     | ovh                | partially available: - [ovh\_dbaas\_logs\_](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_output_graylog_stream)[output\_graylog\_stream](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_output_graylog_stream) - [ovh\_dbaas\_logs\_input](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_input) - \[data source] [ovh\_dbaas\_logs\_input\_engine](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/dbaas_logs_input_engine) |

 

### Hosted Private Cloud

| Control Panel concept | Terraform provider                                                                                                                                   | Resource or Data Source |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| VMware                | <ul><li>not available for ordering</li><li>[vSphere](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs) for management</li></ul> | see provider            |
| Nutanix               | <ul><li>not available for ordering</li><li>[nutanix](https://registry.terraform.io/providers/nutanix/nutanix/latest) for management</li></ul>        | see provider            |

 

### Public Cloud

#### Compute

| Control Panel concept | Terraform provider(s) | Resource or Data Source                                                                                                                                      |
| --------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Instances (VM)        | openstack             | [openstack\_compute\_instance\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/compute_instance_v2) |

 

#### Storage and Backup

| Control Panel concept  | Terraform provider(s) | Resource or Data Source                                                                                                                                                                                                                                                                                                                                                              |
| ---------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Block Storage          | openstack             | [blockstorage\_volume\_v3](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/blockstorage_volume_v3)                                                                                                                                                                                                                              |
| Object Storage (Swift) | openstack             | [objectstorage\_object\_v1](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/objectstorage_object_v1)                                                                                                                                                                                                                            |
| Object Storage         | ovh                   | [cloud\_project\_storage](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_storage)                                                                                                                                                                                                                                                               |
| Object Storage users   | ovh                   | [ovh\_cloud\_project\_user](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_user) with _objectstore\_operator_ role                                                                                                                                                                                                                              |
| Cloud Archive          | openstack             | [objectstorage\_object\_v1](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/objectstorage_object_v1) with [storage\_policy](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/objectstorage_container_v1#storage_policy) set to “PCA” to create an “archive” swift container |
| Databases              | ovh                   | [cloud\_project\_database](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_database) and [cloud\_project\_database\_database](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_database_database)                                                                                                             |
| Volume Snapshot        | openstack             | [openstack\_blockstorage\_snapshot\_v3](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/blockstorage_snapshot_v3)                                                                                                                                                                                                            |
| Volume Backup          | openstack             | \[data source] [openstack\_blockstorage\_volume\_v3](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/blockstorage_volume_v3)                                                                                                                                                                                                 |
| Instance Backup        | openstack             | [openstack\_images\_image\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/images_image_v2)                                                                                                                                                                                                                                 |

 

#### Network

| Control Panel concept       | Terraform provider(s) | Resource or Data Source                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Private network (vRack)     | ovh & openstack       | <ul><li>[ovh\_vrack\_cloudproject](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/vrack_cloudproject)</li><li>[openstack\_networking\_network\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_network_v2)</li><li>[openstack\_networking\_subnet\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/networking_subnet_v2)</li><li>[ovh\_cloud\_project\_network\_private](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_network_private)</li><li>[ovh\_cloud\_project\_network\_private\_subnet](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_network_private_subnet)</li></ul> |
| Load Balancer               | openstack             | [openstack\_lb\_loadbalancer\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/lb_loadbalancer_v2)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| Public IPs - Floating IPs   | openstack             | [openstack\_networking\_floatingip\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/networking_floatingip_v2)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Public IPs - Additional IPs | ovh                   | [ovh\_ip\_service](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/ip_service)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| Gateway                     | openstack             | [openstack\_networking\_router\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/networking_router_v2)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

 

#### Containers & Orchestration

| Control Panel concept                                          | Terraform provider(s) | Resource or Data Source                                                                                                                                                                                                                                                                                    |
| -------------------------------------------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Managed Kubernetes Service - Cluster operations                | ovh                   | [ovh\_cloud\_project\_kube](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_kube)                                                                                                                                                                                      |
| Managed Kubernetes Service - Application deployment operations | Hashicorp Kubernetes  | [kubernetes\_namespace](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/namespace) [kubernetes\_deployment](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/deployment)                                                              |
| Kubernetes Load Balancer                                       | Hashicorp Kubernetes  | [kubernetes\_service](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/service) as described in this [tutorial](https://docs.us.ovhcloud.com/en/public-cloud/managed-kubernetes/using-lb.md)                                                                             |
| Managed Private Registry                                       | ovh                   | [ovh\_cloud\_project\_containerregistry](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_containerregistry) [ovh\_cloud\_project\_containerregistry\_user](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_containerregistry_user) |
| Workflow Management                                            | ovh                   | [cloud\_project\_workflow\_backup](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_workflow_backup)                                                                                                                                                                    |

 

#### AI & Machine Learning

| Control Panel concept | Terraform provider(s)                                                                                                                   | Resource or Data Source |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- |
| AI Notebooks          | not available but [ovhai CLI](https://docs.us.ovhcloud.com/en/public-cloud/ai-machine-learning/cli-overview.md) can help for automation |                         |
| AI Training           | not available but [ovhai CLI](https://docs.us.ovhcloud.com/en/public-cloud/ai-machine-learning/cli-overview.md) can help for automation |                         |
| AI Deploy             | not available but [ovhai CLI](https://docs.us.ovhcloud.com/en/public-cloud/ai-machine-learning/cli-overview.md) can help for automation |                         |

 

#### Data & Analytics

| Control Panel concept | Terraform provider(s) | Resource or Data Source                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| --------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Logs Data Platform    |  ovh                  | partially available: - [ovh\_dbaas\_logs\_output\_graylog\_stream](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_output_graylog_stream) - [ovh\_dbaas\_logs\_input](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_input) - [ovh\_dba](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_cluster)[as\_logs\_cluster](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_cluster) - \[data source] [ovh\_dbaas\_logs\_input\_engine](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/dbaas_logs_input_engine) |

 

#### Settings

| Control Panel concept | Terraform provider(s) | Resource or Data Source                                                                                                                                                                                                                               |
| --------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Users & Roles         | ovh                   | [ovh\_cloud\_project\_user](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_user#role_names)                                                                                                                      |
| Quotas & Regions      | not available         |                                                                                                                                                                                                                                                       |
| SSH keys              | ovh & openstack       | If you use the openstack provider for compute, you will need to use [openstack\_compute\_keypair\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/compute_keypair_v2) to manage the SSH keys |
| Project Settings      | ovh                   | [ovh\_cloud\_project](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project)                                                                                                                                            |

 

### Network

| Control Panel concept                | Terraform provider(s) | Resource or Data Source                                                                                             |
| ------------------------------------ | --------------------- | ------------------------------------------------------------------------------------------------------------------- |
| vRack private network                | ovh                   | [ovh\_vrack](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/vrack)                           |
| Public IP Addresses - Additional IPs | ovh                   | [ovh\_ip\_service](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/ip_service)                |
| OVHcloud Connect                     | ovh                   | [ovh\_ovhcloud\_connect](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/ovhcloud_connect) |
| Load Balancer                        | ovh                   | [ovh\_iploadbalancing](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/iploadbalancing)       |

 

### My account

#### My profile

| Control Panel concept | Terraform provider(s) | Resource or Data Source                                                                                                                                                                                                                                                                                                                 |
| --------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Profile               | ovh                   | \[data source] [ovh\_me](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/me)                                                                                                                                                                                                                                   |
| Payment method        | ovh                   | <ul><li>\[data source] [ovh\_me\_paymentmean\_bankaccount](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/me_paymentmean_bankaccount)</li><li>\[data source] [ovh\_me\_paymentmean\_creditcard](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/me_paymentmean_creditcard)</li></ul> |

 

#### Identity and Access Management (IAM)

| Control Panel concept | Terraform provider(s) | Resource or Data Source                                                                                                                                                                                                                                         |
| --------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Policies              | ovh                   | [ovh\_iam\_policy](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/iam_policy)                                                                                                                                                            |
| Identities            | ovh                   | <ul><li>[ovh\_me\_identity\_user](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/me_identity_user)</li><li>[ovh\_me\_identity\_group](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/me_identity_group)</li></ul> |
| Resource groups       | ovh                   | [ovh\_iam\_resource\_group](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/iam_resource_group)                                                                                                                                           |

 

## Resources

### Terraform with OVHcloud examples

- [Public Cloud examples repository on GitHub](https://github.com/ovh/public-cloud-examples)
- [Create a private registry](https://docs.us.ovhcloud.com/en/public-cloud/managed-private-registry/create-private-registry.md)

 

### OVH Provider

- [Registry entry](https://registry.terraform.io/providers/ovh/ovh/latest)
- [Documentation](https://registry.terraform.io/providers/ovh/ovh/latest/docs)
- Source code on [GitHub](https://github.com/ovh/terraform-provider-ovh) (contributions are welcome)

 

## Go further

Browse the rest of the [OVHcloud US documentation](https://docs.us.ovhcloud.com/en/index.md) for guides on our other products and services.

\*S3 is a trademark filed by Amazon Technologies, Inc. OVHcloud's service is not sponsored by, endorsed by, or otherwise affiliated with Amazon Technologies, Inc.
