Configuration

July 18, 2021 ยท View on GitHub

pathtyperequireddefaultdescription
.rulesruletrue

type: rule

pathtyperequireddefaultexampledescription
ifbool expressiontrueResource.Type == "null_resource"If the result is true, the resource is proceeded by the rule
addresstemplatefalseno change{{.Resource.Type}}.{{.Resource.Name | replace "-" "_"}}
dirnametemplatefalseno changefoo
hcl_file_basenametemplatefalseno change{{.Resource.Type}}.tf
state_basenametemplatefalseterraform.tfstatefoo.tfstate
removedboolfalsefalseIf this is true, resources which match the rule are removed
ignoredboolfalsefalseIf this is true, resources which match the rule aren't migrated by tfmigrator
skip_hcl_migrationboolfalsefalseIf this is true, Terraform Configuration isn't changed
skip_state_migrationboolfalsefalseIf this is true, Terraform State isn't changed

type: bool expression

expr expression. The expression must be returnes boolean (true or false).

type: template

Go's text/template

sprig function can be used.

expression and template parameter

*tfmigrator.Source is passed.