Skip to content

Commit

Permalink
Merge pull request #30 from OurFriendIrony/feature/base_support_for_i…
Browse files Browse the repository at this point in the history
…mport_block

support for 'import' blocks in terraform v1.5.x
  • Loading branch information
shihanng authored Jul 25, 2023
2 parents 7b648cc + 3cbd469 commit cb77389
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/configs/parser_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func (p *Parser) loadConfigFile(path string, override bool) (*File, hcl.Diagnost
case "resource":
case "data":
case "moved":
case "import":
default:
// Should never happen because the above cases should be exhaustive
// for all block type names in our schema.
Expand Down Expand Up @@ -115,5 +116,8 @@ var configFileSchema = &hcl.BodySchema{
{
Type: "moved",
},
{
Type: "import",
},
},
}
5 changes: 5 additions & 0 deletions pkg/tfvar/testdata/normal/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ moved {
from = aws_instance.a
to = aws_instance.b
}

import {
id = "i-123545"
to = aws_instance.b
}

0 comments on commit cb77389

Please sign in to comment.