mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-26 00:41:27 -06:00
terraform: update comment
This commit is contained in:
parent
e5f07567c6
commit
ef60ac5b8c
@ -1623,6 +1623,12 @@ func (c *walkContext) computeModuleVariable(
|
||||
// Get that module from our state
|
||||
mod := c.Context.state.ModuleByPath(path)
|
||||
if mod == nil {
|
||||
// If the module doesn't exist, then we can return an empty string.
|
||||
// This happens usually only in Refresh() when we haven't populated
|
||||
// a state. During validation, we semantically verify that all
|
||||
// modules reference other modules, and graph ordering should
|
||||
// ensure that the module is in the state, so if we reach this
|
||||
// point otherwise it really is a panic.
|
||||
return "", nil
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
variable "value" {}
|
||||
|
||||
resource "aws_instance" "bar" {}
|
@ -0,0 +1,7 @@
|
||||
output "output" {
|
||||
value = "${aws_instance.foo.foo}"
|
||||
}
|
||||
|
||||
resource "aws_instance" "foo" {
|
||||
compute = "foo"
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
module "foo" {
|
||||
source = "./foo"
|
||||
}
|
||||
|
||||
module "bar" {
|
||||
source = "./bar"
|
||||
value = "${module.foo.output}"
|
||||
}
|
Loading…
Reference in New Issue
Block a user