Skip to content

Commit

Permalink
Accept 8.0 as a correct version on MySQL server (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
wata727 committed Jun 18, 2022
1 parent aff11ff commit 4e265a2
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 53 deletions.
3 changes: 1 addition & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This documentation describes a list of rules available by enabling this ruleset.

## API Specification Rules

These are the rules that warn against invalid values generated from [azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs). Currently, 231 rules are available.
These are the rules that warn against invalid values generated from [azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs). Currently, 230 rules are available.

|Rule|Enabled by default|
| --- | --- |
Expand Down Expand Up @@ -178,7 +178,6 @@ These are the rules that warn against invalid values generated from [azure-rest-
|[azurerm_mssql_virtual_machine_invalid_sql_license_type](rules/azurerm_mssql_virtual_machine_invalid_sql_license_type.md)||
|[azurerm_mysql_firewall_rule_invalid_end_ip_address](rules/azurerm_mysql_firewall_rule_invalid_end_ip_address.md)||
|[azurerm_mysql_firewall_rule_invalid_start_ip_address](rules/azurerm_mysql_firewall_rule_invalid_start_ip_address.md)||
|[azurerm_mysql_server_invalid_version](rules/azurerm_mysql_server_invalid_version.md)||
|[azurerm_nat_gateway_invalid_sku_name](rules/azurerm_nat_gateway_invalid_sku_name.md)||
|[azurerm_netapp_account_invalid_resource_group_name](rules/azurerm_netapp_account_invalid_resource_group_name.md)||
|[azurerm_netapp_pool_invalid_name](rules/azurerm_netapp_pool_invalid_name.md)||
Expand Down
44 changes: 0 additions & 44 deletions docs/rules/azurerm_mysql_server_invalid_version.md

This file was deleted.

1 change: 0 additions & 1 deletion rules/apispec/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ var Rules = []tflint.Rule{
NewAzurermMssqlVirtualMachineInvalidSQLLicenseTypeRule(),
NewAzurermMysqlFirewallRuleInvalidEndIPAddressRule(),
NewAzurermMysqlFirewallRuleInvalidStartIPAddressRule(),
NewAzurermMysqlServerInvalidVersionRule(),
NewAzurermNatGatewayInvalidSkuNameRule(),
NewAzurermNetappAccountInvalidResourceGroupNameRule(),
NewAzurermNetappPoolInvalidNameRule(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// This file generated by `tools/apispec-rule-gen/main.go`. DO NOT EDIT

package apispec
package rules

import (
"fmt"
Expand All @@ -26,7 +24,7 @@ func NewAzurermMysqlServerInvalidVersionRule() *AzurermMysqlServerInvalidVersion
attributeName: "version",
enum: []string{
"5.7",
"8.0.21",
"8.0",
},
}
}
Expand Down Expand Up @@ -80,7 +78,7 @@ func (r *AzurermMysqlServerInvalidVersionRule) Check(runner tflint.Runner) error
if !found {
runner.EmitIssue(
r,
fmt.Sprintf(`"%s" is an invalid value as version`, truncateLongMessage(val)),
fmt.Sprintf(`"%s" is an invalid value as version`, val),
attribute.Expr.Range(),
)
}
Expand Down
1 change: 1 addition & 0 deletions rules/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ var Rules = append([]tflint.Rule{
NewAzurermVirtualMachineInvalidVMSizeRule(),
NewAzurermWindowsVirtualMachineInvalidSizeRule(),
NewAzurermWindowsVirtualMachineScaleSetInvalidSkuRule(),
NewAzurermMysqlServerInvalidVersionRule(),
}, apispec.Rules...)
2 changes: 1 addition & 1 deletion tools/apispec-rule-gen/mappings/azurerm_mysql_server.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ mapping "azurerm_mysql_server" {
sku_name = Sku.name
administrator_login = ServerProperties.administratorLogin
administrator_login_password = ServerProperties.administratorLoginPassword
version = ServerVersion
version = any //ServerVersion
ssl_enforcement = any //SslEnforcement
}

0 comments on commit 4e265a2

Please sign in to comment.