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

depends_on (on a resource) cannot be used in module #18787

Closed
khateeb15 opened this issue Sep 4, 2018 · 2 comments
Closed

depends_on (on a resource) cannot be used in module #18787

khateeb15 opened this issue Sep 4, 2018 · 2 comments

Comments

@khateeb15
Copy link

khateeb15 commented Sep 4, 2018

Terraform Version

v0.11.7

Terraform Configuration Files

resource "aws_alb" "internal_alb" {
.
.
}

module "something" {
  source = "something"
  depends_on = ["aws_alb.internal_alb"]
}

Crash Output

Error: module "something": "depends_on" is not a valid argument

Expected Behavior

As per the documentation and a lot of other similar issues (mostly complaining that a module cannot depends_on a resource created in in another module) in which terraform is saying that a module can depends_on a resource, the expected behaviour is that the resource mentioned in the depends_on will be created before the module.

Actual Behavior

getting an error

References

Additional Context

please note that this is not a duplicate of #18239, #10462 or #10603, those issues are talking about referencing a resource created in another module, while this is just talking about referencing another resource that hasn't been created as part of a module.

@jbardin
Copy link
Member

jbardin commented Sep 4, 2018

hi @khateeb15,

Sorry about any confusion here, as the other issues have often digress onto other tracks, but If I understand you correctly, this really is a duplicate of #10462. The error you see is because depends_on isn't valid in a module block, which is expected because that configuration option isn't supported at this time.

If there is documentation implying that depends_on can be used within the module block, please let us know so that it can be updated in the meantime.

@ghost
Copy link

ghost commented Apr 2, 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 Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants