title: Select “Storage Blob Data Contributor” role to Azure storage account and assign access to the new app registration created using terraform
body: <p>Select “Storage Blob Data Contributor” role to Azure storage account and  “Assign access to” as “User, group or service principal” to the app created. How to write same using terraform?</p>
  <pre><code> resource azurerm_role_assignment example_role_assignment {
    scope                = azurerm_storage_account.main.id
    role_definition_name = &quot;Storage Blob Data Owner&quot;
    principal_id         = azuread_application.main[0].application_id
  }
  </code></pre>
  <p>What should be pricipal id here? I think it should be app objectId but how to bring that in scope of storage account. not very familiar with terraform</p>