You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, we would now like to employ them in automated provider tests. And we target minimal manual configuration, although some will be inevitable as the metadata that resides in the Terraform registry itself is not meant to be used in automation.
However, we would like to explore some ideas and test some hypotheses that we expect will improve the example manifests in the context of automated tests. We are planning to start with a local resolution mode in which we are planning to use the "local" manifests of the dependent resources provided in the Terraform registry together with the target resource. An example for the azurerm_data_protection_backup_instance_postgresql resource is reproduced here:
In the above example, some resources (such as azurerm_key_vault_secret or azurerm_key_vault) on which the "target" azurerm_data_protection_backup_instance_postgresql resource depend have examples specified "locally" with the azurerm_data_protection_backup_instance_postgresql's example configuration. The current pipeline resolved such references "globally" and does not employ these local (to the target resource) examples. The hypothesis is that we will be able to increase the quality of the generated example testing manifests (with lower false-positive rate for catching resource configuration errors) if we prioritize local resolution over global resolution.
The text was updated successfully, but these errors were encountered:
ulucinar
changed the title
Improve Automation of the Example Generation Pipeline
Inject Cross-resource References using Scraped Provider Metadata
Jun 15, 2022
The current example manifest generation pipeline aims to produce example manifests that are to be applied after some manual inspection.
However, we would now like to employ them in automated provider tests. And we target minimal manual configuration, although some will be inevitable as the metadata that resides in the Terraform registry itself is not meant to be used in automation.
However, we would like to explore some ideas and test some hypotheses that we expect will improve the example manifests in the context of automated tests. We are planning to start with a local resolution mode in which we are planning to use the "local" manifests of the dependent resources provided in the Terraform registry together with the target resource. An example for the
azurerm_data_protection_backup_instance_postgresql
resource is reproduced here:In the above example, some resources (such as
azurerm_key_vault_secret
orazurerm_key_vault
) on which the "target"azurerm_data_protection_backup_instance_postgresql
resource depend have examples specified "locally" with theazurerm_data_protection_backup_instance_postgresql
's example configuration. The current pipeline resolved such references "globally" and does not employ these local (to the target resource) examples. The hypothesis is that we will be able to increase the quality of the generated example testing manifests (with lower false-positive rate for catching resource configuration errors) if we prioritize local resolution over global resolution.The text was updated successfully, but these errors were encountered: