Skip to content

Commit

Permalink
Import block stop generate for skipped resources (#428)
Browse files Browse the repository at this point in the history
  • Loading branch information
magodo authored Jul 11, 2023
1 parent 86a5b1f commit 1a231e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/meta/base_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,10 @@ func (meta baseMeta) ExportResourceMapping(ctx context.Context, l ImportList) er
f := hclwrite.NewFile()
body := f.Body()
for _, item := range l {
if item.Skip() {
continue
}

// The import block
blk := hclwrite.NewBlock("import", nil)
blk.Body().SetAttributeValue("id", cty.StringVal(item.TFResourceId))
Expand Down

0 comments on commit 1a231e2

Please sign in to comment.