VladRassokhin / intellij-hcl

HCL language support for IntelliJ platform based IDEs
Apache License 2.0
244 stars 47 forks source link

Unresolved Reference: execution_arn from aws_api_gateway_rest_api data #292

Closed ghost closed 4 years ago

ghost commented 4 years ago

Thank you for opening an issue. In this template paragraph text could be removed, however please retain headers.

Prerequisites

Installation details

Terraform Configuration Files

data "aws_api_gateway_rest_api" "api" {
  name = var.api_name
}

data "aws_lambda_function" "lambda" {
  function_name = var.lambda_name
}

resource "aws_lambda_permission" "lambda_permission" {
  statement_id = "AllowInvocationFromAPIGateway"
  action = "lambda:InvokeFunction"
  function_name = data.aws_lambda_function.lambda.function_name
  principal = "apigateway.amazonaws.com"

  source_arn = data.aws_api_gateway_rest_api.api.execution_arn
}

Exception

N/A

Expected Behavior

No warnings/errors manifest.

Actual Behavior

IDE claims "Unresolved reference execution_arn"

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Use an aws_api_gateway_rest_api data element
  2. Reference execution_arn from the aws_api_gateway_rest_api data element in a resource element
  3. Observe error/warning