Skip to content

Commit

Permalink
Add .md file to docs folder for new rule: azurerm_storage_account_inv…
Browse files Browse the repository at this point in the history
…alid_name
  • Loading branch information
aka-msft committed Aug 25, 2020
1 parent dd9e3ac commit db1ebfc
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/rules/azurerm_storage_account_invalid_name.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# azurerm_storage_account_invalid_name

Warns about values that appear to be invalid based on [azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs).

In this rule, the string must match the regular expression `^[a-z0-9]{3,24}$``.

## Example

```hcl
resource "azurerm_storage_account" "foo" {
name = ... // invalid value
}
```

```
$ tflint
1 issue(s) found:
Error: "..." does not match valid pattern ^[a-z0-9]{3,24}$ (azurerm_storage_account_invalid_name)
on template.tf line 15:
15: name = ... // invalid value
Reference: https://github.com/terraform-linters/tflint-ruleset-azurerm/blob/v0.4.0/docs/rules/azurerm_storage_account_invalid_name.md
```

## Why

Requests containing invalid values will return an error when calling the API by `terraform apply`.

## How to Fix

Replace the warned value with a valid value.

## Source

https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftstorage

0 comments on commit db1ebfc

Please sign in to comment.