oci_file_storage_file_system

This resource provides the File System resource in Oracle Cloud Infrastructure File Storage service.

Creates a new file system in the specified compartment and availability domain. Instances can mount file systems in another availability domain, but doing so might increase latency when compared to mounting instances in the same availability domain.

After you create a file system, you can associate it with a mount target. Instances can then mount the file system by connecting to the mount target’s IP address. You can associate a file system with more than one mount target at a time.

For information about access control and compartments, see Overview of the IAM Service.

For information about Network Security Groups access control, see Network Security Groups.

For information about availability domains, see Regions and Availability Domains. To get a list of availability domains, use the ListAvailabilityDomains operation in the Identity and Access Management Service API.

All Oracle Cloud Infrastructure resources, including file systems, get an Oracle-assigned, unique ID called an Oracle Cloud Identifier (OCID). When you create a resource, you can find its OCID in the response. You can also retrieve a resource’s OCID by using a List API operation on that resource type or by viewing the resource in the Console.

Example Usage

resource "oci_file_storage_file_system" "test_file_system" {
	#Required
	availability_domain = var.file_system_availability_domain
	compartment_id = var.compartment_id

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	display_name = var.file_system_display_name
	filesystem_snapshot_policy_id = oci_file_storage_filesystem_snapshot_policy.test_filesystem_snapshot_policy.id
	freeform_tags = {"Department"= "Finance"}
	kms_key_id = oci_kms_key.test_key.id
	source_snapshot_id = oci_file_storage_snapshot.test_snapshot.id
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the File System * update - (Defaults to 20 minutes), when updating the File System * delete - (Defaults to 20 minutes), when destroying the File System

Import

FileSystems can be imported using the id, e.g.

$ terraform import oci_file_storage_file_system.test_file_system "id"