Resources for the Commvault Terraform Module


On this page

A resource type is an infrastructure object (such as an endpoint) in Commvault.

To declare a resource type, include a resource type, and within the block body—between curly braces ({ })—include the arguments and attributes that belong to the resource.

The following table lists the operational behavior for resources.




In the configuration file (.tf), include a resource block for the real object.

When the configuration is applied, the identifier for that real object is saved as a state in the terraform.tfstate file. The .tfstate file is created after the configuration is applied for the first time. This state is used in responses to manage future changes, such as delete.


In the configuration file (.tf), remove the complete resource block that represents the object.

When the configuration is applied, the Commvault Terraform provider attempts to find the resource block that is associated with the real object. Because no resource block is found, the real object is removed from the CommCell environment.


The following basic syntax applies to all Commvault Terraform provider resources.

resource "commvault_resource_name" "local name"{

argument_1 = "<value>"




argument_n = "<value>"



  • commvault_resource_name is the resource type for real object that you want to modify in the CommCell environment.

  • local name is the name that is used by the Commvault Terraform provider to refer the resource and has no significance in the target platform.

  • argument_1 to argument_n are the attributes that are used for the resource.