Skip to content

Display the place were module was called #37702

@EugenKon

Description

@EugenKon

Description

I use my module in many places like:

module "a-aaaa-alb" {
  source = "../a-aaaa-subdomain"
...

module "a-aaaa-base-domain" {
  count  = var.project_name == "essentials" ? 0 : 1
  source = "../a-aaaa-subdomain"
...

module "a-aaaa-portal-domain" {
  source = "../a-aaaa-subdomain"
...

it would be nice to show from which module call these errors came:

 Error: Invalid count argument
│
│   on modules/a-aaaa-subdomain/main.tf line 8, in resource "aws_route53_record" "subdomain_A":
│    8:   count = local.create_alias
│
│ The "count" value depends on resource attributes that cannot be determined until apply, so Terraform
│ cannot predict how many instances will be created. To work around this, use the -target argument to
│ first apply only the resources that the count depends on.
╵
╷
│ Error: Invalid count argument
│
│   on modules/a-aaaa-subdomain/main.tf line 8, in resource "aws_route53_record" "subdomain_A":
│    8:   count = local.create_alias
│
│ The "count" value depends on resource attributes that cannot be determined until apply, so Terraform
│ cannot predict how many instances will be created. To work around this, use the -target argument to
│ first apply only the resources that the count depends on.
╵
╷
│ Error: Invalid count argument
│
│   on modules/a-aaaa-subdomain/main.tf line 8, in resource "aws_route53_record" "subdomain_A":
│    8:   count = local.create_alias
│
│ The "count" value depends on resource attributes that cannot be determined until apply, so Terraform
│ cannot predict how many instances will be created. To work around this, use the -target argument to
│ first apply only the resources that the count depends on.
╵

Error messages are exactly the same for every usage of module.

Affected Resource(s) or Data Source(s)

  • module

Potential Terraform Configuration

References

Moved from here

Would you like to implement the enhancement?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnewnew issue not yet triagedwaiting for reproductionunable to reproduce issue without further information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions