---
title: "Utiliser Terraform avec OVHcloud"
description: "Découvrez les ressources utiles pour utiliser Terraform avec OVHcloud"
url: https://docs.ovhcloud.com/fr/guides/manage-and-operate/terraform/at-ovhcloud
lang: fr
lastUpdated: 2025-06-13
---
> For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/fr/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/fr/llms-full.txt.

# Utiliser Terraform avec OVHcloud

## Introduction

[Terraform](https://www.terraform.io/) est un outil open source d'infrastructure as code (IaC) créé par [Hashicorp](https://www.hashicorp.com/) en 2014 et écrit en Go. Il a pour objectif de construire, modifier et versionner votre infrastructure. Vous pouvez définir et provisionner votre infrastructure en écrivant la définition de vos ressources en Hashicorp Configuration Language (HCL).

Il est largement utilisé et vous pouvez également l'employer avec OVHcloud.

Le concept de [provider](https://developer.hashicorp.com/terraform/language/providers) est au cœur du produit Terraform : il s'agit d'un plugin qui permet d'interagir avec une API.

## Providers

En fonction de vos besoins d'automatisation chez OVHcloud, vous devez choisir un ou plusieurs des providers Terraform suivants :

- [Provider OVH](https://registry.terraform.io/providers/ovh/ovh/latest), qui interagit avec l'API OVHcloud. Vous pouvez consulter [ce guide](https://docs.ovhcloud.com/fr/guides/manage-and-operate/api/first-steps.md) pour en savoir plus sur l'utilisation de l'API. Par ailleurs, le provider OVH évolue au même rythme que l'offre OVHcloud : pensez à suivre les [releases](https://github.com/ovh/terraform-provider-ovh/releases).
- [Provider OpenStack](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest) : la plateforme de cloud computing open standard utilisée par OVHcloud pour propulser son service Public Cloud. Pour plus d'informations, consultez [cette page](https://www.ovhcloud.com/fr/public-cloud/openstack/).
- [Provider AWS de Hashicorp](https://registry.terraform.io/providers/hashicorp/aws/latest/), pour automatiser les opérations sur l'Object Storage.
- [Provider Kubernetes de Hashicorp](https://registry.terraform.io/providers/hashicorp/kubernetes/latest) : une fois votre cluster Kubernetes provisionné avec le provider OVH, vous pouvez gérer votre configuration Kubernetes avec ce provider.
- [Provider vSphere de Hashicorp](https://registry.terraform.io/providers/hashicorp/vsphere/latest), pour automatiser les opérations sur les [solutions VMware on OVHcloud](https://www.ovhcloud.com/fr/enterprise/products/hosted-private-cloud/).
- [Provider Nutanix](https://registry.terraform.io/providers/nutanix/nutanix/latest), pour automatiser les opérations sur [Nutanix on OVHcloud](https://www.ovhcloud.com/fr/hosted-private-cloud/nutanix/).

## Correspondance entre l'interface OVHcloud et les providers et ressources Terraform

L'interface graphique de la console OVHcloud (également appelée « espace client » ou « Manager ») masque à l'utilisateur une partie de la complexité de l'API sous-jacente. À partir d'un concept de l'interface graphique, il peut être difficile de trouver le provider correspondant et la
[ressource](https://developer.hashicorp.com/terraform/language/resources) associée. Les tableaux ci-dessous sont là pour vous aider.

**Note :**

- Les catégories suivantes sont basées sur la version « New version (Beta) » de l'espace client de décembre 2022.
- Si aucune ressource n'est disponible mais qu'une [data source](https://developer.hashicorp.com/terraform/language/data-sources) Terraform l'est, cela est indiqué dans le tableau par « \[source de données] ».
- Lorsque plusieurs ressources sont disponibles pour un même concept de l'interface graphique, seule la ressource principale est indiquée dans cette liste.

### Bare Metal Cloud

| Concept de l'espace client | Provider Terraform | Ressource ou source de données                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| -------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Serveur dédié              | ovh                | \[source de données] [ovh\_dedicated\_server](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/dedicated_server)                                                                                                                                                                                                                                                                                                                                          |
| Serveur privé virtuel      | ovh                | [ovh\_vps](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/vps)                                                                                                                                                                                                                                                                                                                                                                                          |
| HA-NAS                     | ovh                | -\[source de données] [ovh\_dedicated\_nasha](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/dedicated_nasha)<br />- [ovh\_dedicated\_nasha\_partition](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dedicated_nasha_partition)                                                                                                                                                                                                |
| Enterprise File Storage    | ovh                | non disponible                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| Cloud Disk array           | ovh                | \[source de données] [ovh\_dedicated\_ceph](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/dedicated_ceph)                                                                                                                                                                                                                                                                                                                                              |
| Veeam Cloud Connect        | non disponible     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| Logs Data Platform         | ovh                | partiellement disponible :<br />- [ovh\_dbaas\_logs\_graylog\_output\_stream](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_graylog_output_stream) <br /> - [ovh\_dbaas\_logs\_input](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_input) <br />- \[source de données] [ovh\_dbaas\_logs\_input\_engine](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/dbaas_logs_input_engine) |

### Hosted Private Cloud

| Concept de l'espace client | Provider Terraform                                                                                                                        | Ressource ou source de données |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| VMware                     | - non disponible pour la commande<br />- [vsphere](https://registry.terraform.io/providers/hashicorp/vsphere/latest/docs) pour la gestion | voir le provider               |
| Nutanix                    | - non disponible pour la commande<br />- [nutanix](https://registry.terraform.io/providers/nutanix/nutanix/latest) pour la gestion        | voir le provider               |

### Public Cloud

#### Compute

| Concept de l'espace client | Provider(s) Terraform | Ressource ou source de données                                                                                                                               |
| -------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Instances (VM et Metal)    | openstack             | [openstack\_compute\_instance\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/compute_instance_v2) |

#### Stockage et sauvegarde

| Concept de l'espace client  | Provider(s) Terraform | Ressource ou source de données                                                                                                                                                                                                                                                                                                                                                                   |
| --------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 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)                                                                                                                                                                                                                                                                           |
| Utilisateurs Object Storage | ovh                   | [ovh\_cloud\_project\_user](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_user) avec le rôle _objectstore\_operator_                                                                                                                                                                                                                                       |
| Cloud Archive               | openstack             | [objectstorage\_object\_v1](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/objectstorage_object_v1) avec [storage\_policy](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/objectstorage_container_v1#storage_policy) défini sur « PCA » afin de créer un conteneur swift « archive » |
| Cold Archive                | Hashicorp aws         | [aws\_s3\_bucket](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/s3_bucket)                                                                                                                                                                                                                                                                                         |
| Bases de données            | ovh                   | [cloud\_project\_database](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_database) et [cloud\_project\_database\_database](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_database_database)                                                                                                                          |
| Snapshot de volume          | openstack             | [openstack\_blockstorage\_snapshot\_v3](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/blockstorage_snapshot_v3)                                                                                                                                                                                                                        |
| Sauvegarde de volume        | openstack             | \[source de données] [openstack\_blockstorage\_volume\_v3](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/blockstorage_volume_v3)                                                                                                                                                                                                       |
| Sauvegarde d'instance       | openstack             | [openstack\_images\_image\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/images_image_v2)                                                                                                                                                                                                                                             |

#### Réseau

| Concept de l'espace client       | Provider(s) Terraform | Ressource ou source de données                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| -------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Réseau privé (vRack)             | ovh et openstack      | - [ovh\_vrack\_cloudproject](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/vrack_cloudproject) <br />- [openstack\_networking\_network\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/data-sources/networking_network_v2) <br />- [openstack\_networking\_subnet\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/networking_subnet_v2) <br />- [ovh\_cloud\_project\_network\_private](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_network_private) <br />- [ovh\_cloud\_project\_network\_private\_subnet](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_network_private_subnet) |
| Load Balancer                    | openstack             | [openstack\_lb\_loadbalancer\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/lb_loadbalancer_v2)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| IP publiques - IP flottantes     | openstack             | [openstack\_networking\_floatingip\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/networking_floatingip_v2)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| IP publiques - IP additionnelles | 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)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |

#### Conteneurs et orchestration

| Concept de l'espace client                                            | Provider(s) Terraform | Ressource ou source de données                                                                                                                                                                                                                                                                                  |
| --------------------------------------------------------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Managed Kubernetes Service - Opérations sur le cluster                | ovh                   | [ovh\_cloud\_project\_kube](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_kube)                                                                                                                                                                                           |
| Managed Kubernetes Service - Opérations de déploiement d'applications | 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)                                                                   |
| Load Balancer Kubernetes                                              | Hashicorp kubernetes  | [kubernetes\_service](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/service) comme décrit dans ce [tutoriel](https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/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)<br />[ovh\_cloud\_project\_containerregistry\_user](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_containerregistry_user) |
| Gestion des workflows                                                 | ovh                   | [cloud\_project\_workflow\_backup](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_workflow_backup)                                                                                                                                                                         |

#### AI & Machine Learning

| Concept de l'espace client | Provider(s) Terraform                                                                                                                                      | Ressource ou source de données |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| AI Notebooks               | non disponible, mais la [CLI ovhai](https://docs.ovhcloud.com/fr/guides/public-cloud/ai-machine-learning/ai-cli-overview.md) peut vous aider à automatiser |                                |
| AI Training                | non disponible, mais la [CLI ovhai](https://docs.ovhcloud.com/fr/guides/public-cloud/ai-machine-learning/ai-cli-overview.md) peut vous aider à automatiser |                                |
| AI Deploy                  | non disponible, mais la [CLI ovhai](https://docs.ovhcloud.com/fr/guides/public-cloud/ai-machine-learning/ai-cli-overview.md) peut vous aider à automatiser |                                |

#### Data & Analytics

| Concept de l'espace client | Provider(s) Terraform | Ressource ou source de données                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| -------------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Logs Data Platform         | ovh                   | partiellement disponible :<br />- [ovh\_dbaas\_logs\_graylog\_output\_stream](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_graylog_output_stream) <br /> - [ovh\_dbaas\_logs\_input](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_input) <br />- [ovh\_dbaas\_logs\_cluster](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/dbaas_logs_cluster) <br />- \[source de données] [ovh\_dbaas\_logs\_input\_engine](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/dbaas_logs_input_engine) |

#### Paramètres

| Concept de l'espace client | Provider(s) Terraform | Ressource ou source de données                                                                                                                                                                                                                                                                                                                                         |
| -------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Utilisateurs et rôles      | ovh                   | [ovh\_cloud\_project\_user](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project_user#role_names)                                                                                                                                                                                                                                       |
| Quotas et régions          | non disponible        |                                                                                                                                                                                                                                                                                                                                                                        |
| Clés SSH                   | ovh et openstack      | [ovh\_me\_ssh\_key](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/me_ssh_key). Si vous utilisez le provider openstack pour le compute, vous devrez utiliser [openstack\_compute\_keypair\_v2](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/compute_keypair_v2) pour gérer les clés ssh |
| Paramètres du projet       | ovh                   | [ovh\_cloud\_project](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/cloud_project)                                                                                                                                                                                                                                                             |

### Web Cloud

#### Noms de domaine

| Concept de l'espace client | Provider(s) Terraform | Ressource ou source de données                                                                                                      |
| -------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| Nom de domaine             | ovh                   | [ovh\_domain\_zone](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/ovh_domain_zone)                          |
| Enregistrement de zone DNS | ovh                   | [ovh\_domain\_zone\_record](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/ovh_domain_zone_record)           |
| Serveur DNS                | non disponible        |                                                                                                                                     |
| Redirection                | ovh                   | [ovh\_domain\_zone\_redirection](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/ovh_domain_zone_redirection) |
| DynHost                    | non disponible        |                                                                                                                                     |
| Enregistrement GLUE        | non disponible        |                                                                                                                                     |

#### Web

| Concept de l'espace client | Provider(s) Terraform | Ressource ou source de données                                                                                                 |
| -------------------------- | --------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Offre d'hébergement        | non disponible        |                                                                                                                                |
| Base de données            | ovh                   | [ovh\_hosting\_privatedatabase](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/hosting_privatedatabase) |
| E-mails                    | non disponible        |                                                                                                                                |
| Microsoft                  | non disponible        |                                                                                                                                |

### Network

| Concept de l'espace client                | Provider(s) Terraform | Ressource ou source de données                                                                                   |
| ----------------------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------- |
| Réseau privé vRack                        | ovh                   | [ovh\_vrack](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/vrack)                        |
| Adresses IP publiques - IP additionnelles | 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/resources/ovhcloud_connect) |
| Load Balancer                             | ovh                   | [ovh\_iploadbalancing](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/iploadbalancing)    |
| Infrastructure CDN                        | non disponible        |                                                                                                                  |

### Telecom

Cet univers n'est actuellement pas pris en charge par les providers Terraform

### Mon compte

#### Mon profil

| Concept de l'espace client | Provider(s) Terraform | Ressource ou source de données                                                                                                                                                                                                                                                                                                      |
| -------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Profil                     | ovh                   | \[source de données] [ovh\_me](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/me)                                                                                                                                                                                                                         |
| Moyen de paiement          | ovh                   | - \[source de données] [ovh\_me\_paymentmean\_bankaccount](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/me_paymentmean_bankaccount) <br />- \[source de données] [ovh\_me\_paymentmean\_creditcard](https://registry.terraform.io/providers/ovh/ovh/latest/docs/data-sources/me_paymentmean_creditcard) |

#### Identity and Access Management (IAM)

| Concept de l'espace client | Provider(s) Terraform | Ressource ou source de données                                                                                                                                                                                                                  |
| -------------------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Politiques                 | ovh                   | [ovh\_iam\_policy](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/iam_policy)                                                                                                                                            |
| Identités                  | ovh                   | - [ovh\_me\_identity\_user](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/me_identity_user) <br />- [ovh\_me\_identity\_group](https://registry.terraform.io/providers/ovh/ovh/latest/docs/resources/me_identity_group) |
| Groupes de ressources      | non disponible        |                                                                                                                                                                                                                                                 |

## Ressources

### Exemples d'utilisation de Terraform avec OVHcloud

- [Dépôt d'exemples Public Cloud sur GitHub](https://github.com/ovh/public-cloud-examples)
- [Créer un cluster Kubernetes avec Terraform](https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/managed-kubernetes/create-cluster.md)
- [Créer un registre privé (Harbor) avec Terraform](https://docs.ovhcloud.com/fr/guides/public-cloud/containers-orchestration/managed-private-registry/creation.md)
- [Utiliser l'Object Storage OVHcloud High Performance (S3) comme backend Terraform pour stocker votre état Terraform](https://docs.ovhcloud.com/fr/guides/public-cloud/compute/use-object-storage-terraform-backend-state.md)

### Provider OVH

- [Entrée du registre](https://registry.terraform.io/providers/ovh/ovh/latest)
- [Documentation](https://registry.terraform.io/providers/ovh/ovh/latest/docs)
- Code source sur [GitHub](https://github.com/ovh/terraform-provider-ovh) (les contributions sont bienvenues)
