-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
TF 0.12: template_file still contains unknown values during apply #21455
Comments
Update: this bug appears to be related to the use of conditional logic in the locals {
mysql_config = var.mysql_config == null ? data.terraform_remote_state.db[0].outputs : var.mysql_config
} To this: locals {
mysql_config = var.mysql_config
} Then |
I hit an error that seems to be the same as the issue reported here. |
Also hitting this bug with Terraform 0.12.4 I do not think it is related to #21465 Fails:
Works:
Terraform looks like it does not like looking at module outputs or data source outputs for data source inputs now.... |
This is not fixed in Terraform 0.12.6 |
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. |
Terraform Version
Terraform Configuration Files
The failure happens in a relatively large amount of code. I think the relevant parts are as follows.
I have one module called
mysql
:I have another module called
asg
:The idea is that the
asg
module can get the DB data either via themysql_config
input variable or viaterraform_remote_state
. I'm trying to use these two modules together as follows:In other words, I'm trying to pass all the outputs from the
mysql
module straight to themysql_config
input variable of theasg
module.Expected Behavior
I run
terraform apply
and both MySQL and the ASG come up.Actual Behavior
I run
terraform apply
, MySQL comes up, but when trying to bring up the ASG, I get the following error:As instructed, I'm now reporting the bug!
Steps to Reproduce
terraform init
terraform apply
The text was updated successfully, but these errors were encountered: