| path | type | required | default | description |
|---|---|---|---|---|
| .rules | rule | true |
| 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 |
expr expression. The expression must be returnes boolean (true or false).
Go's text/template
sprig function can be used.
*tfmigrator.Source is passed.