Provider Terraform OVHcloud
Provider Terraform OVHcloud
Le provider officiel Terraform/OpenTofu pour gérer vos ressources OVHcloud « as Code ». Versionnez votre infrastructure, intégrez-la dans vos pipelines CI/CD et fiabilisez vos déploiements.
Avantages et bénéfices
Terraform/OpenTofu est un outil d’Infrastructure as Code qui permet de décrire l’état souhaité de votre infrastructure dans des fichiers. Le provider OVHcloud relie Terraform aux API OVHcloud pour créer, modifier et supprimer vos ressources automatiquement.
Gestion déclarative des ressources
Décrivez vos projets Public Cloud, instances, réseaux, bases de données, domaines, load balancers dans des fichiers Terraform. La solution se charge de calculer et d’appliquer les différences entre l’état actuel et l’état souhaité.
Intégration CI/CD et collaboration
Versionnez vos fichiers Terraform/OpenTofu dans Git, validez les plans d’exécution en revue de code et déployez depuis vos pipelines CI/CD. Vos environnements OVHcloud deviennent ainsi reproductibles, révisables et audités.
Alignement avec l’écosystème Terraform
Le provider OVHcloud s’intègre naturellement avec les autres providers Terraform. Vous pouvez composer vos stacks multicloud ou hybrides, tout en utilisant les mêmes workflows et les mêmes outils.
Spécificités OVHcloud
Un provider maintenu par OVHcloud pour couvrir progressivement l’ensemble du portefeuille de services.
Couverture des services OVHcloud
Le provider vise une large couverture des API OVHcloud : Public Cloud (projets, instances, réseaux, stockage, Kubernetes), noms de domaine et DNS, vRack, Répartiteur de charge, sécurité, KMS et plus encore.
Évolution continue
Le provider est activement maintenu, avec des mises à jour régulières sur le registry Terraform. Les nouvelles fonctionnalités OVHcloud sont progressivement exposées via de nouvelles ressources et options dans le provider.
Cartographie services/ressources/sources de données
Couverture croissante des produits OVHcloud avec des commandes dédiées.
« Oui » = couverture complète, « Partiellement » = couverture en cours d’enrichissement.
Installable en quelques secondes, le provider Terraform est maintenu par OVHcloud pour couvrir progressivement l’ensemble du portefeuille de services.
| Catégorie | resource "ovh_* | data "ovh_*" | Couverture |
| Public Cloud : projet, utilisateurs, région, alertes, réseau régional, pré-signature | ovh_cloud_project, ovh_cloud_project_alerting, ovh_cloud_project_region, ovh_cloud_project_region_network, ovh_cloud_project_region_storage_presign, ovh_cloud_project_user, ovh_cloud_project_user_s3_credential, ovh_cloud_project_user_s3_policy | ovh_cloud_project, ovh_cloud_project_region, ovh_cloud_project_regions, ovh_cloud_project_user, ovh_cloud_project_user_s3_credential, ovh_cloud_project_user_s3_credentials, ovh_cloud_project_user_s3_policy, ovh_cloud_project_users, ovh_cloud_projects | Oui |
| Public Cloud : Compute (instance, volume, snapshot, SSH, IP fail-over) | ovh_cloud_project_failover_ip_attach, ovh_cloud_project_instance, ovh_cloud_project_instance_snapshot, ovh_cloud_project_ssh_key, ovh_cloud_project_volume, ovh_cloud_project_volume_backup | ovh_cloud_project_failover_ip_attach, ovh_cloud_project_flavor, ovh_cloud_project_flavors, ovh_cloud_project_floatingips, ovh_cloud_project_image, ovh_cloud_project_images, ovh_cloud_project_instance, ovh_cloud_project_instances, ovh_cloud_project_ssh_key, ovh_cloud_project_ssh_keys, ovh_cloud_project_volume, ovh_cloud_project_volumes | Oui |
| Public Cloud : Network (Répartiteur de charge, Gateway, réseau privé, sous-réseaux, logs LB, projet vRack) | ovh_cloud_project_gateway, ovh_cloud_project_gateway_interface, ovh_cloud_project_loadbalancer, ovh_cloud_project_network_private, ovh_cloud_project_network_private_subnet, ovh_cloud_project_network_private_subnet_v2, ovh_cloud_project_region_loadbalancer_log_subscription | ovh_cloud_project_gateway, ovh_cloud_project_gateway_interface, ovh_cloud_project_loadbalancer, ovh_cloud_project_loadbalancer_flavors, ovh_cloud_project_loadbalancers, ovh_cloud_project_network_private, ovh_cloud_project_network_private_subnets, ovh_cloud_project_network_privates, ovh_cloud_project_region_loadbalancer_log_subscription, ovh_cloud_project_region_loadbalancer_log_subscriptions, ovh_cloud_project_vrack | Oui |
| Public Cloud : conteneurs (Kubernetes, Rancher, Container Registry) | ovh_cloud_project_containerregistry, ovh_cloud_project_containerregistry_iam, ovh_cloud_project_containerregistry_ip_restrictions_management, ovh_cloud_project_containerregistry_ip_restrictions_registry, ovh_cloud_project_containerregistry_oidc, ovh_cloud_project_containerregistry_user, ovh_cloud_project_kube, ovh_cloud_project_kube_iprestrictions, ovh_cloud_project_kube_nodepool, ovh_cloud_project_kube_oidc, ovh_cloud_project_rancher | ovh_cloud_project_capabilities_containerregistry, ovh_cloud_project_capabilities_containerregistry_filter, ovh_cloud_project_containerregistries, ovh_cloud_project_containerregistry, ovh_cloud_project_containerregistry_ip_restrictions_management, ovh_cloud_project_containerregistry_ip_restrictions_registry, ovh_cloud_project_containerregistry_oidc, ovh_cloud_project_containerregistry_users, ovh_cloud_project_kube, ovh_cloud_project_kube_iprestrictions, ovh_cloud_project_kube_nodepool, ovh_cloud_project_kube_nodepool_nodes, ovh_cloud_project_kube_nodes, ovh_cloud_project_kube_oidc, ovh_cloud_project_rancher, ovh_cloud_project_rancher_capabilities_plan, ovh_cloud_project_rancher_capabilities_version, ovh_cloud_project_rancher_plan, ovh_cloud_project_rancher_version | Oui |
| Public Cloud : Cloud Databases | ovh_cloud_project_database, ovh_cloud_project_database_clickhouse_user, ovh_cloud_project_database_database, ovh_cloud_project_database_integration, ovh_cloud_project_database_ip_restriction, ovh_cloud_project_database_kafka_acl, ovh_cloud_project_database_kafka_schemaregistryacl, ovh_cloud_project_database_kafka_topic, ovh_cloud_project_database_log_subscription, ovh_cloud_project_database_m3db_namespace, ovh_cloud_project_database_m3db_user, ovh_cloud_project_database_mongodb_prometheus, ovh_cloud_project_database_mongodb_user, ovh_cloud_project_database_opensearch_pattern, ovh_cloud_project_database_opensearch_user, ovh_cloud_project_database_postgresql_connection_pool, ovh_cloud_project_database_postgresql_user, ovh_cloud_project_database_prometheus, ovh_cloud_project_database_redis_user, ovh_cloud_project_database_user, ovh_cloud_project_database_valkey_user | ovh_cloud_project_database, ovh_cloud_project_database_capabilities, ovh_cloud_project_database_certificates, ovh_cloud_project_database_clickhouse_user, ovh_cloud_project_database_database, ovh_cloud_project_database_databases, ovh_cloud_project_database_integration, ovh_cloud_project_database_integrations, ovh_cloud_project_database_ip_restrictions, ovh_cloud_project_database_kafka_acl, ovh_cloud_project_database_kafka_acls, ovh_cloud_project_database_kafka_schemaregistryacl, ovh_cloud_project_database_kafka_schemaregistryacls, ovh_cloud_project_database_kafka_topic, ovh_cloud_project_database_kafka_topics, ovh_cloud_project_database_kafka_user_access, ovh_cloud_project_database_log_subscription, ovh_cloud_project_database_log_subscriptions, ovh_cloud_project_database_m3db_namespace, ovh_cloud_project_database_m3db_namespaces, ovh_cloud_project_database_m3db_user, ovh_cloud_project_database_mongodb_prometheus, ovh_cloud_project_database_mongodb_user, ovh_cloud_project_database_opensearch_pattern, ovh_cloud_project_database_opensearch_patterns, ovh_cloud_project_database_opensearch_user, ovh_cloud_project_database_postgresql_connection_pool, ovh_cloud_project_database_postgresql_connection_pools, ovh_cloud_project_database_postgresql_user, ovh_cloud_project_database_prometheus, ovh_cloud_project_database_redis_user, ovh_cloud_project_database_user, ovh_cloud_project_database_users, ovh_cloud_project_database_valkey_user, ovh_cloud_project_databases | Oui |
| Public Cloud : Object Storage et lifecycle | ovh_cloud_project_file_storage_share, ovh_cloud_project_storage, ovh_cloud_project_storage_object_bucket_lifecycle_configuration, ovh_cloud_project_storage_replication_job | ovh_cloud_project_storage, ovh_cloud_project_storage_object, ovh_cloud_project_storage_object_bucket_lifecycle_configuration, ovh_cloud_project_storage_objects, ovh_cloud_project_storages | Oui |
| Public Cloud : workflow backup | ovh_cloud_project_workflow_backup | — | Oui |
| Logs Data Platform | ovh_dbaas_logs_cluster, ovh_dbaas_logs_input, ovh_dbaas_logs_output_graylog_stream, ovh_dbaas_logs_output_opensearch_alias, ovh_dbaas_logs_output_opensearch_index, ovh_dbaas_logs_role, ovh_dbaas_logs_role_permission_stream, ovh_dbaas_logs_token | ovh_dbaas_logs_cluster, ovh_dbaas_logs_cluster_retention, ovh_dbaas_logs_clusters, ovh_dbaas_logs_input_engine, ovh_dbaas_logs_output_graylog_stream, ovh_dbaas_logs_output_graylog_stream_url, ovh_dbaas_logs_output_opensearch_index | Oui |
| Bare Metal : serveur dédié, Ceph, NAS-HA, Private Cloud (data) | ovh_dedicated_ceph_acl, ovh_dedicated_nasha_partition, ovh_dedicated_nasha_partition_access, ovh_dedicated_nasha_partition_snapshot, ovh_dedicated_server, ovh_dedicated_server_reboot_task, ovh_dedicated_server_reinstall_task, ovh_dedicated_server_update | ovh_dedicated_ceph, ovh_dedicated_cloud, ovh_dedicated_installation_template, ovh_dedicated_installation_templates, ovh_dedicated_nasha, ovh_dedicated_nasha_partition, ovh_dedicated_server, ovh_dedicated_server_boots, ovh_dedicated_server_orderable_bandwidth, ovh_dedicated_server_orderable_bandwidth_vrack, ovh_dedicated_server_specifications_hardware, ovh_dedicated_server_specifications_network, ovh_dedicated_servers | Oui |
| Enterprise File Storage | ovh_storage_efs, ovh_storage_efs_share, ovh_storage_efs_share_acl, ovh_storage_efs_share_snapshot | ovh_storage_efs, ovh_storage_efs_share_access_path, ovh_storage_efs_share_access_paths | Oui |
| VPS | ovh_vps | ovh_vps, ovh_vpss | Oui |
| vRack et vRack Services | ovh_vrack, ovh_vrack_cloudproject, ovh_vrack_dedicated_cloud, ovh_vrack_dedicated_cloud_datacenter, ovh_vrack_dedicated_server, ovh_vrack_dedicated_server_interface, ovh_vrack_ip, ovh_vrack_iploadbalancing, ovh_vrack_ipv6, ovh_vrack_ipv6_routed_subrange, ovh_vrack_ovhcloudconnect, ovh_vrack_vrackservices, ovh_vrackservices | ovh_vracks, ovh_vrackservices, ovh_vrackservicess | Partiel |
| Adresses IP (service, reverse, transfert, pare-feu, mitigation) | ovh_ip_firewall, ovh_ip_firewall_rule, ovh_ip_mitigation, ovh_ip_move, ovh_ip_reverse, ovh_ip_service | ovh_ip_firewall, ovh_ip_firewall_rule, ovh_ip_mitigation, ovh_ip_service | Partiel |
| IP Répartiteur de charge | ovh_iploadbalancing, ovh_iploadbalancing_http_farm, ovh_iploadbalancing_http_farm_server, ovh_iploadbalancing_http_frontend, ovh_iploadbalancing_http_route, ovh_iploadbalancing_http_route_rule, ovh_iploadbalancing_refresh, ovh_iploadbalancing_ssl, ovh_iploadbalancing_tcp_farm, ovh_iploadbalancing_tcp_farm_server, ovh_iploadbalancing_tcp_frontend, ovh_iploadbalancing_tcp_route, ovh_iploadbalancing_tcp_route_rule, ovh_iploadbalancing_udp_farm, ovh_iploadbalancing_udp_farm_server, ovh_iploadbalancing_udp_frontend, ovh_iploadbalancing_vrack_network | ovh_iploadbalancing, ovh_iploadbalancing_nat_ips, ovh_iploadbalancing_vrack_network, ovh_iploadbalancing_vrack_networks, ovh_iploadbalancings | Partiel |
| OVHcloud Connect | ovh_ovhcloud_connect_pop_config, ovh_ovhcloud_connect_pop_datacenter_config, ovh_ovhcloud_connect_pop_datacenter_extra_config | ovh_ovhcloud_connect, ovh_ovhcloud_connect_config_pop_datacenter_extras, ovh_ovhcloud_connect_config_pop_datacenters, ovh_ovhcloud_connect_config_pops, ovh_ovhcloud_connect_datacenters, ovh_ovhcloud_connects | Partiel |
| VMware Cloud Director (data) | — | ovh_vmware_cloud_director_backup, ovh_vmware_cloud_director_organization | Partiel |
| IAM | ovh_iam_permissions_group, ovh_iam_policy, ovh_iam_resource_group, ovh_iam_resource_tags | ovh_iam_permissions_group, ovh_iam_permissions_groups, ovh_iam_policies, ovh_iam_policy, ovh_iam_reference_actions, ovh_iam_reference_resource_type, ovh_iam_resource_group, ovh_iam_resource_groups | Partiel |
| Compte : identité, OAuth2 API, moyens de paiement (data) | ovh_me_api_oauth2_client, ovh_me_identity_group, ovh_me_identity_user, ovh_me_identity_user_token | ovh_me, ovh_me_api_oauth2_client, ovh_me_api_oauth2_clients, ovh_me_identity_group, ovh_me_identity_groups, ovh_me_identity_user, ovh_me_identity_users, ovh_me_paymentmean_bankaccount, ovh_me_paymentmean_creditcard | Partiel |
| KMS | ovh_okms, ovh_okms_credential, ovh_okms_secret, ovh_okms_service_key, ovh_okms_service_key_jwk | ovh_okms_credential, ovh_okms_resource, ovh_okms_secret, ovh_okms_service_key, ovh_okms_service_key_jwk, ovh_okms_service_key_pem | Oui |
| Savings Plan | ovh_savings_plan | — | Oui |
| Noms de domaine et DNS | ovh_domain_ds_records, ovh_domain_name, ovh_domain_name_servers, ovh_domain_zone, ovh_domain_zone_dnssec, ovh_domain_zone_dynhost_login, ovh_domain_zone_dynhost_record, ovh_domain_zone_import, ovh_domain_zone_record, ovh_domain_zone_redirection | ovh_domain_zone, ovh_domain_zone_dnssec, ovh_domain_zone_record, ovh_domain_zone_records | Partiel |
| WebCloud SQL Privé | ovh_hosting_privatedatabase, ovh_hosting_privatedatabase_database, ovh_hosting_privatedatabase_user, ovh_hosting_privatedatabase_user_grant, ovh_hosting_privatedatabase_whitelist | ovh_hosting_privatedatabase, ovh_hosting_privatedatabase_database, ovh_hosting_privatedatabase_user, ovh_hosting_privatedatabase_user_grant, ovh_hosting_privatedatabase_whitelist | Partiel |
| Panier/commande et localisation (data) | — | ovh_location, ovh_order_cart, ovh_order_cart_product, ovh_order_cart_product_options, ovh_order_cart_product_options_plan, ovh_order_cart_product_plan | Partiel |
Ces produits peuvent également vous intéresser
Gérez OVHcloud « as Code » avec Terraform
Industrialisez vos déploiements, sécurisez vos changements et alignez vos équipes autour d’une description unique de votre infrastructure OVHcloud.
Les questions que vous vous posez
Qu’est-ce que le provider Terraform OVHcloud ?
C’est le composant Terraform qui permet à la solution d’appeler les API OVHcloud. Il expose des ressources et des sources de données représentant vos services OVHcloud (Public Cloud, réseau, domaines, etc.) afin de les gérer comme du code.
Quelle version de Terraform est requise ?
Le provider est compatible avec les versions Terraform 0.12.x et suivantes. Pour profiter des dernières fonctionnalités, nous vous recommandons d’utiliser une version récente de Terraform ainsi que la dernière version du provider publiée sur le registry Terraform.
Comment s’authentifier auprès d’OVHcloud ?
L’authentification s’effectue via les identifiants API OVHcloud (endpoint, application key, application secret, consumer key) fournis sous forme de variables d’environnement ou de fichiers de configuration. Le read me du dépôt GitHub détaille la procédure pour générer ces identifiants.
Le provider Terraform est également compatible avec les identifiants OAuth2 OVHcloud.
Où trouver des exemples complets ?
Le dépôt GitHub « terraform-provider-ovh » contient un dossier « examples/ » avec des configurations complètes pour différents produits OVHcloud. La documentation du registry Terraform fournit également des exemples par ressource.
D'autres exemples aussi sur https://github.com/ovh/public-cloud-examples
Le provider Terraform OVHcloud est-il compatible avec OpenTofu ?
Oui, le provider Terraform OVHcloud est compatible avec OpenTofu.


