Skip to content

Commit cb77389

Browse files
authored
Merge pull request #30 from OurFriendIrony/feature/base_support_for_import_block
support for 'import' blocks in terraform v1.5.x
2 parents 7b648cc + 3cbd469 commit cb77389

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

pkg/configs/parser_config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ func (p *Parser) loadConfigFile(path string, override bool) (*File, hcl.Diagnost
6060
case "resource":
6161
case "data":
6262
case "moved":
63+
case "import":
6364
default:
6465
// Should never happen because the above cases should be exhaustive
6566
// for all block type names in our schema.
@@ -115,5 +116,8 @@ var configFileSchema = &hcl.BodySchema{
115116
{
116117
Type: "moved",
117118
},
119+
{
120+
Type: "import",
121+
},
118122
},
119123
}

pkg/tfvar/testdata/normal/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ moved {
1212
from = aws_instance.a
1313
to = aws_instance.b
1414
}
15+
16+
import {
17+
id = "i-123545"
18+
to = aws_instance.b
19+
}

0 commit comments

Comments
 (0)