Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Latest commit

 

History

History
34 lines (24 loc) · 1.5 KB

CONFIGURATION.md

File metadata and controls

34 lines (24 loc) · 1.5 KB

Configuration

path type required default description
.rules rule true

type: rule

path type required default example description
if bool expression true Resource.Type == "null_resource" If the result is true, the resource is proceeded by the rule
address template false no change {{.Resource.Type}}.{{.Resource.Name | replace "-" "_"}}
dirname template false no change foo
hcl_file_basename template false no change {{.Resource.Type}}.tf
state_basename template false terraform.tfstate foo.tfstate
removed bool false false If this is true, resources which match the rule are removed
ignored bool false false If this is true, resources which match the rule aren't migrated by tfmigrator
skip_hcl_migration bool false false If this is true, Terraform Configuration isn't changed
skip_state_migration bool false false If 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.