Skip to content

Identify Resource in Terraform Registry

GlennChia edited this page Jul 7, 2021 · 1 revision

At this stage, identify the resource in the Terraform Registry.

Identify the supported provider version

To begin, check the current version of the azurerm that the caf framework uses. This can be found at the following link:

As of this writing, the version used by caf is 2.55.0. This is declared in the following snippet:

terraform {
  required_providers {
    azurerm = {
      source  = "hashicorp/azurerm"
      version = "~> 2.55.0"
    }
  }
}

Identify the resource

In version 2.55.0 this resource is not supported

no resource available

Hence, in scenarios like this, find an appropriate version that supports the resource. In this example, we use version 2.61.0 because as of this writing, the team was already planning on upgrading the provider version to 2.61.0

Identify the attributes

Start with the highest level attributes and identify keywords like required and optional. Also take note of the quantity of the attribute because this will influence the design pattern use. Refer to specific design patterns for more information.

Next, scan through the documentation and identify any potential errors. In the documentation for provider version, there was an error in the description for the dimension block as shown below. If such errors are identified, do make a PR to the terraform-provider-azurerm repository.

Using this example, a PR was submitted at terraform-provider-azurerm pr

This resulted in an update to the documentation that fixes the error:

The update will only be released in later versions of the provider. In this example, it was released in version 2.63.0:

Clone this wiki locally