Skip to main content

OVHcloud Integration

Connect your OVHcloud account to Viio to bring in your cloud spend. Viio reads a FOCUS cost export that OVHcloud writes to your own Object Storage bucket, and writes nothing back to your account.

Z
Written by Zhenya Shumel

Capabilities

✅ Cloud cost

Your OVHcloud bill line by line, in the FOCUS 1.3 format

Prerequisites

  • OVHcloud's FOCUS export is in beta. Only the EU and CA OVHcloud APIs offer it, so accounts on OVHcloud US can't use it yet

  • Your account needs at least one Public Cloud project. The export currently covers Public Cloud usage only

  • You can only create the export through the OVHcloud API for now. OVHcloud plans to add a Control Panel screen for it

  • You need an Object Storage bucket in an OVHcloud Public Cloud project, and permission to create S3 users in that project

Setup

  1. Create a bucket for the export, or pick an existing one. In the Control Panel open Public Cloud → your project → Object Storage. Note the bucket name and its region, for example gra or eu-west-par.

  2. Create two S3 users under Object Storage → S3 users, and generate S3 credentials for each:

    1. A writer that OVHcloud uses to deliver the export. Give it read and write access to the bucket

    2. A reader for Viio. Import this policy for it, with your bucket name and path prefix in place of the examples:

    {
    "Statement": [
    {
    "Sid": "ListExport",
    "Effect": "Allow",
    "Action": ["s3:ListBucket"],
    "Resource": ["arn:aws:s3:::my-cost-bucket"]
    },
    {
    "Sid": "ReadExport",
    "Effect": "Allow",
    "Action": ["s3:GetObject"],
    "Resource": ["arn:aws:s3:::my-cost-bucket/cost/focus/*"]
    }
    ]
    }

    Keep the two users separate. The key you give Viio then can't change or delete anything in the bucket.

  3. Create the FOCUS export. Open the EU or CA OVHcloud API console, log in, and call POST /v2/finops/bucketExport with the writer's keys:

    {
    "targetSpec": {
    "period": "HOURLY",
    "exportHour": 0,
    "filePolicy": "CREATE",
    "bucketConfiguration": {
    "bucketName": "my-cost-bucket",
    "region": "gra",
    "endpointURL": "s3.gra.io.cloud.ovh.net",
    "pathPrefix": "cost/focus",
    "accessKey": "<writer access key>",
    "secretKey": "<writer secret key>"
    }
    }
    }
    • Set period to HOURLY. OVHcloud never rewrites a month after it ends, so a daily export can leave up to a day of each month out

    • The API requires exportHour but ignores it for hourly exports

    • With filePolicy set to CREATE, OVHcloud writes a new file on every run. REPLACE overwrites one file per month, which keeps the bucket small. Viio reads either

    • Set endpointURL to the bucket's S3 host without https://, which is s3.<region>.io.cloud.ovh.net

    Each run writes the current month to date. With CREATE the file lands at cost/focus/<your NIC handle>/YYYY/MM/DD/HH/focus.csv, and with REPLACE at cost/focus/<your NIC handle>/YYYY/MM/focus.csv.

    The export starts from the month you create it. OVHcloud can't fill in earlier months.

  4. Configure the integration in Viio:

    1. Open Viio → Integrations and choose OVHcloud → Connect

    2. Enter the five values below, then click Continue, add a name, and click Save

      • Region is the bucket's region, for example gra

      • Bucket is the bucket name only, with no path, for example my-cost-bucket

      • Export path is the path prefix followed by your NIC handle, for example cost/focus/ab12345-ovh. It is the folder that holds the year folders

      • Access key ID and Secret access key are the reader's S3 credentials, not the writer's

      Before it saves, Viio checks that it can find and read an export file. If you just created the export, wait for the first file to appear in the bucket.

  5. Initial sync:

    1. Viio reads every month already in the export path, taking the newest file for each month

    2. After that, Viio picks up each new file and replaces that month's figures with the ones in it

Troubleshooting & FAQ

Symptom

Quick fix

Viio says it found no export file.

Open the bucket and check that a focus.csv exists under the export path you entered. The export path must include your NIC handle and stop before the year folder. If the bucket is empty, call GET /v2/finops/bucketExport/{id}/event in the API console to see the export's status.

I get an access key or permission error.

Check that you entered the reader's keys and that the region matches the bucket's region. Then check the reader's policy. The bucket name must match, and the s3:GetObject resource must cover the export path, including the /* at the end.

Why don't I see months before I set this up?

OVHcloud's export starts from the month you create it and does no backfill.

Last month's total is a little lower than my invoice.

OVHcloud stops writing a month once it ends. Usage after the month's last run, and any adjustment OVHcloud makes later, never reach the export. With an hourly export the gap is about an hour.

Some OVHcloud services are missing.

The beta export covers Public Cloud only, and Viio shows only what is in the file.

What does Viio see in my account?

Only the files under the export path in the bucket you name, through the read-only user you created. Viio has no access to your OVHcloud API and never writes to your bucket.

Can I connect more than one OVHcloud account?

Yes. Add one integration for each NIC handle. Don't connect the same export twice, or Viio counts its cost twice.

Technical details

  • Authentication. Viio connects to s3.<region>.io.cloud.ovh.net with the S3 access key you provide and stores the secret key encrypted. To revoke access, delete the reader user or its credentials.

  • Discovery. Viio lists the focus.csv files under the export path and keeps the most recently written one for each month. It reads a month only when that file's ETag differs from the one it recorded on the last successful sync.

  • Reading. Viio streams the CSV and pins the read to the file's ETag. If OVHcloud overwrites the file during the read, Viio drops that read and picks up the new file on the next sync, so a month never mixes two versions. Money and quantity columns keep the exact strings OVHcloud wrote. A blank cell arrives as no value, and Viio keeps columns outside the FOCUS specification alongside the row.

Additional resources

Did this answer your question?