OVHcloud

The OVH plugin enables formae to manage OVH Public Cloud resources using the OpenStack APIs via gophercloud.

Configuration

Target

Configure an OVH target in your Forma file:

import "@formae/formae.pkl"
import "@ovh/ovh.pkl"

target: formae.Target = new formae.Target {
    label = "ovh-target"
    config = new ovh.Config {
        authURL = "https://auth.cloud.ovh.net/v3"  // EU regions
        // authURL = "https://auth.cloud.ovh.us/v3"  // US regions
        region = "GRA7"
    }
}

Supported Regions:

Region Location
BHS5 Beauharnois, Canada
DE1 Frankfurt, Germany
GRA7, GRA9 Gravelines, France
SBG5 Strasbourg, France
UK1 London, UK
WAW1 Warsaw, Poland
US-EAST-VA-1 Virginia, USA

Credentials

The plugin uses OpenStack environment variables for authentication. Credentials are never stored in the target config.

Required Environment Variables:

export OS_USERNAME="your-openstack-username"
export OS_PASSWORD="your-openstack-password"
export OS_PROJECT_ID="your-project-id"
export OS_USER_DOMAIN_NAME="Default"  # Optional, defaults to "Default"

Getting Credentials from OVH:

  1. Go to the OVH Control Panel
  2. Navigate to Public Cloud > Project > Users & Roles
  3. Create a new user or use an existing one
  4. Download the OpenStack RC file or note the credentials

Examples

Examples are bundled with formae at /opt/pel/formae/examples/formae-plugin-ovh/.

Before running any example, resolve the Pkl dependencies:

pkl project resolve /opt/pel/formae/examples/formae-plugin-ovh

Available examples:

Example Description
lifeline Network, subnet, router, floating IP, and security groups

The lifeline example creates foundational infrastructure equivalent to: - Network (VPC in AWS) - Subnet with DHCP - Router with external gateway (Internet Gateway + Route Table in AWS) - Floating IP (Elastic IP in AWS) - Security groups for web and SSH access

# Evaluate an example
formae eval /opt/pel/formae/examples/formae-plugin-ovh/lifeline/basic_infrastructure.pkl

# Apply resources
formae apply --mode reconcile --watch /opt/pel/formae/examples/formae-plugin-ovh/lifeline/basic_infrastructure.pkl

Supported Resources

Type Discoverable Extractable Comment
OVH::Compute::Instance
OVH::Compute::Keypair
OVH::Network::FloatingIP
OVH::Network::Network
OVH::Network::Port
OVH::Network::Router
OVH::Network::SecurityGroup
OVH::Network::SecurityGroupRule
OVH::Network::Subnet
OVH::Volume::Volume