Automate OVHcloud Connect with API, CLI, and Terraform
Discover how to manage OVHcloud Connect programmatically using the API, CLI, and Terraform
Objective
OVHcloud Connect can be managed programmatically using the OVHcloud API, command-line tools, and Terraform. Automation reduces manual errors, speeds up provisioning, and makes your infrastructure repeatable and version-controlled.
OVHcloud API
The OVHcloud API provides RESTful endpoints for all OVHcloud Connect operations: ordering, configuring, monitoring, and cancelling connections.
API Console: https://eu.api.ovh.com/console/?section=%2FovhCloudConnect&branch=v1
Key API endpoints
Getting started with the API
- Create API credentials — Go to https://eu.api.ovh.com/createToken/ and generate an Application Key, Application Secret, and Consumer Key.
- Choose an SDK — OVHcloud provides official API wrappers in multiple languages:
- Python: github.com/ovh/python-ovh
- Node.js: github.com/ovh/node-ovh
- Go: github.com/ovh/go-ovh
- PHP: github.com/ovh/php-ovh
- C#: github.com/ovh/csharp-ovh
- Make your first call — Example in Python:
Security tip: Never hard-code your API credentials. Use environment variables, a configuration file (ovh.conf), or a secrets manager (e.g. HashiCorp Vault, CI/CD secrets).
Command-Line Interface (CLI)
While there is no dedicated OVHcloud CLI binary for OVHcloud Connect, you can use the API wrappers in a scripting context or build lightweight CLI scripts using the SDKs above.
Example: a quick bash script using curl and the OVHcloud API signing mechanism:
In practice, using the Python or Node.js SDK is much simpler than manual signing.
Terraform
Terraform allows you to define your OVHcloud Connect infrastructure as code. This is ideal for repeatable deployments, version control, and collaboration.
OVHcloud Terraform Provider
- Terraform Registry: registry.terraform.io/providers/ovh/ovh
- GitHub: github.com/ovh/terraform-provider-ovh
Example Terraform configuration
Note: Resource names and attributes may change between provider versions. Always refer to the Terraform Registry documentation for the latest resource definitions.
Go further
For training or technical assistance implementing our solutions, contact your sales representative or visit our Professional Services page to request a quote and have your project analyzed by our experts.
Join our community of users.