func()

in rules/azurerm_resource_tag.go [69:84]


func (r *AzurermResourceTagRule) visitAzResource(runner tflint.Runner, azBlock *hclsyntax.Block) error {
	resourceSchema, isAzureResource := generated.Resources[azBlock.Labels[0]]
	if !isAzureResource {
		return nil
	}
	_, isTagSupported := resourceSchema.Block.Attributes["tags"]
	_, isTagSet := azBlock.Body.Attributes["tags"]
	if isTagSupported && !isTagSet {
		return runner.EmitIssue(
			r,
			fmt.Sprintf("`tags` argument is not set but supported in resource `%s`", azBlock.Labels[0]),
			azBlock.DefRange(),
		)
	}
	return nil
}