@@ -388,8 +388,9 @@ resource "aws_instance" "foo" {
388
388
Name : "get content with options" ,
389
389
Args : func () (* hclext.BodySchema , * tflint.GetModuleContentOption ) {
390
390
return & hclext.BodySchema {}, & tflint.GetModuleContentOption {
391
- ModuleCtx : tflint .RootModuleCtxType ,
392
- Hint : tflint.GetModuleContentHint {ResourceType : "aws_instance" },
391
+ ModuleCtx : tflint .RootModuleCtxType ,
392
+ IncludeNotCreated : true ,
393
+ Hint : tflint.GetModuleContentHint {ResourceType : "aws_instance" },
393
394
}
394
395
},
395
396
ServerImpl : func (schema * hclext.BodySchema , opts tflint.GetModuleContentOption ) (* hclext.BodyContent , hcl.Diagnostics ) {
@@ -398,6 +399,11 @@ resource "aws_instance" "foo" {
398
399
& hcl.Diagnostic {Severity : hcl .DiagError , Summary : "unexpected moduleCtx options" },
399
400
}
400
401
}
402
+ if ! opts .IncludeNotCreated {
403
+ return & hclext.BodyContent {}, hcl.Diagnostics {
404
+ & hcl.Diagnostic {Severity : hcl .DiagError , Summary : "unexpected includeNotCreatedResources options" },
405
+ }
406
+ }
401
407
if opts .Hint .ResourceType != "aws_instance" {
402
408
return & hclext.BodyContent {}, hcl.Diagnostics {
403
409
& hcl.Diagnostic {Severity : hcl .DiagError , Summary : "unexpected hint options" },
0 commit comments