You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And then run terraform plan --module-depth=1 from the issue.tf file location, I get: Error running plan: Resource 'aws_instance.base' not found for variable 'aws_instance.base.*.private_ip'
The aws_route53_record.base_internal_dns resource refers to the aws_instance.base on the records line.
However, if I run from inside of the module at the base/ directory, I runs correctly.
If I change that line to just records = ["${aws_instance.base.*.private_ip}"], it gets the error.
If it's changed to records = ["${aws_instance.base.0.private_ip}"], it does plan, even though it's going to just use the first instance's information.
Any ideas? Thanks.
The text was updated successfully, but these errors were encountered:
As I commented on #408, however, I think the problem is more specific to using a module that refers to internal resources with a splat variable.
If I have a
base/main.tf
file withAnd another configuration that uses it as a module like:
issue.tf
:And then run
terraform plan --module-depth=1
from theissue.tf
file location, I get:Error running plan: Resource 'aws_instance.base' not found for variable 'aws_instance.base.*.private_ip'
The
aws_route53_record.base_internal_dns
resource refers to theaws_instance.base
on the records line.However, if I run from inside of the module at the
base/
directory, I runs correctly.If I change that line to just
records = ["${aws_instance.base.*.private_ip}"]
, it gets the error.If it's changed to
records = ["${aws_instance.base.0.private_ip}"]
, it does plan, even though it's going to just use the first instance's information.Any ideas? Thanks.
The text was updated successfully, but these errors were encountered: