Skip to content

Support naming convention auto-fix #227

@Fraser-Isbester

Description

@Fraser-Isbester

The introduction of moved blocks means that we can now statically rename resources.

Here is an example test case of what I'm proposing.

Name: "mixed_snake_case: kebab-case to snake_case",
Content: `
resource "aws_instance" "my-instance" {}`,

Expected: `
resource "aws_instance" "my_instance" {}
# Auto-generated by tflint. Safe to remove after apply.
# https://developer.hashicorp.com/terraform/language/moved
moved {
  from = aws_instance.my-instance
  to = aws_instance.my_instance
}`,

WIP PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions