From time to time it becomes necessary to update the Terraform modules currently being used to manage your Pureport network(s) via orchestration.  If you are not familiar with the update process, this document will walk you through a brief description of how to force the update and link you to Terraform's documentation covering process and best practices for other use-cases.

Steps to update:

Be sure to check the release notes page regularly to look for mentions of Terraform Module/Plugin updates.  When a update has been released, follow the steps below to update your Terraform module.

Step 1: Navigate to the directory containing the configuration files used for managing your Pureport network(s)


user@linux:~/demoNetwork$ ls  terraform.tfvars terraform.tfstate  tf.plan terraform.tfstate.backup

Step 2: (Only needed if you have constrained your plugin version in your configuration files, otherwise skip to step 3) 

Confirm you have constrained your plugin to a specific version in your configuration by looking for the "~>" constraining code in your configuration files:

user@linux:~/demoNetwork$ grep "~>" *  version    = "~> 0.1"

Look for the specific Pureport module configuration and update it to the most recent version.

provider "pureport" {
  version    = "~> 0.1"

Updated to
provider "pureport" {
  version    = "~> 1.1.5"


Save your configuration file once you have updated all constraints and proceed to the next step.

Step 3: Issue the Terraform init command and pass in the argument "-upgrade" to force a module and plugin upgrade.

*Note* This will update all modules and plugins in use in your Terraform configuration files in the current directory.

user@linux:~/demoNetwork$ terraform init -upgrade

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "pureport" (terraform-providers/pureport) 1.1.5...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

Once this has been completed, you can continue to use Terraform as you have in the past.  Be sure to reference the Terraform Provider page for the Pureport module on details pertaining to updates new features.

Helpful Documents: