Objective
Enterprise File Storage is a storage solution that allows you to provision NFS volumes that are fully managed by OVHcloud. Terraform is an infrastructure-as-code tool that automates resource provisioning.
In this guide, you will learn how to use OVHcloud Terraform provider to manage your EFS solution volumes, snapshots and more.
Info
In this guide, a volume is also called share as in the OVHcloud API.
Learn how manage your EFS service using Terraform.
Requirements
OVHcloud Control Panel Access
Instructions
Generate API credentials
The OVHcloud Teraform Provider needs to be configured with an API token to be able to make calls to the OVHcloud API.
The API token information is needed because the OVHcloud Terraform Provider is making requests to the OVHcloud API in the backend.
Your API token will need to have the following rights:
- GET
/storage/netapp/*
- POST
/storage/netapp/*
- PUT
/storage/netapp/*
- DELETE
/storage/netapp/*
If you plan to order a service using Terraform (see Order a service), you will also need the following rights:
- GET
/order/cart/*
- POST
/order/cart/*
- GET
/me
- GET
/me/*
- GET
/me/order/*
- POST
/me/order/*
Follow the First steps with the OVHcloud APIs guide to generate your API token.
Once your token is generated, save its information for later use with the OVHcloud Terraform provider.
Get your service ID
The ID of your Enterprise File Storage service can be obtained via the OVHcloud API or the OVHcloud Control Panel.
- API method: Call
GET /storage/netapp.
Create a provider.tf file defining the OVHcloud provider configuration:
terraform {
required_providers {
ovh = {
source = "ovh/ovh"
version = "2.5.0"
}
}
required_version = ">= 0.17.1"
}
provider "ovh" {
endpoint = var.ovh.endpoint
application_key = var.ovh.application_key
application_secret = var.ovh.application_secret
consumer_key = var.ovh.consumer_key
}
Then create a variables.tf file definining the variables that will be used inside your .tf files:
variable "ovh" {
type = map(string)
default = {
endpoint = "ovh-eu"
application_key = ""
application_secret = ""
consumer_key = ""
}
}
Info
About the ovh.endpoint variable: by default, ovh-eu is defined because we are making calls to the OVHcloud Europe API.
Other endpoints exists, depending on your needs:
ovh-eu for OVHcloud Europe API
ovh-ca for OVHcloud America/Asia API
Finally, create a secrets.tfvars file containing the required variable values:
Warning
Don't forget to replace <application_key>, <application_secret> and <consumer_key> with your API token information obtained previously.
ovh = {
endpoint = "ovh-eu"
application_key = "<application_key>"
application_secret = "<application_secret>"
consumer_key = "<consumer_key>"
}
Now you need to initiliaze Terraform:
The init command will initialize your working directory which contains .tf configuration files.
It’s the first command to execute for a new configuration, or after doing a checkout of an existing configuration in a given git repository for example.
The init command will download the necessary providers and initialize the backend.
[Success]
Once the initialization is successfull you are now able to manage Enterprise File Storage resources and data sources that are availalable inside the OVHcloud Terraform provider.
Service management
Use the ovh_storage_efs data source to fetch service details.
Create a main.tf file:
data "ovh_storage_efs" "efs" {
service_name = "<service_id>" # Replace this value with EFS service ID.
}
Define outputs in an output.tf file:
output "service_id" {
value = data.ovh_storage_efs.efs.id
}
output "service_product" {
value = data.ovh_storage_efs.efs.product
}
output "service_quota" {
value = data.ovh_storage_efs.efs.quota
}
Run terraform apply to view the outputs:
terraform apply -var-file=secrets.tfvars
data.ovh_storage_efs.efs: Reading...
data.ovh_storage_efs.efs: Read complete after 0s [id=xxx-xxx-xxx-xxx-xxx]
Changes to Outputs:
+ service_id = "xxx-xxx-xxx-xxx-xxx"
+ service_product = "enterprise-file-storage-premium-1tb"
+ service_quota = 1000
You can apply this plan to save these new output values to the Terraform state, without changing any real infrastructure.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
Apply complete! Resources: 0 added, 0 changed, 0 destroyed.
Outputs:
service_id = "xxx-xxx-xxx-xxx-xxx"
service_product = "enterprise-file-storage-premium-1tb"
service_quota = 1000
Order a service
Info
The ovh_storage_efs resource is available starting from OVHcloud Terraform provider version 2.12.0.
Use the ovh_storage_efs resource to order and manage an Enterprise File Storage service.
Warning
To order a product through Terraform, your account needs to have a default payment method defined. This can be done in the OVHcloud Control Panel or via API with the /me/payment/method endpoint.
BANK_ACCOUNT is no longer supported. Update your default payment method to SEPA_DIRECT_DEBIT.
Define the service inside your main.tf file:
data "ovh_me" "my_account" {}
resource "ovh_storage_efs" "efs" {
name = "MyEFS"
ovh_subsidiary = data.ovh_me.my_account.ovh_subsidiary
plan = [
{
plan_code = "enterprise-file-storage-premium-1tb"
duration = "P1M"
pricing_mode = "default"
configuration = [
{
label = "region"
value = "eu-west-gra"
},
{
label = "network"
value = "vrack"
}
]
}
]
}
Key properties:
name: Custom display name for your service.
ovh_subsidiary: OVHcloud subsidiary for billing purposes. In this example, the value is retrieved from the ovh_me data source.
plan: Defines the plan to order. Contains the plan code, duration, pricing mode and configuration options.
plan.plan_code: Identifier of the offer (e.g. enterprise-file-storage-premium-1tb).
plan.duration: Duration of the subscription (e.g. P1M for one month).
plan.configuration: Configuration options for the service, including the region (mandatory) and network type (mandatory).
Run terraform plan to create the execution plan:
terraform plan -var-file=secrets.tfvars -out main.tfplan
data.ovh_me.my_account: Reading...
data.ovh_me.my_account: Read complete after 0s [id=xxx-ovh]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# ovh_storage_efs.efs will be created
+ resource "ovh_storage_efs" "efs" {
+ created_at = (known after apply)
+ iam = (known after apply)
+ id = (known after apply)
+ name = "MyEFS"
+ order = (known after apply)
+ ovh_subsidiary = "FR"
+ performance_level = (known after apply)
+ plan = [
+ {
+ configuration = [
+ {
+ label = "region"
+ value = "eu-west-gra"
},
+ {
+ label = "network"
+ value = "vrack"
},
]
+ duration = "P1M"
+ plan_code = "enterprise-file-storage-premium-1tb"
+ pricing_mode = "default"
},
]
+ product = (known after apply)
+ quota = (known after apply)
+ region = (known after apply)
+ service_name = (known after apply)
+ status = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
Saved the plan to: main.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "main.tfplan"
Once you reviewed the execution plan, run terraform apply to create the service:
terraform apply main.tfplan
ovh_storage_efs.efs: Creating...
ovh_storage_efs.efs: Still creating... [10s elapsed]
ovh_storage_efs.efs: Still creating... [20s elapsed]
ovh_storage_efs.efs: Still creating... [30s elapsed]
[...]
ovh_storage_efs.efs: Still creating... [3m30s elapsed]
ovh_storage_efs.efs: Still creating... [3m40s elapsed]
ovh_storage_efs.efs: Creation complete after 35s [id=xxx-xxx-xxx-xxx-xxx]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Your Enterprise File Storage service is now ordered and provisioned.
Using the created service
Once the service is created, you can reference its id attribute (or service_name which contains the same value) to manage volumes, snapshots and ACLs:
resource "ovh_storage_efs" "efs" {
name = "MyEFS"
# ... plan configuration ...
}
resource "ovh_storage_efs_share" "volume" {
service_name = ovh_storage_efs.efs.id
name = "share"
description = "My share"
protocol = "NFS"
size = 100
}
Timeouts
Custom timeouts can be configured for the service creation:
resource "ovh_storage_efs" "efs" {
# ...
timeouts {
create = "1h"
}
}
The default creation timeout is 30 minutes.
Import an existing service
An existing Enterprise File Storage service can be imported into your Terraform state using the following configuration:
import {
to = ovh_storage_efs.efs
id = "xxx-xxx-xxx-xxx-xxx"
}
Then run:
terraform plan -generate-config-out=efs.tf
terraform apply
ovh_storage_efs.efs: Preparing import... [id=xxx-xxx-xxx-xxx-xxx]
ovh_storage_efs.efs: Refreshing state... [id=xxx-xxx-xxx-xxx-xxx]
Terraform will perform the following actions:
# ovh_storage_efs.efs will be imported
resource "ovh_storage_efs" "efs" {
created_at = "2025-08-01T11:27:49+02:00"
iam = {
id = "xxx-xxx-xxx-xxx-xxx"
urn = "urn:v1:eu:resource:storageNetApp:xxx-xxx-xxx-xxx-xxx"
}
id = "xxx-xxx-xxx-xxx-xxx"
name = "xxx-xxx-xxx-xxx-xxx"
performance_level = "premium"
product = "enterprise-file-storage-premium-2tb"
quota = 2000
region = "eu-west-gra"
service_name = "xxx-xxx-xxx-xxx-xxx"
status = "running"
}
Plan: 1 to import, 0 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
ovh_storage_efs.efs: Importing... [id=xxx-xxx-xxx-xxx-xxx]
ovh_storage_efs.efs: Import complete [id=xxx-xxx-xxx-xxx-xxx]
Apply complete! Resources: 1 imported, 0 added, 0 changed, 0 destroyed
The file efs.tf will then contain the imported resource's configuration, that can be copied into your main configuration file.
Delete a service
A created or imported service can be deleted using the terraform destroy command.
terraform destroy -var-file=secrets.tfvars
data.ovh_me.my_account: Reading...
data.ovh_me.my_account: Read complete after 0s [id=xxx-ovh]
ovh_storage_efs.efs: Refreshing state... [id=xxx-xxx-xxx-xxx-xxx]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
- destroy
Terraform will perform the following actions:
# ovh_storage_efs.efs will be destroyed
- resource "ovh_storage_efs" "efs" {
- created_at = "2026-03-02T18:29:25+01:00" -> null
- iam = {
- id = "xxx-xxx-xxx-xxx-xxx" -> null
- urn = "urn:v1:eu:resource:storageNetApp:xxx-xxx-xxx-xxx-xxx" -> null
} -> null
- id = "xxx-xxx-xxx-xxx-xxx" -> null
- name = "MyEFS" -> null
- ovh_subsidiary = "FR" -> null
- performance_level = "premium" -> null
- plan = [
- {
- configuration = [
- {
- label = "region" -> null
- value = "eu-west-gra" -> null
},
- {
- label = "network" -> null
- value = "vrack" -> null
},
] -> null
- duration = "P1M" -> null
- plan_code = "enterprise-file-storage-premium-1tb" -> null
- pricing_mode = "default" -> null
},
] -> null
- product = "enterprise-file-storage-premium-1tb" -> null
- quota = 1000 -> null
- region = "eu-west-gra" -> null
- service_name = "xxx-xxx-xxx-xxx-xxx" -> null
- status = "running" -> null
}
Plan: 0 to add, 0 to change, 1 to destroy.
Do you really want to destroy all resources?
Terraform will destroy all your managed infrastructure, as shown above.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value: yes
ovh_storage_efs.efs: Destroying... [id=xxx-xxx-xxx-xxx-xxx]
ovh_storage_efs.efs: Destruction complete after 3s
Volumes Management
OVHcloud Terraform Provider allows the following volume management operations: creation, modification and deletion.
ovh_storage_efs_share resource represents a volume.
Create a volume
Define a volume inside your main.tf file:
resource "ovh_storage_efs_share" "volume" {
service_name = "<service_id>" # Replace this value with EFS service ID.
name = "share"
description = "My share"
protocol = "NFS"
size = 100
# mount_path = <mount_path_value>
# snapshot_id = <snapshot_id_to_use>
}
Additionnal properties:
- A custom mount path can be specified using
mount_path property.
- The volume can be created from an existing snapshot using
snapshot_id property.
Run terraform plan to create the execution plan:
terraform plan -var-file=secrets.tfvars -out main.tfplan
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# ovh_storage_efs_share.volume will be created
+ resource "ovh_storage_efs_share" "volume" {
+ created_at = (known after apply)
+ description = "My share"
+ id = (known after apply)
+ mount_point_name = (known after apply)
+ name = "share"
+ protocol = "NFS"
+ service_name = "xxx-xxx-xxx-xxx-xxx"
+ size = 100
+ snapshot_id = (known after apply)
+ status = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
Saved the plan to: main.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "main.tfplan"
Key points:
-
The terraform plan command will create an execution plan but won't execute it. Instead, it will determine what actions are necessary to create the configuration specified inside your configuration files. This will allow you to verifiy whether your execution plan matches exectations before making any changes to actual resources.
-
The optional -out parameter allows your to specifiy an output file for the plan. It will ensure that the plan you reviewed will be the same as what is applied.
Once you reviewed the execution plan, run terraform apply to make changes:
terraform apply main.tfplan
ovh_storage_efs_share.volume: Creating...
ovh_storage_efs_share.volume: Still creating... [10s elapsed]
ovh_storage_efs_share.volume: Creation complete after 11s [id=29d1facf-db03-4951-a4e4-c6c8ac7b1104]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Your volume is now created.
Modify a volume
Volume name, description and size can be updated.
Once the value(s) are updated inside your main.tf file, apply the changes using terraform apply.
Delete a volume
To delete your volume use terraform destroy command.
Warning
If your volume has manual snapshots that are not referenced by Terraform, they must be deleted before the volume is deleted.
terraform destroy -var-file=secrets.tfvars
ovh_storage_efs_share.volume: Refreshing state... [id=29d1facf-db03-4951-a4e4-c6c8ac7b1104]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
- destroy
Terraform will perform the following actions:
# ovh_storage_efs_share.volume will be destroyed
- resource "ovh_storage_efs_share" "volume" {
- created_at = "2025-07-01T09:53:17Z" -> null
- description = "My share" -> null
- id = "29d1facf-db03-4951-a4e4-c6c8ac7b1104" -> null
- name = "share" -> null
- protocol = "NFS" -> null
- service_name = "xxx-xxx-xxx-xxx-xxx" -> null
- size = 100 -> null
- status = "available" -> null
# (1 unchanged attribute hidden)
}
Plan: 0 to add, 0 to change, 1 to destroy.
Do you really want to destroy all resources?
Terraform will destroy all your managed infrastructure, as shown above.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value: yes
ovh_storage_efs_share.volume: Destroying... [id=29d1facf-db03-4951-a4e4-c6c8ac7b1104]
ovh_storage_efs_share.volume: Destruction complete after 1s
Destroy complete! Resources: 1 destroyed.
To retrieve information about one or all of the volume access paths use ovh_storage_efs_share_access_paths and ovh_storage_efs_share_access_path data sources respectively.
Create or add to an existing main.tf file the following content:
Info
You can (re-)use a volume that already exists (within your Terraform configuration or not).
resource "ovh_storage_efs_share" "volume" {
service_name = "xxx-xxx-xxx-xxx-xxx"
name = "share"
description = "My share"
protocol = "NFS"
size = 100
}
data "ovh_storage_efs_share_access_paths" "access_paths" {
service_name = "xxx-xxx-xxx-xxx-xxx"
share_id = ovh_storage_efs_share.volume.id
}
data "ovh_storage_efs_share_access_path" "access_path" {
service_name = "xxx-xxx-xxx-xxx-xxx"
share_id = ovh_storage_efs_share.volume.id
id = tolist(data.ovh_storage_efs_share_access_paths.access_paths.access_paths).0.id
}
Define access path outputs in an output.tf file:
output "share_acccess_path" {
value = data.ovh_storage_efs_share_access_path.access_path
}
output "share_access_paths" {
value = data.ovh_storage_efs_share_access_paths.access_paths
}
Run terraform apply to add your data source and create outputs:
terraform apply data_source.tfplan
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
<= read (data resources)
Terraform will perform the following actions:
# data.ovh_storage_efs_share_access_path.access_path will be read during apply
# (config refers to values not yet known)
<= data "ovh_storage_efs_share_access_path" "access_path" {
+ id = (known after apply)
+ path = (known after apply)
+ preferred = (known after apply)
+ service_name = "xxx-xxx-xxx-xxx-xxx"
+ share_id = (known after apply)
}
# data.ovh_storage_efs_share_access_paths.access_paths will be read during apply
# (config refers to values not yet known)
<= data "ovh_storage_efs_share_access_paths" "access_paths" {
+ access_paths = (known after apply)
+ service_name = "xxx-xxx-xxx-xxx-xxx"
+ share_id = (known after apply)
}
# ovh_storage_efs_share.volume will be created
+ resource "ovh_storage_efs_share" "volume" {
+ created_at = (known after apply)
+ description = "My share"
+ id = (known after apply)
+ mount_point_name = (known after apply)
+ name = "share"
+ protocol = "NFS"
+ service_name = "xxx-xxx-xxx-xxx-xxx"
+ size = 100
+ snapshot_id = (known after apply)
+ status = (known after apply)
}
Plan: 1 to add, 0 to change, 0 to destroy.
Changes to Outputs:
+ share_acccess_path = {
+ id = (known after apply)
+ path = (known after apply)
+ preferred = (known after apply)
+ service_name = "xxx-xxx-xxx-xxx-xxx"
+ share_id = (known after apply)
}
+ share_access_paths = {
+ access_paths = (known after apply)
+ service_name = "xxx-xxx-xxx-xxx-xxx"
+ share_id = (known after apply)
}
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
ovh_storage_efs_share.volume: Creating...
ovh_storage_efs_share.volume: Still creating... [10s elapsed]
ovh_storage_efs_share.volume: Creation complete after 10s [id=1d6669a7-8b86-472a-bb04-cf8be7b9af16]
data.ovh_storage_efs_share_access_paths.access_paths: Reading...
data.ovh_storage_efs_share_access_paths.access_paths: Read complete after 1s
data.ovh_storage_efs_share_access_path.access_path: Reading...
data.ovh_storage_efs_share_access_path.access_path: Read complete after 0s [id=7cbcf0ca-50f4-4e3c-9222-406e71a10649]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Outputs:
share_acccess_path = {
"id" = "7cbcf0ca-50f4-4e3c-9222-406e71a10649"
"path" = "10.6.0.1:/share_b038413e_c446_4788_871f_a762fb1b7697"
"preferred" = true
"service_name" = "xxx-xxx-xxx-xxx-xxx"
"share_id" = "1d6669a7-8b86-472a-bb04-cf8be7b9af16"
}
share_access_paths = {
"access_paths" = toset([
{
"id" = "7cbcf0ca-50f4-4e3c-9222-406e71a10649"
"path" = "10.6.0.1:/share_b038413e_c446_4788_871f_a762fb1b7697"
"preferred" = true
},
])
"service_name" = "xxx-xxx-xxx-xxx-xxx"
"share_id" = "1d6669a7-8b86-472a-bb04-cf8be7b9af16"
}
Snapshots Management
OVHcloud Terraform Provider allows the following snapshot management operations: creation, modification and deletion.
ovh_storage_efs_share_snapshot represents a volume snapshot.
Create a snapshot
Define a snapshot inside main.tf file:
Info
You can (re-)use a volume that already exists (within your Terraform configuration or not) to create your snapshot.
Info
The time_sleep resource manages delay between snapshot and volume deletion. The snapshot has to be deleted before the volume can be deleted.
If you don't already have the hashicorp/time provider installed, you will need to run terraform init -upgrade to download it.
resource "ovh_storage_efs_share" "volume" {
service_name = "<service_id>" # Replace this value with service ID.
name = "share"
description = "My share"
protocol = "NFS"
size = 100
}
resource "ovh_storage_efs_share_snapshot" "snapshot" {
depends_on = [time_sleep.wait_10_seconds]
service_name = "<service_id>" # Replace this value with service ID.
share_id = ovh_storage_efs_share.share.id
name = "snapshot"
description = "My snapshot"
}
resource "time_sleep" "wait_10_seconds" {
depends_on = [ovh_storage_efs_share.share]
destroy_duration = "10s"
}
Run terraform plan to create the execution plan:
terraform plan -var-file=secrets.tfvars -out main.tfplan
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# ovh_storage_efs_share.volume will be created
+ resource "ovh_storage_efs_share" "volume" {
+ created_at = (known after apply)
+ description = "My share"
+ id = (known after apply)
+ mount_point_name = (known after apply)
+ name = "share"
+ protocol = "NFS"
+ service_name = "xxx-xxx-xxx-xxx-xxx"
+ size = 100
+ snapshot_id = (known after apply)
+ status = (known after apply)
}
# ovh_storage_efs_share_snapshot.snapshot will be created
+ resource "ovh_storage_efs_share_snapshot" "snapshot" {
+ created_at = (known after apply)
+ description = "My snapshot"
+ id = (known after apply)
+ name = "snapshot"
+ path = (known after apply)
+ service_name = "xxx-xxx-xxx-xxx-xxx"
+ share_id = (known after apply)
+ status = (known after apply)
+ type = (known after apply)
}
# time_sleep.wait_10_seconds will be created
+ resource "time_sleep" "wait_10_seconds" {
+ destroy_duration = "10s"
+ id = (known after apply)
}
Plan: 3 to add, 0 to change, 0 to destroy.
Saved the plan to: main.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "main.tfplan"
Key points:
-
The terraform plan command will create an execution plan but won't execute it. Instead, it will determine what actions are necessary to create the configuration specified inside your configuration files. This will allow you to verifiy whether your execution plan matches exectations before making any changes to actual resources.
-
The optional -out parameter allows your to specifiy an output file for the plan. It will ensure that the plan you reviewed will be the same as what is applied.
Once you reviewed the execution plan, run terraform apply to make changes:
terraform apply main.tfplan
ovh_storage_efs_share.volume: Creating...
ovh_storage_efs_share.volume: Still creating... [10s elapsed]
ovh_storage_efs_share.volume: Still creating... [20s elapsed]
ovh_storage_efs_share.volume: Still creating... [30s elapsed]
ovh_storage_efs_share.volume: Still creating... [40s elapsed]
ovh_storage_efs_share.volume: Creation complete after 41s [id=1f551984-6529-48f8-830d-f6a70d062174]
time_sleep.wait_10_seconds: Creating...
time_sleep.wait_10_seconds: Creation complete after 0s [id=2025-07-01T13:39:01Z]
ovh_storage_efs_share_snapshot.snapshot: Creating...
ovh_storage_efs_share_snapshot.snapshot: Still creating... [10s elapsed]
ovh_storage_efs_share_snapshot.snapshot: Creation complete after 10s [id=f92bc04a-301f-4a9a-80ba-7c7bf18b2275]
Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
Your snapshot is now available.
Modify a snapshot
Snapshot name and description properties can be updated.
Once the value(s) are updated inside your main.tf file, apply the changes using terraform apply.
Delete a snapshot
To delete your snapshot use the terraform destroy command.
terraform destroy -var-file=secrets.tfvars
ovh_storage_efs_share.volume: Refreshing state... [id=1f551984-6529-48f8-830d-f6a70d062174]
time_sleep.wait_10_seconds: Refreshing state... [id=2025-07-01T13:39:01Z]
ovh_storage_efs_share_snapshot.snapshot: Refreshing state... [id=f92bc04a-301f-4a9a-80ba-7c7bf18b2275]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
- destroy
Terraform will perform the following actions:
# ovh_storage_efs_share.volume will be destroyed
- resource "ovh_storage_efs_share" "volume" {
- created_at = "2025-07-01T13:38:21Z" -> null
- description = "My share" -> null
- id = "1f551984-6529-48f8-830d-f6a70d062174" -> null
- name = "share" -> null
- protocol = "NFS" -> null
- service_name = "xxx-xxx-xxx-xxx-xxx" -> null
- size = 100 -> null
- status = "available" -> null
# (1 unchanged attribute hidden)
}
# ovh_storage_efs_share_snapshot.snapshot will be destroyed
- resource "ovh_storage_efs_share_snapshot" "snapshot" {
- created_at = "2025-07-01T13:39:01Z" -> null
- description = "My snapshot" -> null
- id = "f92bc04a-301f-4a9a-80ba-7c7bf18b2275" -> null
- name = "snapshot" -> null
- path = ".snapshot/share_snapshot_b571d597_80b0_4a5f_ac42_00fb3401c70c" -> null
- service_name = "xxx-xxx-xxx-xxx-xxx" -> null
- share_id = "1f551984-6529-48f8-830d-f6a70d062174" -> null
- status = "available" -> null
- type = "manual" -> null
}
# time_sleep.wait_10_seconds will be destroyed
- resource "time_sleep" "wait_10_seconds" {
- destroy_duration = "10s" -> null
- id = "2025-07-01T13:39:01Z" -> null
}
Plan: 0 to add, 0 to change, 3 to destroy.
Do you really want to destroy all resources?
Terraform will destroy all your managed infrastructure, as shown above.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value: yes
ovh_storage_efs_share_snapshot.snapshot: Destroying... [id=f92bc04a-301f-4a9a-80ba-7c7bf18b2275]
ovh_storage_efs_share_snapshot.snapshot: Destruction complete after 0s
time_sleep.wait_10_seconds: Destroying... [id=2025-07-01T13:39:01Z]
time_sleep.wait_10_seconds: Still destroying... [id=2025-07-01T13:39:01Z, 10s elapsed]
time_sleep.wait_10_seconds: Destruction complete after 10s
ovh_storage_efs_share.volume: Destroying... [id=1f551984-6529-48f8-830d-f6a70d062174]
ovh_storage_efs_share.volume: Destruction complete after 1s
Destroy complete! Resources: 3 destroyed.
ACLs management
OVHcloud Terraform Provider allows ACLs creation and deletion.
ovh_storage_efs_share_acl resource represents an ACL.
Create an ACL
Define an ACL inside main.tf file:
Info
You can (re-)use a volume that already exists (within your Terraform configuration or not) to create your ACL.
resource "ovh_storage_efs_share" "volume" {
service_name = "<service_id>" # Replace this value with service ID.
name = "share"
description = "My share"
protocol = "NFS"
size = 100
}
resource "ovh_storage_efs_share_acl" "acl" {
service_name = "<service_id>" # Replace this value with service ID.
share_id = ovh_storage_efs_share.volume.id
access_level = "rw"
access_to = "10.0.0.1/32"
}
Run terraform plan to create the execution plan:
terraform plan -var-file=secrets.tfvars -out main.tfplan
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# ovh_storage_efs_share.volume will be created
+ resource "ovh_storage_efs_share" "volume" {
+ created_at = (known after apply)
+ description = "My share"
+ id = (known after apply)
+ mount_point_name = (known after apply)
+ name = "share"
+ protocol = "NFS"
+ service_name = "xxx-xxx-xxx-xxx-xxx"
+ size = 100
+ snapshot_id = (known after apply)
+ status = (known after apply)
}
# ovh_storage_efs_share_acl.acl will be created
+ resource "ovh_storage_efs_share_acl" "acl" {
+ access_level = "rw"
+ access_to = "10.0.0.1/32"
+ access_type = (known after apply)
+ created_at = (known after apply)
+ id = (known after apply)
+ service_name = "xxx-xxx-xxx-xxx-xxx"
+ share_id = (known after apply)
+ status = (known after apply)
}
Plan: 2 to add, 0 to change, 0 to destroy.
Saved the plan to: main.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "main.tfplan"
Key points:
-
The terraform plan command will create an execution plan but won't execute it. Instead, it will determine what actions are necessary to create the configuration specified inside your configuration files. This will allow you to verifiy whether your execution plan matches exectations before making any changes to actual resources.
-
The optional -out parameter allows your to specifiy an output file for the plan. It will ensure that the plan you reviewed will be the same as what is applied.
Once you reviewed the execution plan, run terraform apply to make changes:
terraform apply main.tfplan
ovh_storage_efs_share.volume: Creating...
ovh_storage_efs_share.volume: Still creating... [10s elapsed]
ovh_storage_efs_share.volume: Creation complete after 10s [id=001ccf4b-3537-41c0-b446-a42663971d58]
ovh_storage_efs_share_acl.acl: Creating...
ovh_storage_efs_share_acl.acl: Still creating... [10s elapsed]
ovh_storage_efs_share_acl.acl: Creation complete after 11s [id=9274f4d4-de96-46eb-935f-ffbc747a19bc]
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.
Your ACL is now available.
Delete an ACL
To delete your ACL use the terraform destroy command.
terraform destroy -var-file=secrets.tfvars
ovh_storage_efs_share.volume: Refreshing state... [id=001ccf4b-3537-41c0-b446-a42663971d58]
ovh_storage_efs_share_acl.acl: Refreshing state... [id=9274f4d4-de96-46eb-935f-ffbc747a19bc]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
- destroy
Terraform will perform the following actions:
# ovh_storage_efs_share.volume will be destroyed
- resource "ovh_storage_efs_share" "volume" {
- created_at = "2025-07-01T14:36:37Z" -> null
- description = "My share" -> null
- id = "001ccf4b-3537-41c0-b446-a42663971d58" -> null
- name = "share" -> null
- protocol = "NFS" -> null
- service_name = "xxx-xxx-xxx-xxx-xxx" -> null
- size = 100 -> null
- status = "available" -> null
# (1 unchanged attribute hidden)
}
# ovh_storage_efs_share_acl.acl will be destroyed
- resource "ovh_storage_efs_share_acl" "acl" {
- access_level = "rw" -> null
- access_to = "10.0.0.1/32" -> null
- access_type = "ip" -> null
- created_at = "2025-07-01T14:36:48Z" -> null
- id = "9274f4d4-de96-46eb-935f-ffbc747a19bc" -> null
- service_name = "xxx-xxx-xxx-xxx-xxx" -> null
- share_id = "001ccf4b-3537-41c0-b446-a42663971d58" -> null
- status = "active" -> null
}
Plan: 0 to add, 0 to change, 2 to destroy.
Do you really want to destroy all resources?
Terraform will destroy all your managed infrastructure, as shown above.
There is no undo. Only 'yes' will be accepted to confirm.
Enter a value: yes
ovh_storage_efs_share_acl.acl: Destroying... [id=9274f4d4-de96-46eb-935f-ffbc747a19bc]
ovh_storage_efs_share_acl.acl: Destruction complete after 0s
ovh_storage_efs_share.volume: Destroying... [id=001ccf4b-3537-41c0-b446-a42663971d58]
ovh_storage_efs_share.volume: Destruction complete after 0s
Destroy complete! Resources: 2 destroyed.
Troubleshooting
- Authentication Issues: Verify API credentials and permissions.
- Resource Limits: Check volume/snapshot quota usage in the OVHcloud Control Panel.
- Volume Deletion Issues: Ensure all
manual snapshots are deleted before removing the volume.
Go further
API Quickstart
Enterprise File Storage - FAQ
If you need training or technical assistance to implement our solutions, contact your sales representative or click on this link to get a quote and ask our Professional Services experts for assisting you on your specific use case of your project.
Join our community of users.