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, and this page is available as Markdown at https://docs.us.ovhcloud.com/en/manage-and-operate/terraform/using-terraform-with-ovhcloud.md.
  • English

Using Terraform with OVHcloud

View as Markdown

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-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, 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:

 

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. The tables below are here to help.

Info
  • 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 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 conceptTerraform providerResource or Data Source
Dedicated Serverovh[data source] ovh_dedicated_server
Virtual Private Serverovhovh_vps
Veeam Cloud Connectnot available 
Logs Data Platformovhpartially available: - ovh_dbaas_logs_output_graylog_stream - ovh_dbaas_logs_input - [data source] ovh_dbaas_logs_input_engine

 

Hosted Private Cloud

Control Panel conceptTerraform providerResource or Data Source
VMware
  • not available for ordering
  • vSphere for management
see provider
Nutanix
  • not available for ordering
  • nutanix for management
see provider

 

Public Cloud

Compute

Control Panel conceptTerraform provider(s)Resource or Data Source
Instances (VM)openstackopenstack_compute_instance_v2

 

Storage and Backup

Control Panel conceptTerraform provider(s)Resource or Data Source
Block Storageopenstackblockstorage_volume_v3
Object Storage (Swift)openstackobjectstorage_object_v1
Object Storageovhcloud_project_storage
Object Storage usersovhovh_cloud_project_user with objectstore_operator role
Cloud Archiveopenstackobjectstorage_object_v1 with storage_policy set to “PCA” to create an “archive” swift container
Databasesovhcloud_project_database and cloud_project_database_database
Volume Snapshotopenstackopenstack_blockstorage_snapshot_v3
Volume Backupopenstack[data source] openstack_blockstorage_volume_v3
Instance Backupopenstackopenstack_images_image_v2

 

Network

Control Panel conceptTerraform provider(s)Resource or Data Source
Private network (vRack)ovh & openstack
Load Balanceropenstackopenstack_lb_loadbalancer_v2
Public IPs - Floating IPsopenstackopenstack_networking_floatingip_v2
Public IPs - Additional IPsovhovh_ip_service
Gatewayopenstackopenstack_networking_router_v2

 

Containers & Orchestration

Control Panel conceptTerraform provider(s)Resource or Data Source
Managed Kubernetes Service - Cluster operationsovhovh_cloud_project_kube
Managed Kubernetes Service - Application deployment operationsHashicorp Kuberneteskubernetes_namespace kubernetes_deployment
Kubernetes Load BalancerHashicorp Kuberneteskubernetes_service as described in this tutorial
Managed Private Registryovhovh_cloud_project_containerregistry ovh_cloud_project_containerregistry_user
Workflow Managementovhcloud_project_workflow_backup

 

AI & Machine Learning

Control Panel conceptTerraform provider(s)Resource or Data Source
AI Notebooksnot available but ovhai CLI can help for automation 
AI Trainingnot available but ovhai CLI can help for automation 
AI Deploynot available but ovhai CLI can help for automation 

 

Data & Analytics

Control Panel conceptTerraform provider(s)Resource or Data Source
Logs Data Platform ovhpartially available: - ovh_dbaas_logs_output_graylog_stream - ovh_dbaas_logs_input - ovh_dbaas_logs_cluster - [data source] ovh_dbaas_logs_input_engine

 

Settings

Control Panel conceptTerraform provider(s)Resource or Data Source
Users & Rolesovhovh_cloud_project_user
Quotas & Regionsnot available 
SSH keysovh & openstackIf you use the openstack provider for compute, you will need to use openstack_compute_keypair_v2 to manage the SSH keys
Project Settingsovhovh_cloud_project

 

Network

Control Panel conceptTerraform provider(s)Resource or Data Source
vRack private networkovhovh_vrack
Public IP Addresses - Additional IPsovhovh_ip_service
OVHcloud Connectovhovh_ovhcloud_connect
Load Balancerovhovh_iploadbalancing

 

My account

My profile

Control Panel conceptTerraform provider(s)Resource or Data Source
Profileovh[data source] ovh_me
Payment methodovh

 

Identity and Access Management (IAM)

Control Panel conceptTerraform provider(s)Resource or Data Source
Policiesovhovh_iam_policy
Identitiesovh
Resource groupsovhovh_iam_resource_group

 

Resources

Terraform with OVHcloud examples

 

OVH Provider

 

Go further

Browse the rest of the OVHcloud US documentation 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.