mirror of https://github.com/hashicorp/terraform
Merge pull request #33193 from hashicorp/radditude/no-import-blocks-in-child-modules
plannable import: disallow import blocks in child moduleskmoe/genconfig-timeouts
commit
adcecddb4f
@ -0,0 +1,6 @@
|
||||
resource "aws_instance" "web" {}
|
||||
|
||||
import {
|
||||
to = aws_instance.web
|
||||
id = "test"
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
import-in-child-module/child/main.tf:3,1-7: Invalid import configuration; An import block was detected in "module.child". Import blocks are only allowed in the root module.
|
||||
@ -0,0 +1,10 @@
|
||||
resource "aws_instance" "web" {}
|
||||
|
||||
import {
|
||||
to = aws_instance.web
|
||||
id = "test"
|
||||
}
|
||||
|
||||
module "child" {
|
||||
source = "./child"
|
||||
}
|
||||
Loading…
Reference in new issue