The Commvault Terraform module uses the Terraform configuration language, which accepts resource blocks for infrastructure objects that you want to manage in the CommCell environment. The resource blocks are grouped in a configuration file that has the .tf extension. A simple configuration contains a single .tf configuration file. To manage multiple real objects, in the configuration file, add resources that represent the real objects.
When a change is applied to resources using a configuration file, the Commvault provider performs create and delete operations on each resource that has an associated infrastructure object in the CommCell environment.
Syntax
The following is the syntax for configuration file.
provider "commvault" {
#provider block body that contains arguments to initialize the Commvault Terraform provider
}
resource "commvault_resource_1" "localname" {
#resource block body
}
.
.
.
resource "commvault_resource_n" "localname"{
#resource block body
}
Where:
commvault in the provider block is the name of the Terraform provider.
commvault_resource_1 to commvault_resource_n are the Commvault Terraform provider resources that used to manage real objects in the CommCell environment.