terraform-linters / tflint-ruleset-azurerm

TFLint ruleset for terraform-provider-azurerm
Mozilla Public License 2.0
117 stars 24 forks source link

wrong eventgrid schema validation #28

Closed johejo closed 4 years ago

johejo commented 4 years ago

Values that are correct in azure-api-spec are output with an error. CloudEventSchemaV1_0 is supposed to be correct value. https://github.com/Azure/azure-rest-api-specs/blob/e917ed8c8c5d5b3d1c3f844f17788e6192122cb1/specification/eventgrid/resource-manager/Microsoft.EventGrid/stable/2020-06-01/EventGrid.json#L3281

But tflint output is

Error: "CloudEventSchemaV1_0" is an invalid value as event_delivery_schema (azurerm_eventgrid_event_subscription_invalid_event_delivery_schema)

  on main.tf line 415:
 415:   event_delivery_schema = "CloudEventSchemaV1_0"

Reference: https://github.com/terraform-linters/tflint-ruleset-azurerm/blob/v0.2.0/docs/rules/azurerm_eventgrid_event_subscription_invalid_event_delivery_schema.md

my tflint version

$ tflint --version
TFLint version 0.17.0
+ ruleset.azurerm (0.2.0)
wata727 commented 4 years ago

@johejo Thank you for opening the issue.

The current rule refers to this definition: https://github.com/Azure/azure-rest-api-specs/blob/e917ed8c8c5d5b3d1c3f844f17788e6192122cb1/specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2019-02-01-preview/EventGrid.json#L2686-L2698

So, it seems that this can be improved by updating the API version to the latest version.

Since this project has just begun, we really want the voices of Azure users. Please let me know if you have any problems. Thanks again!