gordonbondon / terraform-common-verify

Terraform module to verify resource and data source values

Home Page:https://registry.terraform.io/modules/gordonbondon/verify/common

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VERIFY terraform module

Use this module to verify values from resources during plan. This module has no outputs and does not create any resources. It uses terraform interpolation to check values and bash script to exit with error when they do not pass the verification.

If you need to verify just module variables - use terraform built-in validation rules

Usage example

For more real life examples check ./examples directory

module "check" {
  source  = "gordonbondon/verify/common"
  version = "~> 1.0"

  match = contains(list("a", "b", "c"), "a")
  error = "Value must be one of a,b,c"
}

System Requirements

  • bash shell interpreter

Requirements

Name Version
terraform >= 0.12
external >= 1.1.0

Providers

Name Version
external >= 1.1.0

Inputs

Name Description Type Default Required
error error message to display string n/a yes
match pass in expression that will evaluate to true or false any n/a yes

Outputs

No output.

About

Terraform module to verify resource and data source values

https://registry.terraform.io/modules/gordonbondon/verify/common

License:MIT License


Languages

Language:Go 53.2%Language:Shell 23.2%Language:HCL 20.9%Language:Ruby 2.7%