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
In the real setup, I have a data.template_file injecting ARNs and then this python renderer transforming a DSL into a full Swagger spec. However, I was able to condense it down to just the lambda ARN going directly into the external provider.
data"external""swagger_renderer" {
program=["python3", "${path.module}/data/swagger_renderer.py"]
query={
# computed value on not yet created resource
template_input ="${aws_lambda_function.api_handler.invoke_arn}"
}
}
Based on this core PR (hashicorp/terraform#10670), I tried adding depends_on to defer evaluation until after the lambda function was created, but it didn't seem to change anything.
Actual Behavior
It sees there is no output variable, but the external script is not run. I verified this with file-based logging side effects. aws_api_gateway_rest_api.api: Resource 'data.external.swagger_renderer' does not have attribute 'result.rendered' for variable 'data.external.swagger_renderer.result.rendered'
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
Put anything the template depends on in a separate module and use outputs/variables to move the data between modules. The external provider works fine with simple variables.
The text was updated successfully, but these errors were encountered:
This is actually working as intended per the nice summary in hashicorp/terraform#17034. The problem is the reading of the outputs as stated in #4. At first I didn't realize it applied since when all the inputs were variables it worked.
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
Affected Resource(s)
Terraform Configuration Files
In the real setup, I have a
data.template_file
injecting ARNs and then this python renderer transforming a DSL into a full Swagger spec. However, I was able to condense it down to just the lambda ARN going directly into the external provider.Working
Failing
Debug Output
https://gist.github.com/danieladams456/76cb77fc649bc1dc40746889d8b14bf2
Expected Behavior
Plan should either:
Based on this core PR (hashicorp/terraform#10670), I tried adding depends_on to defer evaluation until after the lambda function was created, but it didn't seem to change anything.
Actual Behavior
It sees there is no output variable, but the external script is not run. I verified this with file-based logging side effects.
aws_api_gateway_rest_api.api: Resource 'data.external.swagger_renderer' does not have attribute 'result.rendered' for variable 'data.external.swagger_renderer.result.rendered'
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform plan
References
hashicorp/terraform#10670
Workaround
Put anything the template depends on in a separate module and use outputs/variables to move the data between modules. The external provider works fine with simple variables.
The text was updated successfully, but these errors were encountered: