Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Referencing module outputs that don't exist doesn't raise an error #1448

Closed
bitglue opened this issue Apr 9, 2015 · 3 comments · Fixed by #1744
Closed

Referencing module outputs that don't exist doesn't raise an error #1448

bitglue opened this issue Apr 9, 2015 · 3 comments · Fixed by #1744
Assignees

Comments

@bitglue
Copy link

bitglue commented Apr 9, 2015

Say I have a module a with no outputs, and another module b which requires a variable foo. Then this configuration:

module "a" {
    source = "a"
    # this module has no outputs
}

module "b" {
    source = "b"
    foo = "${module.a.this_output_does_not_exist}"
}

seems to run just fine. Of course ${module.a.this_output_does_not_exist} is undefined, so there's no way this could do anything useful, and it should raise an error.

bitglue pushed a commit to bitglue/terraform-1448 that referenced this issue Apr 9, 2015
@justincampbell
Copy link
Contributor

This bug I ran into seems similar https://gist.github.com/justincampbell/2a32edb75cc2ae16d0d5

@mitchellh
Copy link
Contributor

Fixed in #1744. Looks like we were validating this, but just not in the specific case that outputs were used as an input to modules. Test added in PR and fix.

mitchellh added a commit that referenced this issue Apr 30, 2015
config: add module raw configs to InterpolatedConfigs [GH-1448]
catsby added a commit that referenced this issue May 1, 2015
…oup-remove-default-egress

* upstream/master: (24 commits)
  helper/resource: fix accidentaly swallowing of acctest step errors
  Update CHANGELOG.md
  providers/aws: Implements DHCP Options Set support.
  update CHANGELOG
  update CHANGELOG
  Update CHANGELOG.md
  Update CHANGELOG.md
  Update CHANGELOG.md
  core: fix targeting with non-word chars
  update CHANGELOG
  update CHANGELOG
  docs: Fix styling in provider code block
  provider/openstack: enable_dhcp should be bool [GH-1741]
  config: add module raw configs to InterpolatedConfigs [GH-1448]
  terraform: EvalDeleteOutput and context test
  terraform: add output orphan transformer
  providers/aws: add source_security_group to elb
  core: graph command gets -verbose and -draw-cycles
  core: fix targeting in destroy w/ provisioners
  core: validate on verbose graph to detect some cycles earlier
  ...
@ghost
Copy link

ghost commented May 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants