From 3cbd469673de297f9f5af19f4f78e6f56300c44d Mon Sep 17 00:00:00 2001 From: Steve Stevens Date: Mon, 24 Jul 2023 14:38:52 +0100 Subject: [PATCH] support for 'import' blocks in terraform v1.5.x --- pkg/configs/parser_config.go | 4 ++++ pkg/tfvar/testdata/normal/main.tf | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/pkg/configs/parser_config.go b/pkg/configs/parser_config.go index 8fa6db2..0998739 100644 --- a/pkg/configs/parser_config.go +++ b/pkg/configs/parser_config.go @@ -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. @@ -115,5 +116,8 @@ var configFileSchema = &hcl.BodySchema{ { Type: "moved", }, + { + Type: "import", + }, }, } diff --git a/pkg/tfvar/testdata/normal/main.tf b/pkg/tfvar/testdata/normal/main.tf index 4161f16..e88de6b 100644 --- a/pkg/tfvar/testdata/normal/main.tf +++ b/pkg/tfvar/testdata/normal/main.tf @@ -12,3 +12,8 @@ moved { from = aws_instance.a to = aws_instance.b } + +import { + id = "i-123545" + to = aws_instance.b +}