OVHcloud Terraform


OVHcloud Terraform

Open Source


The official Terraform/OpenTofu provider for managing your OVHcloud resources “as code”. Version your infrastructure, integrate it into your CI/CD pipelines, and ensure the reliability of your deployments.

Benefits

Terraform/OpenTofu is an Infrastructure-as-Code tool that allows you to describe what you want your infrastructure to look like in files. The OVHcloud provider connects Terraform to OVHcloud APIs to automatically create, edit, and delete your resources.

Icons/concept/todoList Created with Sketch.

Declarative resource management

Describe your Public Cloud projects, instances, networks, databases, domains, and load balancers in Terraform files. The solution calculates and applies the changes from the current state to the desired state.

CI/CD integration and collaboration

Version your Terraform/OpenTofu files in Git, validate execution plans in code review, and deploy from your CI/CD pipelines. This way, your OVHcloud environments can be replicated, reviewed, and audited.

Compatibility with the Terraform ecosystem

OVHcloud provider integrates seamlessly with other Terraform providers. You can build your multicloud or hybrid stacks with the same processes and tools.

OVHcloud specifications

An OVHcloud-managed provider designed to gradually cover the full range of services.

Coverage of OVHcloud services

Terraform intends to cover a wide range of OVHcloud APIs: Public Cloud (projects, instances, networks, storage, Kubernetes), domain names and DNS, vRack, Load Balancer, security, KMS, and more.

Ongoing development

Terraform is actively maintained through regular updates, available in its registry. OVHcloud is gradually making its new features accessible by adding new resources and options to Terraform.

Mapping services/resources/data sources

Increased support for OVHcloud products through service-specific commands.
“Yes” = full coverage, “Partial” = coverage is currently being enhanced.

Installation only takes a few seconds, and OVHcloud actively maintains Terraform to gradually support its entire range of services.

Categoryresource "ovh_*data "ovh_*" Coverage
Public Cloud: project, users, region, alerts, regional network, pre-signatureovh_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_policyovh_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_projectsYes
Public Cloud: Compute (instance, volume, snapshot, SSH, failover IP)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_backupovh_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_volumesYes
Public Cloud: Network (Load Balancer, Gateway, private network, subnets, LB logs, vRack project)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_subscriptionovh_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_vrackYes
Public Cloud: containers (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_rancherovh_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_versionYes
Public Cloud: Cloud Databasesovh_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_userovh_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_databasesYes
Public Cloud: Object Storage and lifecycleovh_cloud_project_file_storage_share, ovh_cloud_project_storage, ovh_cloud_project_storage_object_bucket_lifecycle_configuration, ovh_cloud_project_storage_replication_jobovh_cloud_project_storage, ovh_cloud_project_storage_object, ovh_cloud_project_storage_object_bucket_lifecycle_configuration, ovh_cloud_project_storage_objects, ovh_cloud_project_storagesYes
Public Cloud: workflow backupovh_cloud_project_workflow_backupYes
Logs Data Platformovh_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_tokenovh_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_indexYes
Bare Metal: dedicated server, Ceph, HA-NAS, 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_updateovh_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_serversYes
Enterprise File Storageovh_storage_efs, ovh_storage_efs_share, ovh_storage_efs_share_acl, ovh_storage_efs_share_snapshotovh_storage_efs, ovh_storage_efs_share_access_path, ovh_storage_efs_share_access_pathsYes
VPSovh_vpsovh_vps, ovh_vpssYes
vRack and vRack Servicesovh_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_vrackservicesovh_vracks, ovh_vrackservices, ovh_vrackservicessPartial
IP Addresses (service, reverse, transfer, firewall, mitigation)ovh_ip_firewall, ovh_ip_firewall_rule, ovh_ip_mitigation, ovh_ip_move, ovh_ip_reverse, ovh_ip_serviceovh_ip_firewall, ovh_ip_firewall_rule, ovh_ip_mitigation, ovh_ip_servicePartial
Load balancing IPovh_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_networkovh_iploadbalancing, ovh_iploadbalancing_nat_ips, ovh_iploadbalancing_vrack_network, ovh_iploadbalancing_vrack_networks, ovh_iploadbalancingsPartial
OVHcloud Connectovh_ovhcloud_connect_pop_config, ovh_ovhcloud_connect_pop_datacenter_config, ovh_ovhcloud_connect_pop_datacenter_extra_configovh_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_connectsPartial
VMware Cloud Director (data)ovh_vmware_cloud_director_backup, ovh_vmware_cloud_director_organizationPartial
IAMovh_iam_permissions_group, ovh_iam_policy, ovh_iam_resource_group, ovh_iam_resource_tagsovh_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_groupsPartial
Account: identity, OAuth2 API, payment methods (data)ovh_me_api_oauth2_client, ovh_me_identity_group, ovh_me_identity_user, ovh_me_identity_user_tokenovh_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_creditcardPartial
KMSovh_okms, ovh_okms_credential, ovh_okms_secret, ovh_okms_service_key, ovh_okms_service_key_jwkovh_okms_credential, ovh_okms_resource, ovh_okms_secret, ovh_okms_service_key, ovh_okms_service_key_jwk, ovh_okms_service_key_pemYes
Savings Planovh_savings_planYes
DNS and domain namesovh_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_redirectionovh_domain_zone, ovh_domain_zone_dnssec, ovh_domain_zone_record, ovh_domain_zone_recordsPartial
Web Cloud Private SQLovh_hosting_privatedatabase, ovh_hosting_privatedatabase_database, ovh_hosting_privatedatabase_user, ovh_hosting_privatedatabase_user_grant, ovh_hosting_privatedatabase_whitelistovh_hosting_privatedatabase, ovh_hosting_privatedatabase_database, ovh_hosting_privatedatabase_user, ovh_hosting_privatedatabase_user_grant, ovh_hosting_privatedatabase_whitelistPartial
Cart/order and location (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_planPartial

Manage OVHcloud “as Code” using Terraform

Industrialise your deployments, lock down your changes, and provide all your teams with a consistent description of your OVHcloud infrastructure.

Your questions answered

What is OVHcloud Terraform?

This is a Terraform component you can use to call OVHcloud APIs. It lets you manage your OVHcloud services (Public Cloud, network, and domains) as code by exposing their resources and data.

What version of Terraform is required?

The provider is compatible with Terraform 0.12. and later versions. To access the most recent features, it’s recommended to use an up-to-date Terraform version, and the provider’s latest version available in the Terraform registry.

How do I log in (authenticate) with OVHcloud?

You can use OVHcloud API credentials (endpoint, application key, application secret, and consumer key), provided as environment variables or configuration files, to sign in. GitHub repository readme details the steps for generating these credentials.
Terraform is also supported by OVHcloud OAuth2 credentials.

Where can I find all the examples?

The GitHub repository "terraform-provider-ovh" contains a folder "examples/" with full configurations for various OVHcloud products. The Terraform registry documentation also provides examples by resource.
You’ll also find other examples at https://github.com/ovh/public-cloud-examples

Is OVHcloud Terraform compatible with OpenTofu?

Yes, OVHcloud Terraform is compatible with OpenTofu.