Skip to main content
FlexPod

Terraform execution from controller

Contributors

We can execute the Terraform plan using a controller. You can skip this section if you have already executed your Terraform plan using an ICO workflow.

Prerequisites

Setup of the solution begins with a management workstation that has access to the Internet and with a working installation of Terraform.

A guide for installing Terraform can be found here.

Clone GitHub repo

The first step in the process is to clone the GitHub repo to a new empty folder on the management workstation. To clone the GitHub repository, complete the following steps:

  1. From the management workstation, create a new folder for the project. Create a new folder inside this folder named /root/snapmirror-cvo and Clone the GitHub repo into it.

  2. Open a command-line or console interface on the management workstation and change directories to the new folder just created.

  3. Clone the GitHub collection using the following command:

Git clone https://github.com/NetApp-Automation/FlexPod-hybrid-cloud-for-GCP-with-Intersight-and-CVO
  1. Change directories to the new folder named snapmirror-cvo.

Terraform execution

Schematic for Terraform execution.

  • Init. Initialize the (local) Terraform environment. Usually executed only once per session.

  • Plan. Compare the terraform state with the as-in state in the cloud and build and display an execution plan. This does not change the deployment (read-only).

  • Apply. Apply the plan from the plan phase. This potentially changes the deployment (read and write).

  • Destroy. All resources that are governed by this specific terraform environment.

    For details, see here.