
== How to fix it in Storage Accounts

=== Code examples

==== Noncompliant code example

On Storage Accounts, TLS 1.0 and 1.1 are accepted by default.

[source,json,diff-id=2,diff-type=noncompliant]
----
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "resources": [
    {
      "type": "Microsoft.Storage/storageAccounts",
      "apiVersion": "2022-09-01",
      "name": "example",
      "properties": {
        "minimumTlsVersion": "TLS1_0"
      }
    }
  ]
}
----

[source,bicep,diff-id=4,diff-type=noncompliant]
----
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
  name: 'example'
  properties: {
    minimumTlsVersion: 'TLS1_0'
  }
}
----

==== Compliant solution

[source,json,diff-id=2,diff-type=compliant]
----
{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "resources": [
    {
      "type": "Microsoft.Storage/storageAccounts",
      "apiVersion": "2022-09-01",
      "name": "example",
      "properties": {
        "minimumTlsVersion": "TLS1_2"
      }
    }
  ]
}
----

[source,bicep,diff-id=4,diff-type=compliant]
----
resource storageAccount 'Microsoft.Storage/storageAccounts@2022-09-01' = {
  name: 'example'
  properties: {
    minimumTlsVersion: 'TLS1_2'
  }
}
----

=== How does this work?

include::../../common/fix/fix.adoc[]

