-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Terraform syntax warnings do not check data source or output blocks #25828
Copy link
Copy link
Closed
Labels
bugexplaineda Terraform Core team member has described the root cause of this issue in codea Terraform Core team member has described the root cause of this issue in code
Description
The terraform init and terraform validate commands output syntax warnings for deprecated interpolation syntax for resources, but do not return warnings when the deprecated interpolation is on data source or output blocks.
Terraform Version
This error occurs in both 0.12 and 0.13
$ terraform version
Terraform v0.12.29
+ provider.aws v3.1.0$ terraform version
Terraform v0.13.0
+ provider registry.terraform.io/hashicorp/aws v3.1.0Terraform Configuration Files
variable "api_gateway_name" {
type = string
}
data "aws_api_gateway_rest_api" "selected" {
name = "${var.api_gateway_name}"
}
data "aws_cognito_user_pools" "selected" {
name = "selected"
}
resource "aws_api_gateway_authorizer" "cognito" {
name = "cognito"
type = "COGNITO_USER_POOLS"
rest_api_id = "${data.aws_api_gateway_rest_api.selected.id}"
provider_arns = data.aws_cognito_user_pools.selected.arns
}
output "api_id" {
value = "${aws_api_gateway_authorizer.cognito.rest_api_id}"
}Expected Behavior
The warning
Warning: Interpolation-only expressions are deprecated
should be generated for
- data source
aws_api_gateway_rest_api.selectedname - resource
aws_api_gateway_authorizer.cognitorest_api_id - output
api_idvalue
Actual Behavior
The warning
Warning: Interpolation-only expressions are deprecated
is only generated for
- resource
aws_api_gateway_authorizer.cognitorest_api_id
Steps to Reproduce
terraform init- (Optionally)
terraform validate
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugexplaineda Terraform Core team member has described the root cause of this issue in codea Terraform Core team member has described the root cause of this issue in code